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 aSynsetthat may be null at the time of creation. When thisSynsetis 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 longserialVersionUID-
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 booleancontainsWord(java.lang.String lemma)Returns true iflemmais one of the words contained in this synset.booleanequals(java.lang.Object object)Two Synsets are equal if their POS's and offsets are equaljava.lang.StringgetGloss()java.lang.ObjectgetKey()Get a key that can be used to index this element.java.lang.StringgetLexFileName()Gets the lex file name.longgetLexFileNum()Gets the lexicographer file name containing this synset.longgetOffset()Pointer[]getPointers()Return a list of Target's pointersPointer[]getPointers(PointerType type)Get all pointers of typetype.protected SynsetgetSource()PointerTarget[]getTargets()Get all the pointer targets of this synsetPointerTarget[]getTargets(PointerType type)Get all the targets of the pointers of typetype.java.util.BitSetgetVerbFrameFlags()int[]getVerbFrameIndicies()java.lang.String[]getVerbFrames()Returns all Verb Frames that are valid for all the words in this synsetWordgetWord(int index)Word[]getWords()inthashCode()booleanisAdjectiveCluster()voidsetLexFileNum(long lexFileId)Sets the lexicographer file name containing this synset.voidsetSource(Synset source)java.lang.StringtoString()-
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:PointerTargetGet all pointers of typetype.- Overrides:
getPointersin classPointerTarget
-
equals
public boolean equals(java.lang.Object object)
Description copied from class:SynsetTwo Synsets are equal if their POS's and offsets are equal
-
getTargets
public PointerTarget[] getTargets() throws JWNLException
Description copied from class:PointerTargetGet all the pointer targets of this synset- Overrides:
getTargetsin classPointerTarget- Throws:
JWNLException
-
getTargets
public PointerTarget[] getTargets(PointerType type) throws JWNLException
Description copied from class:PointerTargetGet all the targets of the pointers of typetype.- Overrides:
getTargetsin classPointerTarget- Throws:
JWNLException
-
getPointers
public Pointer[] getPointers()
Description copied from class:PointerTargetReturn a list of Target's pointers- Overrides:
getPointersin classSynset
-
getKey
public java.lang.Object getKey()
Description copied from interface:DictionaryElementGet a key that can be used to index this element.- Specified by:
getKeyin interfaceDictionaryElement- Overrides:
getKeyin classSynset
-
getVerbFrames
public java.lang.String[] getVerbFrames()
Description copied from class:SynsetReturns all Verb Frames that are valid for all the words in this synset- Overrides:
getVerbFramesin classSynset
-
getVerbFrameFlags
public java.util.BitSet getVerbFrameFlags()
- Overrides:
getVerbFrameFlagsin classSynset
-
getVerbFrameIndicies
public int[] getVerbFrameIndicies()
- Overrides:
getVerbFrameIndiciesin classSynset
-
containsWord
public boolean containsWord(java.lang.String lemma)
Description copied from class:SynsetReturns true iflemmais one of the words contained in this synset.- Overrides:
containsWordin classSynset
-
getLexFileName
public java.lang.String getLexFileName()
Description copied from class:SynsetGets the lex file name.- Overrides:
getLexFileNamein classSynset- Returns:
-
getLexFileNum
public long getLexFileNum()
Description copied from class:SynsetGets the lexicographer file name containing this synset.- Overrides:
getLexFileNumin classSynset- Returns:
- two digit decimal integer
-
setLexFileNum
public void setLexFileNum(long lexFileId)
Description copied from class:SynsetSets the lexicographer file name containing this synset.- Overrides:
setLexFileNumin classSynset- Parameters:
lexFileId- - the lexicographer file name id
-
getSource
protected Synset getSource()
-
setSource
public void setSource(Synset source)
-
isAdjectiveCluster
public boolean isAdjectiveCluster()
- Overrides:
isAdjectiveClusterin classSynset
-
-