org.exist.backup
Class SystemExport

java.lang.Object
  extended by org.exist.backup.SystemExport

public class SystemExport
extends Object

Embedded database export tool class. Tries to export as much data as possible, even if parts of the collection hierarchy are corrupted or documents are no longer readable. Features:

The class should be used in combination with ConsistencyCheck. The error lists returned by ConsistencyCheck can be passed to export(String, java.util.List).


Nested Class Summary
static interface SystemExport.StatusCallback
           
 
Field Summary
 Properties contentsOutputProps
           
 Properties defaultOutputProperties
           
 
Constructor Summary
SystemExport(DBBroker broker, SystemExport.StatusCallback callback)
           
 
Method Summary
 void export(String target, List errorList)
          Export the contents of the database, trying to preserve as much data as possible.
static File getUniqueFile(String base, String extension, String dir)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultOutputProperties

public Properties defaultOutputProperties

contentsOutputProps

public Properties contentsOutputProps
Constructor Detail

SystemExport

public SystemExport(DBBroker broker,
                    SystemExport.StatusCallback callback)
Method Detail

export

public void export(String target,
                   List errorList)
Export the contents of the database, trying to preserve as much data as possible. To be effective, this method should be used in combination with class ConsistencyCheck.

Parameters:
target - the output directory or file to which data will be written. Output will be written to a zip file if target ends with .zip.
errorList - a list of ErrorReport objects as returned by methods in ConsistencyCheck.

getUniqueFile

public static File getUniqueFile(String base,
                                 String extension,
                                 String dir)


Copyright (C) Wolfgang Meier. All rights reserved.