org.bibalex.daf.handlers.statusdatahandler
Class CompressedFolderDef

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

public class CompressedFolderDef
extends java.lang.Object

Represents an Xml node with the following format:
<CompressedFolder ZipFileName="" FolderName="" Size="" />
This node means that folder indicated by FolderName attribute has been compressed in the zip file indicated by ZipFileName attribute.
The "Size" attribute, which is optional, indicates the size of the zip file.

Author:
Shehab.Kamal

Field Summary
 java.lang.String folderName
          The 'FolderName' property of the element.
 float size
          The 'Size' property of the element.
 java.lang.String zipFileName
          The 'ZipFileName' property of the element.
 
Constructor Summary
CompressedFolderDef()
          Creates a new instance of CompressedFolderDef.
CompressedFolderDef(org.w3c.dom.Node node)
          Creates a new instance of CompressedFolderDef.
CompressedFolderDef(java.lang.String nodeRep)
          Creates a new instance of CompressedFolderDef.
CompressedFolderDef(java.lang.String folderName, java.lang.String zipFileName, float size)
          Creates a new instance of CompressedFolderDef.
 
Method Summary
private  void createElementFromNode(org.w3c.dom.Node node)
          Creates the CompressedFolderDef by supplying its XmlNode represenation.
 java.lang.String toString()
          Returns the string representation of this object.
 java.lang.String toXmlString()
          Converts this instance to a valid XML string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

folderName

public java.lang.String folderName
The 'FolderName' property of the element.


zipFileName

public java.lang.String zipFileName
The 'ZipFileName' property of the element.


size

public float size
The 'Size' property of the element. If the attribute is missing this value is -1.
Note: Don't compare float values, instead use: new Float(size).intValue();

Constructor Detail

CompressedFolderDef

public CompressedFolderDef(java.lang.String folderName,
                           java.lang.String zipFileName,
                           float size)
Creates a new instance of CompressedFolderDef.

Parameters:
folderName - The 'FolderName' property of the element.
zipFileName - The 'ZipFileName' property of the element.
size - The 'Size' property of the element.

CompressedFolderDef

public CompressedFolderDef()
Creates a new instance of CompressedFolderDef.


CompressedFolderDef

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

Parameters:
node - The Xml Node representing this element.
Throws:
StatusDefException - If the node couldn't be parsed.

CompressedFolderDef

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

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 CompressedFolderDef by supplying its XmlNode represenation.

Parameters:
node - The Xml Node representing this element.
Throws:
StatusDefException - If the node name is not 'CompressedFolder' or attributes are missing.

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()
Converts this instance to a valid XML string.

Returns:
A valid XML string representing this instance.