org.forester.io.parsers.phyloxml
Class XmlElement

java.lang.Object
  extended by org.forester.io.parsers.phyloxml.XmlElement

public class XmlElement
extends java.lang.Object


Field Summary
static boolean DEBUG
           
 
Constructor Summary
XmlElement(java.lang.String namespaceUri, java.lang.String localName, java.lang.String qualifiedName, org.xml.sax.Attributes attributes)
           
 
Method Summary
 void addChildElement(XmlElement element)
           
 void appendValue(java.lang.String value)
           
 java.lang.String getAttribute(java.lang.String attribute_name)
           
 java.util.HashMap<java.lang.String,java.lang.String> getAttributes()
           
 XmlElement getChildElement(int i)
           
 int getNumberOfChildElements()
           
 XmlElement getParent()
           
 java.lang.String getQualifiedName()
           
 boolean getValueAsBoolean()
           
 double getValueAsDouble()
           
 int getValueAsInt()
           
 java.lang.String getValueAsString()
           
 boolean isHasAttribute(java.lang.String attribute_name)
           
 boolean isHasValue()
           
 void setValue(java.lang.String value)
          [Careful, this does not call "new String(...)"]
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values
Constructor Detail

XmlElement

public XmlElement(java.lang.String namespaceUri,
                  java.lang.String localName,
                  java.lang.String qualifiedName,
                  org.xml.sax.Attributes attributes)
Method Detail

addChildElement

public void addChildElement(XmlElement element)

appendValue

public void appendValue(java.lang.String value)

getAttribute

public java.lang.String getAttribute(java.lang.String attribute_name)

getAttributes

public java.util.HashMap<java.lang.String,java.lang.String> getAttributes()

getChildElement

public XmlElement getChildElement(int i)

getNumberOfChildElements

public int getNumberOfChildElements()

getParent

public XmlElement getParent()

getQualifiedName

public java.lang.String getQualifiedName()

getValueAsBoolean

public boolean getValueAsBoolean()
                          throws PhylogenyParserException
Throws:
PhylogenyParserException

getValueAsDouble

public double getValueAsDouble()
                        throws PhyloXmlDataFormatException
Throws:
PhyloXmlDataFormatException

getValueAsInt

public int getValueAsInt()
                  throws PhyloXmlDataFormatException
Throws:
PhyloXmlDataFormatException

getValueAsString

public java.lang.String getValueAsString()

isHasAttribute

public boolean isHasAttribute(java.lang.String attribute_name)

isHasValue

public boolean isHasValue()

setValue

public void setValue(java.lang.String value)
[Careful, this does not call "new String(...)"]

Parameters:
value -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object