org.purl.sword.atom
Class Link

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

public class Link
extends XmlElement
implements SwordElementInterface

Represents an ATOM Link element.

Author:
Neil Taylor

Field Summary
static String ATTRIBUTE_HREF
          Label for the href attribute.
static String ATTRIBUTE_HREF_LANG
          Label for the hreflang attribute.
static String ATTRIBUTE_LENGTH
          Label for the length attribute.
static String ATTRIBUTE_REL
          Label for the rel attribute.
static String ATTRIBUTE_TITLE
          Label for the title attribute.
static String ATTRIBUTE_TYPE
          Label for the type attribute.
static String ELEMENT_NAME
          Deprecated. 
 
Fields inherited from class org.purl.sword.base.XmlElement
DATE_FORMAT, DATE_FORMATS, xmlName
 
Constructor Summary
Link()
          Create a new instance and set prefix and local name to 'atom' and 'link', respectively.
 
Method Summary
static XmlName elementName()
           
 String getContent()
          Get the content.
 String getHref()
          Get the HREF attribute.
 String getHreflang()
          Get the HREF Lang attribute.
 String getLength()
          Get the length.
 String getRel()
          Get the Rel attribute.
 String getTitle()
          Get the title.
 String getType()
          Get the type.
 nu.xom.Element marshall()
          Mashall the data stored in this object into Element objects.
 void setContent(String content)
          Set the content.
 void setHref(String href)
          Set the HREF attribute.
 void setHreflang(String hreflang)
          Set the HREF Lang attribute.
 void setLength(String length)
          Set the length.
 void setRel(String rel)
          Set the Rel attribute.
 void setTitle(String title)
          Set the title.
 void setType(String type)
          Set the type.
 String toString()
           
 void unmarshall(nu.xom.Element link)
          Unmarshall the contents of the Link element into the internal data objects in this object.
 SwordValidationInfo unmarshall(nu.xom.Element link, 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, wait, wait, wait
 

Field Detail

ATTRIBUTE_HREF

public static final String ATTRIBUTE_HREF
Label for the href attribute.

See Also:
Constant Field Values

ATTRIBUTE_REL

public static final String ATTRIBUTE_REL
Label for the rel attribute.

See Also:
Constant Field Values

ATTRIBUTE_TYPE

public static final String ATTRIBUTE_TYPE
Label for the type attribute.

See Also:
Constant Field Values

ATTRIBUTE_HREF_LANG

public static final String ATTRIBUTE_HREF_LANG
Label for the hreflang attribute.

See Also:
Constant Field Values

ATTRIBUTE_TITLE

public static final String ATTRIBUTE_TITLE
Label for the title attribute.

See Also:
Constant Field Values

ATTRIBUTE_LENGTH

public static final String ATTRIBUTE_LENGTH
Label for the length 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

Link

public Link()
Create a new instance and set prefix and local name to 'atom' and 'link', respectively.

Method Detail

elementName

public static XmlName elementName()

marshall

public nu.xom.Element marshall()
Mashall 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 link)
                throws UnmarshallException
Unmarshall the contents of the Link element into the internal data objects in this object.

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

unmarshall

public SwordValidationInfo unmarshall(nu.xom.Element link,
                                      Properties validationProperties)
                               throws UnmarshallException
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)

getHref

public String getHref()
Get the HREF attribute.

Returns:
The HREF.

setHref

public void setHref(String href)
Set the HREF attribute.

Parameters:
href - The href.

getRel

public String getRel()
Get the Rel attribute.

Returns:
The Rel.

setRel

public void setRel(String rel)
Set the Rel attribute.

Parameters:
rel - The Rel.

getType

public String getType()
Get the type.

Returns:
The type.

setType

public void setType(String type)
Set the type.

Parameters:
type - The type.

getHreflang

public String getHreflang()
Get the HREF Lang attribute.

Returns:
The HREF Lang.

setHreflang

public void setHreflang(String hreflang)
Set the HREF Lang attribute.

Parameters:
hreflang - The HREF Lang.

getTitle

public String getTitle()
Get the title.

Returns:
The title.

setTitle

public void setTitle(String title)
Set the title.

Parameters:
title - The title.

getLength

public String getLength()
Get the length.

Returns:
The length.

setLength

public void setLength(String length)
Set the length.

Parameters:
length - The length.

getContent

public String getContent()
Get the content.

Returns:
The content.

setContent

public void setContent(String content)
Set the content.

Parameters:
content - The content.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 DuraSpace. All Rights Reserved.