|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kaos.ontology.util.KAoSInstanceBuilderImpl
public class KAoSInstanceBuilderImpl
Constructor Summary | |
---|---|
KAoSInstanceBuilderImpl(java.io.InputStream ontologyXMLStream,
java.lang.String baseURI)
|
|
KAoSInstanceBuilderImpl(SerializableOntModelImpl mod)
Create an instance builder from an existing ontology model. |
|
KAoSInstanceBuilderImpl(java.lang.String classURI,
java.lang.String instanceURI)
Create a new ontology instance. |
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 conceptName)
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. |
static void |
main(java.lang.String[] args)
|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KAoSInstanceBuilderImpl(java.lang.String classURI, java.lang.String instanceURI)
classURI
- The URI identifying the class this instance is a member of.instanceURI
- URI representing the instance name.public KAoSInstanceBuilderImpl(SerializableOntModelImpl mod)
mod
- The ontology Model object containing an ontology instance.public KAoSInstanceBuilderImpl(java.io.InputStream ontologyXMLStream, java.lang.String baseURI)
ontologyXMLStream
- InputStream containing ontology XML (OWL) defining one instancebaseURI
- Namespace for the instance defined in the ontologyXMLStream.
If the baseURI is null or invalid, the DefaultKAoSInstanceNamespace will be usedMethod Detail |
---|
public void write(java.io.OutputStream out)
write
in interface KAoSInstanceBuilder
out
- The OutputStream that will receive the XML representation of this instancepublic java.lang.String getClassName()
getClassName
in interface KAoSInstanceBuilder
public java.lang.String getInstanceName()
getInstanceName
in interface KAoSInstanceBuilder
public java.util.Enumeration getAllPropertyNames()
getAllPropertyNames
in interface KAoSInstanceBuilder
public void addDatatypePropertyValue(java.lang.String propertyName, java.lang.Object val) throws ValueNotSet
addDatatypePropertyValue
in interface KAoSInstanceBuilder
String
- propertyName the URI that is the name of the property to setObject
- val the value of the Datatype property which
must support the toString() method
ValueNotSet
- if the property is not part of the underlying class.public java.util.Vector getDatatypePropertyValues(java.lang.String propertyName) throws ValueNotSet
getDatatypePropertyValues
in interface KAoSInstanceBuilder
propertyName
- the URI that is the name of the property
ValueNotSet
- if the property is not part of the underlying class.public void addObjectPropertyValue(java.lang.String propertyName, java.lang.String conceptName) throws ValueNotSet
addObjectPropertyValue
in interface KAoSInstanceBuilder
String
- propertyName the URI that is the name of the propertyString
- resourceURI the URI of the resource which
is set as the value of this Object property
ValueNotSet
- if the property is not part of the underlying class.public java.util.Vector getObjectPropertyValues(java.lang.String propertyName) throws ValueNotSet
getObjectPropertyValues
in interface KAoSInstanceBuilder
propertyName
- the name of the property
ValueNotSet
- if the property is not part of the underlying class.public SerializableOntModelImpl getInstanceOntModel()
getInstanceOntModel
in interface KAoSInstanceBuilder
public void showInstance()
showInstance
in interface KAoSInstanceBuilder
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |