inpro.irmrsc.rmrs
Class Hook

java.lang.Object
  extended by inpro.irmrsc.rmrs.Hook
All Implemented Interfaces:
VariableIDsInterpretable

public class Hook
extends java.lang.Object
implements VariableIDsInterpretable

A hook, i.e. the main logical index, of a RMRS Formula consisting of a label, an anchor and an index-variable.

Author:
Andreas Peldszus

Field Summary
private  int mAnchor
           
private  int mIndex
           
private  int mLabel
           
 
Constructor Summary
Hook()
          default constructor, only used for xml loading
Hook(Hook h)
           
Hook(int Label, int Anchor, int Index)
           
 
Method Summary
 int getAnchor()
           
 int getIndex()
           
 int getLabel()
           
 java.util.Set<java.lang.Integer> getVariableIDs()
           
 void parseXML(org.jdom.Element e)
          initializes this hook object from XML element variable definition <hook>
 void replaceVariableID(int oldID, int newID)
          replace all variables IDs matching a specifid old ID with a new ID
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mLabel

private int mLabel

mAnchor

private int mAnchor

mIndex

private int mIndex
Constructor Detail

Hook

public Hook(int Label,
            int Anchor,
            int Index)

Hook

public Hook(Hook h)

Hook

public Hook()
default constructor, only used for xml loading

Method Detail

getLabel

public int getLabel()

getAnchor

public int getAnchor()

getIndex

public int getIndex()

getVariableIDs

public java.util.Set<java.lang.Integer> getVariableIDs()
Specified by:
getVariableIDs in interface VariableIDsInterpretable
Returns:
the set of IDs of all variables in that expression

replaceVariableID

public void replaceVariableID(int oldID,
                              int newID)
Description copied from interface: VariableIDsInterpretable
replace all variables IDs matching a specifid old ID with a new ID

Specified by:
replaceVariableID in interface VariableIDsInterpretable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

parseXML

public void parseXML(org.jdom.Element e)
initializes this hook object from XML element variable definition <hook>

Parameters:
e - the element