edu.gwu.wordnet
Class Pointer
java.lang.Object
edu.gwu.wordnet.Pointer
- public class Pointer
- extends java.lang.Object
A Pointer encodes a lexical or semantic relationship between WordNet entities. A lexical
relationship holds between Words; a semantic relationship holds between Synsets. Relationships
are directional: the two roles of a relationship are the source and target.
Relationships are typed: the type of a relationship is a PointerType
, and can
be retrieved via getType
.
Nested Class Summary |
protected class |
Pointer.TargetIndex
This class is used to avoid paging in the target before it is required, and to prevent
keeping a large portion of the database resident once the target has been queried. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
dictionary
protected FileBackedDictionary dictionary
synset
protected Synset synset
index
protected int index
- The index of this Pointer within the array of Pointer's in the source Synset.
Used by
equal
.
pointerType
protected PointerType pointerType
source
protected PointerTarget source
targetIndex
protected Pointer.TargetIndex targetIndex
- An index that can be used to retrieve the target. The first time this is used, it acts as
an external key; subsequent uses, in conjunction with FileBackedDictionary's caching mechanism,
can be thought of as a weak reference.
equals
public boolean equals(java.lang.Object object)
hashCode
public int hashCode()
toString
public java.lang.String toString()
getType
public PointerType getType()
isLexical
public boolean isLexical()
resolveTarget
protected PointerTarget resolveTarget(Synset synset,
int index)
getSource
public PointerTarget getSource()
getTarget
public PointerTarget getTarget()