| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkaos.policy.information.KAoSInstance
public class KAoSInstance
| Nested Class Summary | |
|---|---|
 class | 
KAoSInstance.PropertyNameWithPath
 | 
| Field Summary | |
|---|---|
protected  java.lang.String | 
_instanceNameURI
 | 
protected  java.lang.String | 
_instanceOfClassURI
 | 
protected  java.lang.String | 
_originalOWL
 | 
protected  java.util.Hashtable | 
_properties
keys are property names, values are KAoSProperties  | 
protected  java.util.Hashtable | 
_propertyClasses
 | 
| Constructor Summary | |
|---|---|
KAoSInstance()
Create an anonymous KAoSInstance with an empty set of properties  | 
|
KAoSInstance(KAoSInstance ki)
Cloning constructor  | 
|
KAoSInstance(java.lang.String className,
             java.lang.String instanceName)
Create an instance of the given ontology class with the given ontology name  | 
|
| Method Summary | |
|---|---|
 void | 
addProperty(KAoSProperty add)
Adds the given property to the set of properties in this class.  | 
 void | 
addProperty(java.lang.String propertyName,
            java.lang.Object propertyValue)
Adds a property to this instance with the given name and propertyValue.  | 
 void | 
addProperty(java.lang.String propertyName,
            java.util.Set propertyValues)
Adds a property to this instance with the given name and set of propertyValues.  | 
 int | 
compareProperty(KAoSProperty other)
Compare the given property to a matching property found in this instance.  | 
 int | 
comparePropertyOtherWay(KAoSProperty other)
Compare the given property to a matching property found in this instance.  | 
 java.util.Enumeration | 
getAllProperties()
Get all of the properties for this instance.  | 
 java.util.Enumeration | 
getAllPropertyNames()
get all the property names of this instance  | 
 java.util.HashMap | 
getAllPropertyValuesWithPaths(java.util.Vector propertyPathVector)
Flatten all of the properties in this instance as well as all nested instances into a single HashMap.  | 
 java.lang.String | 
getClassNameURI()
get the URI for the ontology class this is an instance of  | 
 java.lang.String | 
getInstanceNameURI()
Get the URI that is the name of this instance  | 
 KAoSProperty | 
getNestedProperty(java.lang.String propertyName)
Get the KAoSProperty with the given name from this instance's set of properties.  | 
 java.lang.Object | 
getNestedPropertyValue(java.lang.String propertyName)
Get the first value from the set of values for the given property name.  | 
 java.util.Set | 
getNestedPropertyValues(java.lang.String propertyName)
Get the set of values for the given property name.  | 
 java.lang.String | 
getOriginalOWL()
If this KAoSInstance was created by parsing an OWL document, return the original OWL for this instance, otherwise null.  | 
 KAoSProperty | 
getProperty(java.lang.String propertyName)
Get the KAoSProperty with the given name from this instance's set of properties.  | 
 int | 
numberOfProperties()
This function returns the number of properties held in this description.  | 
 void | 
removeProperty(java.lang.String propertyName)
Remove the property with the given name from the set of this instance's properties.  | 
 KAoSInstance | 
returnCopy()
Return a clone of this instance.  | 
 void | 
setOriginalOWL(java.lang.String owl)
If this KAoSInstance was created by parsing an OWL document, store the original OWL.  | 
 void | 
setPropertyValue(java.lang.String propertyName,
                 java.lang.Object propertyValue)
Replace the value of an existing property with the given value  | 
 void | 
setPropertyValues(java.lang.String propertyName,
                  java.util.Set propertyValues)
Replace the value of an existing property with the given set of values  | 
 java.lang.String | 
toString()
Return a string representation of this instance.  | 
 void | 
updateInstancesForClass(java.lang.String className,
                        java.util.Collection inst)
update the class instances of a property contained in this instance  | 
 void | 
updateSubpropertyNamesForProperty(java.lang.String propName,
                                  java.util.Collection subProps)
update the cached subproperties of the given property  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected java.util.Hashtable _properties
protected java.lang.String _instanceNameURI
protected java.lang.String _instanceOfClassURI
protected java.lang.String _originalOWL
protected java.util.Hashtable _propertyClasses
| Constructor Detail | 
|---|
public KAoSInstance()
public KAoSInstance(java.lang.String className,
                    java.lang.String instanceName)
className - - URI specifying the ontology class this is an instance ofinstanceName - - URI for the name of this instancepublic KAoSInstance(KAoSInstance ki)
ki - | Method Detail | 
|---|
public java.lang.String getInstanceNameURI()
public java.lang.String getClassNameURI()
public void addProperty(KAoSProperty add)
add - - the KAoSProperty to add to this instance
public void addProperty(java.lang.String propertyName,
                        java.util.Set propertyValues)
propertyName - - name of the property to addpropertyValues - - set of property values for the new property, set members are Objects
public void addProperty(java.lang.String propertyName,
                        java.lang.Object propertyValue)
propertyName - - name of the property to addpropertyValue - - string value for the new propertypublic void removeProperty(java.lang.String propertyName)
name - - URI for the name of the property to removepublic KAoSProperty getProperty(java.lang.String propertyName)
propertyName - 
public void updateSubpropertyNamesForProperty(java.lang.String propName,
                                              java.util.Collection subProps)
propName - the given propertysubProps - names of its subpropertiespublic KAoSProperty getNestedProperty(java.lang.String propertyName)
propertyName - - URI for the property to get
public java.util.Set getNestedPropertyValues(java.lang.String propertyName)
                                      throws ValueNotSet
propertyName - - URI for the property to find
ValueNotSet
public java.lang.Object getNestedPropertyValue(java.lang.String propertyName)
                                        throws ValueNotSet
propertyName - - URI for the property to find
ValueNotSet
public void setPropertyValue(java.lang.String propertyName,
                             java.lang.Object propertyValue)
                      throws ValueNotSet
propertyName - - URI for the property namepropertyValue - - new value for the property
ValueNotSet - if the property does not exist
public void setPropertyValues(java.lang.String propertyName,
                              java.util.Set propertyValues)
                       throws ValueNotSet
propertyName - - URI for the property namepropertyValues - - set of new values for the property
ValueNotSet - if the property does not exist
public void updateInstancesForClass(java.lang.String className,
                                    java.util.Collection inst)
public java.util.Enumeration getAllProperties()
public java.util.Enumeration getAllPropertyNames()
public java.util.HashMap getAllPropertyValuesWithPaths(java.util.Vector propertyPathVector)
propertyNamePrefix - - String prefix for property name (e.g. 'path-root.'), 
                                                                typically null except for the recursive calls which use this to build paths to nested properties
public int compareProperty(KAoSProperty other)
other - 
public int comparePropertyOtherWay(KAoSProperty other)
other - 
public int numberOfProperties()
public java.lang.String getOriginalOWL()
public void setOriginalOWL(java.lang.String owl)
owl - public KAoSInstance returnCopy()
public java.lang.String toString()
toString in class java.lang.Object
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||