org.purl.sword.atom
Class Generator

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

public class Generator
extends XmlElement
implements SwordElementInterface

Represents an ATOM Generator element.

Author:
Neil Taylor

Field Summary
static String ATTRIBUTE_URI
          Label for the URI attribute.
static String ATTRIBUTE_VERSION
          Label for the version attribute.
static String ELEMENT_NAME
          Deprecated. 
 
Fields inherited from class org.purl.sword.base.XmlElement
DATE_FORMAT, DATE_FORMATS, xmlName
 
Constructor Summary
Generator()
          Create a new instance and set the prefix to 'atom' and the local name to 'generator'.
 
Method Summary
static XmlName elementName()
           
 String getContent()
          Get the content.
 String getUri()
          Get the URI.
 String getVersion()
          Get the version.
protected  void initialise()
           
 nu.xom.Element marshall()
          Marshal the data in the object to an Element object.
 void setContent(String content)
          Set the content.
 void setUri(String uri)
          Set the URI.
 void setVersion(String version)
          Set the version.
 String toString()
          Get a string representation.
 void unmarshall(nu.xom.Element generator)
          Unmarshal the specified Generator element into the data in this object.
 SwordValidationInfo unmarshall(nu.xom.Element generator, Properties validationProperties)
           
 SwordValidationInfo validate(List<SwordValidationInfo> existing, List<SwordValidationInfo> attributeItems, 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, wait, wait, wait
 

Field Detail

ATTRIBUTE_URI

public static final String ATTRIBUTE_URI
Label for the URI attribute.

See Also:
Constant Field Values

ATTRIBUTE_VERSION

public static final String ATTRIBUTE_VERSION
Label for the version attribute.

See Also:
Constant Field Values

ELEMENT_NAME

@Deprecated
public static final String ELEMENT_NAME
Deprecated. 
Local name for the element.

See Also:
Constant Field Values
Constructor Detail

Generator

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

Method Detail

elementName

public static XmlName elementName()

initialise

protected final void initialise()

marshall

public nu.xom.Element marshall()
Marshal the data in the object to an Element object.

Specified by:
marshall in interface SwordElementInterface
Returns:
The element.

unmarshall

public void unmarshall(nu.xom.Element generator)
                throws UnmarshallException
Unmarshal the specified Generator element into the data in this object.

Specified by:
unmarshall in interface SwordElementInterface
Parameters:
generator - The generator element.
Throws:
UnmarshallException - If the specified element is not an atom:generator element, or if there is an error accessing the data.

unmarshall

public SwordValidationInfo unmarshall(nu.xom.Element generator,
                                      Properties validationProperties)
                               throws UnmarshallException
Throws:
UnmarshallException

validate

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

validate

public SwordValidationInfo validate(List<SwordValidationInfo> existing,
                                    List<SwordValidationInfo> attributeItems,
                                    Properties validationContext)
Parameters:
existing -
attributeItems -
Returns:

getContent

public String getContent()
Get the content.

Returns:
The content.

setContent

public void setContent(String content)
Set the content.

Parameters:
content - The content.

getUri

public String getUri()
Get the URI.

Returns:
The URI.

setUri

public void setUri(String uri)
Set the URI.

Parameters:
uri - The URI.

getVersion

public String getVersion()
Get the version.

Returns:
The version.

setVersion

public void setVersion(String version)
Set the version.

Parameters:
version - The version.

toString

public String toString()
Get a string representation.

Overrides:
toString in class Object


Copyright © 2011 DuraSpace. All Rights Reserved.