DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.repository
Class CollectionReaper

java.lang.Object
  extended by org.dlese.dpc.schemedit.repository.CollectionReaper

public class CollectionReaper
extends Object

Deletes a collections by moving metadata records to a "baseTrashDir" directory.

The Collection record, item records, and status records are all removed from their respective places in the repository file structure and moved to corresponding positions within the baseTrashDir directory.

Version:
$Id: CollectionReaper.java,v 1.4 2009/03/20 23:33:57 jweather Exp $
Author:
ostwald

$Id $


Constructor Summary
CollectionReaper(String collection, ServletContext servletContext)
          constructor for use from Schemedit app
CollectionReaper(String metadataRecordsLocation, String collection, String xmlFormat, String id)
          Constructor for the debugging the CollectionReaper
 
Method Summary
 void init()
          Make sure the repository, baseTrashDir and collections directories exist.
static void main(String[] args)
          The main program for the CollectionReaper class
 void reap()
          Description of the Method
 void unhookCollection(String key)
          Remove all data structures referring to a collection, including: vocabulary entries (collectionKey) prefix idGenerator collectionConfiguration
 void unhookSubCollections()
          Unhook the subcollections of a collection containing collection records.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionReaper

public CollectionReaper(String metadataRecordsLocation,
                        String collection,
                        String xmlFormat,
                        String id)
Constructor for the debugging the CollectionReaper

Parameters:
metadataRecordLocation - Description of the Parameter
collection - Description of the Parameter
xmlFormat - Description of the Parameter
id - Description of the Parameter

CollectionReaper

public CollectionReaper(String collection,
                        ServletContext servletContext)
constructor for use from Schemedit app

Parameters:
collection - Description of the Parameter
servletContext - Description of the Parameter
Method Detail

init

public void init()
          throws Exception
Make sure the repository, baseTrashDir and collections directories exist.

Throws:
Exception - Description of the Exception

reap

public void reap()
          throws Exception
Description of the Method

Throws:
Exception - Description of the Exception

unhookCollection

public void unhookCollection(String key)
                      throws Exception
Remove all data structures referring to a collection, including:

Parameters:
key - NOT YET DOCUMENTED
Throws:
Exception - NOT YET DOCUMENTED

unhookSubCollections

public void unhookSubCollections()
                          throws Exception
Unhook the subcollections of a collection containing collection records. It is assumed that the collection records are not associated with item records.

Throws:
Exception - Description of the Exception

main

public static void main(String[] args)
The main program for the CollectionReaper class

Parameters:
args - The command line arguments

DLESE Tools
v1.6.0