org.argouml.persistence
Class XMLElement
java.lang.Object
org.argouml.persistence.XMLElement
- public class XMLElement
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
private String name
text
private StringBuffer text
attributes
private Attributes attributes
XMLElement
public XMLElement(String n,
Attributes a)
- Constructor.
- Parameters:
n
- The name of the element.a
- The attributes.
getName
public String getName()
- Returns:
- the name of this element
setName
public void setName(String n)
- Parameters:
n
- the name of this element
addText
public void addText(String t)
- Parameters:
t
- the text to be appended
setText
public void setText(String t)
- Parameters:
t
- the new text
resetText
public void resetText()
- Erase the text of this element.
getText
public String getText()
- Returns:
- the text of this element
setAttributes
public void setAttributes(Attributes a)
- Change the attributes for this element.
- Parameters:
a
- The new list of attributes.
getAttribute
public String getAttribute(String attribute)
- Parameters:
attribute
- the attribute name
- Returns:
- the attribute value
getAttributeName
public 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 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