org.argouml.persistence
Class XMLElement

java.lang.Object
  extended byorg.argouml.persistence.XMLElement

public class XMLElement
extends Object


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

Field Detail

name

private String name

text

private StringBuffer text

attributes

private Attributes attributes
Constructor Detail

XMLElement

public XMLElement(String n,
                  Attributes a)
Constructor.

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

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


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook