|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OInstance
OInstance (Ontology Instance) represents an instance in the ontology/knowledge base. The interface provides various methods, including and not limited to, obtain a list of classes the instance belongs to, and various methods to add various property values on it.
| Method Summary | |
|---|---|
void |
addDatatypePropertyValue(DatatypeProperty aProperty,
Literal value)
Adds the value for the given Property. |
void |
addObjectPropertyValue(ObjectProperty aProperty,
OInstance value)
Adds the value for the given property (Object, Symmetric and Transitive). |
void |
addOClass(OClass theClass)
Make this individual an instance of another class. |
void |
addRDFPropertyValue(RDFProperty aProperty,
OResource value)
Deprecated. this throws an exception in the new implementation |
List<Literal> |
getDatatypePropertyValues(DatatypeProperty aProperty)
Gets a list of values for the given Property. |
Set<OInstance> |
getDifferentInstances()
Returns a set of OInstance objects which are explicitly
specified as being different from the current instance. |
List<OInstance> |
getObjectPropertyValues(ObjectProperty aProperty)
Gets a list of values for the given Property (Object, Symmetric and Transitive). |
Set<OClass> |
getOClasses(byte closure)
Deprecated. |
Set<OClass> |
getOClasses(OConstants.Closure closure)
|
OURI |
getOURI()
|
List<OValue> |
getRDFPropertyOValues(RDFProperty aProperty)
|
List<OResource> |
getRDFPropertyValues(RDFProperty aProperty)
Deprecated. |
Set<OInstance> |
getSameInstance()
Returns a set of OInstance objects which are explicitly
specified as being same as the current instance. |
Set<DatatypeProperty> |
getSetDatatypeProperties()
This method returns the datatype properties set on this resource. |
Set<ObjectProperty> |
getSetObjectProperties()
This method returns the object properties set on this resource. |
Set<RDFProperty> |
getSetRDFProperties()
This method returns the RDF properties set on this resource. |
boolean |
hasDatatypePropertyWithValue(DatatypeProperty aProperty,
Literal aValue)
Checks if the resource has the provided datatype property set on it with the specified value. |
boolean |
hasObjectPropertyWithValue(ObjectProperty aProperty,
OInstance aValue)
Checks if the resource has the provided object property set on it with the specified value. |
boolean |
hasRDFPropertyWithValue(RDFProperty aProperty,
OResource aResource)
Deprecated. |
boolean |
isDifferentFrom(OInstance theInstance)
Checks whether the instance is different from the given instance |
boolean |
isInstanceOf(OClass aClass,
byte closure)
Deprecated. |
boolean |
isInstanceOf(OClass aClass,
OConstants.Closure closure)
|
boolean |
isSameInstanceAs(OInstance theInstance)
Checks whether the instance is same as the given instance |
void |
removeDatatypePropertyValue(DatatypeProperty aProperty,
Literal value)
Remove the provided value for the given property. |
void |
removeDatatypePropertyValues(DatatypeProperty aProperty)
Removes all property values set for the current property. |
void |
removeObjectPropertyValue(ObjectProperty aProperty,
OInstance value)
Remove the provided value for the given property (Object, Symmetric and Transitive). |
void |
removeObjectPropertyValues(ObjectProperty aProperty)
Removes all property values set for the current property (Object, Symmetric and Transitive). |
void |
removeRDFPropertyValue(RDFProperty aProperty,
OResource value)
Deprecated. |
void |
removeRDFPropertyValues(RDFProperty aProperty)
Deprecated. |
void |
setDifferentFrom(OInstance theInstance)
Sets the instance being different from the provided instance. |
void |
setSameInstanceAs(OInstance theIndividual)
Sets the instance being same as the provided instance. |
| Methods inherited from interface gate.creole.ontology.OResource |
|---|
addAnnotationPropertyValue, getAllSetProperties, getAnnotationPropertyValues, getComment, getComments, getLabel, getLabels, getName, getONodeID, getOntology, getPropertiesWithResourceAsDomain, getPropertiesWithResourceAsRange, getSetAnnotationProperties, getURI, hasAnnotationPropertyWithValue, removeAnnotationPropertyValue, removeAnnotationPropertyValues, setComment, setLabel, setURI |
| Method Detail |
|---|
@Deprecated Set<OClass> getOClasses(byte closure)
closure - either OntologyConstants.DIRECT_CLOSURE or
OntologyConstants.TRANSITIVE_CLOSURE.
OClass objects.Set<OClass> getOClasses(OConstants.Closure closure)
void addOClass(OClass theClass)
theClass - - the OClass object for the class of which the individual
should be an instance.
@Deprecated
boolean isInstanceOf(OClass aClass,
byte closure)
aClass - closure - either OntologyConstants.DIRECT_CLOSURE or
OntologyConstants.TRANSITIVE_CLOSURE.
boolean isInstanceOf(OClass aClass,
OConstants.Closure closure)
void setDifferentFrom(OInstance theInstance)
theIndividual - Set<OInstance> getDifferentInstances()
OInstance objects which are explicitly
specified as being different from the current instance.
boolean isDifferentFrom(OInstance theInstance)
theInstance -
void setSameInstanceAs(OInstance theIndividual)
theIndividual - Set<OInstance> getSameInstance()
OInstance objects which are explicitly
specified as being same as the current instance.
boolean isSameInstanceAs(OInstance theInstance)
theInstance -
@Deprecated
void addRDFPropertyValue(RDFProperty aProperty,
OResource value)
throws InvalidValueException
aProperty - value -
InvalidValueException - This exception is thrown when a value
is not compatible with the specified property's range.
@Deprecated
void removeRDFPropertyValue(RDFProperty aProperty,
OResource value)
aProperty - value - @Deprecated List<OResource> getRDFPropertyValues(RDFProperty aProperty)
aProperty -
List of OResource.List<OValue> getRDFPropertyOValues(RDFProperty aProperty)
Set<RDFProperty> getSetRDFProperties()
@Deprecated
boolean hasRDFPropertyWithValue(RDFProperty aProperty,
OResource aResource)
aProperty - aValue -
@Deprecated void removeRDFPropertyValues(RDFProperty aProperty)
aProperty -
void addDatatypePropertyValue(DatatypeProperty aProperty,
Literal value)
throws InvalidValueException
aProperty - value -
InvalidValueException - This exception is thrown when a value
is not compatible with the specified property's range.
void removeDatatypePropertyValue(DatatypeProperty aProperty,
Literal value)
aProperty - value - List<Literal> getDatatypePropertyValues(DatatypeProperty aProperty)
aProperty -
List of Literal.void removeDatatypePropertyValues(DatatypeProperty aProperty)
aProperty -
void addObjectPropertyValue(ObjectProperty aProperty,
OInstance value)
throws InvalidValueException
aProperty - value -
InvalidValueException - This exception is thrown when a value
is not compatible with the specified property's range.
void removeObjectPropertyValue(ObjectProperty aProperty,
OInstance value)
aProperty - value - List<OInstance> getObjectPropertyValues(ObjectProperty aProperty)
aProperty -
List of OInstance.void removeObjectPropertyValues(ObjectProperty aProperty)
aProperty - Set<DatatypeProperty> getSetDatatypeProperties()
Set<ObjectProperty> getSetObjectProperties()
boolean hasDatatypePropertyWithValue(DatatypeProperty aProperty,
Literal aValue)
aProperty - aValue -
boolean hasObjectPropertyWithValue(ObjectProperty aProperty,
OInstance aValue)
aProperty - aValue -
OURI getOURI()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||