net.sf.extjwnl.data
Class Pointer

java.lang.Object
  extended by net.sf.extjwnl.data.Pointer
All Implemented Interfaces:
Serializable

public class Pointer
extends Object
implements Serializable

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.

Author:
John Didion , Aliaksandr Autayeu
See Also:
Serialized Form

Constructor Summary
Pointer(PointerTarget source, PointerType pointerType, POS targetPOS, long targetOffset, int targetIndex)
           
Pointer(PointerType pointerType, PointerTarget source, PointerTarget target)
           
 
Method Summary
 boolean equals(Object o)
           
 PointerTarget getSource()
          Returns the source of this pointer.
 int getSourceIndex()
           
 PointerTarget getTarget()
          Returns the actual target of this pointer.
 int getTargetIndex()
           
 long getTargetOffset()
          Returns the offset of the target synset.
 POS getTargetPOS()
           
 Synset getTargetSynset()
          Returns the synset that is a) the target of this pointer, or b) the synset that contains the target of this pointer.
 PointerType getType()
           
 int hashCode()
           
 boolean isLexical()
          Returns whether this pointer's source is a Word.
 void setTarget(PointerTarget target)
          Sets the actual target of this pointer.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pointer

public Pointer(PointerTarget source,
               PointerType pointerType,
               POS targetPOS,
               long targetOffset,
               int targetIndex)

Pointer

public Pointer(PointerType pointerType,
               PointerTarget source,
               PointerTarget target)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getSourceIndex

public int getSourceIndex()

getType

public PointerType getType()

isLexical

public boolean isLexical()
Returns whether this pointer's source is a Word.

Returns:
true if this pointer's source is a Word

getSource

public PointerTarget getSource()
Returns the source of this pointer.

Returns:
source of this pointer

getTarget

public PointerTarget getTarget()
Returns the actual target of this pointer.

Returns:
actual target of this pointer

setTarget

public void setTarget(PointerTarget target)
Sets the actual target of this pointer.

Parameters:
target - actual target of this pointer

getTargetSynset

public Synset getTargetSynset()
Returns the synset that is a) the target of this pointer, or b) the synset that contains the target of this pointer.

Returns:
the synset that is a) the target of this pointer, or b) the synset that contains the target of this pointer.

getTargetOffset

public long getTargetOffset()
Returns the offset of the target synset.

Returns:
offset of the target synset

getTargetIndex

public int getTargetIndex()

getTargetPOS

public POS getTargetPOS()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2011. All Rights Reserved.