GATE
Version 3.1-2270

gate.creole.ontology
Interface Ontology

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

public interface Ontology
extends Taxonomy

This is the base interface for all concrete implementations of ontologies.


Method Summary
 DatatypeProperty addDatatypeProperty(String name, String comment, OClass domain, Class range)
          Creates a new Datatype property in this ontology where the domain consists of a single OClass.
 DatatypeProperty addDatatypeProperty(String name, String comment, Set domain, Class range)
          Create a DatatypeProperty with the given domain and range.
 void addInstance(OInstance theInstance)
          Adds a preconstructed instance to the ontology.
 OInstance addInstance(String name, OClass theClass)
          Adds an instance to the ontology.
 ObjectProperty addObjectProperty(String name, String comment, OClass domain, OClass range)
          Creates a new object property (a property that takes instances as values).
 ObjectProperty addObjectProperty(String name, String comment, Set domain, Set range)
          Creates a new object property (a property that takes instances as values).
 Property addProperty(String name, String comment, OClass domain, Class range)
          Creates a new generic property that is neither datatype or object property.
 Property addProperty(String name, String comment, Set domain, Set range)
          Creates a new generic property that is neither datatype or object property.
 SymmetricProperty addSymmetricProperty(String name, String comment, OClass domain, OClass range)
          Creates a new symmetric property.
 SymmetricProperty addSymmetricProperty(String name, String comment, Set domain, Set range)
          Creates a new symmetric property (an object property that is symmetric).
 TransitiveProperty addTransitiveProperty(String name, String comment, OClass domain, OClass range)
          Creates a new transitive property.
 TransitiveProperty addTransitiveProperty(String name, String comment, Set domain, Set range)
          Creates a new transitive property (an object property that is transitive).
 Set 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.
 Set getInstances()
          Gets all instances in the ontology.
 Set getInstances(OClass theClass)
          Gets all instances in the ontology, which belong to this class, including instances of sub-classes.
 Property getPropertyDefinitionByName(String name)
          Returns the property definition for a given property.
 Set getPropertyDefinitions()
          Gets the set of all known property definitions in this ontology.
 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, getDefaultNameSpace, getId, getLabel, getTaxonomicDistance, getTopClasses, getURL, getVersion, isDirectSubClassOf, isModified, isSubClassOf, load, removeClass, setComment, setDefaultNameSpace, setId, setLabel, setModified, 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

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

Parameters:
name - the name for the new instance
theClass - the class to which the instance belongs
Returns:
the OInstance that has been added to the ontology

addInstance

void addInstance(OInstance theInstance)
Adds a preconstructed instance to the ontology.


removeInstance

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

Parameters:
theInstance - to be removed

getInstances

Set getInstances()
Gets all instances in the ontology.

Returns:
a Set of OInstance objects

getInstances

Set 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:
Set of OInstance objects

getDirectInstances

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

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

getInstanceByName

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

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

addDatatypeProperty

DatatypeProperty addDatatypeProperty(String name,
                                     String comment,
                                     OClass domain,
                                     Class range)
Creates a new Datatype property in this ontology where the domain consists of a single OClass.

Parameters:
name - the name for the new property.
comment - the comment for the new property.
domain - the OClass to which this property applies.
range - the Class specifying the types of Java objects that this property has as values.
Returns:
the newly created property.

addDatatypeProperty

DatatypeProperty addDatatypeProperty(String name,
                                     String comment,
                                     Set domain,
                                     Class range)
Create a DatatypeProperty with the given domain and range.

Parameters:
name - the name for the new property.
comment - the comment for the new property.
domain - the set of ontology classes (i.e. OClass objects} that constitutes the range for the new property. The property only applies to instances that belong to all classes included in its domain. An empty set means that the property applies to instances of any class.
range - the Class specifying the types of Java objects that this property has as values.
Returns:
the newly created property.

addProperty

Property addProperty(String name,
                     String comment,
                     Set domain,
                     Set range)
Creates a new generic property that is neither datatype or object property. This can be for instance a RDF property.

Parameters:
name - the name for the new property.
comment - the comment for the new property.
domain - the set of ontology classes (i.e. OClass objects} that constitutes the range for the new property. The property only applies to instances that belong to all classes included in its domain. An empty set means that the property applies to instances of any class.
range - the set of ontology classes (i.e. OClass objects} that constitutes the range for the new property.
Returns:
the newly created property.

addProperty

Property addProperty(String name,
                     String comment,
                     OClass domain,
                     Class range)
Creates a new generic property that is neither datatype or object property. This can be for instance a RDF property.

Parameters:
name - the name for the new property.
comment - the comment for the new property.
domain - the OClass defining the type of instances this property can apply to.
range - Java Class defining the type of values this proeprty can take.
Returns:
the newly created property.

addObjectProperty

ObjectProperty addObjectProperty(String name,
                                 String comment,
                                 Set domain,
                                 Set range)
Creates a new object property (a property that takes instances as values).

Parameters:
name - the name for the new property.
comment - the comment for the new property.
domain - the set of ontology classes (i.e. OClass objects} that constitutes the range for the new property. The property only applies to instances that belong to all classes included in its domain. An empty set means that the property applies to instances of any class.
range - the set of ontology classes (i.e. OClass objects} that constitutes the range for the new property.
Returns:
the newly created property.

addObjectProperty

ObjectProperty addObjectProperty(String name,
                                 String comment,
                                 OClass domain,
                                 OClass range)
Creates a new object property (a property that takes instances as values).

Parameters:
name - the name for the new property.
comment - the comment for the new property.
domain - the OClass to which this property applies.
range - the OClass specifying the types of instances that this property can take as values.
Returns:
the newly created property.

addSymmetricProperty

SymmetricProperty addSymmetricProperty(String name,
                                       String comment,
                                       Set domain,
                                       Set range)
Creates a new symmetric property (an object property that is symmetric).

Parameters:
name - the name for the new property.
comment - the comment for the new property.
domain - the set of ontology classes (i.e. OClass objects} that constitutes the range for the new property. The property only applies to instances that belong to all classes included in its domain. An empty set means that the property applies to instances of any class.
range - the set of ontology classes (i.e. OClass objects} that constitutes the range for the new property.
Returns:
the newly created property.

addSymmetricProperty

SymmetricProperty addSymmetricProperty(String name,
                                       String comment,
                                       OClass domain,
                                       OClass range)
Creates a new symmetric property.

Parameters:
name - the name for the new property.
comment - the comment for the new property.
domain - the OClass to which this property applies.
range - the OClass specifying the types of instances that this property can take as values.
Returns:
the newly created property.

addTransitiveProperty

TransitiveProperty addTransitiveProperty(String name,
                                         String comment,
                                         Set domain,
                                         Set range)
Creates a new transitive property (an object property that is transitive).

Parameters:
name - the name for the new property.
comment - the comment for the new property.
domain - the set of ontology classes (i.e. OClass objects} that constitutes the range for the new property. The property only applies to instances that belong to all classes included in its domain. An empty set means that the property applies to instances of any class.
range - the set of ontology classes (i.e. OClass objects} that constitutes the range for the new property.
Returns:
the newly created property.

addTransitiveProperty

TransitiveProperty addTransitiveProperty(String name,
                                         String comment,
                                         OClass domain,
                                         OClass range)
Creates a new transitive property.

Parameters:
name - the name for the new property.
comment - the comment for the new property.
domain - the OClass to which this property applies.
range - the OClass specifying the types of instances that this property can take as values.
Returns:
the newly created property.

getPropertyDefinitions

Set getPropertyDefinitions()
Gets the set of all known property definitions in this ontology.

Returns:
a Set of Property objects.

getPropertyDefinitionByName

Property getPropertyDefinitionByName(String name)
Returns the property definition for a given property.

Parameters:
name - the name for which the definition is sought.
Returns:
aProperty object.

GATE
Version 3.1-2270