|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--arlut.csd.Util.XMLItem
|
+--arlut.csd.Util.XMLElement
Element Start class for XML data held in the
XMLReader class's buffer.
| Field Summary | |
(package private) java.lang.String[] |
attrKeys
|
(package private) java.lang.String[] |
attrVals
|
XMLItem[] |
children
|
(package private) boolean |
empty
|
(package private) java.lang.String |
name
|
| Fields inherited from class arlut.csd.Util.XMLItem |
parent |
| Constructor Summary | |
(package private) |
XMLElement(java.lang.String name,
org.xml.sax.AttributeList atts)
|
| Method Summary | |
void |
debugPrintTree(int indentLevel)
This debug method prints out this item and all items under this item if this item is the top node in a tree. |
void |
dissolve()
This method unlinks this XMLItem and any subnodes of it from each other, as well as clearing this XMLItem's parent reference. |
boolean |
getAttrBoolean(java.lang.String name)
This method returns the boolean attribute value for attribute <name>, if any. |
int |
getAttrCount()
This method returns the number of attributes that this element has. |
java.lang.Integer |
getAttrInt(java.lang.String name)
This method returns the Integer attribute value for attribute <name>, if any. |
java.lang.String |
getAttrKey(int index)
This method returns the name for a given attribute in this XMLItem. |
java.lang.String |
getAttrStr(java.lang.String name)
This method returns the attribute value for attribute <name>, if any. |
java.lang.String |
getAttrVal(int index)
This method returns the value for a given attribute in this XMLItem. |
XMLItem[] |
getChildren()
This method returns an array of children under this item, or null if there are none. |
java.lang.String |
getName()
This method returns the name of this element. |
void |
getTreeString(java.lang.StringBuffer buffer,
int indentLevel)
This debug method appends this item and all items under this item if this item is the top node in a tree to the StringBuffer passed in. |
boolean |
isEmpty()
This method returns true if this is an empty element. |
boolean |
isOpen()
This method returns true if this is an open element. |
boolean |
matches(java.lang.String name)
This method returns true if this element is named <name> |
void |
setChildren(XMLItem[] children)
This method sets an array of XMLItem references to be this XMLItem's children. |
(package private) void |
setEmpty()
This method is called by XMLReader
if the open element tag for this element is immediately matched by its
close element tag. |
java.lang.String |
toString()
|
| Methods inherited from class arlut.csd.Util.XMLItem |
getCleanString, getParent, getString, getTreeString, matchesClose, setParent |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public XMLItem[] children
java.lang.String name
java.lang.String[] attrKeys
java.lang.String[] attrVals
boolean empty
| Constructor Detail |
XMLElement(java.lang.String name,
org.xml.sax.AttributeList atts)
| Method Detail |
public XMLItem[] getChildren()
This method returns an array of children under this item, or null if there are none.
getChildren in class XMLItempublic void setChildren(XMLItem[] children)
This method sets an array of XMLItem references to be this XMLItem's children.
setChildren in class XMLItempublic void dissolve()
This method unlinks this XMLItem and any subnodes of it from each other, as well as clearing this XMLItem's parent reference. After this is called, children and parent will both be null-valued.
dissolve in class XMLItemvoid setEmpty()
This method is called by XMLReader
if the open element tag for this element is immediately matched by its
close element tag.
public boolean isEmpty()
This method returns true if this is an empty element.
isEmpty in class XMLItempublic boolean isOpen()
This method returns true if this is an open element.
isOpen in class XMLItempublic java.lang.String getName()
This method returns the name of this element.
getName in class XMLItempublic boolean matches(java.lang.String name)
This method returns true if this element is named <name>
matches in class XMLItempublic int getAttrCount()
This method returns the number of attributes that this element has.
getAttrCount in class XMLItempublic java.lang.String getAttrKey(int index)
This method returns the name for a given attribute in this XMLItem.
getAttrKey in class XMLItempublic java.lang.String getAttrVal(int index)
This method returns the value for a given attribute in this XMLItem.
getAttrVal in class XMLItempublic java.lang.String getAttrStr(java.lang.String name)
This method returns the attribute value for attribute <name>, if any. If this element does not contain an attribute of the given name, null is returned.
getAttrStr in class XMLItempublic boolean getAttrBoolean(java.lang.String name)
This method returns the boolean attribute value for attribute <name>, if any. For Ganymede's purposes, an attribute value is true if the attribute is present with a string value of "1". If this element does not contain an attribute of the given name, false is returned.
getAttrBoolean in class XMLItempublic java.lang.Integer getAttrInt(java.lang.String name)
This method returns the Integer attribute value for attribute <name>, if any. If this element does not contain an attribute of the given name, or if the attribute does not contain an integer value, a null value is returned.
getAttrInt in class XMLItempublic java.lang.String toString()
toString in class java.lang.Objectpublic void debugPrintTree(int indentLevel)
This debug method prints out this item and all items under this item if this item is the top node in a tree.
debugPrintTree in class XMLItem
public void getTreeString(java.lang.StringBuffer buffer,
int indentLevel)
This debug method appends this item and all items under this item if this item is the top node in a tree to the StringBuffer passed in.
getTreeString in class XMLItem
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||