org.apache.abdera.ext.rss
Class RssEnclosure

java.lang.Object
  extended by org.apache.abdera.model.ElementWrapper
      extended by org.apache.abdera.model.ExtensibleElementWrapper
          extended by org.apache.abdera.ext.rss.RssEnclosure
All Implemented Interfaces:
Cloneable, Iterable<Element>, Base, Element, ExtensibleElement, Link

public class RssEnclosure
extends ExtensibleElementWrapper
implements Link


Field Summary
 
Fields inherited from interface org.apache.abdera.model.Link
IANA_BASE, REL_ALTERNATE, REL_ALTERNATE_IANA, REL_CURRENT, REL_CURRENT_IANA, REL_EDIT, REL_EDIT_IANA, REL_EDIT_MEDIA, REL_EDIT_MEDIA_IANA, REL_ENCLOSURE, REL_ENCLOSURE_IANA, REL_FIRST, REL_FIRST_IANA, REL_LAST, REL_LAST_IANA, REL_LICENSE, REL_LICENSE_IANA, REL_NEXT, REL_NEXT_IANA, REL_PAYMENT, REL_PAYMENT_IANA, REL_PREVIOUS, REL_PREVIOUS_IANA, REL_RELATED, REL_RELATED_IANA, REL_REPLIES, REL_REPLIES_IANA, REL_SELF, REL_SELF_IANA, REL_SERVICE, REL_SERVICE_IANA, REL_VIA, REL_VIA_IANA
 
Constructor Summary
RssEnclosure(Element internal)
           
RssEnclosure(Factory factory, QName qname)
           
 
Method Summary
<T extends ExtensibleElement>
T
addExtension(Element extension)
          Adds an individual extension element
<T extends Element>
T
addExtension(QName qname)
          Adds an individual extension element
<T extends Element>
T
addExtension(String namespace, String localPart, String prefix)
          Adds an individual extension element
 Element addSimpleExtension(QName qname, String value)
          Adds a simple extension (text content only)
 Element addSimpleExtension(String namespace, String localPart, String prefix, String value)
          Adds a simple extension (text content only)
<T extends Element>
T
getExtension(Class<T> _class)
          Find an extension by Class rather than QName
<T extends Element>
T
getExtension(QName qname)
          Returns the first extension element with the XML qualified name
 List<Element> getExtensions()
          Returns the complete set of extension elements
<T extends Element>
List<T>
getExtensions(QName qname)
          Returns the complete set of extension elements using the specified XML qualified name
 List<Element> getExtensions(String uri)
          Returns the complete set of extension elements using the specified XML Namespace URI
 IRI getHref()
          RFC4287: The "href" attribute contains the link's IRI.
 String getHrefLang()
          RFC4287: The "hreflang" attribute's content describes the language of the resource pointed to by the href attribute.
 long getLength()
          RFC4287: The "length" attribute indicates an advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the URI in the href attribute is mapped to a IRI and dereferenced.
 javax.activation.MimeType getMimeType()
          RFC4287: On the link element, the "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced.
 String getRel()
           RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link relation type.
 IRI getResolvedHref()
          Returns the value of the link's href attribute resolved against the in-scope Base IRI
 String getSimpleExtension(QName qname)
          Gets the value of a simple extension
 String getSimpleExtension(String namespace, String localPart, String prefix)
          Gets the value of a simple extension
 String getTitle()
          RFC4287: The "title" attribute conveys human-readable information about the link.
 Link setHref(String href)
          RFC4287: The "href" attribute contains the link's IRI.
 Link setHrefLang(String lang)
          RFC4287: The "hreflang" attribute's content describes the language of the resource pointed to by the href attribute.
 Link setLength(long length)
          RFC4287: The "length" attribute indicates an advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the IRI in the href attribute is mapped to a URI and dereferenced.
 Link setMimeType(String type)
          RFC4287: On the link element, the "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced.
 Link setRel(String rel)
           RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link relation type.
 Link setTitle(String title)
          RFC4287: The "title" attribute conveys human-readable information about the link.
 
Methods inherited from class org.apache.abdera.model.ExtensibleElementWrapper
addExtension, addExtension, getExtInternal, getMustPreserveWhitespace, setMustPreserveWhitespace
 
Methods inherited from class org.apache.abdera.model.ElementWrapper
addComment, clone, complete, declareNS, discard, equals, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDefaultWriterOptions, getDocument, getElements, getExtensionAttributes, getFactory, getFirstChild, getFirstChild, getInternal, getLanguage, getLanguageTag, getLocale, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, hashCode, iterator, removeAttribute, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setParentElement, setText, setText, toString, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.abdera.model.ExtensibleElement
addExtension, addExtension
 
Methods inherited from interface org.apache.abdera.model.Element
declareNS, discard, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDocument, getElements, getExtensionAttributes, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, getMustPreserveWhitespace, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, removeAttribute, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setMustPreserveWhitespace, setParentElement, setText, setText
 
Methods inherited from interface org.apache.abdera.model.Base
addComment, clone, complete, getDefaultWriterOptions, getFactory, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo
 
Methods inherited from interface java.lang.Iterable
iterator
 

Constructor Detail

RssEnclosure

public RssEnclosure(Element internal)

RssEnclosure

public RssEnclosure(Factory factory,
                    QName qname)
Method Detail

getHref

public IRI getHref()
Description copied from interface: Link
RFC4287: The "href" attribute contains the link's IRI. atom:link elements MUST have an href attribute, whose value MUST be a IRI reference [RFC3987].

Specified by:
getHref in interface Link
Returns:
The href IRI value

getHrefLang

public String getHrefLang()
Description copied from interface: Link
RFC4287: The "hreflang" attribute's content describes the language of the resource pointed to by the href attribute. When used together with the rel="alternate", it implies a translated version of the entry. Link elements MAY have an hreflang attribute, whose value MUST be a language tag [RFC3066].

Specified by:
getHrefLang in interface Link
Returns:
The hreflang value

getLength

public long getLength()
Description copied from interface: Link
RFC4287: The "length" attribute indicates an advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the URI in the href attribute is mapped to a IRI and dereferenced. Note that the length attribute does not override the actual content length of the representation as reported by the underlying protocol. Link elements MAY have a length attribute.

Specified by:
getLength in interface Link
Returns:
The length attribute value

getMimeType

public javax.activation.MimeType getMimeType()
Description copied from interface: Link
RFC4287: On the link element, the "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation. Link elements MAY have a type attribute, whose value MUST conform to the syntax of a MIME media type [MIMEREG].

Specified by:
getMimeType in interface Link
Returns:
The value of the type attribute

getRel

public String getRel()
Description copied from interface: Link

RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link relation type. If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate"... The value of "rel" MUST be a string that is non-empty and matches either the "isegment-nz-nc" or the "IRI" production in [RFC3987]. Note that use of a relative reference other than a simple name is not allowed. If a name is given, implementations MUST consider the link relation type equivalent to the same name registered within the IANA Registry of Link Relations (Section 7), and thus to the IRI that would be obtained by appending the value of the rel attribute to the string "http://www.iana.org/assignments/relation/". The value of "rel" describes the meaning of the link, but does not impose any behavioral requirements on Atom Processors.

Specified by:
getRel in interface Link
Returns:
The rel attribute value

getResolvedHref

public IRI getResolvedHref()
Description copied from interface: Link
Returns the value of the link's href attribute resolved against the in-scope Base IRI

Specified by:
getResolvedHref in interface Link
Returns:
The href IRI value

getTitle

public String getTitle()
Description copied from interface: Link
RFC4287: The "title" attribute conveys human-readable information about the link. The content of the "title" attribute is Language-Sensitive. Entities such as "&amp;" and "&lt;" represent their corresponding characters ("&" and "<", respectively), not markup. Link elements MAY have a title attribute.

Specified by:
getTitle in interface Link
Returns:
The title attribute

setHref

public Link setHref(String href)
Description copied from interface: Link
RFC4287: The "href" attribute contains the link's IRI. atom:link elements MUST have an href attribute, whose value MUST be a IRI reference [RFC3987].

Specified by:
setHref in interface Link
Parameters:
href - The href IRI

setHrefLang

public Link setHrefLang(String lang)
Description copied from interface: Link
RFC4287: The "hreflang" attribute's content describes the language of the resource pointed to by the href attribute. When used together with the rel="alternate", it implies a translated version of the entry. Link elements MAY have an hreflang attribute, whose value MUST be a language tag [RFC3066].

Specified by:
setHrefLang in interface Link
Parameters:
lang - The hreflang value

setLength

public Link setLength(long length)
Description copied from interface: Link
RFC4287: The "length" attribute indicates an advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the IRI in the href attribute is mapped to a URI and dereferenced. Note that the length attribute does not override the actual content length of the representation as reported by the underlying protocol. Link elements MAY have a length attribute.

Specified by:
setLength in interface Link
Parameters:
length - The length attribute value

setMimeType

public Link setMimeType(String type)
Description copied from interface: Link
RFC4287: On the link element, the "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation. Link elements MAY have a type attribute, whose value MUST conform to the syntax of a MIME media type [MIMEREG].

Specified by:
setMimeType in interface Link
Parameters:
type - The link type

setRel

public Link setRel(String rel)
Description copied from interface: Link

RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link relation type. If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate"... The value of "rel" MUST be a string that is non-empty and matches either the "isegment-nz-nc" or the "IRI" production in [RFC3987]. Note that use of a relative reference other than a simple name is not allowed. If a name is given, implementations MUST consider the link relation type equivalent to the same name registered within the IANA Registry of Link Relations (Section 7), and thus to the IRI that would be obtained by appending the value of the rel attribute to the string "http://www.iana.org/assignments/relation/". The value of "rel" describes the meaning of the link, but does not impose any behavioral requirements on Atom Processors.

Specified by:
setRel in interface Link
Parameters:
rel - The rel attribute value

setTitle

public Link setTitle(String title)
Description copied from interface: Link
RFC4287: The "title" attribute conveys human-readable information about the link. The content of the "title" attribute is Language-Sensitive. Entities such as "&amp;" and "&lt;" represent their corresponding characters ("&" and "<", respectively), not markup. Link elements MAY have a title attribute.

Specified by:
setTitle in interface Link
Parameters:
title - The title attribute

addExtension

public <T extends ExtensibleElement> T addExtension(Element extension)
Description copied from interface: ExtensibleElement
Adds an individual extension element

Specified by:
addExtension in interface ExtensibleElement
Overrides:
addExtension in class ExtensibleElementWrapper
Parameters:
extension - An extension element to add

addExtension

public <T extends Element> T addExtension(QName qname)
Description copied from interface: ExtensibleElement
Adds an individual extension element

Specified by:
addExtension in interface ExtensibleElement
Overrides:
addExtension in class ExtensibleElementWrapper
Parameters:
qname - An extension element to create
Returns:
The newly created extension element

addExtension

public <T extends Element> T addExtension(String namespace,
                                          String localPart,
                                          String prefix)
Description copied from interface: ExtensibleElement
Adds an individual extension element

Specified by:
addExtension in interface ExtensibleElement
Overrides:
addExtension in class ExtensibleElementWrapper
Parameters:
namespace - An XML namespace
localPart - A localname
prefix - A XML namespace prefix
Returns:
The newly creatd extension element

addSimpleExtension

public Element addSimpleExtension(QName qname,
                                  String value)
Description copied from interface: ExtensibleElement
Adds a simple extension (text content only)

Specified by:
addSimpleExtension in interface ExtensibleElement
Overrides:
addSimpleExtension in class ExtensibleElementWrapper
Parameters:
qname - An XML QName
value - The simple text value of the element
Returns:
The newly created extension element

addSimpleExtension

public Element addSimpleExtension(String namespace,
                                  String localPart,
                                  String prefix,
                                  String value)
Description copied from interface: ExtensibleElement
Adds a simple extension (text content only)

Specified by:
addSimpleExtension in interface ExtensibleElement
Overrides:
addSimpleExtension in class ExtensibleElementWrapper
Parameters:
namespace - An XML namespace
localPart - A local name
prefix - A namespace prefix
value - The simple text value
Returns:
The newly created extension element

getExtension

public <T extends Element> T getExtension(QName qname)
Description copied from interface: ExtensibleElement
Returns the first extension element with the XML qualified name

Specified by:
getExtension in interface ExtensibleElement
Overrides:
getExtension in class ExtensibleElementWrapper
Parameters:
qname - An XML QName
Returns:
An extension with the specified qname

getExtension

public <T extends Element> T getExtension(Class<T> _class)
Description copied from interface: ExtensibleElement
Find an extension by Class rather than QName

Specified by:
getExtension in interface ExtensibleElement
Overrides:
getExtension in class ExtensibleElementWrapper
Parameters:
_class - The implementation class of the extension
Returns:
The extension element

getExtensions

public List<Element> getExtensions()
Description copied from interface: ExtensibleElement
Returns the complete set of extension elements

Specified by:
getExtensions in interface ExtensibleElement
Overrides:
getExtensions in class ExtensibleElementWrapper
Returns:
a listing of extensions

getExtensions

public List<Element> getExtensions(String uri)
Description copied from interface: ExtensibleElement
Returns the complete set of extension elements using the specified XML Namespace URI

Specified by:
getExtensions in interface ExtensibleElement
Overrides:
getExtensions in class ExtensibleElementWrapper
Parameters:
uri - A namespace URI
Returns:
A listing of extensions using the specified XML namespace

getExtensions

public <T extends Element> List<T> getExtensions(QName qname)
Description copied from interface: ExtensibleElement
Returns the complete set of extension elements using the specified XML qualified name

Specified by:
getExtensions in interface ExtensibleElement
Overrides:
getExtensions in class ExtensibleElementWrapper
Parameters:
qname - An XML QName
Returns:
A listing of extensions with the specified QName

getSimpleExtension

public String getSimpleExtension(QName qname)
Description copied from interface: ExtensibleElement
Gets the value of a simple extension

Specified by:
getSimpleExtension in interface ExtensibleElement
Overrides:
getSimpleExtension in class ExtensibleElementWrapper
Parameters:
qname - An XML QName
Returns:
The string value of the extension

getSimpleExtension

public String getSimpleExtension(String namespace,
                                 String localPart,
                                 String prefix)
Description copied from interface: ExtensibleElement
Gets the value of a simple extension

Specified by:
getSimpleExtension in interface ExtensibleElement
Overrides:
getSimpleExtension in class ExtensibleElementWrapper
Parameters:
namespace - An XML namespace
localPart - A localname
prefix - A namespace prefix
Returns:
The string value of the extension


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.