org.eclipse.higgins.idas.cp.jena2.impl
Class SimpleValue

java.lang.Object
  extended by org.eclipse.higgins.idas.cp.jena2.impl.StatefulObject
      extended by org.eclipse.higgins.idas.cp.jena2.impl.SimpleValue
All Implemented Interfaces:
org.eclipse.higgins.idas.api.IHasAttributes, org.eclipse.higgins.idas.api.ISimpleValue, org.eclipse.higgins.idas.api.ITypedValue, org.eclipse.higgins.idas.api.IValue, IStatefulObject

public class SimpleValue
extends StatefulObject
implements org.eclipse.higgins.idas.api.ISimpleValue


Field Summary
 
Fields inherited from interface org.eclipse.higgins.idas.api.ITypedValue
ANYURI_ATTR_VALUE_TYPE_URI_STR, ANYURI_ATTR_VALUE_URI_STR, ANYURI_OWL_TYPE_STR, ANYURI_TYPE_URI, ANYURI_XML_TYPE_STR, BASE_XML_SCHEMA_URI, BASE64BINARY_ATTR_VALUE_TYPE_URI_STR, BASE64BINARY_ATTR_VALUE_URI_STR, BASE64BINARY_OWL_TYPE_STR, BASE64BINARY_TYPE_URI, BASE64BINARY_XML_TYPE_STR, BOOLEAN_ATTR_VALUE_TYPE_URI_STR, BOOLEAN_ATTR_VALUE_URI_STR, BOOLEAN_OWL_TYPE_STR, BOOLEAN_TYPE_URI, BOOLEAN_XML_TYPE_STR, BYTE_ATTR_VALUE_TYPE_URI_STR, BYTE_ATTR_VALUE_URI_STR, BYTE_OWL_TYPE_STR, BYTE_TYPE_URI, BYTE_XML_TYPE_STR, DATE_ATTR_VALUE_TYPE_URI_STR, DATE_ATTR_VALUE_URI_STR, DATE_OWL_TYPE_STR, DATE_TYPE_URI, DATE_XML_TYPE_STR, DATETIME_ATTR_VALUE_TYPE_URI_STR, DATETIME_ATTR_VALUE_URI_STR, DATETIME_OWL_TYPE_STR, DATETIME_TYPE_URI, DATETIME_XML_TYPE_STR, DECIMAL_ATTR_VALUE_TYPE_URI_STR, DECIMAL_ATTR_VALUE_URI_STR, DECIMAL_OWL_TYPE_STR, DECIMAL_TYPE_URI, DECIMAL_XML_TYPE_STR, DOUBLE_ATTR_VALUE_TYPE_URI_STR, DOUBLE_ATTR_VALUE_URI_STR, DOUBLE_OWL_TYPE_STR, DOUBLE_TYPE_URI, DOUBLE_XML_TYPE_STR, ENTITYID_ATTR_VALUE_TYPE_URI_STR, ENTITYID_TYPE_URI, ENTITYID_XML_TYPE_STR, FLOAT_ATTR_VALUE_TYPE_URI_STR, FLOAT_ATTR_VALUE_URI_STR, FLOAT_OWL_TYPE_STR, FLOAT_TYPE_URI, FLOAT_XML_TYPE_STR, GDAY_ATTR_VALUE_TYPE_URI_STR, GDAY_ATTR_VALUE_URI_STR, GDAY_OWL_TYPE_STR, GDAY_TYPE_URI, GDAY_XML_TYPE_STR, GMONTH_ATTR_VALUE_TYPE_URI_STR, GMONTH_ATTR_VALUE_URI_STR, GMONTH_OWL_TYPE_STR, GMONTH_TYPE_URI, GMONTH_XML_TYPE_STR, GMONTHDAY_ATTR_VALUE_TYPE_URI_STR, GMONTHDAY_ATTR_VALUE_URI_STR, GMONTHDAY_OWL_TYPE_STR, GMONTHDAY_TYPE_URI, GMONTHDAY_XML_TYPE_STR, GYEAR_ATTR_VALUE_TYPE_URI_STR, GYEAR_ATTR_VALUE_URI_STR, GYEAR_OWL_TYPE_STR, GYEAR_TYPE_URI, GYEAR_XML_TYPE_STR, GYEARMONTH_ATTR_VALUE_TYPE_URI_STR, GYEARMONTH_ATTR_VALUE_URI_STR, GYEARMONTH_OWL_TYPE_STR, GYEARMONTH_TYPE_URI, GYEARMONTH_XML_TYPE_STR, HEXBINARY_ATTR_VALUE_TYPE_URI_STR, HEXBINARY_ATTR_VALUE_URI_STR, HEXBINARY_OWL_TYPE_STR, HEXBINARY_TYPE_URI, HEXBINARY_XML_TYPE_STR, INT_ATTR_VALUE_TYPE_URI_STR, INT_ATTR_VALUE_URI_STR, INT_OWL_TYPE_STR, INT_TYPE_URI, INT_XML_TYPE_STR, INTEGER_ATTR_VALUE_TYPE_URI_STR, INTEGER_ATTR_VALUE_URI_STR, INTEGER_OWL_TYPE_STR, INTEGER_TYPE_URI, INTEGER_XML_TYPE_STR, LANGUAGE_ATTR_VALUE_TYPE_URI_STR, LANGUAGE_ATTR_VALUE_URI_STR, LANGUAGE_OWL_TYPE_STR, LANGUAGE_TYPE_URI, LANGUAGE_XML_TYPE_STR, LONG_ATTR_VALUE_TYPE_URI_STR, LONG_ATTR_VALUE_URI_STR, LONG_OWL_TYPE_STR, LONG_TYPE_URI, LONG_XML_TYPE_STR, NAME_ATTR_VALUE_TYPE_URI_STR, NAME_ATTR_VALUE_URI_STR, NAME_OWL_TYPE_STR, NAME_TYPE_URI, NAME_XML_TYPE_STR, NCNAME_ATTR_VALUE_TYPE_URI_STR, NCNAME_ATTR_VALUE_URI_STR, NCNAME_OWL_TYPE_STR, NCNAME_TYPE_URI, NCNAME_XML_TYPE_STR, NEGATIVEINTEGER_ATTR_VALUE_TYPE_URI_STR, NEGATIVEINTEGER_ATTR_VALUE_URI_STR, NEGATIVEINTEGER_OWL_TYPE_STR, NEGATIVEINTEGER_TYPE_URI, NEGATIVEINTEGER_XML_TYPE_STR, NMTOKEN_ATTR_VALUE_TYPE_URI_STR, NMTOKEN_ATTR_VALUE_URI_STR, NMTOKEN_OWL_TYPE_STR, NMTOKEN_TYPE_URI, NMTOKEN_XML_TYPE_STR, NONNEGATIVEINTEGER_ATTR_VALUE_TYPE_URI_STR, NONNEGATIVEINTEGER_ATTR_VALUE_URI_STR, NONNEGATIVEINTEGER_OWL_TYPE_STR, NONNEGATIVEINTEGER_TYPE_URI, NONNEGATIVEINTEGER_XML_TYPE_STR, NONPOSITIVEINTEGER_ATTR_VALUE_TYPE_URI_STR, NONPOSITIVEINTEGER_ATTR_VALUE_URI_STR, NONPOSITIVEINTEGER_OWL_TYPE_STR, NONPOSITIVEINTEGER_TYPE_URI, NONPOSITIVEINTEGER_XML_TYPE_STR, NORMALIZEDSTRING_ATTR_VALUE_TYPE_URI_STR, NORMALIZEDSTRING_ATTR_VALUE_URI_STR, NORMALIZEDSTRING_OWL_TYPE_STR, NORMALIZEDSTRING_TYPE_URI, NORMALIZEDSTRING_XML_TYPE_STR, OWL_TYPE_SUFFIX, POSITIVEINTEGER_ATTR_VALUE_TYPE_URI_STR, POSITIVEINTEGER_ATTR_VALUE_URI_STR, POSITIVEINTEGER_OWL_TYPE_STR, POSITIVEINTEGER_TYPE_URI, POSITIVEINTEGER_XML_TYPE_STR, RELATIVEENTITYUDI_ATTR_VALUE_TYPE_URI_STR, RELATIVEENTITYUDI_ATTR_VALUE_URI_STR, RELATIVEENTITYUDI_OWL_TYPE_STR, RELATIVEENTITYUDI_TYPE_URI, RELATIVEENTITYUDI_XML_TYPE_STR, SHORT_ATTR_VALUE_TYPE_URI_STR, SHORT_ATTR_VALUE_URI_STR, SHORT_OWL_TYPE_STR, SHORT_TYPE_URI, SHORT_XML_TYPE_STR, STRING_ATTR_VALUE_TYPE_URI_STR, STRING_ATTR_VALUE_URI_STR, STRING_OWL_TYPE_STR, STRING_TYPE_URI, STRING_XML_TYPE_STR, TIME_ATTR_VALUE_TYPE_URI_STR, TIME_ATTR_VALUE_URI_STR, TIME_OWL_TYPE_STR, TIME_TYPE_URI, TIME_XML_TYPE_STR, TOKEN_ATTR_VALUE_TYPE_URI_STR, TOKEN_ATTR_VALUE_URI_STR, TOKEN_OWL_TYPE_STR, TOKEN_TYPE_URI, TOKEN_XML_TYPE_STR, typeMap, UNSIGNEDBYTE_ATTR_VALUE_TYPE_URI_STR, UNSIGNEDBYTE_ATTR_VALUE_URI_STR, UNSIGNEDBYTE_OWL_TYPE_STR, UNSIGNEDBYTE_TYPE_URI, UNSIGNEDBYTE_XML_TYPE_STR, UNSIGNEDINT_ATTR_VALUE_TYPE_URI_STR, UNSIGNEDINT_ATTR_VALUE_URI_STR, UNSIGNEDINT_OWL_TYPE_STR, UNSIGNEDINT_TYPE_URI, UNSIGNEDINT_XML_TYPE_STR, UNSIGNEDLONG_ATTR_VALUE_TYPE_URI_STR, UNSIGNEDLONG_ATTR_VALUE_URI_STR, UNSIGNEDLONG_OWL_TYPE_STR, UNSIGNEDLONG_TYPE_URI, UNSIGNEDLONG_XML_TYPE_STR, UNSIGNEDSHORT_ATTR_VALUE_TYPE_URI_STR, UNSIGNEDSHORT_ATTR_VALUE_URI_STR, UNSIGNEDSHORT_OWL_TYPE_STR, UNSIGNEDSHORT_TYPE_URI, UNSIGNEDSHORT_XML_TYPE_STR
 
Fields inherited from interface org.eclipse.higgins.idas.api.IValue
BASE_OWL_URI
 
Fields inherited from interface org.eclipse.higgins.idas.cp.jena2.IStatefulObject
CHANGED_OBJ, DELETED_OBJ, NEW_OBJ, PRE_DELETED_NEW_OBJ, PRE_DELETED_STORED_OBJ, STORED_OBJ
 
Constructor Summary
SimpleValue(Context context, Attribute owner, com.hp.hpl.jena.rdf.model.Literal literal, URI type, org.eclipse.higgins.idas.api.model.ISimpleValueModel model)
           
SimpleValue(Context context, Attribute owner, URI type, Object data, org.eclipse.higgins.idas.api.model.ISimpleValueModel model)
           
 
Method Summary
 org.eclipse.higgins.idas.api.IAttribute addAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
           
 org.eclipse.higgins.idas.api.IAttribute addAttribute(URI attrID)
           
 org.eclipse.higgins.idas.api.IEntity addAttributeValue(URI attrType, String entityId)
           
 void commitState()
           
 org.eclipse.higgins.idas.api.IAttribute getAttribute(URI attrID)
           
 Iterator<org.eclipse.higgins.idas.api.IAttribute> getAttributes()
           
 String getCanonical()
           
 Object getData()
           
 String getLexical()
           
 com.hp.hpl.jena.rdf.model.Literal getLiteral()
           
 org.eclipse.higgins.idas.api.model.ISimpleValueModel getModel()
           
 org.eclipse.higgins.idas.api.ISingleValuedAttribute getSingleValuedAttribute(URI attrID)
           
 URI getType()
           
 org.eclipse.higgins.idas.api.model.IValueModel getValueModel()
           
 boolean isSimple()
           
 void remove()
           
 void removeAttribute(URI attrID)
           
 void removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
           
 void removeAttributeValue(URI attrID, Object value)
           
 void rollbackState()
           
 void rollbackUpdates()
           
 void saveUpdates(com.hp.hpl.jena.ontology.OntModel model)
           
 void setData(Object data)
           
 String toString()
           
 
Methods inherited from class org.eclipse.higgins.idas.cp.jena2.impl.StatefulObject
getState, setState
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleValue

public SimpleValue(Context context,
                   Attribute owner,
                   com.hp.hpl.jena.rdf.model.Literal literal,
                   URI type,
                   org.eclipse.higgins.idas.api.model.ISimpleValueModel model)
            throws org.eclipse.higgins.idas.api.IdASException
Throws:
org.eclipse.higgins.idas.api.IdASException

SimpleValue

public SimpleValue(Context context,
                   Attribute owner,
                   URI type,
                   Object data,
                   org.eclipse.higgins.idas.api.model.ISimpleValueModel model)
            throws org.eclipse.higgins.idas.api.IdASException
Throws:
org.eclipse.higgins.idas.api.IdASException
Method Detail

getModel

public org.eclipse.higgins.idas.api.model.ISimpleValueModel getModel()
Specified by:
getModel in interface org.eclipse.higgins.idas.api.ISimpleValue

getCanonical

public String getCanonical()
                    throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getCanonical in interface org.eclipse.higgins.idas.api.ITypedValue
Throws:
org.eclipse.higgins.idas.api.IdASException

getData

public Object getData()
               throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getData in interface org.eclipse.higgins.idas.api.ITypedValue
Throws:
org.eclipse.higgins.idas.api.IdASException

getLexical

public String getLexical()
                  throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getLexical in interface org.eclipse.higgins.idas.api.ITypedValue
Throws:
org.eclipse.higgins.idas.api.IdASException

setData

public void setData(Object data)
             throws org.eclipse.higgins.idas.api.IdASException
Specified by:
setData in interface org.eclipse.higgins.idas.api.ITypedValue
Throws:
org.eclipse.higgins.idas.api.IdASException

remove

public void remove()
Specified by:
remove in interface org.eclipse.higgins.idas.api.IValue

getType

public URI getType()
Specified by:
getType in interface org.eclipse.higgins.idas.api.IValue

isSimple

public boolean isSimple()
Specified by:
isSimple in interface org.eclipse.higgins.idas.api.IValue

getLiteral

public com.hp.hpl.jena.rdf.model.Literal getLiteral()

addAttribute

public org.eclipse.higgins.idas.api.IAttribute addAttribute(URI attrID)
                                                     throws org.eclipse.higgins.idas.api.IdASException,
                                                            org.eclipse.higgins.idas.api.InvalidTypeException
Specified by:
addAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException

addAttribute

public org.eclipse.higgins.idas.api.IAttribute addAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
                                                     throws org.eclipse.higgins.idas.api.IdASException
Specified by:
addAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

getAttribute

public org.eclipse.higgins.idas.api.IAttribute getAttribute(URI attrID)
                                                     throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

getAttributes

public Iterator<org.eclipse.higgins.idas.api.IAttribute> getAttributes()
                                                                throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getAttributes in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

getSingleValuedAttribute

public org.eclipse.higgins.idas.api.ISingleValuedAttribute getSingleValuedAttribute(URI attrID)
                                                                             throws org.eclipse.higgins.idas.api.IdASException,
                                                                                    org.eclipse.higgins.idas.api.NotSingleValuedAttributeException
Specified by:
getSingleValuedAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.NotSingleValuedAttributeException

removeAttribute

public void removeAttribute(URI attrID)
                     throws org.eclipse.higgins.idas.api.IdASException
Specified by:
removeAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

removeAttributeValue

public void removeAttributeValue(URI attrID,
                                 Object value)
                          throws org.eclipse.higgins.idas.api.IdASException
Specified by:
removeAttributeValue in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

removeAttributeValue

public void removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
                          throws org.eclipse.higgins.idas.api.IdASException
Specified by:
removeAttributeValue in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

addAttributeValue

public org.eclipse.higgins.idas.api.IEntity addAttributeValue(URI attrType,
                                                              String entityId)
                                                       throws org.eclipse.higgins.idas.api.IdASException
Specified by:
addAttributeValue in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

saveUpdates

public void saveUpdates(com.hp.hpl.jena.ontology.OntModel model)
                 throws org.eclipse.higgins.idas.api.IdASException
Specified by:
saveUpdates in interface IStatefulObject
Throws:
org.eclipse.higgins.idas.api.IdASException

commitState

public void commitState()
Specified by:
commitState in interface IStatefulObject
Overrides:
commitState in class StatefulObject

getValueModel

public org.eclipse.higgins.idas.api.model.IValueModel getValueModel()
Specified by:
getValueModel in interface org.eclipse.higgins.idas.api.IValue

rollbackUpdates

public void rollbackUpdates()
                     throws org.eclipse.higgins.idas.api.IdASException
Specified by:
rollbackUpdates in interface IStatefulObject
Throws:
org.eclipse.higgins.idas.api.IdASException

rollbackState

public void rollbackState()
Specified by:
rollbackState in interface IStatefulObject
Overrides:
rollbackState in class StatefulObject

toString

public String toString()
Overrides:
toString in class Object