org.eclipse.actf.visualization.engines.blind.html.util
Class Id2LineViaActfId

java.lang.Object
  extended by org.eclipse.actf.visualization.engines.blind.html.util.Id2LineViaActfId

public class Id2LineViaActfId
extends Object

Utility class for mapping information between HTML IDs and line number of source HTML. This class uses ACTF_ID to create the mapping information.


Constructor Summary
Id2LineViaActfId(Map<Integer,Integer> id2AccId, Vector<Html2ViewMapData> html2ViewMapDataV)
          Constructor of the class.
Id2LineViaActfId(Map<Integer,Integer> id2AccId, Vector<Html2ViewMapData> html2ViewMapDataV, boolean is1base)
          Constructor of the class.
 
Method Summary
 int getLine(int nodeId)
          Get corresponding line number from ID
 Html2ViewMapData getViewMapData(int nodeId)
          Get corresponding Html2ViewMapData of target ID
 Html2ViewMapData getViewMapData(Integer nodeId)
          Get corresponding Html2ViewMapData of target ID
 boolean is1base()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Id2LineViaActfId

public Id2LineViaActfId(Map<Integer,Integer> id2AccId,
                        Vector<Html2ViewMapData> html2ViewMapDataV)
Constructor of the class.

Parameters:
id2AccId - mapping information between ID and ACTF_ID
html2ViewMapDataV - mapping information between ACTF_ID and line number. ACTF_ID is used as index of Vector.

Id2LineViaActfId

public Id2LineViaActfId(Map<Integer,Integer> id2AccId,
                        Vector<Html2ViewMapData> html2ViewMapDataV,
                        boolean is1base)
Constructor of the class.

Parameters:
id2AccId - mapping information between ID and ACTF_ID
html2ViewMapDataV - mapping information between ACTF_ID and line number. ACTF_ID is used as index of Vector.
is1base - true if line number starts from 1
false if line number starts from 0
Method Detail

getLine

public int getLine(int nodeId)
Get corresponding line number from ID

Parameters:
nodeId - target ID
Returns:
line number

getViewMapData

public Html2ViewMapData getViewMapData(int nodeId)
Get corresponding Html2ViewMapData of target ID

Parameters:
nodeId - target ID
Returns:
corresponding Html2ViewMapData

getViewMapData

public Html2ViewMapData getViewMapData(Integer nodeId)
Get corresponding Html2ViewMapData of target ID

Parameters:
nodeId - target ID
Returns:
corresponding Html2ViewMapData

is1base

public boolean is1base()
Returns:
true if line number starts from 1