org.purl.sword.base
Class SWORDEntry

java.lang.Object
  extended by org.purl.sword.base.XmlElement
      extended by org.w3.atom.Entry
          extended by org.purl.sword.base.SWORDEntry
All Implemented Interfaces:
SwordElementInterface

public class SWORDEntry
extends Entry

Extension of the ATOM Entry class. This adds support for the additional SWORD elements. These elements reside inside the ATOM Entry object, created in org.w3.atom.Entry class.

Author:
Neil Taylor

Field Summary
 
Fields inherited from class org.purl.sword.base.XmlElement
DATE_FORMAT, localName, prefix
 
Constructor Summary
SWORDEntry()
          Create a new instance of the class.
 
Method Summary
 String getFormatNamespace()
          Get the format namespace.
 String getTreatment()
          Get the treatment value.
 String getVerboseDescription()
          Get the Verbose Description for this entry.
 boolean isNoOp()
          Get the current value of NoOp.
 boolean isNoOpSet()
          Determine if the noOp value has been set.
 nu.xom.Element marshall()
          Overrides the marshall method in the parent Entry.
 void setFormatNamespace(String formatNamespace)
          Set the format namespace.
 void setNoOp(boolean noOp)
          Call this method to set noOp.
 void setTreatment(String treatment)
          Set the treatment value.
 void setVerboseDescription(String verboseDescription)
          Set the verbose description.
 void unmarshall(nu.xom.Element entry)
          Overrides the unmarshall method in the parent Entry.
 
Methods inherited from class org.w3.atom.Entry
addAuthors, addCategory, addContributor, addLink, clearAuthors, clearCategories, clearContributors, clearLinks, getAuthors, getCategories, getContent, getContributors, getId, getLinks, getPublished, getRights, getSource, getSummary, getTitle, getUpdated, setContent, setId, setPublished, setRights, setSource, setSummary, setTitle, setUpdated
 
Methods inherited from class org.purl.sword.base.XmlElement
dateToString, getQualifiedName, getQualifiedName, isInstanceOf, stringToDate, unmarshallBoolean, unmarshallDate, unmarshallInteger, unmarshallString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWORDEntry

public SWORDEntry()
Create a new instance of the class.

Method Detail

isNoOp

public boolean isNoOp()
Get the current value of NoOp.

Returns:
True if the value is set, false otherwise.

setNoOp

public void setNoOp(boolean noOp)
Call this method to set noOp. It should be called even by internal methods so that the object can determine if the value has been set or whether it just holds the default value.

Parameters:
noOp -

isNoOpSet

public boolean isNoOpSet()
Determine if the noOp value has been set. This should be called if you want to know whether false for noOp means that it is the default value (i.e. no code has set it) or it is a value that has been actively set.

Returns:
True if the value has been set. Otherwise, false.

getVerboseDescription

public String getVerboseDescription()
Get the Verbose Description for this entry.

Returns:
The description.

setVerboseDescription

public void setVerboseDescription(String verboseDescription)
Set the verbose description.

Parameters:
verboseDescription - The description.

getTreatment

public String getTreatment()
Get the treatment value.

Returns:
The treatment.

setTreatment

public void setTreatment(String treatment)
Set the treatment value.

Parameters:
treatment - The treatment.

marshall

public nu.xom.Element marshall()
Overrides the marshall method in the parent Entry. This will call the parent marshall method and then add the additional elements that have been added in this subclass.

Specified by:
marshall in interface SwordElementInterface
Overrides:
marshall in class Entry
Returns:
An element that holds the data associated with this object.

unmarshall

public void unmarshall(nu.xom.Element entry)
                throws UnmarshallException
Overrides the unmarshall method in the parent Entry. This will call the parent method to parse the general Atom elements and attributes. This method will then parse the remaining sword extensions that exist in the element.

Specified by:
unmarshall in interface SwordElementInterface
Overrides:
unmarshall in class Entry
Parameters:
entry - The entry to parse.
Throws:
UnmarshallException - If the entry is not an atom:entry or if there is an exception extracting the data.

getFormatNamespace

public String getFormatNamespace()
Get the format namespace.

Returns:
The format namespace.

setFormatNamespace

public void setFormatNamespace(String formatNamespace)
Set the format namespace.

Parameters:
formatNamespace - The format namespace.


Copyright © 2008 The DSpace Foundation. All Rights Reserved.