Package com.bc.ceres.binding.dom
Class DefaultDomElement
java.lang.Object
com.bc.ceres.binding.dom.DefaultDomElement
- All Implemented Interfaces:
DomElement
,ConfigurationElementBase<DomElement>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(DomElement child) createChild
(String name) getAttribute
(String name) Gets the value of the attribute with the specified name.String[]
Gets the names of all attributes.getChild
(int index) Gets the child element with the specified element name.int
Gets all children.getChildren
(String elementName) Gets all children with the specified element name.getName()
Gets the name of this element.Gets the element which contains this element.getValue()
Gets the value of this element.void
setAttribute
(String name, String value) void
setParent
(DomElement parent) void
toXml()
-
Constructor Details
-
DefaultDomElement
-
DefaultDomElement
-
-
Method Details
-
getName
Description copied from interface:ConfigurationElementBase
Gets the name of this element.- Specified by:
getName
in interfaceConfigurationElementBase<DomElement>
- Returns:
- The name of this element.
-
getValue
Description copied from interface:ConfigurationElementBase
Gets the value of this element.- Specified by:
getValue
in interfaceConfigurationElementBase<DomElement>
- Returns:
- The value of this element, or
null
.
-
setValue
- Specified by:
setValue
in interfaceDomElement
-
getParent
Description copied from interface:ConfigurationElementBase
Gets 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:
getParent
in interfaceConfigurationElementBase<DomElement>
- Returns:
- The parent of this configuration element or
null
if this is a root element.
-
setParent
- Specified by:
setParent
in interfaceDomElement
-
getAttribute
Description copied from interface:ConfigurationElementBase
Gets the value of the attribute with the specified name.- Specified by:
getAttribute
in interfaceConfigurationElementBase<DomElement>
- Parameters:
name
- The attribute name.- Returns:
- The value of the attribute, or
null
.
-
setAttribute
- Specified by:
setAttribute
in interfaceDomElement
-
getAttributeNames
Description copied from interface:ConfigurationElementBase
Gets the names of all attributes.- Specified by:
getAttributeNames
in interfaceConfigurationElementBase<DomElement>
- Returns:
- The array of names, which may be empty.
-
getChild
Description copied from interface:ConfigurationElementBase
Gets the child element with the specified element name.- Specified by:
getChild
in interfaceConfigurationElementBase<DomElement>
- Parameters:
elementName
- The element name.- Returns:
- The child element or
null
if no such could be found.
-
getChildren
Description copied from interface:ConfigurationElementBase
Gets all children.- Specified by:
getChildren
in interfaceConfigurationElementBase<DomElement>
- Returns:
- The array of children, which may be empty.
-
getChildren
Description copied from interface:ConfigurationElementBase
Gets all children with the specified element name.- Specified by:
getChildren
in interfaceConfigurationElementBase<DomElement>
- Parameters:
elementName
- The element name.- Returns:
- The array of children, which may be empty.
-
getChild
- Specified by:
getChild
in interfaceDomElement
-
getChildCount
public int getChildCount()- Specified by:
getChildCount
in interfaceDomElement
-
createChild
- Specified by:
createChild
in interfaceDomElement
-
addChild
- Specified by:
addChild
in interfaceDomElement
-
toXml
- Specified by:
toXml
in interfaceDomElement
-