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.IEntity, org.eclipse.higgins.idas.api.IHasAttributes, org.eclipse.higgins.idas.api.IHasMetadata, IMetadataContainer

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

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.
The following methods are deliberatly not implemented in this abstract class because they must be provided by the subclass :
IEntity.remove()
IAttributeContainer.updateNotification(AttributeNotification)
IMetadataContainer.updateNotification(MetadataNotification)


Constructor Summary
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, Iterator metadata)
          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)
           
 org.eclipse.higgins.idas.api.IMetadata addMetadata(org.eclipse.higgins.idas.api.IMetadata copyFrom)
           
 org.eclipse.higgins.idas.api.IMetadata addMetadata(URI type)
           
 boolean equals(org.eclipse.higgins.idas.api.IHasAttributes attributes)
           
 boolean equals(org.eclipse.higgins.idas.api.IHasMetadata metadataSet)
           
 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.IMetadata getMetadata(URI metadataID)
           
 Iterator getMetadataSet()
           
 org.eclipse.higgins.idas.api.model.IEntityModel getModel()
           
 org.eclipse.higgins.idas.api.ISingleValuedAttribute getSingleValuedAttribute(URI attrID)
           
 void removeAttribute(URI attrID)
           
 void removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
           
 void removeAttributeValue(URI attrID, Object value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.higgins.idas.api.IEntity
remove
 
Methods inherited from interface org.eclipse.higgins.idas.spi.IAttributeContainer
updateNotification
 
Methods inherited from interface org.eclipse.higgins.idas.spi.IMetadataContainer
updateNotification
 

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,
                   Iterator metadata)
            throws org.eclipse.higgins.idas.api.IdASException
The preferred constructor

Parameters:
context -
type -
entityId -
attributes -
metadata -
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.IEntity
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

addMetadata

public org.eclipse.higgins.idas.api.IMetadata addMetadata(org.eclipse.higgins.idas.api.IMetadata copyFrom)
                                                   throws org.eclipse.higgins.idas.api.IdASException
Specified by:
addMetadata in interface org.eclipse.higgins.idas.api.IHasMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException

addMetadata

public org.eclipse.higgins.idas.api.IMetadata addMetadata(URI type)
                                                   throws org.eclipse.higgins.idas.api.IdASException,
                                                          org.eclipse.higgins.idas.api.InvalidTypeException
Specified by:
addMetadata in interface org.eclipse.higgins.idas.api.IHasMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException

getMetadata

public org.eclipse.higgins.idas.api.IMetadata getMetadata(URI metadataID)
                                                   throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getMetadata in interface org.eclipse.higgins.idas.api.IHasMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException

getMetadataSet

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

equals

public boolean equals(org.eclipse.higgins.idas.api.IHasMetadata metadataSet)
               throws org.eclipse.higgins.idas.api.IdASException
Specified by:
equals in interface org.eclipse.higgins.idas.api.IHasMetadata
Throws:
org.eclipse.higgins.idas.api.IdASException