org.eclipse.higgins.idas.spi
Class BasicAttributeSet

java.lang.Object
  extended byorg.eclipse.higgins.idas.spi.BasicAttributeSet
All Implemented Interfaces:
IAttributeContainer, org.eclipse.higgins.idas.api.IHasAttributes
Direct Known Subclasses:
AbstractComplexValue, AbstractSimpleValue, BasicAuthNAttributesMaterials, BasicContext

public class BasicAttributeSet
extends Object
implements org.eclipse.higgins.idas.api.IHasAttributes, IAttributeContainer

Basic implementation of IHasAttributes. This class uses a Hashtable of URI and IAttribute to hold the attributes.


Constructor Summary
BasicAttributeSet()
           
BasicAttributeSet(Iterator attrs, IAttributeContainer container, org.eclipse.higgins.idas.api.IContext context)
           
 
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)
           
 BasicAttribute addUnnotifiedAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
           
 BasicAttribute addUnnotifiedAttribute(URI attrID)
           
 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.ISingleValuedAttribute getSingleValuedAttribute(URI attrID)
           
 void removeAttribute(URI attrID)
           
 void removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
           
 void removeAttributeValue(URI attrID, Object value)
           
 void removeUnnotifiedAttribute(URI attrID)
           
 void updateNotification(AttributeNotification attrNotif)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAttributeSet

public BasicAttributeSet()

BasicAttributeSet

public BasicAttributeSet(Iterator attrs,
                         IAttributeContainer container,
                         org.eclipse.higgins.idas.api.IContext context)
                  throws org.eclipse.higgins.idas.api.IdASException
Parameters:
attrs - Contains IAttributes
container - May be null. IAttributeContainer to send update notifications to. When null, this is the container.
context - May be null. IContext instance from which a model may be obtained if needed.
Method Detail

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

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

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

removeUnnotifiedAttribute

public void removeUnnotifiedAttribute(URI attrID)
                               throws org.eclipse.higgins.idas.api.IdASException,
                                      org.eclipse.higgins.idas.api.InvalidTypeException
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException

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(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

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

addUnnotifiedAttribute

public BasicAttribute addUnnotifiedAttribute(URI attrID)
                                      throws org.eclipse.higgins.idas.api.IdASException,
                                             org.eclipse.higgins.idas.api.InvalidTypeException
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException

addUnnotifiedAttribute

public BasicAttribute addUnnotifiedAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
                                      throws org.eclipse.higgins.idas.api.IdASException
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

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