|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList java.util.Vector context.arch.storage.Attributes
This class is a container for a group of related attributes. Attributes can be added, removed, and found in the container.
Field Summary | |
static java.lang.String |
ALL
Tag to indicate all attributes are to be used |
static java.lang.String |
ATTRIBUTES
Tag for attributes |
static char |
SEPARATOR
Connector for nested attributes |
static java.lang.String |
SEPARATOR_STRING
Connector for nested attributes - String |
Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
Attributes()
Empty constructor |
|
Attributes(DataObject data)
Constructor that takes a DataObject as a parameter. |
Method Summary | |
void |
addAttribute(Attribute att)
Adds the given Attribute object to the container. |
void |
addAttribute(java.lang.String name)
Adds the given attribute name. |
void |
addAttribute(java.lang.String name,
Attributes attributes)
Adds the given attribute name and value to the container. |
void |
addAttribute(java.lang.String name,
Attributes attributes,
java.lang.String type)
Adds the given attribute name, subAttributes and type to the container |
void |
addAttribute(java.lang.String name,
java.lang.String type)
Adds the given attribute name and data type |
void |
addAttributeNameValue(AttributeNameValue att)
Adds the given AttributeNameValue object to the container. |
void |
addAttributeNameValue(java.lang.String name)
Adds the given attribute name. |
void |
addAttributeNameValue(java.lang.String name,
java.lang.Object value)
Adds the given attribute name and value to the container. |
void |
addAttributeNameValue(java.lang.String name,
java.lang.Object value,
java.lang.String type)
Adds the given attribute name, value and type to the container |
void |
addAttributes(Attributes atts)
Adds the given Attributes object to the container. |
protected Attributes |
create()
|
boolean |
equals(Attributes attributes)
Return true if both Attributes objects are equal |
Attribute |
getAttribute(java.lang.String name)
This method returns the Attribute with the given name from this list of Attributes. |
Attribute |
getAttribute(java.lang.String name,
java.lang.String prefix)
This method returns the Attribute with the given name from this list of Attributes. |
Attribute |
getAttributeAt(int index)
Returns the Attribute object at the given index |
AttributeNameValue |
getAttributeNameValue(java.lang.String name)
This method returns the AttributeNameValue with the given name from this list of AttributeNameValues. |
AttributeNameValue |
getAttributeNameValue(java.lang.String name,
java.lang.String prefix)
This method returns the AttributeNameValue with the given name from this list of AttributeNameValue. |
Attributes |
getSubset(Attributes filterAtts)
This method takes an Attributes containing the list of attributes (names) wanted and it filters all the rest out from this Attributes object. |
boolean |
hasAttribute(Attribute att)
Determines whether the given Attribute object is in the container |
boolean |
hasAttribute(java.lang.String name,
Attributes attributes)
Determines whether the given attribute name and subAttributes are in the container, using the default datatype. |
boolean |
hasAttribute(java.lang.String name,
Attributes attributes,
java.lang.String type)
Determines whether the given attribute name, subAttributes and type are in the container, |
int |
indexOfAttribute(Attribute att)
Returns the index at which the Attribute object occurs |
int |
indexOfAttribute(java.lang.String name,
Attributes attributes)
Returns the index at which the given attribute name and subAttributes occurs, using the default datatype |
int |
indexOfAttribute(java.lang.String name,
Attributes attributes,
java.lang.String type)
Returns the index at which the given attribute name, subAttributes and type occurs. |
int |
numAttributes()
Returns the number of Attributes in the container return the number of Attributes in the container |
void |
removeAttribute(java.lang.String name)
This method removes the Attribute with the given name from this list of Attributes. |
Attribute |
removeAttribute(java.lang.String name,
java.lang.String prefix)
This method removes the Attribute with the given name from this list of Attributes. |
void |
removeAttributeAt(int index)
Removes the Attribute object at the given index |
protected void |
replaceOrAdd(Attribute att)
guarantees that only one attribute of a given name resides in an Attributes. |
java.lang.String |
toAString()
A printable version of this class. |
DataObject |
toDataObject()
Converts to a DataObject. |
java.util.Hashtable |
toTypesHashtable()
Converts the attributes name-type pairs to a hashtable where the keys are the names and the values are the types. |
java.util.Hashtable |
toTypesHashtable(java.lang.String prefix)
Converts the attributes name-type pairs to a hashtable where the keys are the names and the values are the types. |
Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
Field Detail |
public static final char SEPARATOR
public static final java.lang.String SEPARATOR_STRING
public static final java.lang.String ATTRIBUTES
public static final java.lang.String ALL
Constructor Detail |
public Attributes()
public Attributes(DataObject data)
data
- DataObject that contains the attribute name (and possibly type) infoMethod Detail |
public DataObject toDataObject()
public void addAttribute(Attribute att)
att
- Attribute to addpublic void addAttribute(java.lang.String name)
name
- Name of the attribute to addpublic void addAttribute(java.lang.String name, java.lang.String type)
name
- Name of the attribute to addtype
- Datatype of the attribute to addpublic void addAttribute(java.lang.String name, Attributes attributes)
name
- Name of the attribute to addattributes
- SubAttributes of the attribute to addpublic void addAttribute(java.lang.String name, Attributes attributes, java.lang.String type)
name
- Name of the attribute to addattributes
- SubAttributes of the attribute to addtype
- Datatype of the attribute to addprotected void replaceOrAdd(Attribute att)
att
- public void addAttributes(Attributes atts)
atts
- Attributes to addpublic void addAttributeNameValue(AttributeNameValue att)
att
- AttributeNameValue to addpublic void addAttributeNameValue(java.lang.String name)
name
- Name of the attribute to addpublic void addAttributeNameValue(java.lang.String name, java.lang.Object value)
name
- Name of the attribute to addvalue
- Value of the attribute to addpublic void addAttributeNameValue(java.lang.String name, java.lang.Object value, java.lang.String type)
name
- Name of the attribute to addvalue
- Value of the attribute to addtype
- Datatype of the attribute to addpublic Attribute getAttributeAt(int index)
index
- Index into the container
public void removeAttributeAt(int index)
index
- Index into the containerpublic boolean hasAttribute(Attribute att)
att
- Attribute to check
public boolean hasAttribute(java.lang.String name, Attributes attributes)
name
- Name of the attribute to checkattributes
- SubAttributes of the attribute to check
public boolean hasAttribute(java.lang.String name, Attributes attributes, java.lang.String type)
name
- Name of the attribute to checkattributes
- SubAttributes of the attribute to checktype
- Datatype of the attribute to check
public int indexOfAttribute(Attribute att)
att
- Attribute to look for
public int indexOfAttribute(java.lang.String name, Attributes attributes)
name
- Name of the attribute to look forattributes
- SubAttributes of the attribute to look for
public int indexOfAttribute(java.lang.String name, Attributes attributes, java.lang.String type)
name
- Name of the attribute to look forattributes
- SubAttributes of the attribute to look fortype
- Datatype of the attribute to look for
public int numAttributes()
public Attribute getAttribute(java.lang.String name)
name
- of the Attribute to return
public Attribute getAttribute(java.lang.String name, java.lang.String prefix)
name
- of the Attribute to returnprefix
- Structure name to use
public AttributeNameValue getAttributeNameValue(java.lang.String name)
name
- of the AttributeNameValue to return
public AttributeNameValue getAttributeNameValue(java.lang.String name, java.lang.String prefix)
name
- of the AttributeNameValue to returnprefix
- Structure name to use
public void removeAttribute(java.lang.String name)
name
- of the Attribute to removepublic Attribute removeAttribute(java.lang.String name, java.lang.String prefix)
name
- of the Attribute to removeprefix
- Structure name to usepublic Attributes getSubset(Attributes filterAtts)
protected Attributes create()
public java.util.Hashtable toTypesHashtable()
public java.util.Hashtable toTypesHashtable(java.lang.String prefix)
public java.lang.String toAString()
public boolean equals(Attributes attributes)
attributes
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |