edu.uiuc.ndiipp.hubandspoke.packager
Class DirectoryPackager

java.lang.Object
  extended by edu.uiuc.ndiipp.hubandspoke.packager.ToHubPackager
      extended by edu.uiuc.ndiipp.hubandspoke.packager.DirectoryPackager
Direct Known Subclasses:
OCAPackager

public class DirectoryPackager
extends ToHubPackager

Walks a supplied directory and creates an EchoDep Hub compliant METS file from the contents.

Author:
Matt Cordial

Constructor Summary
DirectoryPackager()
           
 
Method Summary
 HaSMETSProfile createHubPackage(java.io.File itemdir, java.io.File metadata)
          Overload to allow internal generation of an identifier
 HaSMETSProfile createHubPackage(java.io.File itemdir, java.io.File metadata, java.lang.String id, METSProfile.PREMISIdentifierType idtype)
          Creates the Hub package from scratch
 boolean createHubPackage(java.util.zip.ZipFile zip, java.lang.String unzippath, java.lang.String hubpath)
           
static void main(java.lang.String[] args)
          Command line interface...
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryPackager

public DirectoryPackager()
Method Detail

main

public static void main(java.lang.String[] args)
Command line interface...


createHubPackage

public HaSMETSProfile createHubPackage(java.io.File itemdir,
                                       java.io.File metadata,
                                       java.lang.String id,
                                       METSProfile.PREMISIdentifierType idtype)
                                throws PackagerException
Creates the Hub package from scratch

Parameters:
itemdir - -- File representing the path to the items
metadata - -- File representing the path to the MODS metadata for the item
id - -- Identifier of the item. If not supplied, a UUID will be created for the item.
idtype - -- Indicator of which identifier scheme is used.
Returns:
HasMETSProfile object
Throws:
PackagerException

createHubPackage

public HaSMETSProfile createHubPackage(java.io.File itemdir,
                                       java.io.File metadata)
                                throws PackagerException
Overload to allow internal generation of an identifier

Parameters:
itemdir - -- File representing the path to the items
metadata - -- File representing the path to the MODS metadata for the item
Returns:
- HasMETSProfile object
Throws:
PackagerException

createHubPackage

public boolean createHubPackage(java.util.zip.ZipFile zip,
                                java.lang.String unzippath,
                                java.lang.String hubpath)
                         throws PackagerException,
                                HaSMETSProfileException
Specified by:
createHubPackage in class ToHubPackager
Throws:
PackagerException
HaSMETSProfileException


Copyright © 2006, University of Illinois.