gate.creole.ontology
Interface Ontology

All Superinterfaces:
FeatureBearer, LanguageResource, NameBearer, Resource, Serializable, Taxonomy
All Known Implementing Classes:
OntologyImpl

public interface Ontology
extends Taxonomy


Method Summary
 DatatypeProperty addDatatypeProperty(String name, OClass domain, Number range)
          Create a DatatypeProperty with the given domain and range
 DatatypeProperty addDatatypeProperty(String name, OClass domain, String range)
          Create a DatatypeProperty with the given domain and range
 FunctionalProperty addFunctionalProperty(String name, OClass domain, Object range)
          Create a FunctionalProperty with the given domain and range
 void addInstance(OInstance theInstance)
          Adds an instance to the ontology.
 OInstance addInstance(String name, OClass theClass)
          Adds an instance to the ontology.
 ObjectProperty addObjectProperty(String name, OClass domain, OClass range)
           
 void addPropertyDefinition(Property theProperty)
           
 SymmetricProperty addSymmetricProperty(String name, OClass domain, OClass range)
           
 TransitiveProperty addTransitiveProperty(OClass domain, OClass range)
           
 List getDirectInstances(OClass theClass)
          Gets all instances in the ontology, which belong to the given class only.
 OInstance getInstanceByName(String instanceName)
          Gets the instance with the given name.
 List getInstances()
          Gets all instances in the ontology.
 List getInstances(OClass theClass)
          Gets all instances in the ontology, which belong to this class, including instances of sub-classes.
 Property getPropertyDefinitionByName(String name)
           
 Set getPropertyDefinitions()
           
 void removeInstance(OInstance theInstance)
          Removes the instance from the ontology.
 
Methods inherited from interface gate.creole.ontology.Taxonomy
addClass, containsClassByName, createClass, equals, getClassByName, getClasses, getClasses, getComment, getId, getLabel, getOntology, getSourceURI, getTaxonomicDistance, getTopClasses, getURL, getVersion, isDirectSubClassOf, isModified, isSubClassOf, load, removeClass, setComment, setId, setLabel, setModified, setSourceURI, setURL, setVersion, store
 
Methods inherited from interface gate.LanguageResource
getDataStore, getLRPersistenceId, getParent, setDataStore, setLRPersistenceId, setParent, sync
 
Methods inherited from interface gate.Resource
cleanup, getParameterValue, init, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 

Method Detail

addInstance

public OInstance addInstance(String name,
                             OClass theClass)
Adds an instance to the ontology.

Parameters:
name - the instance name to be added
theClass - the class to be added
Returns:
the OInstance that has been added to the ontology

addInstance

public void addInstance(OInstance theInstance)
Adds an instance to the ontology.


removeInstance

public void removeInstance(OInstance theInstance)
Removes the instance from the ontology.

Parameters:
theInstance - to be removed

getInstances

public List getInstances()
Gets all instances in the ontology.

Returns:
List of OInstance objects

getInstances

public List getInstances(OClass theClass)
Gets all instances in the ontology, which belong to this class, including instances of sub-classes. If only the instances of the given class are needed, then use getDirectInstances.

Parameters:
theClass - the class of the instances
Returns:
List of OInstance objects

getDirectInstances

public List getDirectInstances(OClass theClass)
Gets all instances in the ontology, which belong to the given class only.

Parameters:
theClass - the class of the instances
Returns:
List of OInstance objects

getInstanceByName

public OInstance getInstanceByName(String instanceName)
Gets the instance with the given name.

Parameters:
instanceName - the instance name
Returns:
the OInstance object with this name

addDatatypeProperty

public DatatypeProperty addDatatypeProperty(String name,
                                            OClass domain,
                                            String range)
Create a DatatypeProperty with the given domain and range

Parameters:
domain -
range -

addDatatypeProperty

public DatatypeProperty addDatatypeProperty(String name,
                                            OClass domain,
                                            Number range)
Create a DatatypeProperty with the given domain and range

Parameters:
domain -
range -

addFunctionalProperty

public FunctionalProperty addFunctionalProperty(String name,
                                                OClass domain,
                                                Object range)
Create a FunctionalProperty with the given domain and range

Parameters:
domain -
range -
Returns:
a KBFunctionalProperty value.

addObjectProperty

public ObjectProperty addObjectProperty(String name,
                                        OClass domain,
                                        OClass range)

addSymmetricProperty

public SymmetricProperty addSymmetricProperty(String name,
                                              OClass domain,
                                              OClass range)

addTransitiveProperty

public TransitiveProperty addTransitiveProperty(OClass domain,
                                                OClass range)

addPropertyDefinition

public void addPropertyDefinition(Property theProperty)

getPropertyDefinitions

public Set getPropertyDefinitions()

getPropertyDefinitionByName

public Property getPropertyDefinitionByName(String name)