org.eclipse.higgins.idas.api
Interface IEntity

All Superinterfaces:
IHasAttributes, IHasMetadata

public interface IEntity
extends IHasMetadata, IHasAttributes

As defined at http://wiki.eclipse.org/Entity and http://wiki.eclipse.org/Context, This interface holds a set of IEntity objects.

All Entities follow the http://www.eclipse.org/higgins/ontologies/2006/higgins ontology as a base. As such, each Entity has the attribute http://www.eclipse.org/higgins/ontologies/2006/higgins#uniqueIdentifier. getEntityID() provides a shortcut to access the value of this attribute. TODO (Doc): Finish javadoc on methods


Method Summary
 IContext getContext()
           
 String getEntityID()
          Returns the Contextually unique identifier of this Entity.
 URI getEntityType()
          Deprecated. Instead, call getModel() and from that call IModel.getType(). Doing this is equivalent to calling this method.
 IEntityModel getModel()
          Returns a model of this type of Entities as it defined in the context's schema.
 void remove()
          Removes this Entity from its Context.
 
Methods inherited from interface org.eclipse.higgins.idas.api.IHasMetadata
addMetadata, addMetadata, equals, getMetadata, getMetadataSet
 
Methods inherited from interface org.eclipse.higgins.idas.api.IHasAttributes
addAttribute, addAttribute, equals, getAttribute, getAttributes, getSingleValuedAttribute, removeAttribute, removeAttributeValue, removeAttributeValue
 

Method Detail

getContext

public IContext getContext()
                    throws IdASException
Returns:
The Context holding this Entity.
Throws:
IdASException

getEntityID

public String getEntityID()
                   throws IdASException
Returns the Contextually unique identifier of this Entity. This is a convenience method equivalent to reading the entity's http://www.eclipse.org/higgins/ontologies/2006/higgins#uniqueIdentifier attribute.

Returns:
Contextually unique identifier of this Entity
Throws:
IdASException

getEntityType

public URI getEntityType()
                  throws IdASException
Deprecated. Instead, call getModel() and from that call IModel.getType(). Doing this is equivalent to calling this method.

Returns the type of this Entity. For example: http://www.eclipse.org/higgins/ontologies/2006/person#Person

Returns:
This Entity's type
Throws:
IdASException

remove

public void remove()
            throws IdASException
Removes this Entity from its Context. Note: This operation is only applied to any backing data store after IContext.applyUpdates() is called.
Note: It is invalid to call subsequent update operations on this IEntity instance or on any elements held by this Entity or by any of its sub-elements.

Throws:
IdASException

getModel

public IEntityModel getModel()
                      throws IdASException
Returns a model of this type of Entities as it defined in the context's schema. Returned model could be used to discover what attributes are defined in the context's schema for this type of Entities.

Returns:
the model of this Entity
Throws:
IdASException