kaos.ontology.util
Interface KAoSInstanceBuilder

All Known Implementing Classes:
KAoSInstanceBuilderImpl

public interface KAoSInstanceBuilder


Method Summary
 void addDatatypePropertyValue(java.lang.String propertyName, java.lang.Object val)
          Add a value to given Datatype property such as a String, Integer, Float, etc.
 void addObjectPropertyValue(java.lang.String propertyName, java.lang.String resourceName)
          Add a value to given Object property.
 java.util.Enumeration getAllPropertyNames()
          Get the names of all properties contained within this ontology instance.
 java.lang.String getClassName()
          Get the name of the class of this instance.
 java.util.Vector getDatatypePropertyValues(java.lang.String propertyName)
          Get the values of the given Datatype property.
 java.lang.String getInstanceName()
          Get the name of this instance.
 SerializableOntModelImpl getInstanceOntModel()
          Get the jena-based Ontology Model object for this instance.
 java.util.Vector getObjectPropertyValues(java.lang.String propertyName)
          Get the values of the given Object property.
 void showInstance()
          Show the properties and their values in this instance.
 void write(java.io.OutputStream out)
          Write the XML (OWL) representation of this instance to the text output stream provided
 

Method Detail

getClassName

java.lang.String getClassName()
Get the name of the class of this instance.

Returns:
String the URI that is the name of the class for this instance.

getInstanceName

java.lang.String getInstanceName()
Get the name of this instance.

Returns:
String the URI that is the name of this instance.

getInstanceOntModel

SerializableOntModelImpl getInstanceOntModel()
Get the jena-based Ontology Model object for this instance.

Returns:

addDatatypePropertyValue

void addDatatypePropertyValue(java.lang.String propertyName,
                              java.lang.Object val)
                              throws ValueNotSet
Add a value to given Datatype property such as a String, Integer, Float, etc.

Parameters:
String - propertyName the URI that is the name of the property to set
Object - val the value of the Datatype property which must support the toString() method
Throws:
ValueNotSet - if the property is not part of the underlying class.

getAllPropertyNames

java.util.Enumeration getAllPropertyNames()
Get the names of all properties contained within this ontology instance.

Returns:
Enumeration of Strings, each of which contains a URI identifying a property for this instance.

getDatatypePropertyValues

java.util.Vector getDatatypePropertyValues(java.lang.String propertyName)
                                           throws ValueNotSet
Get the values of the given Datatype property.

Parameters:
propertyName - the URI that is the name of the property
Returns:
the values of the property as a Vector of Strings
Throws:
ValueNotSet - if the property is not part of the underlying class.

addObjectPropertyValue

void addObjectPropertyValue(java.lang.String propertyName,
                            java.lang.String resourceName)
                            throws ValueNotSet
Add a value to given Object property.

Parameters:
String - propertyName the URI that is the name of the property
String - resourceURI the URI of the resource which is set as the value of this Object property
Throws:
ValueNotSet - if the property is not part of the underlying class.

getObjectPropertyValues

java.util.Vector getObjectPropertyValues(java.lang.String propertyName)
                                         throws ValueNotSet
Get the values of the given Object property.

Parameters:
propertyName - the name of the property
Returns:
the resource URI values of the property as a Vector of Strings
Throws:
ValueNotSet - if the property is not part of the underlying class.

showInstance

void showInstance()
Show the properties and their values in this instance. Prints an XML (OWL) representation of this instance to the log.


write

void write(java.io.OutputStream out)
Write the XML (OWL) representation of this instance to the text output stream provided

Parameters:
out - The OutputStream that will receive the XML representation of this instance