org.dspace.sword
Class DSpaceATOMEntry

java.lang.Object
  extended by org.dspace.sword.DSpaceATOMEntry
Direct Known Subclasses:
BitstreamEntryGenerator, ItemEntryGenerator

public abstract class DSpaceATOMEntry
extends Object

Class to represent a DSpace Item as an ATOM Entry. This handles the objects in a default way, but the intention is for you to be able to extend the class with your own representation if necessary.

Author:
Richard Jones

Field Summary
protected  Bitstream bitstream
          The bitstream this ATOM entry represents
protected  Deposit deposit
          the original deposit
protected  SWORDEntry entry
          the SWORD ATOM entry which this class effectively decorates
protected  Item item
          the item this ATOM entry represents
protected  DepositResult result
          the deposit result
protected  SWORDService swordService
          sword service implementation
 
Constructor Summary
protected DSpaceATOMEntry(SWORDService service)
          Create a new atom entry object around the given service
 
Method Summary
protected  void addAuthors()
          add the author names from the bibliographic metadata.
protected  void addContributors()
          Add the list of contributors to the item.
protected  void addGenerator()
          add the generator field content
protected  void addPackagingElement()
          set the packaging format of the deposit
protected  void addTreatment()
          Add deposit treatment text
protected  void constructEntry()
          Construct the entry
 SWORDEntry getSWORDEntry(DepositResult result, Deposit deposit)
          Construct the SWORDEntry object which represents the given item with the given handle.
 SWORDEntry getSWORDEntry(DSpaceObject dso)
          get the sword entry for the given dspace object.
 void reset()
          Reset all the internal variables of the class to their original values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entry

protected SWORDEntry entry
the SWORD ATOM entry which this class effectively decorates


item

protected Item item
the item this ATOM entry represents


bitstream

protected Bitstream bitstream
The bitstream this ATOM entry represents


result

protected DepositResult result
the deposit result


swordService

protected SWORDService swordService
sword service implementation


deposit

protected Deposit deposit
the original deposit

Constructor Detail

DSpaceATOMEntry

protected DSpaceATOMEntry(SWORDService service)
Create a new atom entry object around the given service

Parameters:
service -
Method Detail

reset

public void reset()
Reset all the internal variables of the class to their original values


getSWORDEntry

public SWORDEntry getSWORDEntry(DSpaceObject dso)
                         throws DSpaceSWORDException
get the sword entry for the given dspace object. In this case, we should be responding to requests for the media link, so this method will throw an error unless the dspace object is an instance of the Bitstream

Parameters:
dso -
Returns:
Throws:
DSpaceSWORDException

getSWORDEntry

public SWORDEntry getSWORDEntry(DepositResult result,
                                Deposit deposit)
                         throws DSpaceSWORDException
Construct the SWORDEntry object which represents the given item with the given handle. An argument as to whether this is a NoOp request is required because in that event the assigned identifier for the item will not be added to the SWORDEntry as it will be invalid.

Parameters:
result - the result of the deposit operation
deposit - the original deposit request
Returns:
the SWORDEntry for the item
Throws:
DSpaceSWORDException

constructEntry

protected void constructEntry()
                       throws DSpaceSWORDException
Construct the entry

Throws:
DSpaceSWORDException

addTreatment

protected void addTreatment()
Add deposit treatment text


addGenerator

protected void addGenerator()
add the generator field content


addPackagingElement

protected void addPackagingElement()
set the packaging format of the deposit


addAuthors

protected void addAuthors()
add the author names from the bibliographic metadata. Does not supply email addresses or URIs, both for privacy, and because the data is not so readily available in DSpace.


addContributors

protected void addContributors()
Add the list of contributors to the item. This will include the authors, and any other contributors that are supplied in the bibliographic metadata



Copyright © 2010 The DSpace Foundation. All Rights Reserved.