public abstract class Relationship
extends java.lang.Object
Relationship
encapsulates the relationship between two synsets. Basically, it is a list of
synsets/words that one must traverse to get from the source synset to the target synset of the
relationship, for some relationship type.
There are two types of relationships - Symmetric
and Asymmetric
.
Modifier | Constructor and Description |
---|---|
protected |
Relationship(PointerType type,
PointerTargetNodeList nodes,
Synset sourceSynset,
Synset targetSynset) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Two relationships are assumed equal if they have the same source synset, target synset, and type.
|
int |
getDepth()
Returns the depth of this relationship.
|
PointerTargetNodeList |
getNodeList()
Returns the list that contains the nodes of this relationship.
|
int |
getSize() |
PointerTarget |
getSourcePointerTarget()
Returns the pointer target of the source node.
|
Synset |
getSourceSynset()
Returns the synset that is the source of this relationship.
|
PointerTarget |
getTargetPointerTarget()
Returns the pointer target of the target node.
|
Synset |
getTargetSynset()
Returns the synset that is the target of this relationship.
|
PointerType |
getType() |
int |
hashCode() |
abstract Relationship |
reverse() |
java.lang.String |
toString() |
protected Relationship(PointerType type, PointerTargetNodeList nodes, Synset sourceSynset, Synset targetSynset)
public abstract Relationship reverse() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public PointerTargetNodeList getNodeList()
public PointerTarget getSourcePointerTarget()
public PointerTarget getTargetPointerTarget()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public PointerType getType()
public Synset getSourceSynset()
public Synset getTargetSynset()
public int getSize()
public int getDepth()