Package org.datanucleus.plugin
Class ConfigurationElement
- java.lang.Object
-
- org.datanucleus.plugin.ConfigurationElement
-
public class ConfigurationElement extends Object
Represents XML elements declared nested in the extension element
-
-
Constructor Summary
Constructors Constructor Description ConfigurationElement(Extension extension, String name, ConfigurationElement parent)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConfigurationElement(ConfigurationElement confElm)Add a new children ConfigurationElement to this elementStringgetAttribute(String name)Acessor for the attribute value by a given nameString[]getAttributeNames()Acessor for all attribute names declared in this elementConfigurationElement[]getChildren()Acessor for all children of this ConfigurationElementExtensiongetExtension()Accesstor to theExtensionStringgetName()Acessor for the name of this elementConfigurationElementgetParent()Acessor for the parent of this ConfigurationElementStringgetText()Accessor to the textvoidputAttribute(String name, String value)Put a new attribute to this elementvoidsetText(String text)Setter to the textStringtoString()
-
-
-
Constructor Detail
-
ConfigurationElement
public ConfigurationElement(Extension extension, 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 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 String getAttribute(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(String name, 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 String[] getAttributeNames()
Acessor for all attribute names declared in this element- Returns:
- the attribute names
-
setText
public void setText(String text)
Setter to the text- Parameters:
text- the text
-
getText
public String getText()
Accessor to the text- Returns:
- the text
-
-