edu.uiuc.ndiipp.hubandspoke.packager
Class Hub2DspacePackager

java.lang.Object
  extended by edu.uiuc.ndiipp.hubandspoke.packager.FromHubPackager
      extended by edu.uiuc.ndiipp.hubandspoke.packager.Hub2DspacePackager

public class Hub2DspacePackager
extends FromHubPackager

Class responsible for transforming a hub package into a package ingestable by Dspace. Expects to be fed a METS file conformant to the EchoDep profile (http://www.loc.gov/standards/mets/profiles/00000015.xml)

Any files not referenced in the METS file will not be packaged for DSpace ingestion.

Version:
$LastChangedRevision: 696 $
Author:
Matt Cordial
See Also:
ECHODep Generic METS Profile for Preservation and Digital Repository Interoperability

Constructor Summary
Hub2DspacePackager()
           
 
Method Summary
 java.io.File createRepositoryPackage(HaSMETSProfile hubpackage, java.lang.String id)
          Carry out the transformation on the given package.
 java.io.File createRepositoryPackage(HaSMETSProfile hubpackage, java.lang.String output_dir, java.lang.String id)
          Carry out the transformation on the given package
 java.io.File createRepositoryPackage(java.lang.String pathtomets, java.lang.String id)
          Carry out the transformation on the given package.
 java.io.File createRepositoryPackage(java.lang.String pathtomets, java.lang.String output_path, java.lang.String id)
          Carry out the transformation on the given package.
static void main(java.lang.String[] args)
          Command line interface to transform a hub package into a package ingestable by Dspace USAGE: Hub2DspacePackager /path/to/hub/package /output/dir dspaceAssignedHandle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hub2DspacePackager

public Hub2DspacePackager()
Method Detail

main

public static void main(java.lang.String[] args)
Command line interface to transform a hub package into a package ingestable by Dspace USAGE: Hub2DspacePackager /path/to/hub/package /output/dir dspaceAssignedHandle

Parameters:
args - - path to the hub package, path to the output directory, dspace handle

createRepositoryPackage

public java.io.File createRepositoryPackage(java.lang.String pathtomets,
                                            java.lang.String id)
                                     throws HaSMETSProfileException,
                                            PackagerException
Carry out the transformation on the given package. If output directory is not given it creates the package in the same directory as the METS file.

Parameters:
pathtomets - - location of the METS file
id - - handle retrieved from the POST method of LRCRUD
Throws:
PackagerException
HaSMETSProfileException

createRepositoryPackage

public java.io.File createRepositoryPackage(java.lang.String pathtomets,
                                            java.lang.String output_path,
                                            java.lang.String id)
                                     throws HaSMETSProfileException,
                                            PackagerException
Carry out the transformation on the given package. If passed a string, instantiates a MaSMETSProfile object and validates it before continuing.

Parameters:
pathtomets - - location of the METS file
id - - handle retrieved from the POST method of LRCRUD
Throws:
HaSMETSProfileException
PackagerException

createRepositoryPackage

public java.io.File createRepositoryPackage(HaSMETSProfile hubpackage,
                                            java.lang.String id)
                                     throws HaSMETSProfileException,
                                            PackagerException
Carry out the transformation on the given package. If passed a string, instantiates a MaSMETSProfile object and validates it before continuing.

Parameters:
hubpackage - - HaSMETSProfile object
id - - handle retrieved from the POST method of LRCRUD
Throws:
HaSMETSProfileException
PackagerException

createRepositoryPackage

public java.io.File createRepositoryPackage(HaSMETSProfile hubpackage,
                                            java.lang.String output_dir,
                                            java.lang.String id)
                                     throws PackagerException,
                                            HaSMETSProfileException
Carry out the transformation on the given package

Specified by:
createRepositoryPackage in class FromHubPackager
Parameters:
hubpackage - - HaSMETSProfile object
output_dir - - Place to put the zip
id - - handle retrieved from the POST method of LRCRUD
Throws:
HaSMETSProfileException
PackagerException


Copyright © 2006, University of Illinois.