Package net.didion.jwnl.data
Class SynsetProxy
java.lang.Object
net.didion.jwnl.data.PointerTarget
net.didion.jwnl.data.Synset
net.didion.jwnl.data.SynsetProxy
- All Implemented Interfaces:
Serializable
,DictionaryElement
Proxy for a
Synset
. This class wraps a Synset
that may be null at
the time of creation. When this Synset
is initialized (set), all
method calls are forwarded to it.- See Also:
-
Field Summary
FieldsFields inherited from class net.didion.jwnl.data.Synset
_gloss, _isAdjectiveCluster, _offset, _pointers, _pos, _verbFrameFlags, _words, lexFileName, lexFileNum
-
Constructor Summary
ConstructorsConstructorDescriptionSynsetProxy
(POS pos) The only value that matters is pos, since the call to getPOS is not forwarded to _source -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsWord
(String lemma) Returns true iflemma
is one of the words contained in this synset.boolean
Two Synsets are equal if their POS's and offsets are equalgetGloss()
getKey()
Get a key that can be used to index this element.Gets the lex file name.long
Gets the lexicographer file name containing this synset.long
Pointer[]
Return a list of Target's pointersPointer[]
getPointers
(PointerType type) Get all pointers of typetype
.protected Synset
Get all the pointer targets of this synsetgetTargets
(PointerType type) Get all the targets of the pointers of typetype
.int[]
String[]
Returns all Verb Frames that are valid for all the words in this synsetgetWord
(int index) Word[]
getWords()
int
hashCode()
boolean
void
setLexFileNum
(long lexFileId) Sets the lexicographer file name containing this synset.void
toString()
Methods inherited from class net.didion.jwnl.data.Synset
getPOS, getSenseKey, getType, getWordsSize
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
_source
-
-
Constructor Details
-
SynsetProxy
The only value that matters is pos, since the call to getPOS is not forwarded to _source
-
-
Method Details
-
getPointers
Description copied from class:PointerTarget
Get all pointers of typetype
.- Overrides:
getPointers
in classPointerTarget
-
equals
Description copied from class:Synset
Two Synsets are equal if their POS's and offsets are equal -
getTargets
Description copied from class:PointerTarget
Get all the pointer targets of this synset- Overrides:
getTargets
in classPointerTarget
- Throws:
JWNLException
-
hashCode
public int hashCode() -
getTargets
Description copied from class:PointerTarget
Get all the targets of the pointers of typetype
.- Overrides:
getTargets
in classPointerTarget
- Throws:
JWNLException
-
toString
-
getPointers
Description copied from class:PointerTarget
Return a list of Target's pointers- Overrides:
getPointers
in classSynset
-
getGloss
-
getWords
-
getWord
-
getOffset
public long getOffset() -
getKey
Description copied from interface:DictionaryElement
Get a key that can be used to index this element.- Specified by:
getKey
in interfaceDictionaryElement
- Overrides:
getKey
in classSynset
-
getVerbFrames
Description copied from class:Synset
Returns all Verb Frames that are valid for all the words in this synset- Overrides:
getVerbFrames
in classSynset
-
getVerbFrameFlags
- Overrides:
getVerbFrameFlags
in classSynset
-
getVerbFrameIndicies
public int[] getVerbFrameIndicies()- Overrides:
getVerbFrameIndicies
in classSynset
-
containsWord
Description copied from class:Synset
Returns true iflemma
is one of the words contained in this synset.- Overrides:
containsWord
in classSynset
-
getLexFileName
Description copied from class:Synset
Gets the lex file name.- Overrides:
getLexFileName
in classSynset
- Returns:
-
getLexFileNum
public long getLexFileNum()Description copied from class:Synset
Gets the lexicographer file name containing this synset.- Overrides:
getLexFileNum
in classSynset
- Returns:
- two digit decimal integer
-
setLexFileNum
public void setLexFileNum(long lexFileId) Description copied from class:Synset
Sets the lexicographer file name containing this synset.- Overrides:
setLexFileNum
in classSynset
- Parameters:
lexFileId
- - the lexicographer file name id
-
getSource
-
setSource
-
isAdjectiveCluster
public boolean isAdjectiveCluster()- Overrides:
isAdjectiveCluster
in classSynset
-