inpro.irmrsc.rmrs
Class Relation
java.lang.Object
inpro.irmrsc.rmrs.Relation
- All Implemented Interfaces:
- VariableIDsInterpretable
public class Relation
- extends java.lang.Object
- implements VariableIDsInterpretable
A relation in a RMRS Formula
.
All relations have an anchor variable, as well as a relation name and a
type. Lexical relations (representing lexemes) and nonlexical relations
(introduced by the grammar) also have a label and usually have an argument.
Argument relations (expressing predicate argument structure) have no label
but always an argument.
- Author:
- Andreas Peldszus
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
mLabel
private int mLabel
mAnchor
private int mAnchor
mArgument
private int mArgument
mName
private java.lang.String mName
mType
private Relation.Type mType
mArgumentGiven
private boolean mArgumentGiven
Relation
public Relation(int Label,
int Anchor,
int Argument,
java.lang.String Name,
Relation.Type Type)
Relation
public Relation(int Label,
int Anchor,
java.lang.String Name,
Relation.Type Type)
Relation
public Relation(Relation r)
Relation
public Relation()
- default constructor, only used for xml loading
getLabel
public int getLabel()
getAnchor
public int getAnchor()
hasArgument
public boolean hasArgument()
getArgument
public int getArgument()
getName
public java.lang.String getName()
getType
public Relation.Type getType()
isAbout
public boolean isAbout(int variableID)
isAnchoredAs
public boolean isAnchoredAs(int variableID)
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 relation object from XML element variable definition
<rel>
- Parameters:
e
- the element