|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.purl.sword.base.XmlElement
org.purl.sword.atom.Entry
org.purl.sword.base.SWORDEntry
public class SWORDEntry
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.
| Field Summary | |
|---|---|
protected SwordNoOp |
swordNoOp
Specifies whether the document was run in noOp mode, i.e. |
protected SwordTreatment |
swordTreatment
Used for a human readable statement about what treatment the deposited resource has received. |
protected SwordUserAgent |
swordUserAgent
The user agent |
protected SwordVerboseDescription |
swordVerboseDescription
Use to supply a verbose description. |
| Fields inherited from class org.purl.sword.atom.Entry |
|---|
ELEMENT_CATEGORY, ELEMENT_GENERATOR, ELEMENT_ID, ELEMENT_NAME, ELEMENT_PUBLISHED, ELEMENT_UPDATED |
| Fields inherited from class org.purl.sword.base.XmlElement |
|---|
DATE_FORMAT, DATE_FORMATS, xmlName |
| Constructor Summary | |
|---|---|
SWORDEntry()
A default constructor. |
|
SWORDEntry(String namespace,
String element,
String namespaceUri)
Create a new SWORDEntry with the given namespace and element. |
|
SWORDEntry(XmlName name)
|
|
| Method Summary | |
|---|---|
String |
getPackaging()
Get the packaging format |
String |
getTreatment()
Get the treatment value. |
String |
getUserAgent()
Get the user agent |
String |
getVerboseDescription()
Get the Verbose Description for this entry. |
protected void |
initialise()
|
protected boolean |
isElementChecked(XmlName elementName)
|
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. |
protected void |
marshallElements(nu.xom.Element entry)
|
void |
setNoOp(boolean noOp)
Call this method to set noOp. |
void |
setPackaging(String packaging)
Set the packaging format |
void |
setTreatment(String treatment)
Set the treatment value. |
void |
setUserAgent(String userAgent)
Set the user agent |
void |
setVerboseDescription(String verboseDescription)
Set the verbose description. |
void |
unmarshall(nu.xom.Element entry)
Overrides the unmarshall method in the parent Entry. |
SwordValidationInfo |
unmarshall(nu.xom.Element entry,
Properties validationProperties)
|
SwordValidationInfo |
unmarshallWithValidation(nu.xom.Element entry,
Properties validationProperties)
Overrides the unmarshall method in the parent Entry. |
SwordValidationInfo |
validate(Properties validationContext)
|
protected SwordValidationInfo |
validate(SwordValidationInfo info,
Properties validationContext)
|
| Methods inherited from class org.purl.sword.atom.Entry |
|---|
addAuthors, addCategory, addContributor, addLink, clearAuthors, clearCategories, clearContributors, clearLinks, elementName, getAuthors, getCategories, getContent, getContributors, getGenerator, getId, getLinks, getPublished, getRights, getSource, getSummary, getTitle, getUpdated, setContent, setGenerator, setId, setPublished, setRights, setSource, setSummary, setTitle, setUpdated, unmarshallWithoutValidate |
| Methods inherited from class org.purl.sword.base.XmlElement |
|---|
createValidAttributeInfo, getQualifiedName, getQualifiedName, getQualifiedNameWithPrefix, getXmlName, handleIncorrectElement, isInstanceOf, isInstanceOf, processUnexpectedAttributes, processUnexpectedAttributes, unmarshallBoolean, unmarshallInteger, unmarshallString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SwordNoOp swordNoOp
protected SwordVerboseDescription swordVerboseDescription
protected SwordTreatment swordTreatment
protected SwordUserAgent swordUserAgent
| Constructor Detail |
|---|
public SWORDEntry(String namespace,
String element,
String namespaceUri)
namespace - The namespace of the elementelement - The element namepublic SWORDEntry()
public SWORDEntry(XmlName name)
| Method Detail |
|---|
protected void initialise()
initialise in class Entrypublic boolean isNoOp()
public void setNoOp(boolean noOp)
noOp - public boolean isNoOpSet()
public String getVerboseDescription()
public void setVerboseDescription(String verboseDescription)
verboseDescription - The description.public String getTreatment()
public void setTreatment(String treatment)
treatment - The treatment.public String getUserAgent()
public void setUserAgent(String userAgent)
userAgent - the user agentpublic String getPackaging()
public void setPackaging(String packaging)
packaging - the packaging formatpublic nu.xom.Element marshall()
marshall in interface SwordElementInterfacemarshall in class Entryprotected void marshallElements(nu.xom.Element entry)
marshallElements in class Entry
public SwordValidationInfo unmarshallWithValidation(nu.xom.Element entry,
Properties validationProperties)
throws UnmarshallException
entry - The entry to parse.
UnmarshallException - If the entry is not an atom:entry
or if there is an exception extracting the data.
public SwordValidationInfo unmarshall(nu.xom.Element entry,
Properties validationProperties)
throws UnmarshallException
unmarshall in class EntryUnmarshallExceptionprotected boolean isElementChecked(XmlName elementName)
isElementChecked in class EntryelementName -
public SwordValidationInfo validate(Properties validationContext)
validate in class Entry
protected SwordValidationInfo validate(SwordValidationInfo info,
Properties validationContext)
validate in class Entry
public void unmarshall(nu.xom.Element entry)
throws UnmarshallException
unmarshall in interface SwordElementInterfaceunmarshall in class Entryentry - The entry to parse.
UnmarshallException - If the entry is not an atom:entry
or if there is an exception extracting the data.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||