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

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

public class Entity
extends StatefulObject
implements org.eclipse.higgins.idas.api.IEntity


Field Summary
static String RDF_TYPE
           
 
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
Entity(Context context, Attribute owner, URI type, URI id, org.eclipse.higgins.idas.api.model.IHasAttributeModel model)
           
Entity(Context context, com.hp.hpl.jena.ontology.Individual individual, Attribute owner, org.eclipse.higgins.idas.api.model.IHasAttributeModel model, URI type)
           
 
Method Summary
 Attribute addAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
           
 Attribute addAttribute(URI attrID)
           
 org.eclipse.higgins.idas.api.IEntity addAttributeValue(URI attrType, String entityId)
           
 void commitState()
           
 Attribute getAttribute(URI type)
           
 Iterator<org.eclipse.higgins.idas.api.IAttribute> getAttributes()
           
 org.eclipse.higgins.idas.api.IContext getContext()
           
 String getEntityID()
           
 com.hp.hpl.jena.ontology.Individual getIndividual()
           
 org.eclipse.higgins.idas.api.model.IEntityModel getModel()
           
 org.eclipse.higgins.idas.api.ISingleValuedAttribute getSingleValuedAttribute(URI attrID)
           
 URI getType()
           
 org.eclipse.higgins.idas.api.model.IValueModel getValueModel()
           
 boolean isProxy()
           
 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)
           
 
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, toString, wait, wait, wait
 

Field Detail

RDF_TYPE

public static final String RDF_TYPE
See Also:
Constant Field Values
Constructor Detail

Entity

public Entity(Context context,
              com.hp.hpl.jena.ontology.Individual individual,
              Attribute owner,
              org.eclipse.higgins.idas.api.model.IHasAttributeModel model,
              URI type)
       throws org.eclipse.higgins.idas.api.IdASException
Throws:
org.eclipse.higgins.idas.api.IdASException

Entity

public Entity(Context context,
              Attribute owner,
              URI type,
              URI id,
              org.eclipse.higgins.idas.api.model.IHasAttributeModel model)
       throws org.eclipse.higgins.idas.api.IdASException
Throws:
org.eclipse.higgins.idas.api.IdASException
Method Detail

getContext

public org.eclipse.higgins.idas.api.IContext getContext()
                                                 throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getContext in interface org.eclipse.higgins.idas.api.IEntity
Throws:
org.eclipse.higgins.idas.api.IdASException

getEntityID

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

getModel

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

getType

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

isSimple

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

remove

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

addAttribute

public Attribute 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 Attribute 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 Attribute getAttribute(URI type)
                       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

getIndividual

public com.hp.hpl.jena.ontology.Individual getIndividual()

getValueModel

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

isProxy

public boolean isProxy()
                throws org.eclipse.higgins.idas.api.IdASException
Specified by:
isProxy in interface org.eclipse.higgins.idas.api.IEntity
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

rollbackState

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

rollbackUpdates

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