GATE
Version 3.1-2270

gate.lexicon
Class OntoLexKBImpl

java.lang.Object
  extended by gate.util.AbstractFeatureBearer
      extended by gate.creole.AbstractResource
          extended by gate.creole.AbstractLanguageResource
              extended by gate.lexicon.OntoLexKBImpl
All Implemented Interfaces:
LanguageResource, OntoLexLR, Resource, FeatureBearer, NameBearer, Serializable

public class OntoLexKBImpl
extends AbstractLanguageResource
implements OntoLexLR, Serializable

See Also:
Serialized Form

Field Summary
protected  HashMap conceptIdMap
           
protected  HashMap lexIdMap
           
protected  Object lexKBIndentifier
           
protected  Object ontologyIdentifier
           
 
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
 
Constructor Summary
OntoLexKBImpl()
           
 
Method Summary
 void add(Object conceptId, Object lexId)
          Add a concept<->lexical ID pair
 void clear()
          Clear the mapping
 Set getAllConceptIds()
          Returns a list of objects which are all concept IDs in this mapping.
 Set getAllLexIds()
          Returns a list of objects which are all lexical IDs in this mapping.
 List getConceptIds(Object lexId)
          Returns a list of objects which are the concept IDs corresponding to the given lexical Id.
 List getLexIds(Object conceptId)
          Returns a list of objects which are the lexical IDs corresponding to the given concept Id.
 Object getLexKBIdentifier()
          Accessor for the lexical Id property.
 Object getOntologyIdentifier()
          Accessor for the ontology Id property
 Resource init()
          Initialise this resource, and return it.
 boolean isEmpty()
          True if the mapping is empty
 void remove(Object conceptId, Object lexId)
          Remove the given mapping
 void removeByConcept(Object conceptId)
          Remove all mappings to lexical items for the given concept Id
 void removeByLexId(Object lexId)
          Remove all mappings to concept items for the given lexical Id
 void setLexKBIdentifier(Object lexId)
          Set method for the lexical Id property.
 void setOntologyIdentifier(Object ontoId)
          Set method for the ontology Id property.
 
Methods inherited from class gate.creole.AbstractLanguageResource
cleanup, getDataStore, getLRPersistenceId, getParent, isModified, setDataStore, setLRPersistenceId, setParent, sync
 
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.LanguageResource
getDataStore, getLRPersistenceId, getParent, isModified, setDataStore, setLRPersistenceId, setParent, sync
 
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
 

Field Detail

lexIdMap

protected HashMap lexIdMap

conceptIdMap

protected HashMap conceptIdMap

lexKBIndentifier

protected Object lexKBIndentifier

ontologyIdentifier

protected Object ontologyIdentifier
Constructor Detail

OntoLexKBImpl

public OntoLexKBImpl()
Method Detail

getConceptIds

public List getConceptIds(Object lexId)
Description copied from interface: OntoLexLR
Returns a list of objects which are the concept IDs corresponding to the given lexical Id. A list is returned because there might be more than one such concept IDs. Null is returned if there is no corresponding concept ID.

Specified by:
getConceptIds in interface OntoLexLR

getLexIds

public List getLexIds(Object conceptId)
Description copied from interface: OntoLexLR
Returns a list of objects which are the lexical IDs corresponding to the given concept Id. A list is returned because there might be more than one such lexical IDs. Null is returned if there is no corresponding lexical ID.

Specified by:
getLexIds in interface OntoLexLR

getAllLexIds

public Set getAllLexIds()
Description copied from interface: OntoLexLR
Returns a list of objects which are all lexical IDs in this mapping.

Specified by:
getAllLexIds in interface OntoLexLR

getAllConceptIds

public Set getAllConceptIds()
Description copied from interface: OntoLexLR
Returns a list of objects which are all concept IDs in this mapping.

Specified by:
getAllConceptIds in interface OntoLexLR

add

public void add(Object conceptId,
                Object lexId)
Description copied from interface: OntoLexLR
Add a concept<->lexical ID pair

Specified by:
add in interface OntoLexLR

removeByConcept

public void removeByConcept(Object conceptId)
Description copied from interface: OntoLexLR
Remove all mappings to lexical items for the given concept Id

Specified by:
removeByConcept in interface OntoLexLR

removeByLexId

public void removeByLexId(Object lexId)
Description copied from interface: OntoLexLR
Remove all mappings to concept items for the given lexical Id

Specified by:
removeByLexId in interface OntoLexLR

remove

public void remove(Object conceptId,
                   Object lexId)
Description copied from interface: OntoLexLR
Remove the given mapping

Specified by:
remove in interface OntoLexLR

isEmpty

public boolean isEmpty()
Description copied from interface: OntoLexLR
True if the mapping is empty

Specified by:
isEmpty in interface OntoLexLR

clear

public void clear()
Description copied from interface: OntoLexLR
Clear the mapping

Specified by:
clear in interface OntoLexLR

getLexKBIdentifier

public Object getLexKBIdentifier()
Description copied from interface: OntoLexLR
Accessor for the lexical Id property. It specifies which lexicon is this mapping for

Specified by:
getLexKBIdentifier in interface OntoLexLR

setLexKBIdentifier

public void setLexKBIdentifier(Object lexId)
Description copied from interface: OntoLexLR
Set method for the lexical Id property. It specifies which lexicon is this mapping for

Specified by:
setLexKBIdentifier in interface OntoLexLR

getOntologyIdentifier

public Object getOntologyIdentifier()
Description copied from interface: OntoLexLR
Accessor for the ontology Id property

Specified by:
getOntologyIdentifier in interface OntoLexLR

setOntologyIdentifier

public void setOntologyIdentifier(Object ontoId)
Description copied from interface: OntoLexLR
Set method for the ontology Id property. It specifies which ontology is this mapping for

Specified by:
setOntologyIdentifier in interface OntoLexLR

init

public Resource init()
              throws ResourceInstantiationException
Description copied from class: AbstractResource
Initialise this resource, and return it.

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

GATE
Version 3.1-2270