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:
java.io.Serializable
,DictionaryElement
public class SynsetProxy extends Synset
Proxy for aSynset
. This class wraps aSynset
that may be null at the time of creation. When thisSynset
is initialized (set), all method calls are forwarded to it.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Synset
_source
(package private) static long
serialVersionUID
-
Fields inherited from class net.didion.jwnl.data.Synset
_gloss, _isAdjectiveCluster, _offset, _pointers, _pos, _verbFrameFlags, _words, lexFileName, lexFileNum
-
-
Constructor Summary
Constructors Constructor Description SynsetProxy(POS pos)
The only value that matters is pos, since the call to getPOS is not forwarded to _source
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsWord(java.lang.String lemma)
Returns true iflemma
is one of the words contained in this synset.boolean
equals(java.lang.Object object)
Two Synsets are equal if their POS's and offsets are equaljava.lang.String
getGloss()
java.lang.Object
getKey()
Get a key that can be used to index this element.java.lang.String
getLexFileName()
Gets the lex file name.long
getLexFileNum()
Gets the lexicographer file name containing this synset.long
getOffset()
Pointer[]
getPointers()
Return a list of Target's pointersPointer[]
getPointers(PointerType type)
Get all pointers of typetype
.protected Synset
getSource()
PointerTarget[]
getTargets()
Get all the pointer targets of this synsetPointerTarget[]
getTargets(PointerType type)
Get all the targets of the pointers of typetype
.java.util.BitSet
getVerbFrameFlags()
int[]
getVerbFrameIndicies()
java.lang.String[]
getVerbFrames()
Returns all Verb Frames that are valid for all the words in this synsetWord
getWord(int index)
Word[]
getWords()
int
hashCode()
boolean
isAdjectiveCluster()
void
setLexFileNum(long lexFileId)
Sets the lexicographer file name containing this synset.void
setSource(Synset source)
java.lang.String
toString()
-
Methods inherited from class net.didion.jwnl.data.Synset
getPOS, getSenseKey, getType, getWordsSize
-
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
_source
private Synset _source
-
-
Constructor Detail
-
SynsetProxy
public SynsetProxy(POS pos)
The only value that matters is pos, since the call to getPOS is not forwarded to _source
-
-
Method Detail
-
getPointers
public Pointer[] getPointers(PointerType type)
Description copied from class:PointerTarget
Get all pointers of typetype
.- Overrides:
getPointers
in classPointerTarget
-
equals
public boolean equals(java.lang.Object object)
Description copied from class:Synset
Two Synsets are equal if their POS's and offsets are equal
-
getTargets
public PointerTarget[] getTargets() throws JWNLException
Description copied from class:PointerTarget
Get all the pointer targets of this synset- Overrides:
getTargets
in classPointerTarget
- Throws:
JWNLException
-
getTargets
public PointerTarget[] getTargets(PointerType type) throws JWNLException
Description copied from class:PointerTarget
Get all the targets of the pointers of typetype
.- Overrides:
getTargets
in classPointerTarget
- Throws:
JWNLException
-
getPointers
public Pointer[] getPointers()
Description copied from class:PointerTarget
Return a list of Target's pointers- Overrides:
getPointers
in classSynset
-
getKey
public java.lang.Object 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
public java.lang.String[] 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
public java.util.BitSet getVerbFrameFlags()
- Overrides:
getVerbFrameFlags
in classSynset
-
getVerbFrameIndicies
public int[] getVerbFrameIndicies()
- Overrides:
getVerbFrameIndicies
in classSynset
-
containsWord
public boolean containsWord(java.lang.String lemma)
Description copied from class:Synset
Returns true iflemma
is one of the words contained in this synset.- Overrides:
containsWord
in classSynset
-
getLexFileName
public java.lang.String 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
protected Synset getSource()
-
setSource
public void setSource(Synset source)
-
isAdjectiveCluster
public boolean isAdjectiveCluster()
- Overrides:
isAdjectiveCluster
in classSynset
-
-