org.purl.sword.atom
Class Source

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

public class Source
extends XmlElement
implements SwordElementInterface

Represents an ATOM Generator element.

Author:
Neil Taylor

Field Summary
 
Fields inherited from class org.purl.sword.base.XmlElement
DATE_FORMAT, DATE_FORMATS, xmlName
 
Constructor Summary
Source()
          Create a new instance and set the prefix to 'atom' and the local name to 'source'.
 
Method Summary
static XmlName elementName()
           
 Generator getGenerator()
          Get the generator.
 nu.xom.Element marshall()
          Marshal the data stored in this object into Element objects.
 void setGenerator(Generator generator)
          Set the generator.
 void unmarshall(nu.xom.Element source)
          Unmarshal the contents of the source element into the internal data objects in this object.
 SwordValidationInfo unmarshall(nu.xom.Element source, Properties validationProperties)
           
 SwordValidationInfo validate(List<SwordValidationInfo> elements, List<SwordValidationInfo> attributes, Properties validationContext)
           
 SwordValidationInfo validate(Properties validationContext)
           
 
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
 

Constructor Detail

Source

public Source()
Create a new instance and set the prefix to 'atom' and the local name to 'source'.

Method Detail

elementName

public static XmlName elementName()

marshall

public nu.xom.Element marshall()
Marshal the data stored in this object into Element objects.

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

unmarshall

public void unmarshall(nu.xom.Element source)
                throws UnmarshallException
Unmarshal the contents of the source element into the internal data objects in this object.

Specified by:
unmarshall in interface SwordElementInterface
Parameters:
source - The Source element to process.
Throws:
UnmarshallException - If the element does not contain an ATOM Source element, or if there is a problem processing the element or any sub-elements.

unmarshall

public SwordValidationInfo unmarshall(nu.xom.Element source,
                                      Properties validationProperties)
                               throws UnmarshallException
Parameters:
source -
validationProperties -
Returns:
Throws:
UnmarshallException

validate

public SwordValidationInfo validate(Properties validationContext)
Specified by:
validate in class XmlElement

validate

public SwordValidationInfo validate(List<SwordValidationInfo> elements,
                                    List<SwordValidationInfo> attributes,
                                    Properties validationContext)

getGenerator

public Generator getGenerator()
Get the generator.

Returns:
The generator.

setGenerator

public void setGenerator(Generator generator)
Set the generator.

Parameters:
generator - The generator.


Copyright © 2013 DuraSpace. All Rights Reserved.