org.dspace.content.packager
Class AbstractMETSIngester.MdrefManager

java.lang.Object
  extended by org.dspace.content.packager.AbstractMETSIngester.MdrefManager
All Implemented Interfaces:
METSManifest.Mdref
Enclosing class:
AbstractMETSIngester

protected class AbstractMETSIngester.MdrefManager
extends Object
implements METSManifest.Mdref

An instance of MdrefManager holds the state needed to retrieve the contents (or bitstream corresponding to) an external metadata stream referenced by an mdRef element in the METS manifest.

Initialize it with the DSpace Bundle containing all of the metadata bitstreams. Match an mdRef by finding the bitstream with the same name.


Method Summary
 Bitstream getBitstreamForMdRef(org.jdom.Element mdref)
          Find the local Bitstream referenced in an mdRef element.
 InputStream getInputStream(org.jdom.Element mdref)
          Make the contents of an external resource mentioned in an mdRef element available as an InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBitstreamForMdRef

public Bitstream getBitstreamForMdRef(org.jdom.Element mdref)
                               throws MetadataValidationException,
                                      IOException,
                                      SQLException,
                                      AuthorizeException
Find the local Bitstream referenced in an mdRef element.

Parameters:
mdref - the METS mdRef element to locate the bitstream for.
Returns:
bitstream or null if none found.
Throws:
MetadataValidationException
IOException
SQLException
AuthorizeException

getInputStream

public InputStream getInputStream(org.jdom.Element mdref)
                           throws MetadataValidationException,
                                  IOException,
                                  SQLException,
                                  AuthorizeException
Make the contents of an external resource mentioned in an mdRef element available as an InputStream. See the METSManifest.MdRef interface for details.

Specified by:
getInputStream in interface METSManifest.Mdref
Parameters:
mdref - the METS mdRef element to locate the input for.
Returns:
the input stream of its content.
Throws:
MetadataValidationException
IOException
SQLException
AuthorizeException


Copyright © 2010 DuraSpace. All Rights Reserved.