org.apache.commons.configuration
Class XMLConfiguration.XMLNode

java.lang.Object
  extended byorg.apache.commons.configuration.tree.DefaultConfigurationNode
      extended byorg.apache.commons.configuration.HierarchicalConfiguration.Node
          extended byorg.apache.commons.configuration.XMLConfiguration.XMLNode
All Implemented Interfaces:
Cloneable, ConfigurationNode, Serializable
Enclosing class:
XMLConfiguration

class XMLConfiguration.XMLNode
extends HierarchicalConfiguration.Node

A specialized Node class that is connected with an XML element. Changes on a node are also performed on the associated element.


Nested Class Summary
 
Nested classes inherited from class org.apache.commons.configuration.tree.DefaultConfigurationNode
DefaultConfigurationNode.SubNodes
 
Constructor Summary
XMLConfiguration.XMLNode(String name, Element elem)
          Creates a new instance of XMLNode and initializes it with a name and the corresponding XML element.
 
Method Summary
protected  void removeReference()
          Updates the associated XML elements when a node is removed.
 void setValue(Object value)
          Sets the value of this node.
 
Methods inherited from class org.apache.commons.configuration.HierarchicalConfiguration.Node
addChild, getParent, hasChildren, remove, remove, setParent, visit
 
Methods inherited from class org.apache.commons.configuration.tree.DefaultConfigurationNode
addAttribute, addChild, checkState, clone, createSubNodes, getAttribute, getAttributeCount, getAttributeCount, getAttributes, getAttributes, getChild, getChildren, getChildren, getChildrenCount, getChildrenCount, getName, getParentNode, getReference, getValue, isAttribute, isDefined, removeAttribute, removeAttribute, removeAttributes, removeChild, removeChild, removeChildren, setAttribute, setName, setParentNode, setReference, visit
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLConfiguration.XMLNode

public XMLConfiguration.XMLNode(String name,
                                Element elem)
Creates a new instance of XMLNode and initializes it with a name and the corresponding XML element.

Parameters:
name - the node's name
elem - the XML element
Method Detail

setValue

public void setValue(Object value)
Sets the value of this node. If this node is associated with an XML element, this element will be updated, too.

Specified by:
setValue in interface ConfigurationNode
Overrides:
setValue in class DefaultConfigurationNode
Parameters:
value - the node's new value

removeReference

protected void removeReference()
Updates the associated XML elements when a node is removed.

Overrides:
removeReference in class DefaultConfigurationNode


Copyright © 2001-2006 The Apache Software Foundation. All Rights Reserved.