org.bibalex.daf.handlers.statusdatahandler
Class DatabaseInfoDef

java.lang.Object
  extended by org.bibalex.daf.handlers.statusdatahandler.DatabaseInfoDef

public class DatabaseInfoDef
extends java.lang.Object

Represents an Xml node with the following format:
<Database>
<Name>Value</Name>
.
.
</Database>

Author:
Shehab.Kamal

Field Summary
 java.util.ArrayList<NameValueInfo> information
          Holds the NameValueInfo contained within this instance.
 
Constructor Summary
DatabaseInfoDef()
          Creates a new instance of DatabaseInfoDef.
DatabaseInfoDef(org.w3c.dom.Node node)
          Creates a new instance of DatabaseInfoDef.
DatabaseInfoDef(java.lang.String nodeRep)
          Creates a new instance of DatabaseInfoDef.
 
Method Summary
private  void createElementFromNode(org.w3c.dom.Node node)
          Creates the DatabaseInfoDef element by supplying its XmlNode represenation.
 NameValueInfo[] getElements()
          Gets the elements defined within this section.
 java.lang.String toString()
          Returns the string representation of this object.
 java.lang.String toXmlString()
          Returns a String representing the DatabaseInfoDef in xml format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

information

public java.util.ArrayList<NameValueInfo> information
Holds the NameValueInfo contained within this instance.

Constructor Detail

DatabaseInfoDef

public DatabaseInfoDef()
Creates a new instance of DatabaseInfoDef.


DatabaseInfoDef

public DatabaseInfoDef(org.w3c.dom.Node node)
                throws NameValueInfoException
Creates a new instance of DatabaseInfoDef.

Parameters:
node - The Xml node that representd the element.
Throws:
NameValueInfoException - If the given node couldn't be parsed.

DatabaseInfoDef

public DatabaseInfoDef(java.lang.String nodeRep)
                throws NameValueInfoException
Creates a new instance of DatabaseInfoDef.

Parameters:
nodeRep - The Xml String representing this element.
Throws:
NameValueInfoException - If the given String couldn't be parsed.
Method Detail

createElementFromNode

private void createElementFromNode(org.w3c.dom.Node node)
                            throws NameValueInfoException
Creates the DatabaseInfoDef element by supplying its XmlNode represenation.

Parameters:
node - The Xml Node representing this element.
Throws:
NameValueInfoException - If the node name is not 'Database' or child couldn't be added.

getElements

public NameValueInfo[] getElements()
Gets the elements defined within this section.

Returns:
An array of type NameValueInfo containing the elements or an empty array if there is no elements.

toString

public java.lang.String toString()
Returns the string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this object.

toXmlString

public java.lang.String toXmlString()
Returns a String representing the DatabaseInfoDef in xml format.

Returns:
A String representing the DatabaseInfoDef in xml format.