GATE
Version 3.1-2270

gate.wordnet
Class IndexFileWordNetImpl

java.lang.Object
  extended by gate.util.AbstractFeatureBearer
      extended by gate.creole.AbstractResource
          extended by gate.creole.AbstractLanguageResource
              extended by gate.wordnet.IndexFileWordNetImpl
All Implemented Interfaces:
LanguageResource, Resource, FeatureBearer, NameBearer, WordNet, Serializable

public class IndexFileWordNetImpl
extends AbstractLanguageResource
implements WordNet

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gate.creole.AbstractLanguageResource
dataStore, lrPersistentId
 
Fields inherited from class gate.creole.AbstractResource
name
 
Fields inherited from class gate.util.AbstractFeatureBearer
features
 
Fields inherited from interface gate.wordnet.WordNet
POS_ADJECTIVE, POS_ADVERB, POS_NOUN, POS_VERB
 
Constructor Summary
IndexFileWordNetImpl()
           
 
Method Summary
 DataStore getDataStore()
          Get the data store that this LR lives in.
 net.didion.jwnl.dictionary.Dictionary getJWNLDictionary()
          helper method
 Object getLRPersistenceId()
          Returns the persistence id of this LR, if it has been stored in a datastore.
 LanguageResource getParent()
          Returns the parent LR of this LR.
 URL getPropertyUrl()
           
 Iterator getSynsets(int _pos)
          returns all synsets for specific POS
 Iterator getUniqueBeginners()
          returns all unique beginners
 String getVersion()
          returns the WordNet version
 Resource init()
          Initialise this resource, and return it.
 boolean isModified()
          Returns true of an LR has been modified since the last sync.
 List lookupWord(String lemma)
          returns list of WordSense-s for specific lemma
 List lookupWord(String lemma, int pos)
          returns list of WordSense-s for specific lemma of the specified POS
 void setDataStore(DataStore dataStore)
          Set the data store that this LR lives in.
 void setLRPersistenceId(Object lrID)
          Sets the persistence id of this LR.
 void setParent(LanguageResource parentLR)
          Sets the parent LR of this LR.
 void setPropertyUrl(URL _propertiesUrl)
           
 void sync()
          Save: synchonise the in-memory image of the LR with the persistent image.
 
Methods inherited from class gate.creole.AbstractLanguageResource
cleanup
 
Methods inherited from class gate.creole.AbstractResource
checkParameterValues, getBeanInfo, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners
 
Methods inherited from class gate.util.AbstractFeatureBearer
getFeatures, setFeatures
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gate.Resource
cleanup, getParameterValue, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 

Constructor Detail

IndexFileWordNetImpl

public IndexFileWordNetImpl()
Method Detail

init

public Resource init()
              throws ResourceInstantiationException
Initialise this resource, and return it.

Specified by:
init in interface Resource
Overrides:
init in class AbstractResource
Throws:
ResourceInstantiationException

getJWNLDictionary

public net.didion.jwnl.dictionary.Dictionary getJWNLDictionary()
helper method


setPropertyUrl

public void setPropertyUrl(URL _propertiesUrl)
Specified by:
setPropertyUrl in interface WordNet

getPropertyUrl

public URL getPropertyUrl()
Specified by:
getPropertyUrl in interface WordNet

getVersion

public String getVersion()
returns the WordNet version

Specified by:
getVersion in interface WordNet

getSynsets

public Iterator getSynsets(int _pos)
                    throws WordNetException
returns all synsets for specific POS

Specified by:
getSynsets in interface WordNet
Throws:
WordNetException

getUniqueBeginners

public Iterator getUniqueBeginners()
returns all unique beginners

Specified by:
getUniqueBeginners in interface WordNet

setParent

public void setParent(LanguageResource parentLR)
               throws PersistenceException,
                      SecurityException
Sets the parent LR of this LR. Only relevant for LRs that support shadowing. Most do not by default.

Specified by:
setParent in interface LanguageResource
Overrides:
setParent in class AbstractLanguageResource
Throws:
PersistenceException
SecurityException

getParent

public LanguageResource getParent()
                           throws PersistenceException,
                                  SecurityException
Returns the parent LR of this LR. Only relevant for LRs that support shadowing. Most do not by default.

Specified by:
getParent in interface LanguageResource
Overrides:
getParent in class AbstractLanguageResource
Throws:
PersistenceException
SecurityException

isModified

public boolean isModified()
Returns true of an LR has been modified since the last sync. Always returns false for transient LRs.

Specified by:
isModified in interface LanguageResource
Overrides:
isModified in class AbstractLanguageResource

sync

public void sync()
          throws PersistenceException,
                 SecurityException
Save: synchonise the in-memory image of the LR with the persistent image.

Specified by:
sync in interface LanguageResource
Overrides:
sync in class AbstractLanguageResource
Throws:
PersistenceException
SecurityException

setLRPersistenceId

public void setLRPersistenceId(Object lrID)
Sets the persistence id of this LR. To be used only in the Factory and DataStore code.

Specified by:
setLRPersistenceId in interface LanguageResource
Overrides:
setLRPersistenceId in class AbstractLanguageResource

getLRPersistenceId

public Object getLRPersistenceId()
Returns the persistence id of this LR, if it has been stored in a datastore. Null otherwise.

Specified by:
getLRPersistenceId in interface LanguageResource
Overrides:
getLRPersistenceId in class AbstractLanguageResource

getDataStore

public DataStore getDataStore()
Get the data store that this LR lives in. Null for transient LRs.

Specified by:
getDataStore in interface LanguageResource
Overrides:
getDataStore in class AbstractLanguageResource

setDataStore

public void setDataStore(DataStore dataStore)
                  throws PersistenceException
Set the data store that this LR lives in.

Specified by:
setDataStore in interface LanguageResource
Overrides:
setDataStore in class AbstractLanguageResource
Throws:
PersistenceException

lookupWord

public List lookupWord(String lemma)
                throws WordNetException
returns list of WordSense-s for specific lemma

Specified by:
lookupWord in interface WordNet
Throws:
WordNetException

lookupWord

public List lookupWord(String lemma,
                       int pos)
                throws WordNetException
returns list of WordSense-s for specific lemma of the specified POS

Specified by:
lookupWord in interface WordNet
Throws:
WordNetException

GATE
Version 3.1-2270