Package org.forester.io.parsers.phyloxml
Class XmlElement
- java.lang.Object
-
- org.forester.io.parsers.phyloxml.XmlElement
-
public class XmlElement extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEBUG
-
Constructor Summary
Constructors Constructor Description XmlElement(java.lang.String namespaceUri, java.lang.String localName, java.lang.String qualifiedName, org.xml.sax.Attributes attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
- See Also:
- Constant Field Values
-
-
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 classjava.lang.Object
-
-