Package org.datanucleus.plugin
Class ConfigurationElement
java.lang.Object
org.datanucleus.plugin.ConfigurationElement
Represents XML elements declared nested in the extension element
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]attributesattributesprivate ConfigurationElement[]child elementsprivate Extensionthe Extensionprivate Stringelement nameprivate final ConfigurationElementparent elementprivate Stringtext of element -
Constructor Summary
ConstructorsConstructorDescriptionConfigurationElement(Extension extension, String name, ConfigurationElement parent) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new children ConfigurationElement to this elementgetAttribute(String name) Acessor for the attribute value by a given nameString[]Acessor for all attribute names declared in this elementAcessor for all children of this ConfigurationElementAccesstor to theExtensiongetName()Acessor for the name of this elementAcessor for the parent of this ConfigurationElementgetText()Accessor to the textvoidputAttribute(String name, String value) Put a new attribute to this elementvoidSetter to the texttoString()
-
Field Details
-
parent
parent element -
children
child elements -
attributes
attributes -
attributeNames
attributes -
name
element name -
text
text of element -
extension
the Extension
-
-
Constructor Details
-
ConfigurationElement
Constructor- Parameters:
extension- The extensionname- the element's nameparent- the parent. null if there is no parent
-
-
Method Details
-
getName
Acessor for the name of this element- Returns:
- the name of this element
-
getParent
Acessor for the parent of this ConfigurationElement- Returns:
- can return null if there is no parent, or the parent is the Extension
-
getChildren
Acessor for all children of this ConfigurationElement- Returns:
- the ConfigurationElement declared nested in this element
-
getAttribute
Acessor for the attribute value by a given name- Parameters:
name- the attribute name- Returns:
- null if the attribute cannot be found
-
putAttribute
Put a new attribute to this element- Parameters:
name- the attribute's namevalue- the attribute's value
-
addConfigurationElement
Add a new children ConfigurationElement to this element- Parameters:
confElm- the ConfigurationElement
-
getAttributeNames
Acessor for all attribute names declared in this element- Returns:
- the attribute names
-
setText
Setter to the text- Parameters:
text- the text
-
getText
Accessor to the text- Returns:
- the text
-
getExtension
Accesstor to theExtension- Returns:
- the
Extension
-
toString
-