org.dspace.sword
Class CollectionDepositor

java.lang.Object
  extended by org.dspace.sword.Depositor
      extended by org.dspace.sword.CollectionDepositor

public class CollectionDepositor
extends Depositor

Author:
Richard Jones A depositor which can deposit content into a DSpace Collection

Field Summary
 
Fields inherited from class org.dspace.sword.Depositor
swordService
 
Constructor Summary
CollectionDepositor(SWORDService swordService, DSpaceObject dso)
          Construct a depositor for the given service instance on the given DSpaceObject.
 
Method Summary
 DepositResult doDeposit(Deposit deposit)
          Perform a deposit, using the supplied SWORD Deposit object
 void undoDeposit(DepositResult result)
          Reverse any changes which may have resulted as the consequence of a deposit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionDepositor

public CollectionDepositor(SWORDService swordService,
                           DSpaceObject dso)
                    throws DSpaceSWORDException
Construct a depositor for the given service instance on the given DSpaceObject. If the DSpaceObject is not an instance of Collection this constructor will throw an Exception

Parameters:
swordService -
dso -
Throws:
DSpaceSWORDException
Method Detail

doDeposit

public DepositResult doDeposit(Deposit deposit)
                        throws SWORDErrorException,
                               DSpaceSWORDException
Perform a deposit, using the supplied SWORD Deposit object

Specified by:
doDeposit in class Depositor
Parameters:
deposit -
Returns:
Throws:
SWORDErrorException
DSpaceSWORDException

undoDeposit

public void undoDeposit(DepositResult result)
                 throws DSpaceSWORDException
Reverse any changes which may have resulted as the consequence of a deposit. This is inteded for use during no-op deposits, and should be called at the end of such a deposit process in order to remove any temporary files and to abort the database connection, so no changes are written.

Specified by:
undoDeposit in class Depositor
Parameters:
result -
Throws:
DSpaceSWORDException


Copyright © 2009 The DSpace Foundation. All Rights Reserved.