Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## backupAndRecovery
Class BackupMetaContainer

    java.lang.Object
      backupAndRecovery.BackupMetaContainer

    public class BackupMetaContainer

extends java.lang.Object

Container storing information about backup.

Field Summary
`static java.lang.String` | `ROOT`

Constructor Summary
`BackupMetaContainer(org.dom4j.Document doc)` Constructor loads information about backup from xml document.
`BackupMetaContainer(org.dom4j.Element root)` Constructor loads information about backup from xml element.
`BackupMetaContainer(java.io.File file, java.lang.String name, int dc, int cc)` Computes metadata to given file.

Method Summary
`boolean` | `equals(java.lang.Object obj)`
`java.lang.String` | `getBackupName()` Returns name of this backup.
`java.util.Date` | `getBackupTime()` Time when backup was created.
`java.lang.String` | `getFilename()` Returns name of file to which this backup belongs.
`int` | `getFragmentCount()` Returns number of fragments of original file created for this backup.
`int` | `getChecksumCount()` Returns numbers of checksums calculated for this backup.
`java.util.Date` | `getModificationTime()` Returns time of last modification of file to which this backup belongs
`long` | `getSize()` Returns size of original file in bytes.
`java.lang.String` | `getUserName()` Returns name of user which created this backup or under which application was running during process of backing up.
`org.dom4j.Document` | `getXmlDocument()` Returns Xml document of current metadata.
`java.lang.String` | `getXmlString()` Returns string representation of xml corresponding to current backup meta.
`int` | `hashCode()`
`java.lang.String` | `toString()` Returns Xml of this metadata in string format.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### ROOT

    public static final java.lang.String ROOT

See Also:
  Constant Field Values

Constructor Detail

### BackupMetaContainer

    public BackupMetaContainer(org.dom4j.Document doc)
                        throws java.lang.IllegalArgumentException

  Constructor loads information about backup from xml document.

  Parameters:
    `doc` - xml document
  Throws:
    `java.lang.IllegalArgumentException` - when document is malformed
  See Also:
    `Document`

### BackupMetaContainer

    public BackupMetaContainer(org.dom4j.Element root)
                        throws java.lang.IllegalArgumentException

  Constructor loads information about backup from xml element.

  Parameters:
    `root` - root element of xml document containing metadata
  Throws:
    `java.lang.IllegalArgumentException` - if document is malformed

### BackupMetaContainer

    public BackupMetaContainer(java.io.File file,
                               java.lang.String name,
                               int dc,
                               int cc)

  Computes metadata to given file.

  Parameters:
    `file` - File to which we want to compute metadata
    `name` - name of backup to be created
    `dc` - number of framgents of original file
    `cc` - number of checksums to be calculated

Method Detail

### getXmlString

    public java.lang.String getXmlString()

  Returns string representation of xml corresponding to current backup meta.

  Returns:
    string of xml document

### getXmlDocument

    public org.dom4j.Document getXmlDocument()

  Returns Xml document of current metadata.

  Returns:
    xml Document
  See Also:
    `Document`

### getFilename

    public java.lang.String getFilename()

  Returns name of file to which this backup belongs.

  Returns:
    String name of file

### getBackupName

    public java.lang.String getBackupName()

  Returns name of this backup.

  Returns:
    String name of backup

### getUserName

    public java.lang.String getUserName()

  Returns name of user which created this backup or under which application was running during process of backing up.

  Returns:
    username

### getBackupTime

    public java.util.Date getBackupTime()

  Time when backup was created.

  Returns:
    Date object containing exact time of backup

### getModificationTime

    public java.util.Date getModificationTime()

  Returns time of last modification of file to which this backup belongs

  Returns:
    Date object representing time of last modification

### getFragmentCount

    public int getFragmentCount()

  Returns number of fragments of original file created for this backup.

  Returns:
    number of fragments

### getChecksumCount

    public int getChecksumCount()

  Returns numbers of checksums calculated for this backup.

  Returns:
    number of checksums

### getSize

    public long getSize()

  Returns size of original file in bytes.

  Returns:
    size of file

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Returns Xml of this metadata in string format.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    string of xml

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD