Package com.bc.ceres.binding.dom
Class XppDomElement
- java.lang.Object
-
- com.bc.ceres.binding.dom.XppDomElement
-
- All Implemented Interfaces:
DomElement,ConfigurationElementBase<DomElement>
public class XppDomElement extends Object implements DomElement
-
-
Constructor Summary
Constructors Constructor Description XppDomElement(com.thoughtworks.xstream.io.xml.xppdom.XppDom xppDom)XppDomElement(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(DomElement child)DomElementcreateChild(String name)StringgetAttribute(String attributeName)Gets the value of the attribute with the specified name.String[]getAttributeNames()Gets the names of all attributes.DomElementgetChild(int index)DomElementgetChild(String elementName)Gets the child element with the specified element name.intgetChildCount()DomElement[]getChildren()Gets all children.DomElement[]getChildren(String elementName)Gets all children with the specified element name.StringgetName()Gets the name of this element.DomElementgetParent()Gets the element which contains this element.StringgetValue()Gets the value of this element.com.thoughtworks.xstream.io.xml.xppdom.XppDomgetXppDom()voidsetAttribute(String name, String value)voidsetParent(DomElement parent)voidsetValue(String value)StringtoXml()
-
-
-
Constructor Detail
-
XppDomElement
public XppDomElement(String name)
-
XppDomElement
public XppDomElement(com.thoughtworks.xstream.io.xml.xppdom.XppDom xppDom)
-
-
Method Detail
-
getXppDom
public com.thoughtworks.xstream.io.xml.xppdom.XppDom getXppDom()
-
getName
public String getName()
Description copied from interface:ConfigurationElementBaseGets the name of this element.- Specified by:
getNamein interfaceConfigurationElementBase<DomElement>- Returns:
- The name of this element.
-
getValue
public String getValue()
Description copied from interface:ConfigurationElementBaseGets the value of this element.- Specified by:
getValuein interfaceConfigurationElementBase<DomElement>- Returns:
- The value of this element, or
null.
-
setValue
public void setValue(String value)
- Specified by:
setValuein interfaceDomElement
-
getParent
public DomElement getParent()
Description copied from interface:ConfigurationElementBaseGets the element which contains this element. If this element is an immediate child of an extension or an extension point, the returned value isnull.- Specified by:
getParentin interfaceConfigurationElementBase<DomElement>- Returns:
- The parent of this configuration element or
nullif this is a root element.
-
setParent
public void setParent(DomElement parent)
- Specified by:
setParentin interfaceDomElement
-
getChildren
public DomElement[] getChildren()
Description copied from interface:ConfigurationElementBaseGets all children.- Specified by:
getChildrenin interfaceConfigurationElementBase<DomElement>- Returns:
- The array of children, which may be empty.
-
getChildren
public DomElement[] getChildren(String elementName)
Description copied from interface:ConfigurationElementBaseGets all children with the specified element name.- Specified by:
getChildrenin interfaceConfigurationElementBase<DomElement>- Parameters:
elementName- The element name.- Returns:
- The array of children, which may be empty.
-
getChild
public DomElement getChild(int index)
- Specified by:
getChildin interfaceDomElement
-
getChild
public DomElement getChild(String elementName)
Description copied from interface:ConfigurationElementBaseGets the child element with the specified element name.- Specified by:
getChildin interfaceConfigurationElementBase<DomElement>- Parameters:
elementName- The element name.- Returns:
- The child element or
nullif no such could be found.
-
getChildCount
public int getChildCount()
- Specified by:
getChildCountin interfaceDomElement
-
createChild
public DomElement createChild(String name)
- Specified by:
createChildin interfaceDomElement
-
addChild
public void addChild(DomElement child)
- Specified by:
addChildin interfaceDomElement
-
getAttributeNames
public String[] getAttributeNames()
Description copied from interface:ConfigurationElementBaseGets the names of all attributes.- Specified by:
getAttributeNamesin interfaceConfigurationElementBase<DomElement>- Returns:
- The array of names, which may be empty.
-
getAttribute
public String getAttribute(String attributeName)
Description copied from interface:ConfigurationElementBaseGets the value of the attribute with the specified name.- Specified by:
getAttributein interfaceConfigurationElementBase<DomElement>- Parameters:
attributeName- The attribute name.- Returns:
- The value of the attribute, or
null.
-
setAttribute
public void setAttribute(String name, String value)
- Specified by:
setAttributein interfaceDomElement
-
toXml
public String toXml()
- Specified by:
toXmlin interfaceDomElement
-
-