kaos.core.csi
Class OntPropertyDescriptionImpl

java.lang.Object
  extended by kaos.core.csi.OntPropertyDescriptionImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, OntPropertyDescription

public class OntPropertyDescriptionImpl
extends java.lang.Object
implements OntPropertyDescription, java.lang.Cloneable, java.io.Serializable

This is an implementation of the OntPropertyDescription interface $Revision: 1.14 $

See Also:
Serialized Form

Constructor Summary
OntPropertyDescriptionImpl(java.lang.String name)
          Constructor with instance name
 
Method Summary
 void addMultipleValues(java.util.Set<java.lang.String> values)
           
 void addPropertyToOntModel(SerializableOntModelImpl ontModel, java.lang.String instanceName)
          Add this property to the instance definition in the ontology model
 void addValue(java.lang.String value)
          Add the value to this property.
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getFirstValue()
          Get the first value of this property.
 java.lang.String getName()
          Get the name of this property.
 java.util.Set<java.lang.String> getNestedPropertyValues(java.lang.String nestedPropertyName)
          Locate the given property nested within one of the value descriptions for this property and return the set of values for that nested property.
 java.lang.Object getValueDescForValue(java.lang.String value)
          Get the optional description of the given property value.
 java.util.Set<java.lang.String> getValues()
          Get the values of this property.
 int hashCode()
           
 void removeAllValues()
          Clear the property value.
 void removeValue(java.lang.String value)
          Remove the property value.
 void removeValueDescForValue(java.lang.String value)
          Remove the optional description of the given property value.
 void setValue(java.lang.String value)
          Set the value to this property, if previous values exists they will be deleted
 void setValueDescForValue(java.lang.String value, java.lang.Object desc)
          Set the optional description of the given property value.
 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

OntPropertyDescriptionImpl

public OntPropertyDescriptionImpl(java.lang.String name)
                           throws java.net.URISyntaxException
Constructor with instance name

Parameters:
name - - instance name
Throws:
java.net.URISyntaxException
Method Detail

setValue

public void setValue(java.lang.String value)
Description copied from interface: OntPropertyDescription
Set the value to this property, if previous values exists they will be deleted

Specified by:
setValue in interface OntPropertyDescription
Parameters:
value - String containing the value of the property.
See Also:
OntPropertyDescription.setValue(java.lang.String)

addValue

public void addValue(java.lang.String value)
Description copied from interface: OntPropertyDescription
Add the value to this property.

Specified by:
addValue in interface OntPropertyDescription
Parameters:
value - String containing the value of the property.
See Also:
OntPropertyDescription.addValue(java.lang.String)

addMultipleValues

public void addMultipleValues(java.util.Set<java.lang.String> values)
Specified by:
addMultipleValues in interface OntPropertyDescription
See Also:
kaos.core.csi.OntPropertyDescription#addValue(Set)

setValueDescForValue

public void setValueDescForValue(java.lang.String value,
                                 java.lang.Object desc)
Description copied from interface: OntPropertyDescription
Set the optional description of the given property value.

Specified by:
setValueDescForValue in interface OntPropertyDescription
Parameters:
value - String containing the value of the property.
desc - Object containing the description of the value often it will be kaos.core.csi.OntInstanceDescription
See Also:
OntPropertyDescription.setValueDescForValue(java.lang.String, java.lang.Object)

getName

public java.lang.String getName()
Description copied from interface: OntPropertyDescription
Get the name of this property.

Specified by:
getName in interface OntPropertyDescription
Returns:
String containing the uri of the property.
See Also:
OntPropertyDescription.getName()

getValues

public java.util.Set<java.lang.String> getValues()
Description copied from interface: OntPropertyDescription
Get the values of this property.

Specified by:
getValues in interface OntPropertyDescription
Returns:
Set containing the value of the property.
See Also:
OntPropertyDescription.getValues()

getFirstValue

public java.lang.String getFirstValue()
Description copied from interface: OntPropertyDescription
Get the first value of this property.

Specified by:
getFirstValue in interface OntPropertyDescription
Returns:
first value of the property.
See Also:
OntPropertyDescription.getFirstValue()

getValueDescForValue

public java.lang.Object getValueDescForValue(java.lang.String value)
Description copied from interface: OntPropertyDescription
Get the optional description of the given property value.

Specified by:
getValueDescForValue in interface OntPropertyDescription
Parameters:
value - String containing the value of the property.
Returns:
Object containing the description of the value often it will be kaos.core.csi.OntInstanceDescription
See Also:
OntPropertyDescription.getValueDescForValue(java.lang.String)

getNestedPropertyValues

public java.util.Set<java.lang.String> getNestedPropertyValues(java.lang.String nestedPropertyName)
Description copied from interface: OntPropertyDescription
Locate the given property nested within one of the value descriptions for this property and return the set of values for that nested property.

Specified by:
getNestedPropertyValues in interface OntPropertyDescription
Returns:
Set of String values for the nested property
See Also:
OntPropertyDescription.getNestedPropertyValues(java.lang.String)

removeValue

public void removeValue(java.lang.String value)
Description copied from interface: OntPropertyDescription
Remove the property value.

Specified by:
removeValue in interface OntPropertyDescription
Parameters:
value - String containing the value of the property.
See Also:
OntPropertyDescription.removeValue(java.lang.String)

removeAllValues

public void removeAllValues()
Clear the property value.

Specified by:
removeAllValues in interface OntPropertyDescription

removeValueDescForValue

public void removeValueDescForValue(java.lang.String value)
Description copied from interface: OntPropertyDescription
Remove the optional description of the given property value.

Specified by:
removeValueDescForValue in interface OntPropertyDescription
Parameters:
value - String containing the value of the property.
See Also:
OntPropertyDescription.removeValueDescForValue(java.lang.String)

addPropertyToOntModel

public void addPropertyToOntModel(SerializableOntModelImpl ontModel,
                                  java.lang.String instanceName)
Description copied from interface: OntPropertyDescription
Add this property to the instance definition in the ontology model

Specified by:
addPropertyToOntModel in interface OntPropertyDescription
Parameters:
ontModel - ontology model to which the property is to be added
instanceName - name of the instance the property is to be added to
See Also:
kaos.core.csi.OntPropertyDescription#raddPropertyToOntModel(kaos.ontology.util.SerializableOntModelImpl, java.lang.String)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Returns a String representation of this instance.

Overrides:
toString in class java.lang.Object