Package net.didion.jwnl.data
Class Pointer
- java.lang.Object
-
- net.didion.jwnl.data.Pointer
-
- All Implemented Interfaces:
Serializable
public class Pointer extends Object implements Serializable
APointerencodes a lexical or semantic relationship between WordNet entities. A lexical relationship holds between Words; a semantic relationship holds between Synsets. Relationships aredirectional : the two roles of a relationship are thesource andtarget . Relationships aretyped : the type of a relationship is aPointerType, and can be retrieved viagetType.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Pointer(PointerTarget source, int index, PointerType pointerType, POS targetPOS, long targetOffset, int targetIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)PointerTargetgetSource()Get the source of this pointer.intgetSourceIndex()PointerTargetgetTarget()Get the actual target of this pointer.intgetTargetIndex()longgetTargetOffset()Get the offset of the target within the target synset.POSgetTargetPOS()SynsetgetTargetSynset()Get the synset that is a) the target of this pointer, or b) the * synset that contains the target of this pointer.PointerTypegetType()inthashCode()booleanisLexical()True if this pointer's source is a WordStringtoString()
-
-
-
Constructor Detail
-
Pointer
public Pointer(PointerTarget source, int index, PointerType pointerType, POS targetPOS, long targetOffset, int targetIndex)
-
-
Method Detail
-
getSourceIndex
public int getSourceIndex()
-
getType
public PointerType getType()
-
isLexical
public boolean isLexical()
True if this pointer's source is a Word
-
getSource
public PointerTarget getSource()
Get the source of this pointer.
-
getTarget
public PointerTarget getTarget() throws JWNLException
Get the actual target of this pointer.- Throws:
JWNLException
-
getTargetSynset
public Synset getTargetSynset() throws JWNLException
Get the synset that is a) the target of this pointer, or b) the * synset that contains the target of this pointer.- Throws:
JWNLException
-
getTargetOffset
public long getTargetOffset()
Get the offset of the target within the target synset. If the offset is * 0, then this pointer applies to all words in the target.
-
getTargetIndex
public int getTargetIndex()
-
getTargetPOS
public POS getTargetPOS()
-
-