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.6 $


Method Summary
 void addProperty(OntPropertyDescription newProperty)
          Add property to the instance
 OntPropertyDescription addProperty(java.lang.String newProperty, java.lang.String value)
          Add property to the instance, providing name and value.
 void addType(java.lang.String name)
          Add the ontology type of this instance.
 java.lang.Object clone()
          Clone method
 java.lang.String getFirstType()
          Get first type 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.HashMap<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.
 

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

addProperty

void addProperty(OntPropertyDescription newProperty)
Add property to the instance

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 teh instance

Parameters:
newProperty - string with the property name
vale - string with the property vale
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.HashMap<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.

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.

clone

java.lang.Object clone()
Clone method

Returns:
copy of the object

getInstanceOntModel

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

Returns:
Jena-based Ontology Model


Copyright © 2006 IHMC All Rights Reserved.