uk.co.lakesidetech.springxmldb.processor
Class XMLDBAutoLoader

java.lang.Object
  extended byuk.co.lakesidetech.springxmldb.processor.XMLDBImportProcessor
      extended byuk.co.lakesidetech.springxmldb.processor.XMLDBAutoLoader

public class XMLDBAutoLoader
extends XMLDBImportProcessor

The XMLDBAutoLoader can be used in a Spring context to automatically upload documents to a XMLDatabase on startup. The auto loader uses Spring Resource abstraction to indicate the location of the directory to upload. This allows it to work in web applications and standalone.

Author:
Stuart Eccles

Field Summary
protected  java.lang.String collection
           
protected  org.springframework.core.io.Resource initDirectory
           
 
Constructor Summary
XMLDBAutoLoader()
           
 
Method Summary
 void init()
          run the upload directory and recursively upload the directory resource specified to the xml database
 void setCollection(java.lang.String collection)
           
 void setInitDirectory(org.springframework.core.io.Resource initDirectory)
           
 
Methods inherited from class uk.co.lakesidetech.springxmldb.processor.XMLDBImportProcessor
setCollectionManageDao, setXmldbManageDao, uploadDirectory, uploadFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initDirectory

protected org.springframework.core.io.Resource initDirectory

collection

protected java.lang.String collection
Constructor Detail

XMLDBAutoLoader

public XMLDBAutoLoader()
Method Detail

setInitDirectory

public void setInitDirectory(org.springframework.core.io.Resource initDirectory)
Parameters:
initDirectory - The initDirectory to set.

setCollection

public void setCollection(java.lang.String collection)
Parameters:
collection - The collection to set.

init

public void init()
          throws java.io.IOException
run the upload directory and recursively upload the directory resource specified to the xml database

Throws:
java.io.IOException - if the resource cannot be found