org.eclipse.higgins.idas.spi
Class BasicEntity

java.lang.Object
  extended byorg.eclipse.higgins.idas.spi.BasicEntity
All Implemented Interfaces:
IAttributeContainer, org.eclipse.higgins.idas.api.IBlankEntity, org.eclipse.higgins.idas.api.IEntity, org.eclipse.higgins.idas.api.IHasAttributes

public class BasicEntity
extends Object
implements org.eclipse.higgins.idas.api.IEntity, IAttributeContainer

Basic implementation of IEntity. The intent of this abstract class is to be used by Context Provider writers as a superclass for IEntity instances. The benefits of using this class are that you will pick up any convenience methods as well as have the latest methods stubbed out such that when new methods are added to IEntity and implemented here, the subclass will still compile.


Constructor Summary
BasicEntity(BasicContext containerCtx, URI type, String entityId)
           
BasicEntity(BasicContext containerCtx, URI type, String entityID, Iterator attributes)
           
BasicEntity(org.eclipse.higgins.idas.api.IContext context)
           
BasicEntity(org.eclipse.higgins.idas.api.IContext context, URI type, String entityId)
          The preferred constructor
BasicEntity(org.eclipse.higgins.idas.api.IContext context, URI type, String entityId, Iterator attributes)
          The preferred constructor
 
Method Summary
 org.eclipse.higgins.idas.api.IAttribute addAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
           
 org.eclipse.higgins.idas.api.IAttribute addAttribute(URI type)
           
 boolean equals(org.eclipse.higgins.idas.api.IHasAttributes attributes)
           
 org.eclipse.higgins.idas.api.IAttribute getAttribute(URI attrID)
           
 Iterator getAttributes()
           
 org.eclipse.higgins.idas.api.IContext getContext()
           
 String getEntityID()
           
 URI getEntityType()
           
 org.eclipse.higgins.idas.api.model.IEntityModel getModel()
           
 org.eclipse.higgins.idas.api.ISingleValuedAttribute getSingleValuedAttribute(URI attrID)
           
 void remove()
           
 void removeAttribute(URI attrID)
           
 void removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
           
 void removeAttributeValue(URI attrID, Object value)
           
 void updateNotification(AttributeNotification attrNotif)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicEntity

public BasicEntity(org.eclipse.higgins.idas.api.IContext context)
            throws org.eclipse.higgins.idas.api.IdASException
Parameters:
context -
Throws:
org.eclipse.higgins.idas.api.IdASException

BasicEntity

public BasicEntity(org.eclipse.higgins.idas.api.IContext context,
                   URI type,
                   String entityId)
            throws org.eclipse.higgins.idas.api.IdASException
The preferred constructor

Parameters:
context -
type -
entityId -
Throws:
org.eclipse.higgins.idas.api.IdASException

BasicEntity

public BasicEntity(org.eclipse.higgins.idas.api.IContext context,
                   URI type,
                   String entityId,
                   Iterator attributes)
            throws org.eclipse.higgins.idas.api.IdASException
The preferred constructor

Parameters:
context -
type -
entityId -
attributes -
Throws:
org.eclipse.higgins.idas.api.IdASException

BasicEntity

public BasicEntity(BasicContext containerCtx,
                   URI type,
                   String entityId)
            throws org.eclipse.higgins.idas.api.IdASException

BasicEntity

public BasicEntity(BasicContext containerCtx,
                   URI type,
                   String entityID,
                   Iterator attributes)
            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

getModel

public org.eclipse.higgins.idas.api.model.IEntityModel getModel()
                                                         throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getModel in interface org.eclipse.higgins.idas.api.IBlankEntity
Throws:
org.eclipse.higgins.idas.api.IdASException

getEntityType

public URI getEntityType()
                  throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getEntityType 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

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

addAttribute

public org.eclipse.higgins.idas.api.IAttribute addAttribute(URI type)
                                                     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

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

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

getAttributes

public Iterator 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

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

equals

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

updateNotification

public void updateNotification(AttributeNotification attrNotif)
                        throws org.eclipse.higgins.idas.api.IdASException
Specified by:
updateNotification in interface IAttributeContainer
Parameters:
attrNotif -
Throws:
org.eclipse.higgins.idas.api.IdASException