All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xg.xg_AttList

java.lang.Object
   |
   +----xg.xg_AttList

public class xg_AttList
extends Object
implements MutableAttributeSet

A list of xg_Attributes.

Note that this class implements all the methods of the DOM org.w3c.dom.AttributeList interface, but since the rest of xg does not, references to the DOM interfaces is commented out to allow xg to run without the DOM interfaces being present.


Variable Index

 o AttributeHashtable
Table of xg_Attributes, each with a name and a value.
 o AttributeVector
Sequential list of xg_Attributes, each with a name and a value.
 o ResolveParent
The parent attribute set to be used to locate attributes if they do not exist in this set.

Constructor Index

 o xg_AttList()

Method Index

 o addAttribute(Object, Object)
Add an attribute to the list.
 o addAttribute(String, String)
Add an attribute, given its name and value.
 o addAttribute(xg_Attribute)
Add an attribute.
 o addAttributes(AttributeSet)
Add a set of attributes to the list.
 o clone()
Clones this set of attributes.
 o containsAttribute(Object, Object)
Return true if this set contains this attribute, and its value is the same as that given.
 o containsAttributes(AttributeSet)
Returns true if this set contains all the attributes with equal values.
 o copyAttributes()
Return an attribute set that is guaranteed not to change over time.
 o duplicate()
Create a new xg_AttList which is exactly the same as this one.
 o duplicateFrom(xg_AttList)
Add an attribute to this att list corresponding to each attribute in the InputAttList.
 o getAtt(int)
Get the attribute with the given index.
 o getAtt(String)
Get a named attribute.
 o getAttribute(Object)
Get the value of the given attribute.
 o getAttributeCount()
Get the number of attributes in this set.
 o getAttributeNames()
Return an enumeration over the names of the attributes in the set.
 o getAttributeValue(String)
Get the value of a named attribute.
 o getLength()
Get the number of attributes in this list.
 o getResolveParent()
Get the parent used in resolving attributes not present in this set.
 o isDefined(Object)
Check whether the named attribute has a value specified in the set, without resolving through another attribute set.
 o isEqual(AttributeSet)
Determine if the two attribute sets are equivalent.
 o removeAttribute(Object)
Remove an attribute from the list.
 o removeAttribute(String)
Remove the named attribute.
 o removeAttributes(AttributeSet)
Remove a set of attributes from the list.
 o removeAttributes(Enumeration)
Remove a set of attributes from the list.
 o save(Writer)
Save this attribute list (ie.
 o setResolveParent(AttributeSet)
Set the resolving parent.

Variables

 o AttributeVector
 protected Vector AttributeVector
Sequential list of xg_Attributes, each with a name and a value.

 o AttributeHashtable
 protected Hashtable AttributeHashtable
Table of xg_Attributes, each with a name and a value.

 o ResolveParent
 protected AttributeSet ResolveParent
The parent attribute set to be used to locate attributes if they do not exist in this set.

Constructors

 o xg_AttList
 public xg_AttList()

Methods

 o save
 public void save(Writer InputWriter) throws IOException
Save this attribute list (ie. its children) in XML source form in InputWriter.

Parameters:
InputWriter - The writer to which the XML will be written
 o duplicate
 public xg_AttList duplicate()
Create a new xg_AttList which is exactly the same as this one.

Returns:
A duplicate attribute list
 o duplicateFrom
 public void duplicateFrom(xg_AttList InputAttList)
Add an attribute to this att list corresponding to each attribute in the InputAttList.

Parameters:
InputAttList - A duplicate attribute list
 o clone
 public Object clone()
Clones this set of attributes.

Returns:
The new set of attributes
Overrides:
clone in class Object
 o addAttribute
 public boolean addAttribute(String InputAttName,
                             String InputAttValue)
Add an attribute, given its name and value.

Parameters:
InputAttName - The name of this attribute
InputAttValue - The value of this attribute
Returns:
Flag indicating success (true) or failure. Failure only occurs if an attribute with this name already exists (which is an XML well-formedness error).
 o addAttribute
 public boolean addAttribute(xg_Attribute InputAttribute)
Add an attribute.

Parameters:
InputAttribute - The attribute to be added
Returns:
Flag indicating success (true) or failure. Failure only occurs if an attribute with this name already exists (which is an XML well-formedness error).
 o removeAttribute
 public xg_Attribute removeAttribute(String InputAttName)
Remove the named attribute.

Parameters:
InputAttName - The name of the attribute required
Returns:
The attribute removed
 o getAtt
 public xg_Attribute getAtt(int InputAttIndex)
Get the attribute with the given index.

Parameters:
InputAttIndex - The index of the attribute required
Returns:
The attribute
 o getAttributeValue
 public String getAttributeValue(String InputAttName)
Get the value of a named attribute.

Parameters:
InputAttName - The name of the attribute required
Returns:
The value of the named attribute (or null if there is no attribute with this name).
 o getAtt
 public xg_Attribute getAtt(String InputAttName)
Get a named attribute.

Parameters:
InputAttName - The name of the attribute required
Returns:
The named attribute (or null if there is no attribute with this name).
 o getLength
 public int getLength()
Get the number of attributes in this list. (Implements org.w3c.dom.AttributeList.getLength().)

Returns:
The number of attributes in this list
 o getAttributeCount
 public int getAttributeCount()
Get the number of attributes in this set.

Returns:
The number of attributes in this set
 o isDefined
 public boolean isDefined(Object attrName)
Check whether the named attribute has a value specified in the set, without resolving through another attribute set.

Parameters:
attrName - the attribute name
Returns:
true if the attribute has a value specified
 o isEqual
 public boolean isEqual(AttributeSet attr)
Determine if the two attribute sets are equivalent.

Parameters:
attr - an attribute set
Returns:
true if the sets are equivalent
 o copyAttributes
 public AttributeSet copyAttributes()
Return an attribute set that is guaranteed not to change over time.

Returns:
a copy of the attribute set
 o getAttribute
 public Object getAttribute(Object InputAttName)
Get the value of the given attribute. If the value is not found locally, the search is continued upward through the resolving parent (if one exists) until the value is either found or there are no more parents. If the value is not found, null is returned.

Parameters:
InputAttName - The name of the required attribute
Returns:
The value of the requested attribute
 o getAttributeNames
 public Enumeration getAttributeNames()
Return an enumeration over the names of the attributes in the set. The elements of the enumeration are all Strings. The set does not include the resolving parent, if one is defined.

Returns:
The names of all the attributes
 o containsAttribute
 public boolean containsAttribute(Object name,
                                  Object value)
Return true if this set contains this attribute, and its value is the same as that given.

Parameters:
name - the non-null attribute name
value - the value
Returns:
true if the set contains the attribute with an equal value
 o containsAttributes
 public boolean containsAttributes(AttributeSet attributes)
Returns true if this set contains all the attributes with equal values.

Parameters:
attributes - the set of attributes to check against
Returns:
true if this set contains all the attributes with equal values
 o getResolveParent
 public AttributeSet getResolveParent()
Get the parent used in resolving attributes not present in this set.

Returns:
The parent
 o addAttribute
 public void addAttribute(Object InputAttName,
                          Object InputAttValue)
Add an attribute to the list.

Parameters:
InputAttName - the name
InputAttValue - the value
 o addAttributes
 public void addAttributes(AttributeSet attributes)
Add a set of attributes to the list.

Parameters:
attributes - the set of attributes
 o removeAttribute
 public void removeAttribute(Object InputAttName)
Remove an attribute from the list.

Parameters:
InputAttName - The name of the attribute to remove
 o removeAttributes
 public void removeAttributes(Enumeration InputAttNames)
Remove a set of attributes from the list.

Parameters:
InputAttNames - The names of the attributes to remove
 o removeAttributes
 public void removeAttributes(AttributeSet InputAttToRemove)
Remove a set of attributes from the list. Existing attributes with the same name and different value will remain.

Parameters:
InputAttToRemove - The set of attributes to be removed
 o setResolveParent
 public void setResolveParent(AttributeSet InputResolveParent)
Set the resolving parent. This is the set of attributes to resolve through if an attribute isn't defined locally.

Parameters:
InputResolveParent - The parent

All Packages  Class Hierarchy  This Package  Previous  Next  Index