edu.utexas.its.eis.tools.qwicap.template.xml.structure
Interface TagWithAttributes

All Superinterfaces:
Cloneable, Item, Iterable<Attribute>, NamedItem, Range, Tag
All Known Subinterfaces:
EmptyTag, StartTag

public interface TagWithAttributes
extends Tag, Iterable<Attribute>

Common interface of all tags that can possess attributes (for example: "<p class='thing'>") in XML documents.

Author:
Chris W. Johnson

Field Summary
static Characters kClassAttributeName
           
 
Method Summary
 AttributeEnumeration enumerateAttributes()
          Returns an enumeration of the attributes of this tag.
 Attribute getAttribute(Characters AttrName)
          Returns a reference to the specified attribute of this tag, or null if this tag has no such attribute.
 String getAttribute(String AttrName)
          Returns a String representing the value of the requested attribute of this tag, or null if this tag has no such attribute.
 boolean isOfClass(Characters ClassName)
          Returns true if this tag has a "class" attribute and the value of that attribute includes the specified class name.
 
Methods inherited from interface edu.utexas.its.eis.tools.qwicap.template.xml.structure.NamedItem
getName, getNamespace, getNameString, nameEquals, nameEquals
 
Methods inherited from interface edu.utexas.its.eis.tools.qwicap.template.xml.structure.Item
contentEquals, getContent
 
Methods inherited from interface edu.utexas.its.eis.tools.qwicap.template.xml.structure.Range
clone, isEmptyTag, isEndTag, isStartTag, isTagWithAttributes, rangeEquals, toString, write
 
Methods inherited from interface java.lang.Iterable
iterator
 

Field Detail

kClassAttributeName

static final Characters kClassAttributeName
Method Detail

isOfClass

boolean isOfClass(Characters ClassName)
Returns true if this tag has a "class" attribute and the value of that attribute includes the specified class name.

Parameters:
ClassName - The name of the class for which to test.
Returns:
true if this tag has a "class" attribute whose value includes the named class, otherwise false.

getAttribute

Attribute getAttribute(Characters AttrName)
Returns a reference to the specified attribute of this tag, or null if this tag has no such attribute.

Parameters:
AttrName - The name of the attribute to retrieve from this tag.
Returns:
A reference to the requested attribute of this tag, or null if this tag has no such attribute.

getAttribute

String getAttribute(String AttrName)
Returns a String representing the value of the requested attribute of this tag, or null if this tag has no such attribute.

Parameters:
AttrName - The name of the attribute whose value should be retrieved.
Returns:
A String representing the value of the requested attribute of this tag, or null if this tag has no such attribute.

enumerateAttributes

AttributeEnumeration enumerateAttributes()
Returns an enumeration of the attributes of this tag. Note that the Iterable>Attribute< interface, which makes possible the use of Java 1.5's "for each" loop, is also supported by this interface.

Returns:
An enumeration of the attributes of this tag.
See Also:
Iterable.iterator()