Package org.datanucleus.plugin
Class ConfigurationElement
- java.lang.Object
-
- org.datanucleus.plugin.ConfigurationElement
-
public class ConfigurationElement extends java.lang.Object
Represents XML elements declared nested in the extension element
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]
attributeNames
attributesprivate java.util.Map<java.lang.String,java.lang.String>
attributes
attributesprivate ConfigurationElement[]
children
child elementsprivate Extension
extension
the Extensionprivate java.lang.String
name
element nameprivate ConfigurationElement
parent
parent elementprivate java.lang.String
text
text of element
-
Constructor Summary
Constructors Constructor Description ConfigurationElement(Extension extension, java.lang.String name, ConfigurationElement parent)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConfigurationElement(ConfigurationElement confElm)
Add a new children ConfigurationElement to this elementjava.lang.String
getAttribute(java.lang.String name)
Acessor for the attribute value by a given namejava.lang.String[]
getAttributeNames()
Acessor for all attribute names declared in this elementConfigurationElement[]
getChildren()
Acessor for all children of this ConfigurationElementExtension
getExtension()
Accesstor to theExtension
java.lang.String
getName()
Acessor for the name of this elementConfigurationElement
getParent()
Acessor for the parent of this ConfigurationElementjava.lang.String
getText()
Accessor to the textvoid
putAttribute(java.lang.String name, java.lang.String value)
Put a new attribute to this elementvoid
setText(java.lang.String text)
Setter to the textjava.lang.String
toString()
-
-
-
Field Detail
-
parent
private final ConfigurationElement parent
parent element
-
children
private ConfigurationElement[] children
child elements
-
attributes
private final java.util.Map<java.lang.String,java.lang.String> attributes
attributes
-
attributeNames
private java.lang.String[] attributeNames
attributes
-
name
private java.lang.String name
element name
-
text
private java.lang.String text
text of element
-
extension
private Extension extension
the Extension
-
-
Constructor Detail
-
ConfigurationElement
public ConfigurationElement(Extension extension, java.lang.String name, ConfigurationElement parent)
Constructor- Parameters:
extension
- The extensionname
- the element's nameparent
- the parent. null if there is no parent
-
-
Method Detail
-
getName
public java.lang.String getName()
Acessor for the name of this element- Returns:
- the name of this element
-
getParent
public ConfigurationElement getParent()
Acessor for the parent of this ConfigurationElement- Returns:
- can return null if there is no parent, or the parent is the Extension
-
getChildren
public ConfigurationElement[] getChildren()
Acessor for all children of this ConfigurationElement- Returns:
- the ConfigurationElement declared nested in this element
-
getAttribute
public java.lang.String getAttribute(java.lang.String name)
Acessor for the attribute value by a given name- Parameters:
name
- the attribute name- Returns:
- null if the attribute cannot be found
-
putAttribute
public void putAttribute(java.lang.String name, java.lang.String value)
Put a new attribute to this element- Parameters:
name
- the attribute's namevalue
- the attribute's value
-
addConfigurationElement
public void addConfigurationElement(ConfigurationElement confElm)
Add a new children ConfigurationElement to this element- Parameters:
confElm
- the ConfigurationElement
-
getAttributeNames
public java.lang.String[] getAttributeNames()
Acessor for all attribute names declared in this element- Returns:
- the attribute names
-
setText
public void setText(java.lang.String text)
Setter to the text- Parameters:
text
- the text
-
getText
public java.lang.String getText()
Accessor to the text- Returns:
- the text
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-