org.bibalex.daf.handlers.statusdatahandler
Class BackupInfoDef

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

public class BackupInfoDef
extends java.lang.Object

Represents an Xml node with the following format:
<Backup Version="" Size="" BackupAs="" >
<Server IP="" Username="" Password="" />
<CompressedFolder Name="" Size="" />
<CompressedFolder Name="" Size="" />
.
.
</Backup>
Note: There could be 0 or more compressed folders defined.

Author:
Shehab.Kamal

Field Summary
 java.lang.String backupAs
          Holds the 'BackupAs' property used in old system data retrieval.
 java.util.ArrayList<CompressedFolderDef> compressedFolders
          Holds the compressed folders defintions contained within this instance.
 ServerDef server
          Holds the server defintion contained within this instance.
 float size
          The 'Size' property of the server.
 int version
          The 'Version' property of the server.
 
Constructor Summary
BackupInfoDef()
          Creates a new instance of BackupInfoDef.
BackupInfoDef(org.w3c.dom.Node node)
          Creates a new instance of BackupInfoDef.
BackupInfoDef(java.lang.String nodeRep)
          Creates a new instance of BackupInfoDef.
 
Method Summary
private  void createElementFromNode(org.w3c.dom.Node node)
          Creates the BackupInfoDef element by supplying its XmlNode represenation.
 CompressedFolderDef[] getCompressedFolders()
          Gets the compressed folders defined within this section.
 java.lang.String toString()
          Returns the string representation of this object.
 java.lang.String toXmlString()
          Returns a String representing the BackupInfoDef in xml format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

version

public int version
The 'Version' property of the server.


size

public float size
The 'Size' property of the server.


server

public ServerDef server
Holds the server defintion contained within this instance.


backupAs

public java.lang.String backupAs
Holds the 'BackupAs' property used in old system data retrieval.


compressedFolders

public java.util.ArrayList<CompressedFolderDef> compressedFolders
Holds the compressed folders defintions contained within this instance.

Constructor Detail

BackupInfoDef

public BackupInfoDef()
Creates a new instance of BackupInfoDef.


BackupInfoDef

public BackupInfoDef(org.w3c.dom.Node node)
              throws StatusDefException
Creates a new instance of BackupInfoDef.

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

BackupInfoDef

public BackupInfoDef(java.lang.String nodeRep)
              throws StatusDefException
Creates a new instance of BackupInfoDef.

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

createElementFromNode

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

Parameters:
node - The Xml Node representing this element.
Throws:
StatusDefException - If the node name is not 'Backup', attributes are missing or child couldn't be added.

getCompressedFolders

public CompressedFolderDef[] getCompressedFolders()
Gets the compressed folders defined within this section.

Returns:
An array of type CompressedFolderDef 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 BackupInfoDef in xml format.

Returns:
A String representing the BackupInfoDef in xml format.