uk.co.lakesidetech.springxmldb.processor
Class XMLDBExportProcessor

java.lang.Object
  extended byuk.co.lakesidetech.springxmldb.processor.XMLDBExportProcessor

public class XMLDBExportProcessor
extends java.lang.Object

The XMLDBExportProcessor is used to export the contents of an XML database to a filesystem location. This works for both XML and binary resources and allows for recursive collection traversing for conversion to directory structures. The resources have a file name of their database resource ID

Author:
Stuart Eccles

Constructor Summary
XMLDBExportProcessor()
           
 
Method Summary
 java.util.Map exportCollection(java.io.File directory, java.lang.String collectionPath, boolean recursive)
          Export an XML database collection to a filesystem directory.
 void setCollectionManageDao(ICollectionManageXMLDBDao collectionManageDao)
           
 void setXmldbManageDao(IResourceManageXMLDBDao xmldbManageDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDBExportProcessor

public XMLDBExportProcessor()
Method Detail

setCollectionManageDao

public void setCollectionManageDao(ICollectionManageXMLDBDao collectionManageDao)
Parameters:
collectionManageDao - The collectionManageDao to set.

setXmldbManageDao

public void setXmldbManageDao(IResourceManageXMLDBDao xmldbManageDao)
Parameters:
xmldbManageDao - The xmldbManageDao to set.

exportCollection

public java.util.Map exportCollection(java.io.File directory,
                                      java.lang.String collectionPath,
                                      boolean recursive)
                               throws java.io.IOException,
                                      XMLDBDataAccessException
Export an XML database collection to a filesystem directory. If the recursive flag is specified the exported will convert collections to directories.

Parameters:
directory - The directory to export to
collectionPath - The collection path to export from
recursive - transverse the collection tree converting collections into directories
Returns:
A Map of collectionpaths to Sets of ids of resources exported
Throws:
java.io.IOException - problems with file writing
XMLDBDataAccessException - problems with XML database access