org.dspace.app.mets
Class METSExport

java.lang.Object
  extended by org.dspace.app.mets.METSExport

public class METSExport
extends Object

Tool for exporting DSpace AIPs with the metadata serialised in METS format

Version:
$Revision: 3739 $
Author:
Robert Tansley

Constructor Summary
METSExport()
           
 
Method Summary
static void main(String[] args)
           
static void writeAIP(Context context, Item item, String dest)
          Write out the AIP for the given item to the given directory.
static void writeMETS(Context context, Item item, OutputStream os, boolean fullURL)
          Write METS metadata corresponding to the metadata for an item
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

METSExport

public METSExport()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

writeAIP

public static void writeAIP(Context context,
                            Item item,
                            String dest)
                     throws SQLException,
                            IOException,
                            AuthorizeException,
                            edu.harvard.hul.ois.mets.helper.MetsException
Write out the AIP for the given item to the given directory. A new directory will be created with the Handle (URL-encoded) as the directory name, and inside, a mets.xml file written, together with the bitstreams.

Parameters:
context - DSpace context to use
item - Item to write
dest - destination directory
Throws:
SQLException
IOException
AuthorizeException
edu.harvard.hul.ois.mets.helper.MetsException

writeMETS

public static void writeMETS(Context context,
                             Item item,
                             OutputStream os,
                             boolean fullURL)
                      throws SQLException,
                             IOException,
                             AuthorizeException
Write METS metadata corresponding to the metadata for an item

Parameters:
context - DSpace context
item - DSpace item to create METS object for
os - A stream to write METS package to (UTF-8 encoding will be used)
fullURL - if true, the <FLocat> values for each bitstream will be the full URL for that bitstream. Otherwise, only the filename itself will be used.
Throws:
SQLException
IOException
AuthorizeException


Copyright © 2010 DuraSpace. All Rights Reserved.