org.tigris.gef.persistence
Class XMLElement

java.lang.Object
  extended by org.tigris.gef.persistence.XMLElement

public class XMLElement
extends java.lang.Object

Author:
Jim Holt

Constructor Summary
XMLElement(java.lang.String n, org.xml.sax.Attributes a)
          Constructor.
 
Method Summary
 void addText(java.lang.String t)
           
 java.lang.String getAttribute(java.lang.String attribute)
           
 java.lang.String getAttributeName(int i)
           
 java.lang.String getAttributeValue(int i)
           
 java.lang.String getName()
           
 int getNumAttributes()
           
 java.lang.String getText()
           
 void resetText()
          Erase the text of this element.
 void setAttributes(org.xml.sax.Attributes a)
          Change the attributes for this element.
 void setName(java.lang.String n)
           
 void setText(java.lang.String t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLElement

public XMLElement(java.lang.String n,
                  org.xml.sax.Attributes a)
Constructor.

Parameters:
n - The name of the element.
a - The attributes.
Method Detail

getName

public java.lang.String getName()
Returns:
the name of this element

setName

public void setName(java.lang.String n)
Parameters:
n - the name of this element

addText

public void addText(java.lang.String t)
Parameters:
t - the text to be appended

setText

public void setText(java.lang.String t)
Parameters:
t - the new text

resetText

public void resetText()
Erase the text of this element.


getText

public java.lang.String getText()
Returns:
the text of this element

setAttributes

public void setAttributes(org.xml.sax.Attributes a)
Change the attributes for this element.

Parameters:
a - The new list of attributes.

getAttribute

public java.lang.String getAttribute(java.lang.String attribute)
Parameters:
attribute - the attribute name
Returns:
the attribute value

getAttributeName

public java.lang.String getAttributeName(int i)
Parameters:
i - the index for the list of attributes
Returns:
the attribute name for the attribute at the given index

getAttributeValue

public java.lang.String getAttributeValue(int i)
Parameters:
i - the index for the list of attributes
Returns:
the attribute value for the attribute at the given index

getNumAttributes

public int getNumAttributes()
Returns:
the number of attributes