com.cafesoft.cams.attr
Interface AttributeSet

All Known Implementing Classes:
StandardAttributeSet

public interface AttributeSet

AttributeSet defines the interface for a unique collection of Attribute instances.

Since:
5/21/2004

Method Summary
 void add(Attribute attr)
          Add an Attribute.
 void clear()
          Clear all Attributes.
 boolean containsAttributeCategory(URI attrCategory)
          Returns true if the specified attribute category is represented in in this AttributeSet.
 List get(URI attrCategory, URI type, URI id)
          Get an Attribute by category and identifier.
 Iterator getAttributeCategories()
          Returns the attribute categories represented in this collection.
 int getAttributeCategoryCount()
          Returns the number of attribute categories.
 int getAttributeCountByCategory(URI attrCategory)
          Returns the number of attributes in the specified category.
 Iterator getAttributes()
          Get all Attributes.
 Iterator getAttributesByCategory(URI attrCategory)
          Get all Attributes by category.
 Attribute getOneAndOnly(URI attrCategory, URI type, URI id)
          Get a one and only Attributes.
 void remove(Attribute attr)
          Remove an Attribute.
 

Method Detail

add

public void add(Attribute attr)
Add an Attribute.

Parameters:
attr - the Attribute to be added to this collection.

get

public List get(URI attrCategory,
                URI type,
                URI id)
Get an Attribute by category and identifier.

Parameters:
attrCategory - the attribute category.
type - the attribute type.
id - the attribute identifier.
Returns:
a List of Attributes or null if not in this collection.

getOneAndOnly

public Attribute getOneAndOnly(URI attrCategory,
                               URI type,
                               URI id)
Get a one and only Attributes.

NOTE: - the caller must be certain that at most one Attribute with the specified catetory, type, and id is in the set.

Parameters:
attrCategory - the attribute category.
type - the attribute data type.
id - the attribute identifier.
Returns:
the requested Attribute with the specified category, type, and identifier or null if not in this collection.

getAttributes

public Iterator getAttributes()
Get all Attributes.

Returns:
an Iterator over all Attributes in this collection.

getAttributesByCategory

public Iterator getAttributesByCategory(URI attrCategory)
Get all Attributes by category.

Returns:
an Iterator over all Attributes in the specifed category within this collection.

getAttributeCountByCategory

public int getAttributeCountByCategory(URI attrCategory)
Returns the number of attributes in the specified category.

Returns:
the number of attributes in the specified attribute category.

getAttributeCategories

public Iterator getAttributeCategories()
Returns the attribute categories represented in this collection.

Returns:
an Iterator providing access to java.net.URI instances: one per attribute category.

getAttributeCategoryCount

public int getAttributeCategoryCount()
Returns the number of attribute categories.

Returns:
the number of attribute categories represented in this set.

containsAttributeCategory

public boolean containsAttributeCategory(URI attrCategory)
Returns true if the specified attribute category is represented in in this AttributeSet.

Returns:
true if at least one attribute with the specified category is contained in this collection.

remove

public void remove(Attribute attr)
Remove an Attribute.

Parameters:
attr - the Attribute to be removed from this collection.

clear

public void clear()
Clear all Attributes.



Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.