org.dspace.sword
Class DSpaceATOMEntry

java.lang.Object
  extended by org.dspace.sword.DSpaceATOMEntry

public 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  SWORDEntry entry
          the SWORD ATOM entry which this class effectively decorates
protected  Item item
          the item this ATOM entry represents
 
Constructor Summary
DSpaceATOMEntry()
           
 
Method Summary
protected  void addAuthors()
          add the author names from the bibliographic metadata.
protected  void addCategories()
          Add all the subject classifications from the bibliographic metadata.
protected  void addContentElement(String handle, boolean noOp)
          Set the content type that DSpace received.
protected  void addContributors()
          Add the list of contributors to the item.
protected  void addIdentifier(String handle, boolean noOp)
          Add the identifier for the item.
protected  void addLastUpdatedDate()
          Add the date that this item was last updated
protected  void addLinks(String handle)
          Add links associated with this item.
protected  void addPublishDate()
          Add the date of publication from the bibliographic metadata
protected  void addRights(String handle)
          Add rights information.
protected  void addSource()
          Add the source of the bibliographic metadata.
protected  void addSummary()
          Add the summary/abstract from the bibliographic metadata
protected  void addTitle()
          Add the title from the bibliographic metadata
 SWORDEntry getSWORDEntry(Item item, String handle, boolean noOp)
          Construct the SWORDEntry object which represents the given item with the given handle.
protected  void setFormatNamespace()
           
 
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

Constructor Detail

DSpaceATOMEntry

public DSpaceATOMEntry()
Method Detail

getSWORDEntry

public SWORDEntry getSWORDEntry(Item item,
                                String handle,
                                boolean noOp)
                         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:
item - the item to represent
handle - the handle for the item
noOp - whether this is a noOp request
Returns:
the SWORDEntry for the item
Throws:
DSpaceSWORDException

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.


addCategories

protected void addCategories()
Add all the subject classifications from the bibliographic metadata.


addContentElement

protected void addContentElement(String handle,
                                 boolean noOp)
Set the content type that DSpace received. This is just "application/zip" in this default implementation.


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


addIdentifier

protected void addIdentifier(String handle,
                             boolean noOp)
Add the identifier for the item. If the item object has a handle already assigned, this is used, otherwise, the passed handle is used. It is set in the form that they can be used to access the resource over http (i.e. a real URL).

Parameters:
handle -

addLinks

protected void addLinks(String handle)
                 throws DSpaceSWORDException
Add links associated with this item. The default implementation does not support item linking, so this method currently does nothing

Throws:
DSpaceSWORDException

addPublishDate

protected void addPublishDate()
Add the date of publication from the bibliographic metadata


addRights

protected void addRights(String handle)
Add rights information. This attaches an href to the URL of the item's licence file


addSource

protected void addSource()
Add the source of the bibliographic metadata.


addSummary

protected void addSummary()
Add the summary/abstract from the bibliographic metadata


addTitle

protected void addTitle()
Add the title from the bibliographic metadata


addLastUpdatedDate

protected void addLastUpdatedDate()
Add the date that this item was last updated


setFormatNamespace

protected void setFormatNamespace()


Copyright © 2008 The DSpace Foundation. All Rights Reserved.