Java Doc for DefaultConfigurationNode.java in  » Library » Apache-commons-configuration-1.4-src » org » apache » commons » configuration » tree » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache commons configuration 1.4 src » org.apache.commons.configuration.tree 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.configuration.tree.DefaultConfigurationNode

All known Subclasses:   org.apache.commons.configuration.tree.ViewNode,
DefaultConfigurationNode
public class DefaultConfigurationNode implements ConfigurationNode,Cloneable(Code)

A default implementation of the ConfigurationNode interface.


since:
   1.3
author:
   Oliver Heger

Inner Class :protected static class SubNodes


Constructor Summary
public  DefaultConfigurationNode()
     Creates a new uninitialized instance of DefaultConfigurationNode.
public  DefaultConfigurationNode(String name)
     Creates a new instance of DefaultConfigurationNode and initializes it with the node name.
public  DefaultConfigurationNode(String name, Object value)
     Creates a new instance of DefaultConfigurationNode and initializes it with the name and a value.

Method Summary
public  voidaddAttribute(ConfigurationNode attr)
     Adds the specified attribute to this node.
public  voidaddChild(ConfigurationNode child)
     Adds a new child to this node.
protected  voidcheckState()
     Checks if a modification of this node is allowed.
public  Objectclone()
     Creates a copy of this object.
protected  SubNodescreateSubNodes(boolean attributes)
     Creates a SubNodes instance that is used for storing either this node's children or attributes.
public  ConfigurationNodegetAttribute(int index)
     Returns the attribute with the given index.
public  intgetAttributeCount()
     Returns the number of attributes contained in this node.
public  intgetAttributeCount(String name)
     Returns the number of attributes of this node with the given name.
public  ListgetAttributes()
     Returns a list with the attributes of this node.
public  ListgetAttributes(String name)
     Returns a list with all attributes of this node with the given name.
public  ConfigurationNodegetChild(int index)
     Returns the child node with the given index.
public  ListgetChildren()
     Returns a list with all children of this node.
public  ListgetChildren(String name)
     Returns a list of all children with the given name.
public  intgetChildrenCount()
     Returns the number of all children of this node.
public  intgetChildrenCount(String name)
     Returns the number of children with the given name.
public  StringgetName()
     Returns the name of this node.
public  ConfigurationNodegetParentNode()
     Returns a reference to this node's parent.
public  ObjectgetReference()
     Returns the reference.
public  ObjectgetValue()
     Returns the value of this node.
public  booleanisAttribute()
     Checks if this node is an attribute node.
public  booleanisDefined()
     Returns a flag if this node is defined.
public  booleanremoveAttribute(ConfigurationNode node)
     Removes the specified attribute.
public  booleanremoveAttribute(String name)
     Removes all attributes with the specified name.
public  voidremoveAttributes()
     Removes all attributes of this node.
public  booleanremoveChild(ConfigurationNode child)
     Removes the specified child node from this node.
public  booleanremoveChild(String childName)
     Removes all children with the given name.
public  voidremoveChildren()
     Removes all child nodes of this node.
protected  voidremoveReference()
     Deals with the reference when a node is removed.
public  voidsetAttribute(boolean f)
     Sets the attribute flag.
public  voidsetName(String name)
     Sets the name of this node.
public  voidsetParentNode(ConfigurationNode parent)
     Sets the parent of this node.
public  voidsetReference(Object reference)
     Sets the reference.
public  voidsetValue(Object val)
     Sets the value of this node.
public  voidvisit(ConfigurationNodeVisitor visitor)
     Visits this node and all its sub nodes.


Constructor Detail
DefaultConfigurationNode
public DefaultConfigurationNode()(Code)
Creates a new uninitialized instance of DefaultConfigurationNode.



DefaultConfigurationNode
public DefaultConfigurationNode(String name)(Code)
Creates a new instance of DefaultConfigurationNode and initializes it with the node name.
Parameters:
  name - the name of this node



DefaultConfigurationNode
public DefaultConfigurationNode(String name, Object value)(Code)
Creates a new instance of DefaultConfigurationNode and initializes it with the name and a value.
Parameters:
  name - the node's name
Parameters:
  value - the node's value




Method Detail
addAttribute
public void addAttribute(ConfigurationNode attr)(Code)
Adds the specified attribute to this node.
Parameters:
  attr - the attribute to be added



addChild
public void addChild(ConfigurationNode child)(Code)
Adds a new child to this node.
Parameters:
  child - the new child



checkState
protected void checkState()(Code)
Checks if a modification of this node is allowed. Some properties of a node must not be changed when the node has a parent. This method checks this and throws a runtime exception if necessary.



clone
public Object clone()(Code)
Creates a copy of this object. This is not a deep copy, the children are not cloned. a copy of this object



createSubNodes
protected SubNodes createSubNodes(boolean attributes)(Code)
Creates a SubNodes instance that is used for storing either this node's children or attributes.
Parameters:
  attributes - true if the returned instance is used forstoring attributes, false for storing child nodes the SubNodes object to use



getAttribute
public ConfigurationNode getAttribute(int index)(Code)
Returns the attribute with the given index.
Parameters:
  index - the index (0-based) the attribute with this index



getAttributeCount
public int getAttributeCount()(Code)
Returns the number of attributes contained in this node. the number of attributes



getAttributeCount
public int getAttributeCount(String name)(Code)
Returns the number of attributes of this node with the given name.
Parameters:
  name - the name the number of attributes with this name



getAttributes
public List getAttributes()(Code)
Returns a list with the attributes of this node. This list contains ConfigurationNode objects, too. the attribute list, never null



getAttributes
public List getAttributes(String name)(Code)
Returns a list with all attributes of this node with the given name.
Parameters:
  name - the attribute's name all attributes with this name



getChild
public ConfigurationNode getChild(int index)(Code)
Returns the child node with the given index.
Parameters:
  index - the index (0-based) the child with this index



getChildren
public List getChildren()(Code)
Returns a list with all children of this node. a list with all child nodes



getChildren
public List getChildren(String name)(Code)
Returns a list of all children with the given name.
Parameters:
  name - the name; can be null , then all children are returned a list of all children with the given name



getChildrenCount
public int getChildrenCount()(Code)
Returns the number of all children of this node. the number of all children



getChildrenCount
public int getChildrenCount(String name)(Code)
Returns the number of children with the given name.
Parameters:
  name - the name; can be null , then the number of allchildren is returned the number of child nodes with this name



getName
public String getName()(Code)
Returns the name of this node. the name of this node



getParentNode
public ConfigurationNode getParentNode()(Code)
Returns a reference to this node's parent. the parent node or null if this is the root



getReference
public Object getReference()(Code)
Returns the reference. the reference



getValue
public Object getValue()(Code)
Returns the value of this node. the value of this node



isAttribute
public boolean isAttribute()(Code)
Checks if this node is an attribute node. a flag if this is an attribute node



isDefined
public boolean isDefined()(Code)
Returns a flag if this node is defined. This means that the node contains some data. a flag whether this node is defined



removeAttribute
public boolean removeAttribute(ConfigurationNode node)(Code)
Removes the specified attribute.
Parameters:
  node - the attribute node to be removed a flag if the attribute could be removed



removeAttribute
public boolean removeAttribute(String name)(Code)
Removes all attributes with the specified name.
Parameters:
  name - the name a flag if at least one attribute was removed



removeAttributes
public void removeAttributes()(Code)
Removes all attributes of this node.



removeChild
public boolean removeChild(ConfigurationNode child)(Code)
Removes the specified child node from this node.
Parameters:
  child - the node to be removed a flag if a node was removed



removeChild
public boolean removeChild(String childName)(Code)
Removes all children with the given name.
Parameters:
  childName - the name of the children to be removed a flag if at least one child node was removed



removeChildren
public void removeChildren()(Code)
Removes all child nodes of this node.



removeReference
protected void removeReference()(Code)
Deals with the reference when a node is removed. This method is called for each removed child node or attribute. It can be overloaded in sub classes, for which the reference has a concrete meaning and remove operations need some update actions. This default implementation is empty.



setAttribute
public void setAttribute(boolean f)(Code)
Sets the attribute flag. Note: this method can only be called if the node is not already part of a node hierarchy.
Parameters:
  f - the attribute flag



setName
public void setName(String name)(Code)
Sets the name of this node.
Parameters:
  name - the new name



setParentNode
public void setParentNode(ConfigurationNode parent)(Code)
Sets the parent of this node.
Parameters:
  parent - the parent of this node



setReference
public void setReference(Object reference)(Code)
Sets the reference.
Parameters:
  reference - the reference object



setValue
public void setValue(Object val)(Code)
Sets the value of this node.
Parameters:
  val - the value of this node



visit
public void visit(ConfigurationNodeVisitor visitor)(Code)
Visits this node and all its sub nodes.
Parameters:
  visitor - the visitor



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.