com.lightdev.lib.xml
Class XmlTag

java.lang.Object
  extended by com.lightdev.lib.xml.XmlTag

public class XmlTag
extends Object

An xml tag with optional storage of data.

Version:
1, March 5, 2005
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the BSD License, for details see file license.txt in the distribution package of this software

Constructor Summary
XmlTag(String tag, Object data, AttributeSet attributes)
          constructor
XmlTag(String tag, Object data, AttributeSet attributes, boolean maskSpecialChars)
           
 
Method Summary
 void appendChild(XmlTag tag)
           
 boolean doMaskSpecialChars()
           
 AttributeSet getAttributes()
          get the attributes of this tag
 int getChildCount()
           
 Enumeration getChildren()
           
 Object getData()
          get the data of this tag
 XmlTag getParent()
           
 String getTag()
          get the tag name
 boolean hasChildren()
           
 boolean hasData()
          determine whether or not this tag has data
 void setAttributes(AttributeSet a)
          set the attributes of this tag
 void setData(Object data)
          set the data of this tag
 void setParent(XmlTag tag)
           
 String toString()
          get a string representation for this tag
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlTag

public XmlTag(String tag,
              Object data,
              AttributeSet attributes)
constructor

Parameters:
tag - String tag name
data - Object tag data
attributes - AttributeSet attributes this tag has

XmlTag

public XmlTag(String tag,
              Object data,
              AttributeSet attributes,
              boolean maskSpecialChars)
Method Detail

appendChild

public void appendChild(XmlTag tag)

hasChildren

public boolean hasChildren()

getChildren

public Enumeration getChildren()

setParent

public void setParent(XmlTag tag)

getParent

public XmlTag getParent()

getChildCount

public int getChildCount()

toString

public String toString()
get a string representation for this tag

Overrides:
toString in class Object
Returns:
String

setData

public void setData(Object data)
set the data of this tag

Parameters:
data - Object

getTag

public String getTag()
get the tag name

Returns:
String name of tag

getData

public Object getData()
get the data of this tag

Returns:
Object the tag data

getAttributes

public AttributeSet getAttributes()
get the attributes of this tag

Returns:
AttributeSet the tag attributes

setAttributes

public void setAttributes(AttributeSet a)
set the attributes of this tag

Parameters:
a - AttributeSet the tag attributes to set

hasData

public boolean hasData()
determine whether or not this tag has data

Returns:
boolean true is tag has data, false if not

doMaskSpecialChars

public boolean doMaskSpecialChars()