GATE
Version 3.1-2270

gate.creole.ontology
Interface OntologyResource

All Known Subinterfaces:
DatatypeProperty, ObjectProperty, OClass, OInstance, Property, ReflexiveProperty, SymmetricProperty, TClass, TransitiveProperty
All Known Implementing Classes:
DatatypePropertyImpl, ObjectPropertyImpl, OClassImpl, OInstanceImpl, OntologyResourceImpl, PropertyImpl, SymmetricPropertyImpl, TClassImpl, TransitivePropertyImpl

public interface OntologyResource

This is the top level interface for all ontology resources such as classes, instances and properties.


Method Summary
 boolean addPropertyValue(String propertyName, Object theValue)
          Adds a new property with the given name and value.
 String getComment()
          Gets the comment of the resource.
 String getName()
          Gets resource name.
 Ontology getOntology()
          Gets the ontology to which the resource belongs.
 List getPropertyValues(String propertyName)
          Gets the list of values for a given property name.
 Set getSetPropertiesNames()
          Gets the names of the properties that have set values for this instance.
 Taxonomy getTaxonomy()
          Gets the taxonomy to which the resource belongs.
 String getURI()
          Gets the URI of the resource.
 boolean removePropertyValue(String propertyName, Object theValue)
          Removes one of the values for a given property.
 void removePropertyValues(String propertyName)
          Removes all values for a named property.
 void setComment(String aComment)
          Sets the resource comment.
 void setName(String aName)
          Sets the resource name.
 void setURI(String theURI)
          Sets the URI of the resource.
 

Method Detail

getURI

String getURI()
Gets the URI of the resource.

Returns:
the URI.

setURI

void setURI(String theURI)
Sets the URI of the resource.

Parameters:
theURI - the new URI to be set

getComment

String getComment()
Gets the comment of the resource.

Returns:
the comment of the resource

setComment

void setComment(String aComment)
Sets the resource comment.

Parameters:
aComment - the comment to be set.

getName

String getName()
Gets resource name.

Returns:
the name of the resource.

setName

void setName(String aName)
Sets the resource name.

Parameters:
aName - the new name of the resource.

getOntology

Ontology getOntology()
Gets the ontology to which the resource belongs.

Returns:
the ontology to which the resource belongs

getTaxonomy

Taxonomy getTaxonomy()
Gets the taxonomy to which the resource belongs.

Returns:
the taxonomy to which the resource belongs

addPropertyValue

boolean addPropertyValue(String propertyName,
                         Object theValue)
Adds a new property with the given name and value.

Parameters:
propertyName - the name of the property
theValue - the value for the property
Returns:
true if the property name is valid for this type of instance and the new value has been added, false otherwise.

getPropertyValues

List getPropertyValues(String propertyName)
Gets the list of values for a given property name.

Parameters:
propertyName - the name of the property
Returns:
a List of values.

removePropertyValue

boolean removePropertyValue(String propertyName,
                            Object theValue)
Removes one of the values for a given property.

Parameters:
propertyName - the name of the property
theValue - the value to be removed.
Returns:
true if the value was found and removed, false otherwise.

removePropertyValues

void removePropertyValues(String propertyName)
Removes all values for a named property.

Parameters:
propertyName - the property name.

getSetPropertiesNames

Set getSetPropertiesNames()
Gets the names of the properties that have set values for this instance.

Returns:
a set of String values.

GATE
Version 3.1-2270