org.eclipse.higgins.idas.impl
Class BasicAttributeSet

Package class diagram package BasicAttributeSet
java.lang.Object
  extended by org.eclipse.higgins.idas.impl.BasicAttributeSet
All Implemented Interfaces:
IHasAttributes
Direct Known Subclasses:
AbstractComplexValue

public class BasicAttributeSet
extends Object
implements IHasAttributes

Basic implementation of IHasAttributes. This class uses a HashMap of URI and String to hold the attributes.


Constructor Summary
BasicAttributeSet()
           
BasicAttributeSet(Iterable<IAttribute> attrs)
           
 
Method Summary
 void addAttribute(IAttribute attribute)
           
 IAttribute createAttribute(URI type, IPropertyValue value)
          Creates and adds an attribute for this object.
 IAttribute createAttribute(URI type, Iterable<IPropertyValue> values)
          Creates and adds an attribute for this object.
 IAttribute getAttribute(URI attrID)
          Return specified attribute of this object
 Iterable<IAttribute> getAttributes()
          Return all attributes of this object
 void removeAttribute(IAttribute attribute)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAttributeSet

public BasicAttributeSet()

BasicAttributeSet

public BasicAttributeSet(Iterable<IAttribute> attrs)
Method Detail

createAttribute

public IAttribute createAttribute(URI type,
                                  IPropertyValue value)
                           throws IdASException
Description copied from interface: IHasAttributes
Creates and adds an attribute for this object.

Specified by:
createAttribute in interface IHasAttributes
Parameters:
type - The attribute's type.
value - The attribute's value.
Returns:
The resulting Attribute.
Throws:
IdASException

createAttribute

public IAttribute createAttribute(URI type,
                                  Iterable<IPropertyValue> values)
                           throws IdASException
Description copied from interface: IHasAttributes
Creates and adds an attribute for this object.

Specified by:
createAttribute in interface IHasAttributes
Parameters:
type - The attribute's type.
values - The attribute's values.
Returns:
The resulting Attribute.
Throws:
IdASException

addAttribute

public void addAttribute(IAttribute attribute)
                  throws IdASException
Specified by:
addAttribute in interface IHasAttributes
Throws:
IdASException

removeAttribute

public void removeAttribute(IAttribute attribute)
                     throws IdASException
Specified by:
removeAttribute in interface IHasAttributes
Throws:
IdASException

getAttributes

public Iterable<IAttribute> getAttributes()
                                   throws IdASException
Description copied from interface: IHasAttributes
Return all attributes of this object

Specified by:
getAttributes in interface IHasAttributes
Returns:
An Iterable object of IAttributes.
Throws:
IdASException

getAttribute

public IAttribute getAttribute(URI attrID)
                        throws IdASException
Description copied from interface: IHasAttributes
Return specified attribute of this object

Specified by:
getAttribute in interface IHasAttributes
Parameters:
attrID - The identifier of the attribute to be returned.
Returns:
An IAttribute or null if none exits.
Throws:
IdASException


Copyright © 2006 Novell Inc. All Rights Reserved.
This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

Contributors:
  Jim Sermersheim (Novell, Inc.) - initial API and implementation