at.woli.xml
Class XMLDataElement

java.lang.Object
  extended by at.woli.xml.XMLDataElement

public class XMLDataElement
extends Object

XMLDataElement to store an Element of the XML-File. This class is used by XMLData.

Version:
1.0.0
Author:
Wolfgang Nitzlnader

Field Summary
private  ArrayList<XMLDataAttribute> elementAttributes
          ArrayList of all attributes of the Element
private  String elementName
          Name of the XMLDataElement
private  Object elementValue
          Value of the XMLDataElement
 
Constructor Summary
XMLDataElement()
          Standard constructor all variables are initialized with 0
XMLDataElement(String elementName, Object elementValue)
           
 
Method Summary
 void addAttribute(String attributeName, String attributeValue)
          Add a new attribute for the elment.
 XMLDataAttribute getAttributeByIndex(int index)
          Returns an attribute at a given index
 ArrayList<XMLDataAttribute> getElementAttributes()
          Returns an Arraylist with all attributes
 String getElementName()
          Returns the name of the element
 Object getElementValue()
          Returns the value of the element
 int getNumberOfAttributes()
          Returns the number of attributes, stored in the Arraylist
 void removeAttributeByIndex(int index)
          Removes an attribute at the given index.
 void setElementAttributes(ArrayList<XMLDataAttribute> elementAttributes)
          Sets the new ArrayList of the attributes
 void setElementName(String elementName)
          Sets the name of the element
 void setElementValue(Object elementValue)
          Sets the value of the element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elementName

private String elementName
Name of the XMLDataElement


elementValue

private Object elementValue
Value of the XMLDataElement


elementAttributes

private ArrayList<XMLDataAttribute> elementAttributes
ArrayList of all attributes of the Element

Constructor Detail

XMLDataElement

public XMLDataElement()
Standard constructor all variables are initialized with 0


XMLDataElement

public XMLDataElement(String elementName,
                      Object elementValue)
Parameters:
elementName - The Name of the new element
elementValue - The Value of the new element
Method Detail

getElementName

public String getElementName()
Returns the name of the element

Returns:
the name of the element

setElementName

public void setElementName(String elementName)
Sets the name of the element

Parameters:
elementName - the new name of the element

getElementValue

public Object getElementValue()
Returns the value of the element

Returns:
the value of the element

setElementValue

public void setElementValue(Object elementValue)
Sets the value of the element

Parameters:
elementValue - the new value of the element

getElementAttributes

public ArrayList<XMLDataAttribute> getElementAttributes()
Returns an Arraylist with all attributes

Returns:
the list of the attributes

setElementAttributes

public void setElementAttributes(ArrayList<XMLDataAttribute> elementAttributes)
Sets the new ArrayList of the attributes

Parameters:
elementAttributes - the new list of attributes of the element

getNumberOfAttributes

public int getNumberOfAttributes()
Returns the number of attributes, stored in the Arraylist

Returns:
the number of the attributes

getAttributeByIndex

public XMLDataAttribute getAttributeByIndex(int index)
Returns an attribute at a given index

Returns:
the attribute at the given index

addAttribute

public void addAttribute(String attributeName,
                         String attributeValue)
Add a new attribute for the elment.

Parameters:
attributeName - the name of the attribute
attributeValue - the value of the attribute

removeAttributeByIndex

public void removeAttributeByIndex(int index)
Removes an attribute at the given index.