edu.uiuc.ndiipp.hubandspoke.packager
Class Hub2EprintsPackager

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

public class Hub2EprintsPackager
extends FromHubPackager

Class responsible for transforming a hub package into a package ingestable by Eprints. 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 Eprints ingestion.

Version:
$LastChangedRevision: 1 $
Author:
Robert Manaster
See Also:
ECHODep Generic METS Profile for Preservation and Digital Repository Interoperability

Constructor Summary
Hub2EprintsPackager()
           
 
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 Eprints USAGE: Hub2EprintsPackager /path/to/hub/package /output/dir eprintsAssignedHandle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hub2EprintsPackager

public Hub2EprintsPackager()
Method Detail

main

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

Parameters:
args - - path to the hub package, path to the output directory, Eprints 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:
HaSPackagerException
HaSMETSProfileException
PackagerException

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.