Class CollectionReaper

java.lang.Object
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 Details

    • CollectionReaper

      public CollectionReaper(String metadataRecordsLocation, String collection, String xmlFormat, String id)
      Constructor for the debugging the CollectionReaper
      Parameters:
      collection - Description of the Parameter
      xmlFormat - Description of the Parameter
      id - Description of the Parameter
      metadataRecordLocation - 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 Details

    • 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:
      • vocabulary entries (collectionKey)
      • prefix
      • idGenerator
      • collectionConfiguration
      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