Class CollectionReaper
java.lang.Object
org.dlese.dpc.schemedit.repository.CollectionReaper
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
ConstructorsConstructorDescriptionCollectionReaper(String metadataRecordsLocation, String collection, String xmlFormat, String id) Constructor for the debugging the CollectionReaperCollectionReaper(String collection, ServletContext servletContext) constructor for use from Schemedit app -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()Make sure the repository, baseTrashDir and collections directories exist.static voidThe main program for the CollectionReaper classvoidreap()Description of the MethodvoidunhookCollection(String key) Remove all data structures referring to a collection, including: vocabulary entries (collectionKey) prefix idGenerator collectionConfigurationvoidUnhook the subcollections of a collection containing collection records.
-
Constructor Details
-
CollectionReaper
public CollectionReaper(String metadataRecordsLocation, String collection, String xmlFormat, String id) Constructor for the debugging the CollectionReaper- Parameters:
collection- Description of the ParameterxmlFormat- Description of the Parameterid- Description of the ParametermetadataRecordLocation- Description of the Parameter
-
CollectionReaper
constructor for use from Schemedit app- Parameters:
collection- Description of the ParameterservletContext- Description of the Parameter
-
-
Method Details
-
init
Make sure the repository, baseTrashDir and collections directories exist.- Throws:
Exception- Description of the Exception
-
reap
Description of the Method- Throws:
Exception- Description of the Exception
-
unhookCollection
Remove all data structures referring to a collection, including:- vocabulary entries (collectionKey)
- prefix
- idGenerator
- collectionConfiguration
- Parameters:
key- NOT YET DOCUMENTED- Throws:
Exception- NOT YET DOCUMENTED
-
unhookSubCollections
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
The main program for the CollectionReaper class- Parameters:
args- The command line arguments
-