|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkaos.core.csi.OntInstanceDescriptionImpl
public class OntInstanceDescriptionImpl
Represents an instance of an ontology class. Each property's value may have description, which can be another OntInstanceDescriptionImpl thus allowing for unlimited nesting of OntInstanceDescriptionImpl's.
$Revision: 1.41 $,
Serialized Form| Constructor Summary | |
|---|---|
OntInstanceDescriptionImpl(SerializableOntModelImpl instanceModel)
Constructor creating an instance based on ontology model containing OWL defining this instance. |
|
OntInstanceDescriptionImpl(SerializableOntModelImpl instanceModel,
boolean findValueDescriptions)
Constructor creating an instance based on ontology model containing OWL defining this instance. |
|
OntInstanceDescriptionImpl(SerializableOntModelImpl instanceModel,
OntologyService myOntologyService)
Constructor creating an instance based on ontology model containing OWL defining this instance. |
|
OntInstanceDescriptionImpl(SerializableOntModelImpl instanceModel,
OntologyService myOntologyService,
java.util.Map<java.lang.String,java.util.List<OntPropertyDescription>> createdValueDescs)
Constructor creating an instance based on ontology model containing OWL defining this instance. |
|
OntInstanceDescriptionImpl(java.lang.String owlString)
Constructor creating an instance from OWL. |
|
OntInstanceDescriptionImpl(java.lang.String owlString,
OntologyService myOntologyService)
Constructor creating an instance from OWL. |
|
OntInstanceDescriptionImpl(java.lang.String instanceName,
java.lang.String className)
Basic constructor |
|
| Method Summary | |
|---|---|
void |
addProperty(OntPropertyDescription newProperty)
Add property to the instance |
OntPropertyDescription |
addProperty(java.lang.String newPropertyName,
java.lang.String value)
Add property to the instance, providing name and value. |
void |
addType(java.lang.String className)
Add the ontology type of this instance. |
void |
addValueForProperty(java.lang.String propertyURI,
java.lang.String propertyValue)
|
void |
addValueForProperty(java.lang.String propertyURI,
java.lang.String propertyValue,
java.lang.Object propertyValueDesc)
|
java.lang.Object |
clone()
Implementation of the clone method |
OntInstanceDescription |
createValueDescription(java.lang.String propertyURI,
SerializableOntModelImpl model,
OntologyService ontService,
java.util.Map<java.lang.String,java.util.List<OntPropertyDescription>> createdValueDescs)
|
boolean |
equals(java.lang.Object obj)
|
java.util.Vector<java.lang.Object> |
getAllValueDescriptionsForProperty(java.lang.String propertyURI)
|
java.util.Vector<java.lang.String> |
getAllValuesForProperty(java.lang.String propertyURI)
|
java.lang.Object |
getDescriptionOfFirstValueForProperty(java.lang.String propertyURI)
|
java.lang.String |
getFirstType()
Get first type of the instance |
java.lang.String |
getFirstValueForProperty(java.lang.String propertyURI)
|
java.lang.String |
getInstanceID()
|
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 path 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 |
int |
hashCode()
|
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)
|
void |
setValueForProperty(java.lang.String propertyURI,
OntInstanceDescription propertyValue)
|
void |
setValueForProperty(java.lang.String propertyURI,
java.lang.String propertyValue)
|
java.lang.String |
toString()
Returns a string representation of this instance. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OntInstanceDescriptionImpl(java.lang.String instanceName,
java.lang.String className)
throws java.net.URISyntaxException
instanceName - - instance nameclassName - - initial class of instance
java.net.URISyntaxException - when the class or instance name are not URI
public OntInstanceDescriptionImpl(java.lang.String owlString)
throws java.net.URISyntaxException
owlString - - String containing valid OWL that defines an ontology instance
java.net.URISyntaxException
public OntInstanceDescriptionImpl(java.lang.String owlString,
OntologyService myOntologyService)
throws java.net.URISyntaxException
owlString - - String containing valid OWL that defines an ontology instancemyOntologyService - - Ontology service used to lookup the value descriptions not defined in the owlString,
may be null in which case the OntologyService lookup is skipped
java.net.URISyntaxException
public OntInstanceDescriptionImpl(SerializableOntModelImpl instanceModel)
throws java.net.URISyntaxException
instanceModel - - Ontology model wrapper with the id of instance you want in the ontologyStructureId (see SerializableOntModelImpl.setOntologyStructureId(String)
java.net.URISyntaxException
public OntInstanceDescriptionImpl(SerializableOntModelImpl instanceModel,
boolean findValueDescriptions)
throws java.net.URISyntaxException
instanceModel - - Ontology model wrapper with the id of instance you want in the ontologyStructureId (see SerializableOntModelImpl.setOntologyStructureId(String)findValueDescriptions - - indicates if to parse descriptions of the property values
java.net.URISyntaxException
public OntInstanceDescriptionImpl(SerializableOntModelImpl instanceModel,
OntologyService myOntologyService)
throws java.net.URISyntaxException
instanceModel - - Ontology model wrapper with the id of instance you want in the ontologyStructureIdmyOntologyService - - Ontology service used to lookup the value descriptions not defined in the owlString,
may be null in which case the OntologyService lookup is skipped
java.net.URISyntaxException
public OntInstanceDescriptionImpl(SerializableOntModelImpl instanceModel,
OntologyService myOntologyService,
java.util.Map<java.lang.String,java.util.List<OntPropertyDescription>> createdValueDescs)
throws java.net.URISyntaxException
instanceModel - - Ontology model wrapper with the id of instance you want in the ontologyStructureIdmyOntologyService - - Ontology service used to lookup the value descriptions not defined in the owlString,
may be null in which case the OntologyService lookup is skipped
java.net.URISyntaxException| Method Detail |
|---|
public OntInstanceDescription createValueDescription(java.lang.String propertyURI,
SerializableOntModelImpl model,
OntologyService ontService,
java.util.Map<java.lang.String,java.util.List<OntPropertyDescription>> createdValueDescs)
throws java.net.URISyntaxException
java.net.URISyntaxExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void addProperty(OntPropertyDescription newProperty)
OntInstanceDescription
addProperty in interface OntInstanceDescriptionnewProperty - OntPropertyDescription with the property description.OntInstanceDescription.addProperty(kaos.core.csi.OntPropertyDescription)
public OntPropertyDescription addProperty(java.lang.String newPropertyName,
java.lang.String value)
OntInstanceDescription
addProperty in interface OntInstanceDescriptionnewPropertyName - string with the property name
public void setProperty(OntPropertyDescription newProperty)
public void addType(java.lang.String className)
throws java.net.URISyntaxException
OntInstanceDescription
addType in interface OntInstanceDescriptionclassName - String containing the uri of the ontology type (class).
java.net.URISyntaxException - when the name is not a correct URIOntInstanceDescription.addType(java.lang.String)public java.lang.String getName()
OntInstanceDescription
getName in interface OntInstanceDescriptionOntInstanceDescription.getName()public java.util.Set<java.lang.String> getTypes()
OntInstanceDescription
getTypes in interface OntInstanceDescriptionOntInstanceDescription.getTypes()public java.lang.String getFirstType()
OntInstanceDescription
getFirstType in interface OntInstanceDescriptionOntInstanceDescription.getFirstType()public java.util.Set<OntPropertyDescription> getProperties()
OntInstanceDescription
getProperties in interface OntInstanceDescriptionOntInstanceDescription.getProperties()public java.util.HashMap<java.lang.String,OntPropertyDescription> getPropertiesMap()
OntInstanceDescription
getPropertiesMap in interface OntInstanceDescriptionOntInstanceDescription.getPropertiesMap()public OntPropertyDescription getProperty(java.lang.String propertyName)
OntInstanceDescription
getProperty in interface OntInstanceDescriptionpropertyName - name of the property.
OntInstanceDescription.getProperty(java.lang.String)public OntPropertyDescription getNestedProperty(java.lang.String propertyName)
getNestedProperty in interface OntInstanceDescriptionpropertyName - - URI for the property to find
public void removeType(java.lang.String name)
OntInstanceDescription
removeType in interface OntInstanceDescriptionname - String containing the uri of the ontology type (class).OntInstanceDescription.removeType(java.lang.String)public void removeProperty(java.lang.String propertyName)
OntInstanceDescription
removeProperty in interface OntInstanceDescriptionpropertyName - property name.OntInstanceDescription.removeProperty(java.lang.String)public java.lang.Object clone()
clone in interface OntInstanceDescriptionclone in class java.lang.Objectpublic java.lang.String getInstanceID()
public java.lang.String toString()
toString in class java.lang.Objectpublic SerializableOntModelImpl getInstanceOntModel()
OntInstanceDescription
getInstanceOntModel in interface OntInstanceDescriptionOntInstanceDescription.getInstanceOntModel()public java.lang.String getFirstValueForProperty(java.lang.String propertyURI)
public java.lang.Object getDescriptionOfFirstValueForProperty(java.lang.String propertyURI)
public java.util.Vector<java.lang.Object> getAllValueDescriptionsForProperty(java.lang.String propertyURI)
public java.util.Vector<java.lang.String> getAllValuesForProperty(java.lang.String propertyURI)
public void setValueForProperty(java.lang.String propertyURI,
OntInstanceDescription propertyValue)
public void setValueForProperty(java.lang.String propertyURI,
java.lang.String propertyValue)
public void addValueForProperty(java.lang.String propertyURI,
java.lang.String propertyValue)
public void addValueForProperty(java.lang.String propertyURI,
java.lang.String propertyValue,
java.lang.Object propertyValueDesc)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||