public class DefaultDomElement extends Object implements DomElement
Constructor and Description |
---|
DefaultDomElement(String name) |
DefaultDomElement(String name,
String value) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(DomElement child) |
DomElement |
createChild(String name) |
String |
getAttribute(String name)
Gets the value of the attribute with the specified name.
|
String[] |
getAttributeNames()
Gets the names of all attributes.
|
DomElement |
getChild(int index) |
DomElement |
getChild(String elementName)
Gets the child element with the specified element name.
|
int |
getChildCount() |
DomElement[] |
getChildren()
Gets all children.
|
DomElement[] |
getChildren(String elementName)
Gets all children with the specified element name.
|
String |
getName()
Gets the name of this element.
|
DomElement |
getParent()
Gets the element which contains this element.
|
String |
getValue()
Gets the value of this element.
|
void |
setAttribute(String name,
String value) |
void |
setParent(DomElement parent) |
void |
setValue(String value) |
String |
toXml() |
public DefaultDomElement(String name)
public String getName()
com.bc.ceres.core.runtime.ConfigurationElementBase
getName
in interface com.bc.ceres.core.runtime.ConfigurationElementBase<DomElement>
public String getValue()
com.bc.ceres.core.runtime.ConfigurationElementBase
getValue
in interface com.bc.ceres.core.runtime.ConfigurationElementBase<DomElement>
null
.public void setValue(String value)
setValue
in interface DomElement
public DomElement getParent()
com.bc.ceres.core.runtime.ConfigurationElementBase
null
.getParent
in interface com.bc.ceres.core.runtime.ConfigurationElementBase<DomElement>
null
if this is a root element.public void setParent(DomElement parent)
setParent
in interface DomElement
public String getAttribute(String name)
com.bc.ceres.core.runtime.ConfigurationElementBase
getAttribute
in interface com.bc.ceres.core.runtime.ConfigurationElementBase<DomElement>
name
- The attribute name.null
.public void setAttribute(String name, String value)
setAttribute
in interface DomElement
public String[] getAttributeNames()
com.bc.ceres.core.runtime.ConfigurationElementBase
getAttributeNames
in interface com.bc.ceres.core.runtime.ConfigurationElementBase<DomElement>
public DomElement getChild(String elementName)
com.bc.ceres.core.runtime.ConfigurationElementBase
getChild
in interface com.bc.ceres.core.runtime.ConfigurationElementBase<DomElement>
elementName
- The element name.null
if no such could be found.public DomElement[] getChildren()
com.bc.ceres.core.runtime.ConfigurationElementBase
getChildren
in interface com.bc.ceres.core.runtime.ConfigurationElementBase<DomElement>
public DomElement[] getChildren(String elementName)
com.bc.ceres.core.runtime.ConfigurationElementBase
getChildren
in interface com.bc.ceres.core.runtime.ConfigurationElementBase<DomElement>
elementName
- The element name.public DomElement getChild(int index)
getChild
in interface DomElement
public int getChildCount()
getChildCount
in interface DomElement
public DomElement createChild(String name)
createChild
in interface DomElement
public void addChild(DomElement child)
addChild
in interface DomElement
public String toXml()
toXml
in interface DomElement
Copyright © 2014–2022 European Space Agency (ESA). All rights reserved.