kaos.core.csi
Interface OntInstanceDescription

All Superinterfaces:
java.lang.Cloneable
All Known Subinterfaces:
ActionInstanceDescription, ObligationActionDescription, ViolatedObligationDescription

public interface OntInstanceDescription
extends java.lang.Cloneable

This interface contains methods allowing to create and investigate a description of an ontology instance. $Revision: 1.10 $


Method Summary
 void addProperty(OntPropertyDescription newProperty)
          Add property to the instance The method will will check if the property already exist and if yes combine the values.
 OntPropertyDescription addProperty(java.lang.String newProperty, java.lang.String value)
          Add property to the instance; providing name and value.
 OntPropertyDescription addProperty(java.lang.String newProperty, java.lang.String propertyValue, java.lang.Object propertyValueDesc)
          Add property to the instance; providing name, value and value description.
 void addType(java.lang.String name)
          Add the ontology type of this instance.
 OntInstanceDescription clone()
          Clone the instance
 java.util.List<java.lang.Object> getAllValueDescriptionsForProperty(java.lang.String propertyURI)
          Get values descriptions for property of the instance
 java.util.List<java.lang.String> getAllValuesForProperty(java.lang.String propertyURI)
          Get values for property of the instance
 java.lang.String getAsOWL()
          Get the OWL representation for this instance.
 java.lang.Object getDescriptionOfFirstValueForProperty(java.lang.String propertyURI)
          Get value description for the first value of the property of the instance
 java.lang.String getFirstType()
          Get first type of the instance
 java.lang.String getFirstValueForProperty(java.lang.String propertyURI)
          Get the first value for property of the instance
 kaos.ontology.util.SerializableOntModelImpl getInstanceOntModel()
          Get the Jena-based Ontology Model object for this instance.
 java.lang.String getName()
          Get name of the instance
 OntPropertyDescription getNestedProperty(java.lang.String propertyName)
          Get the given property if nested in the train of interrelated instances.
 java.util.Set<OntPropertyDescription> getProperties()
          Get properties of the instance
 java.util.Map<java.lang.String,OntPropertyDescription> getPropertiesMap()
          Get properties of the instance
 OntPropertyDescription getProperty(java.lang.String propertyName)
          Get property of the instance
 java.util.Set<java.lang.String> getTypes()
          Get types of the instance
 void removeProperty(java.lang.String propertyName)
          Get property from the instance description
 void removeType(java.lang.String name)
          Remove the ontology type of this instance.
 void setProperty(OntPropertyDescription newProperty)
          Set property for the instance.
 OntPropertyDescription setProperty(java.lang.String newProperty, java.lang.String value)
          Set property for the instance; providing name and value.
 

Method Detail

addType

void addType(java.lang.String name)
             throws java.net.URISyntaxException
Add the ontology type of this instance.

Parameters:
name - String containing the uri of the ontology type (class).
Throws:
java.net.URISyntaxException - when the name is not a correct URI

setProperty

void setProperty(OntPropertyDescription newProperty)
Set property for the instance. The method will remove the previous property is it exists.

Parameters:
newProperty - OntPropertyDescription with the property description.

setProperty

OntPropertyDescription setProperty(java.lang.String newProperty,
                                   java.lang.String value)
Set property for the instance; providing name and value. The method will remove the previous property is it exists.

Parameters:
newProperty - string with the property name
vale - string with the property vale
Returns:
the created OntPropertyDescription

addProperty

void addProperty(OntPropertyDescription newProperty)
Add property to the instance The method will will check if the property already exist and if yes combine the values. If not; just add this property.

Parameters:
newProperty - OntPropertyDescription with the property description.

addProperty

OntPropertyDescription addProperty(java.lang.String newProperty,
                                   java.lang.String value)
Add property to the instance; providing name and value. The method will create OntPropertyDescription and add it to the instance if it does not exist. If the property exist it will combine the values

Parameters:
newProperty - string with the property name
value - string with the property value
Returns:
the created OntPropertyDescription

addProperty

OntPropertyDescription addProperty(java.lang.String newProperty,
                                   java.lang.String propertyValue,
                                   java.lang.Object propertyValueDesc)
Add property to the instance; providing name, value and value description. The method will create OntPropertyDescription and add it to the instance if it does not exist. If the property exist it will combine the values

Parameters:
newProperty - string with the property name
propertyValue - string with the property value
propertyValueDesc - description for the value
Returns:
the created OntPropertyDescription

getName

java.lang.String getName()
Get name of the instance

Returns:
String representing the name in URI format.

getTypes

java.util.Set<java.lang.String> getTypes()
Get types of the instance

Returns:
Set containing the strings with URIs of the types.

getFirstType

java.lang.String getFirstType()
Get first type of the instance

Returns:
URI of the types.

getProperties

java.util.Set<OntPropertyDescription> getProperties()
Get properties of the instance

Returns:
Set containing the OntPropertyDescriptions.

getPropertiesMap

java.util.Map<java.lang.String,OntPropertyDescription> getPropertiesMap()
Get properties of the instance

Returns:
Map containing the OntPropertyDescriptions.

getProperty

OntPropertyDescription getProperty(java.lang.String propertyName)
Get property of the instance

Parameters:
propertyName - name of the property.
Returns:
OntPropertyDescription.

getAllValuesForProperty

java.util.List<java.lang.String> getAllValuesForProperty(java.lang.String propertyURI)
Get values for property of the instance

Parameters:
propertyName - name of the property.
Returns:
list of values

getAllValueDescriptionsForProperty

java.util.List<java.lang.Object> getAllValueDescriptionsForProperty(java.lang.String propertyURI)
Get values descriptions for property of the instance

Parameters:
propertyName - name of the property.
Returns:
list of values descriptions

getFirstValueForProperty

java.lang.String getFirstValueForProperty(java.lang.String propertyURI)
Get the first value for property of the instance

Parameters:
propertyName - name of the property.
Returns:
value of the property

getDescriptionOfFirstValueForProperty

java.lang.Object getDescriptionOfFirstValueForProperty(java.lang.String propertyURI)
Get value description for the first value of the property of the instance

Parameters:
propertyName - name of the property.
Returns:
value description

getNestedProperty

OntPropertyDescription getNestedProperty(java.lang.String propertyName)
Get the given property if nested in the train of interrelated instances. If the property is not found in this instance, recursively search for the property in OntInstanceDescriptions if nested within this one.

Parameters:
propertyName - - URI for the property to find
Returns:
- the property description

removeType

void removeType(java.lang.String name)
Remove the ontology type of this instance.

Parameters:
name - String containing the uri of the ontology type (class).

removeProperty

void removeProperty(java.lang.String propertyName)
Get property from the instance description

Parameters:
propertyName - property name.

getInstanceOntModel

kaos.ontology.util.SerializableOntModelImpl getInstanceOntModel()
Get the Jena-based Ontology Model object for this instance.

Returns:
Jena-based Ontology Model

getAsOWL

java.lang.String getAsOWL()
Get the OWL representation for this instance.

Returns:
string containing the OWL representation

clone

OntInstanceDescription clone()
Clone the instance

Returns:
the new instance


Copyright © 2006 IHMC All Rights Reserved.