Java Doc for ConfigurationNode.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) 


org.apache.commons.configuration.tree.ConfigurationNode

All known Subclasses:   org.apache.commons.configuration.tree.DefaultConfigurationNode,
ConfigurationNode
public interface ConfigurationNode (Code)

Definition of an interface for the nodes of a hierarchical configuration.

This interface defines a tree like structure for configuration data. A node has a value and can have an arbitrary number of children and attribures.


since:
   1.3
author:
   Oliver Heger
version:
   $Id: ConfigurationNode.java 439648 2006-09-02 20:42:10Z oheger $




Method Summary
 voidaddAttribute(ConfigurationNode attr)
    
 voidaddChild(ConfigurationNode node)
     Adds a child to this node.
 Objectclone()
     Returns a copy of this node.
 ConfigurationNodegetAttribute(int index)
     Returns the attribute node with the given index.
 intgetAttributeCount()
     Returns the number of attributes of this node.
 intgetAttributeCount(String name)
     Returns the number of attributes with the given name.
 ListgetAttributes()
     Returns a list with this node's attributes.
 ListgetAttributes(String name)
     Returns a list with the attribute nodes with the given name.
 ConfigurationNodegetChild(int index)
     Returns the child node with the given index.
 ListgetChildren()
     Returns a list with the child nodes of this node.
 ListgetChildren(String name)
     Returns a list with all children of this node with the given name.
 intgetChildrenCount()
     Returns the number of this node's children.
 intgetChildrenCount(String name)
     Returns the number of children with the given name.
 StringgetName()
     Returns the name of this node.
 ConfigurationNodegetParentNode()
     Returns this node's parent.
 ObjectgetReference()
     Returns this node's reference.
 ObjectgetValue()
     Returns the value of this node.
 booleanisAttribute()
     Returns a flag whether this node is an attribute.
 booleanisDefined()
     Returns a flag if this node is defined.
 booleanremoveAttribute(ConfigurationNode node)
     Removes the specified attribute from this node.
 booleanremoveAttribute(String name)
     Removes all attributes with the given name.
 voidremoveAttributes()
     Removes all attributes of this node.
 booleanremoveChild(ConfigurationNode child)
     Removes the given node from this node's children.
 booleanremoveChild(String childName)
     Removes all child nodes of this node with the given name.
 voidremoveChildren()
     Removes all children from this node.
 voidsetAttribute(boolean f)
     Sets a flag whether this node is an attribute.
 voidsetName(String name)
     Sets the name of this node.
 voidsetParentNode(ConfigurationNode parent)
     Sets the parent of this node.
 voidsetReference(Object ref)
     Sets this node's reference.
 voidsetValue(Object val)
     Sets the value of this node.
 voidvisit(ConfigurationNodeVisitor visitor)
     Visits this node and all its sub nodes.



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



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



clone
Object clone()(Code)
Returns a copy of this node. the copy



getAttribute
ConfigurationNode getAttribute(int index)(Code)
Returns the attribute node with the given index. If no such index exists, an exception will be thrown.
Parameters:
  index - the index the attribute node with this index



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



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



getAttributes
List getAttributes()(Code)
Returns a list with this node's attributes. Attributes are also modeled as ConfigurationNode objects. a list with the attributes



getAttributes
List getAttributes(String name)(Code)
Returns a list with the attribute nodes with the given name. Attributes with same names can be added multiple times, so the return value of this method is a list.
Parameters:
  name - the name of the attribute the attribute nodes with this name (never null)



getChild
ConfigurationNode getChild(int index)(Code)
Returns the child node with the given index. If the index does not exist, an exception will be thrown.
Parameters:
  index - the index of the child node (0-based) the child node with this index



getChildren
List getChildren()(Code)
Returns a list with the child nodes of this node. The nodes in this list should be in the order they were inserted into this node. a list with the children of this node (never null)



getChildren
List getChildren(String name)(Code)
Returns a list with all children of this node with the given name.
Parameters:
  name - the name of the searched children a list with all child nodes with this name (never null)



getChildrenCount
int getChildrenCount()(Code)
Returns the number of this node's children. the number of the children of this node



getChildrenCount
int getChildrenCount(String name)(Code)
Returns the number of children with the given name.
Parameters:
  name - the name the number of children with this name



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



getParentNode
ConfigurationNode getParentNode()(Code)
Returns this node's parent. Can be null, then this node is the top level node. the parent of this node



getReference
Object getReference()(Code)
Returns this node's reference. the reference



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



isAttribute
boolean isAttribute()(Code)
Returns a flag whether this node is an attribute. a flag whether this node is an attribute



isDefined
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
boolean removeAttribute(ConfigurationNode node)(Code)
Removes the specified attribute from this node.
Parameters:
  node - the attribute to remove a flag if the node could be removed



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



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



removeChild
boolean removeChild(ConfigurationNode child)(Code)
Removes the given node from this node's children.
Parameters:
  child - the child node to be removed a flag if the node could be removed



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



removeChildren
void removeChildren()(Code)
Removes all children from this node.



setAttribute
void setAttribute(boolean f)(Code)
Sets a flag whether this node is an attribute.
Parameters:
  f - the attribute flag



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



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



setReference
void setReference(Object ref)(Code)
Sets this node's reference. This reference can be used by concrete Configuration implementations to store data associated with each node. A XML based configuration for instance could here store a reference to the corresponding DOM element.
Parameters:
  ref - the reference



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



visit
void visit(ConfigurationNodeVisitor visitor)(Code)
Visits this node and all its sub nodes. This method provides a simple means for going through a hierarchical structure of configuration nodes.
See Also:   ConfigurationNodeVisitor
Parameters:
  visitor - the visitor



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