gate.creole.ontology
Interface OResource

All Known Subinterfaces:
AllValuesFromRestriction, AnnotationProperty, AnonymousClass, CardinalityRestriction, DatatypeProperty, HasValueRestriction, MaxCardinalityRestriction, MinCardinalityRestriction, ObjectProperty, OClass, OInstance, RDFProperty, Restriction, SomeValuesFromRestriction, SymmetricProperty, TransitiveProperty

public interface OResource

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

Author:
Niraj Aswani, Johann Petrak

Method Summary
 void addAnnotationPropertyValue(AnnotationProperty theAnnotationProperty, Literal literal)
          Adds a new annotation property value and specifies the language.
 Set<RDFProperty> getAllSetProperties()
          This method returns all the set properties set on this resource.
 List<Literal> getAnnotationPropertyValues(AnnotationProperty theAnnotationProperty)
          Gets the list of values for a given property name.
 String getComment(Locale language)
          Deprecated.  
 Set<Literal> getComments()
          Deprecated.  
 String getLabel(Locale language)
          Deprecated.  
 Set<Literal> getLabels()
          This method returns a set of labels specified on this resource.
 String getName()
          Gets resource name.
 ONodeID getONodeID()
           
 Ontology getOntology()
          Gets the ontology to which the resource belongs.
 Set<RDFProperty> getPropertiesWithResourceAsDomain()
          This method returns a set of all properties where the current resource has been specified as one of the domain resources.
 Set<RDFProperty> getPropertiesWithResourceAsRange()
          This method returns a set of all properties where the current resource has been specified as one of the range resources.
 Set<AnnotationProperty> getSetAnnotationProperties()
          This method returns the annotation properties set on this resource.
 URI getURI()
          Deprecated.  
 boolean hasAnnotationPropertyWithValue(AnnotationProperty aProperty, Literal aValue)
          Checks if the resource has the provided annotation property set on it with the specified value.
 void removeAnnotationPropertyValue(AnnotationProperty theAnnotationProperty, Literal literal)
          For the current resource, the method removes the given literal for the given property.
 void removeAnnotationPropertyValues(AnnotationProperty theProperty)
          Removes all values for a named property.
 void setComment(String aComment, Locale Locale)
          Deprecated.  
 void setLabel(String aLabel, Locale language)
          Sets the label for the resource with the specified language.
 void setURI(URI uri)
          Deprecated.  
 

Method Detail

getURI

@Deprecated
URI getURI()
Deprecated. 

Gets the URI of the resource.

Returns:
the URI.

getONodeID

ONodeID getONodeID()

setURI

@Deprecated
void setURI(URI uri)
Deprecated. 

Sets the URI of the resource

Parameters:
uri -

getLabels

Set<Literal> getLabels()
This method returns a set of labels specified on this resource.

Returns:

getComments

@Deprecated
Set<Literal> getComments()
Deprecated. 

This method returns a set of comments specified on this resource.

Returns:

getComment

@Deprecated
String getComment(Locale language)
Deprecated. 

Gets the comment set on the resource in the specified language. Returns null if no comment found for the specified language.

Parameters:
language - (@see OConstants for available locales)
Returns:
the comment of the resource

setComment

@Deprecated
void setComment(String aComment,
                           Locale Locale)
Deprecated. 

Sets the comment for the resource with the specified language.

Parameters:
aComment - the comment to be set.
Locale -

getLabel

@Deprecated
String getLabel(Locale language)
Deprecated. 

Gets the comment set on the resource in the specified language. Returns null if no comment found for the specified language.

Parameters:
language -
Returns:
the label of the resource

setLabel

void setLabel(String aLabel,
              Locale language)
Sets the label for the resource with the specified language.

Parameters:
aLabel - the label to be set.
language - the anguage of the label. (@see OConstants for available locales)

getName

String getName()
Gets resource name. Typically a string after the last '#' or '/'

Returns:
the name of the resource.

getOntology

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

Returns:
the Ontology to which the resource belongs

addAnnotationPropertyValue

void addAnnotationPropertyValue(AnnotationProperty theAnnotationProperty,
                                Literal literal)
Adds a new annotation property value and specifies the language.

Parameters:
theAnnotationProperty - the annotation property
literal - the Literal containing some value

getAnnotationPropertyValues

List<Literal> getAnnotationPropertyValues(AnnotationProperty theAnnotationProperty)
Gets the list of values for a given property name.

Parameters:
theAnnotationProperty -
Returns:
a List of Literal.

getSetAnnotationProperties

Set<AnnotationProperty> getSetAnnotationProperties()
This method returns the annotation properties set on this resource.

Returns:

getAllSetProperties

Set<RDFProperty> getAllSetProperties()
This method returns all the set properties set on this resource.

Returns:

getPropertiesWithResourceAsDomain

Set<RDFProperty> getPropertiesWithResourceAsDomain()
This method returns a set of all properties where the current resource has been specified as one of the domain resources.

Returns:

getPropertiesWithResourceAsRange

Set<RDFProperty> getPropertiesWithResourceAsRange()
This method returns a set of all properties where the current resource has been specified as one of the range resources.

Returns:

hasAnnotationPropertyWithValue

boolean hasAnnotationPropertyWithValue(AnnotationProperty aProperty,
                                       Literal aValue)
Checks if the resource has the provided annotation property set on it with the specified value.

Parameters:
aProperty -
aValue -
Returns:

removeAnnotationPropertyValue

void removeAnnotationPropertyValue(AnnotationProperty theAnnotationProperty,
                                   Literal literal)
For the current resource, the method removes the given literal for the given property.

Parameters:
theAnnotationProperty -
literal -

removeAnnotationPropertyValues

void removeAnnotationPropertyValues(AnnotationProperty theProperty)
Removes all values for a named property.

Parameters:
theProperty - the property