|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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 |
addAttributes(Attributes atts)
Adds the given Attributes object to the container. |
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 |
Attributes |
getSubset(Attributes atts)
This method takes a DataObject 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 |
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 |
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 addpublic void addAttributes(Attributes atts)
atts
- Attributes to addpublic Attribute getAttributeAt(int index)
index
- Index into the containerpublic void removeAttributeAt(int index)
index
- Index into the containerpublic boolean hasAttribute(Attribute att)
att
- Attribute to checkpublic boolean hasAttribute(java.lang.String name, Attributes attributes)
name
- Name of the attribute to checkattributes
- SubAttributes of the attribute to checkpublic 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 checkpublic int indexOfAttribute(Attribute att)
att
- Attribute to look forpublic int indexOfAttribute(java.lang.String name, Attributes attributes)
name
- Name of the attribute to look forattributes
- SubAttributes of the attribute to look forpublic 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 forpublic int numAttributes()
public Attribute getAttribute(java.lang.String name)
name
- of the Attribute to returnpublic Attribute getAttribute(java.lang.String name, java.lang.String prefix)
name
- of the Attribute to returnprefix
- Structure name to usepublic 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 atts)
atts
- Attributes object containing the attributes to returnpublic java.util.Hashtable toTypesHashtable()
public java.util.Hashtable toTypesHashtable(java.lang.String prefix)
public java.lang.String toAString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |