org.apache.abdera.ext.rss
Class RssFeed

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

public class RssFeed
extends ExtensibleElementWrapper
implements Feed


Constructor Summary
RssFeed(Element internal)
           
RssFeed(Factory factory, QName qname)
           
 
Method Summary
<T extends Source>
T
addAuthor(Person person)
          Adds an individual author to the entry
 Person addAuthor(String name)
          Adds an author
 Person addAuthor(String name, String email, String iri)
          Adds an author
<T extends Source>
T
addCategory(Category category)
          Adds an individual category to the entry
 Category addCategory(String term)
          Adds a category to the feed
 Category addCategory(String scheme, String term, String label)
          Adds a category to the feed
<T extends Source>
T
addContributor(Person person)
          Adds an individual contributor to this entry
 Person addContributor(String name)
          Adds a contributor
 Person addContributor(String name, String email, String iri)
          Adds a contributor
 Entry addEntry()
          Adds a new Entry to the end of the Feeds collection of entries
 Feed addEntry(Entry entry)
          Adds a new Entry to the end of the Feeds collection of entries
<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
<T extends Source>
T
addLink(Link link)
          Adds an individual link to the entry
 Link addLink(String href)
          Adds an individual link element
 Link addLink(String href, String rel)
          Adds an individual link element
 Link addLink(String href, String rel, String type, String title, String hreflang, long length)
          Adds an individual link 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)
 Link getAlternateLink()
          Returns this entries first alternate link
 Link getAlternateLink(String type, String hreflang)
           
 IRI getAlternateLinkResolvedHref()
           
 IRI getAlternateLinkResolvedHref(String type, String hreflang)
           
 Feed getAsFeed()
          Convert the Source element into an empty Feed element
 Source getAsSource()
          Creates a Source element from this Feed
 List<QName> getAttributes()
          Returns a listing of all attributes on this element
 String getAttributeValue(QName qname)
          Returns the value of the named attribute
 String getAttributeValue(String name)
          Returns the value of the named attribute
 Person getAuthor()
          Returns the first author listed for the entry
 List<Person> getAuthors()
          Returns the complete set of authors listed for the entry
 List<Category> getCategories()
          Lists the complete set of categories listed for the entry
 List<Category> getCategories(String scheme)
          Lists the complete set of categories using the specified scheme
 Collection getCollection()
          Return an app:collection element associatd with this atom:source.
 List<Person> getContributors()
          Lists the complete set of contributors for this entry
 List<Entry> getEntries()
          Returns the complete set of entries contained in this feed
 Entry getEntry(String id)
          Retrieves the first entry in the feed with the given atom:id value
<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<QName> getExtensionAttributes()
          Returns a listing of extension attributes on this element (extension attributes are attributes whose namespace URI is different than the elements)
 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
 Generator getGenerator()
          RFC4287: The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.
 IRI getIcon()
          RFC4287: The "atom:icon" element's content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed...
 IRIElement getIconElement()
          RFC4287: The "atom:icon" element's content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed...
 IRI getId()
          Returns the universally unique identifier for this feed
 IRIElement getIdElement()
          RFC4287: The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed.
 String getLanguage()
          Returns the value of this elements xml:lang attribute or null if xml:lang is undefined.
 Link getLink(String rel)
          Returns the first link with the specified rel attribute value
 IRI getLinkResolvedHref(String rel)
           
 List<Link> getLinks()
          Lists the complete set of links for this entry
 List<Link> getLinks(String... rel)
          Lists the complete set of links using the specified rel attributes values
 List<Link> getLinks(String rel)
          Lists the complete set of links using the specified rel attribute value
 IRI getLogo()
          RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] that identifies an image that provides visual identification for a feed.
 IRIElement getLogoElement()
          RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] that identifies an image that provides visual identification for a feed.
 Date getPublished()
           
 DateTime getPublisheddElement()
           
 String getPublishedString()
           
 String getRights()
          Returns the text of atom:rights
 Text getRightsElement()
           The rights element is typically used to convey a human readable copyright (e.g.
 Text.Type getRightsType()
          Returns the type of atom:rights
 Link getSelfLink()
          Returns the first link using the rel attribute value "self"
 IRI getSelfLinkResolvedHref()
           
 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 getSubtitle()
          Returns the text value of atom:subtitle
 Text getSubtitleElement()
          RFC4287: The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed.
 Text.Type getSubtitleType()
          Returns the atom:subtitle type
 String getTitle()
          Returns the text of atom:title
 Text getTitleElement()
          RFC4287: The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.
 Text.Type getTitleType()
          Returns the type of atom:title
 Date getUpdated()
          Return the atom:updated value
 DateTime getUpdatedElement()
          RFC4287: The "atom:updated" element is a Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant.
 String getUpdatedString()
          Return the atom:updated value
 String getVersion()
           
 Entry insertEntry()
          Adds a new Entry to the start of the Feeds collection of entries
 Feed insertEntry(Entry entry)
          Adds a new Entry to the start of the Feeds collection of entries
 IRIElement newId()
          Creates a new randomized atom:id for the entry
<T extends Element>
T
removeAttribute(QName qname)
          Remove the named Attribute
<T extends Element>
T
setAttributeValue(QName qname, String value)
          Sets the value of the named attribute
<T extends Element>
T
setAttributeValue(String name, String value)
          Sets the value of the named attribute
<T extends Element>
T
setBaseUri(IRI base)
          Sets the value of this element's xml:base attribute.
<T extends Element>
T
setBaseUri(String base)
          Sets the value of this element's xml:base attribute.
<T extends Source>
T
setCollection(Collection collection)
          Set the app:collection element
<T extends Source>
T
setGenerator(Generator generator)
          RFC4287: The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.
 Generator setGenerator(String iri, String version, String value)
          RFC4287: The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.
 IRIElement setIcon(String iri)
          RFC4287: The "atom:icon" element's content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed...
<T extends Source>
T
setIconElement(IRIElement iri)
          RFC4287: The "atom:icon" element's content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed...
 IRIElement setId(String id)
          Sets the universally unique identifier for this feed
 IRIElement setId(String id, boolean normalize)
          Sets the universally unique identifier for this feed
<T extends Source>
T
setIdElement(IRIElement id)
          RFC4287: The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed.
<T extends Element>
T
setLanguage(String language)
          Sets the value of this elements xml:lang attribute.
 IRIElement setLogo(String iri)
          RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] that identifies an image that provides visual identification for a feed.
<T extends Source>
T
setLogoElement(IRIElement iri)
          RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] that identifies an image that provides visual identification for a feed.
 Text setRights(Div value)
          Sets the value of the rights as @type="xhtml"
 Text setRights(String value)
          Sets the value of the rights as @type="text"
 Text setRights(String value, Text.Type type)
          Sets the value of the rights
 Text setRightsAsHtml(String value)
          Sets the value of the rights as @type="html"
 Text setRightsAsXhtml(String value)
          Sets the value of the rights as @type="xhtml"
<T extends Source>
T
setRightsElement(Text text)
           The rights element is typically used to convey a human readable copyright (e.g.
 Text setSubtitle(Div value)
          Sets the value of the subtitle as @type="xhtml"
 Text setSubtitle(String value)
          Sets the value of the subtitle as @type="text"
 Text setSubtitle(String value, Text.Type type)
          Sets the value of the subtitle
 Text setSubtitleAsHtml(String value)
          Sets the value of the subtitle as @type="html"
 Text setSubtitleAsXhtml(String value)
          Sets the value of the subtitle as @type="xhtml"
<T extends Source>
T
setSubtitleElement(Text text)
          RFC4287: The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed.
 Text setTitle(Div value)
          Sets the value of the title as @type="xhtml"
 Text setTitle(String value)
          Sets the value of the title as @type="text"
 Text setTitle(String value, Text.Type type)
          Sets the value of the title
 Text setTitleAsHtml(String value)
          Sets the value of the title as @type="html"
 Text setTitleAsXhtml(String value)
          Sets the value of the title as @type="xhtml"
<T extends Source>
T
setTitleElement(Text text)
          RFC4287: The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.
 DateTime setUpdated(Date value)
          Set the atom:updated value
 DateTime setUpdated(String value)
          Set the atom:updated value
<T extends Source>
T
setUpdatedElement(DateTime dateTime)
          RFC4287: The "atom:updated" element is a Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant.
 Feed sortEntries(Comparator<Entry> comparator)
          Sorts entries using the given comparator
 Feed sortEntriesByEdited(boolean new_first)
          Sorts entries by the app:edited property.
 Feed sortEntriesByUpdated(boolean new_first)
          Sorts entries by the atom:updated property
 
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, getBaseUri, getDefaultWriterOptions, getDocument, getElements, getFactory, getFirstChild, getFirstChild, getInternal, getLanguageTag, getLocale, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, hashCode, iterator, removeAttribute, 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, getBaseUri, getDocument, getElements, getFirstChild, getFirstChild, getLanguageTag, getLocale, getMustPreserveWhitespace, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, removeAttribute, 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

RssFeed

public RssFeed(Element internal)

RssFeed

public RssFeed(Factory factory,
               QName qname)
Method Detail

addEntry

public Feed addEntry(Entry entry)
Description copied from interface: Feed
Adds a new Entry to the end of the Feeds collection of entries

Specified by:
addEntry in interface Feed
Parameters:
entry - Add an entry

addEntry

public Entry addEntry()
Description copied from interface: Feed
Adds a new Entry to the end of the Feeds collection of entries

Specified by:
addEntry in interface Feed
Returns:
A newly created atom:entry

getAsSource

public Source getAsSource()
Description copied from interface: Feed
Creates a Source element from this Feed

Specified by:
getAsSource in interface Feed
Returns:
Returns a copy of this atom:feed as a atom:source element

getEntries

public List<Entry> getEntries()
Description copied from interface: Feed
Returns the complete set of entries contained in this feed

Specified by:
getEntries in interface Feed
Returns:
A listing of atom:entry elements

getEntry

public Entry getEntry(String id)
Description copied from interface: Feed
Retrieves the first entry in the feed with the given atom:id value

Specified by:
getEntry in interface Feed
Parameters:
id - The id to retrieve
Returns:
The matching atom:entry

insertEntry

public Feed insertEntry(Entry entry)
Description copied from interface: Feed
Adds a new Entry to the start of the Feeds collection of entries

Specified by:
insertEntry in interface Feed
Parameters:
entry - An atom:entry to insert

insertEntry

public Entry insertEntry()
Description copied from interface: Feed
Adds a new Entry to the start of the Feeds collection of entries

Specified by:
insertEntry in interface Feed
Returns:
A newly created atom:entry

sortEntries

public Feed sortEntries(Comparator<Entry> comparator)
Description copied from interface: Feed
Sorts entries using the given comparator

Specified by:
sortEntries in interface Feed
Parameters:
comparator - Sort the entries using the comparator

sortEntriesByEdited

public Feed sortEntriesByEdited(boolean new_first)
Description copied from interface: Feed
Sorts entries by the app:edited property. if app:edited is null, use app:updated

Specified by:
sortEntriesByEdited in interface Feed

sortEntriesByUpdated

public Feed sortEntriesByUpdated(boolean new_first)
Description copied from interface: Feed
Sorts entries by the atom:updated property

Specified by:
sortEntriesByUpdated in interface Feed
Parameters:
new_first - If true, entries with newer atom:updated values will come first

addAuthor

public <T extends Source> T addAuthor(Person person)
Description copied from interface: Source
Adds an individual author to the entry

Specified by:
addAuthor in interface Source
Parameters:
person - an atom:author element

addAuthor

public Person addAuthor(String name)
Description copied from interface: Source
Adds an author

Specified by:
addAuthor in interface Source
Parameters:
name - The author name
Returns:
The newly created atom:author element

addAuthor

public Person addAuthor(String name,
                        String email,
                        String iri)
Description copied from interface: Source
Adds an author

Specified by:
addAuthor in interface Source
Parameters:
name - The author name
email - The author email
iri - The author iri
Returns:
The newly created atom:author element

addCategory

public <T extends Source> T addCategory(Category category)
Description copied from interface: Source
Adds an individual category to the entry

Specified by:
addCategory in interface Source
Parameters:
category - A atom:category element

addCategory

public Category addCategory(String term)
Description copied from interface: Source
Adds a category to the feed

Specified by:
addCategory in interface Source
Parameters:
term - A category term
Returns:
The newly created atom:category element

addCategory

public Category addCategory(String scheme,
                            String term,
                            String label)
Description copied from interface: Source
Adds a category to the feed

Specified by:
addCategory in interface Source
Parameters:
scheme - A category scheme
term - A category term
label - The human readable label
Returns:
the newly created atom:category element

addContributor

public <T extends Source> T addContributor(Person person)
Description copied from interface: Source
Adds an individual contributor to this entry

Specified by:
addContributor in interface Source
Parameters:
person - a atom:contributor element

addContributor

public Person addContributor(String name)
Description copied from interface: Source
Adds a contributor

Specified by:
addContributor in interface Source
Parameters:
name - The name of a contributor
Returns:
The newly created atom:contributor element

addContributor

public Person addContributor(String name,
                             String email,
                             String iri)
Description copied from interface: Source
Adds a contributor

Specified by:
addContributor in interface Source
Parameters:
name - The contributor name
email - The contributor email
iri - The contributor uri
Returns:
The atom:contributor element

addLink

public <T extends Source> T addLink(Link link)
Description copied from interface: Source
Adds an individual link to the entry

Specified by:
addLink in interface Source
Parameters:
link - A atom:link element

addLink

public Link addLink(String href)
Description copied from interface: Source
Adds an individual link element

Specified by:
addLink in interface Source
Parameters:
href - The href IRI of the link
Returns:
The newly created atom:link

addLink

public Link addLink(String href,
                    String rel)
Description copied from interface: Source
Adds an individual link element

Specified by:
addLink in interface Source
Parameters:
href - The href IRI of the link
rel - The link rel attribute
Returns:
The newly created atom:link

addLink

public Link addLink(String href,
                    String rel,
                    String type,
                    String title,
                    String hreflang,
                    long length)
Description copied from interface: Source
Adds an individual link element

Specified by:
addLink in interface Source
Parameters:
href - The href IRI of the link
rel - The link rel attribute
type - The link type attribute
hreflang - The link hreflang attribute
length - The length attribute
Returns:
The newly created atom:link

getAlternateLink

public Link getAlternateLink()
Description copied from interface: Source
Returns this entries first alternate link

Specified by:
getAlternateLink in interface Source
Returns:
An atom:link

getAlternateLink

public Link getAlternateLink(String type,
                             String hreflang)
Specified by:
getAlternateLink in interface Source
Parameters:
type - A media type
hreflang - A target language
Returns:
A matching atom:link

getAlternateLinkResolvedHref

public IRI getAlternateLinkResolvedHref()
Specified by:
getAlternateLinkResolvedHref in interface Source
Returns:
An atom:link

getAlternateLinkResolvedHref

public IRI getAlternateLinkResolvedHref(String type,
                                        String hreflang)
Specified by:
getAlternateLinkResolvedHref in interface Source
Parameters:
type - A media type
hreflang - A target language
Returns:
A matching atom:link

getAuthor

public Person getAuthor()
Description copied from interface: Source
Returns the first author listed for the entry

Specified by:
getAuthor in interface Source
Returns:
This feed's author

getAuthors

public List<Person> getAuthors()
Description copied from interface: Source
Returns the complete set of authors listed for the entry

Specified by:
getAuthors in interface Source
Returns:
This feeds list of authors

getCategories

public List<Category> getCategories()
Description copied from interface: Source
Lists the complete set of categories listed for the entry

Specified by:
getCategories in interface Source
Returns:
A listing of app:category elements

getCategories

public List<Category> getCategories(String scheme)
Description copied from interface: Source
Lists the complete set of categories using the specified scheme

Specified by:
getCategories in interface Source
Parameters:
scheme - A Scheme IRI
Returns:
The listing of app:category elements

getCollection

public Collection getCollection()
Description copied from interface: Source
Return an app:collection element associatd with this atom:source. The Atom Publishing Protocol allows an app:collection to be contained by atom:feed to specify the collection to which the feed is associated.

Specified by:
getCollection in interface Source
Returns:
An app:collection element

getContributors

public List<Person> getContributors()
Description copied from interface: Source
Lists the complete set of contributors for this entry

Specified by:
getContributors in interface Source
Returns:
A listing of atom:contributor elements

getGenerator

public Generator getGenerator()
Description copied from interface: Source
RFC4287: The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.

Specified by:
getGenerator in interface Source
Returns:
The atom:generator

getIcon

public IRI getIcon()
Description copied from interface: Source
RFC4287: The "atom:icon" element's content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed... The image SHOULD have an aspect ratio of one (horizontal) to one (vertical) and SHOULD be suitable for presentation at a small size.

Specified by:
getIcon in interface Source
Returns:
The atom:icon value

getIconElement

public IRIElement getIconElement()
Description copied from interface: Source
RFC4287: The "atom:icon" element's content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed... The image SHOULD have an aspect ratio of one (horizontal) to one (vertical) and SHOULD be suitable for presentation at a small size.

Specified by:
getIconElement in interface Source
Returns:
the atom:icon element

getId

public IRI getId()
Description copied from interface: Source
Returns the universally unique identifier for this feed

Specified by:
getId in interface Source
Returns:
The atom:id value

getIdElement

public IRIElement getIdElement()
Description copied from interface: Source
RFC4287: The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed.

Specified by:
getIdElement in interface Source
Returns:
The atom:id element

getLink

public Link getLink(String rel)
Description copied from interface: Source
Returns the first link with the specified rel attribute value

Specified by:
getLink in interface Source
Parameters:
rel - A link relation
Returns:
The newly created atom:link element

getLinkResolvedHref

public IRI getLinkResolvedHref(String rel)
Specified by:
getLinkResolvedHref in interface Source
Parameters:
rel - A link relation
Returns:
An atom:link

getLinks

public List<Link> getLinks()
Description copied from interface: Source
Lists the complete set of links for this entry

Specified by:
getLinks in interface Source
Returns:
returns a listing of atom:link elements

getLinks

public List<Link> getLinks(String rel)
Description copied from interface: Source
Lists the complete set of links using the specified rel attribute value

Specified by:
getLinks in interface Source
Parameters:
rel - A link relation
Returns:
A listing of atom:link elements

getLinks

public List<Link> getLinks(String... rel)
Description copied from interface: Source
Lists the complete set of links using the specified rel attributes values

Specified by:
getLinks in interface Source
Returns:
A listof atom:link elements

getLogo

public IRI getLogo()
Description copied from interface: Source
RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] that identifies an image that provides visual identification for a feed. The image SHOULD have an aspect ratio of 2 (horizontal) to 1 (vertical).

Specified by:
getLogo in interface Source
Returns:
The atom:logo element value

getLogoElement

public IRIElement getLogoElement()
Description copied from interface: Source
RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] that identifies an image that provides visual identification for a feed. The image SHOULD have an aspect ratio of 2 (horizontal) to 1 (vertical).

Specified by:
getLogoElement in interface Source
Returns:
the atom:logo element

getRights

public String getRights()
Description copied from interface: Source
Returns the text of atom:rights

Specified by:
getRights in interface Source
Returns:
The value of the atom:rights element

getRightsElement

public Text getRightsElement()
Description copied from interface: Source

The rights element is typically used to convey a human readable copyright (e.g. "<atom:rights>Copyright (c), 2006</atom:rights>).

RFC4287: The "atom:rights" element is a Text construct that conveys information about rights held in and over an entry or feed.

Specified by:
getRightsElement in interface Source
Returns:
The atom:rights element

getRightsType

public Text.Type getRightsType()
Description copied from interface: Source
Returns the type of atom:rights

Specified by:
getRightsType in interface Source
Returns:
The Text.Type of the atom:rights element

getSelfLink

public Link getSelfLink()
Description copied from interface: Source
Returns the first link using the rel attribute value "self"

Specified by:
getSelfLink in interface Source
Returns:
An atom:link

getSelfLinkResolvedHref

public IRI getSelfLinkResolvedHref()
Specified by:
getSelfLinkResolvedHref in interface Source
Returns:
An atom:link

getSubtitle

public String getSubtitle()
Description copied from interface: Source
Returns the text value of atom:subtitle

Specified by:
getSubtitle in interface Source
Returns:
The atom:subtitle text value

getSubtitleElement

public Text getSubtitleElement()
Description copied from interface: Source
RFC4287: The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed.

Specified by:
getSubtitleElement in interface Source
Returns:
The atom:subtitle element

getSubtitleType

public Text.Type getSubtitleType()
Description copied from interface: Source
Returns the atom:subtitle type

Specified by:
getSubtitleType in interface Source
Returns:
The atom:subtitle Text.Type

getTitle

public String getTitle()
Description copied from interface: Source
Returns the text of atom:title

Specified by:
getTitle in interface Source
Returns:
The text value of the atom:title element

getTitleElement

public Text getTitleElement()
Description copied from interface: Source
RFC4287: The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.

Specified by:
getTitleElement in interface Source
Returns:
The atom:title element

getTitleType

public Text.Type getTitleType()
Description copied from interface: Source
Returns the type of atom:title

Specified by:
getTitleType in interface Source
Returns:
The atom:title Text.Type value

getUpdated

public Date getUpdated()
Description copied from interface: Source
Return the atom:updated value

Specified by:
getUpdated in interface Source
Returns:
The atom:updated as a java.util.Date

getUpdatedElement

public DateTime getUpdatedElement()
Description copied from interface: Source
RFC4287: The "atom:updated" element is a Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant. Therefore, not all modifications necessarily result in a changed atom:updated value.

Specified by:
getUpdatedElement in interface Source
Returns:
the atom:updated element

getUpdatedString

public String getUpdatedString()
Description copied from interface: Source
Return the atom:updated value

Specified by:
getUpdatedString in interface Source
Returns:
The serialized string form value of atom:updated

getPublished

public Date getPublished()

getPublisheddElement

public DateTime getPublisheddElement()

getPublishedString

public String getPublishedString()

newId

public IRIElement newId()
Description copied from interface: Source
Creates a new randomized atom:id for the entry

Specified by:
newId in interface Source

setCollection

public <T extends Source> T setCollection(Collection collection)
Description copied from interface: Source
Set the app:collection element

Specified by:
setCollection in interface Source
Parameters:
collection - An app:collection element

setGenerator

public <T extends Source> T setGenerator(Generator generator)
Description copied from interface: Source
RFC4287: The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.

Specified by:
setGenerator in interface Source
Parameters:
generator - A atom:generator element

setGenerator

public Generator setGenerator(String iri,
                              String version,
                              String value)
Description copied from interface: Source
RFC4287: The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.

Specified by:
setGenerator in interface Source
Parameters:
iri - The iri attribute
version - The version attribute
value - The value attribute
Returns:
A newly created atom:generator element

setIcon

public IRIElement setIcon(String iri)
Description copied from interface: Source
RFC4287: The "atom:icon" element's content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed... The image SHOULD have an aspect ratio of one (horizontal) to one (vertical) and SHOULD be suitable for presentation at a small size.

Specified by:
setIcon in interface Source
Parameters:
iri - The atom:icon IRI value

setIconElement

public <T extends Source> T setIconElement(IRIElement iri)
Description copied from interface: Source
RFC4287: The "atom:icon" element's content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed... The image SHOULD have an aspect ratio of one (horizontal) to one (vertical) and SHOULD be suitable for presentation at a small size.

Specified by:
setIconElement in interface Source
Parameters:
iri - The atom:icon element

setId

public IRIElement setId(String id)
Description copied from interface: Source
Sets the universally unique identifier for this feed

Specified by:
setId in interface Source
Parameters:
id - The atom:id value
Returns:
The newly created atom:id element

setId

public IRIElement setId(String id,
                        boolean normalize)
Description copied from interface: Source
Sets the universally unique identifier for this feed

Specified by:
setId in interface Source
Parameters:
id - The atom:id value
normalize - True if the atom:id value should be normalized
Returns:
The newly created atom:id element

setIdElement

public <T extends Source> T setIdElement(IRIElement id)
Description copied from interface: Source
RFC4287: The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed.

Specified by:
setIdElement in interface Source
Parameters:
id - A atom:id element

setLogo

public IRIElement setLogo(String iri)
Description copied from interface: Source
RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] that identifies an image that provides visual identification for a feed. The image SHOULD have an aspect ratio of 2 (horizontal) to 1 (vertical).

Specified by:
setLogo in interface Source
Parameters:
iri - The atom:logo value
Returns:
The newly created atom:logo element

setLogoElement

public <T extends Source> T setLogoElement(IRIElement iri)
Description copied from interface: Source
RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] that identifies an image that provides visual identification for a feed. The image SHOULD have an aspect ratio of 2 (horizontal) to 1 (vertical).

Specified by:
setLogoElement in interface Source
Parameters:
iri - The atom:logo element

setRights

public Text setRights(String value)
Description copied from interface: Source
Sets the value of the rights as @type="text"

Specified by:
setRights in interface Source
Parameters:
value - The atom:rights text value
Returns:
The newly created atom:rights element

setRights

public Text setRights(String value,
                      Text.Type type)
Description copied from interface: Source
Sets the value of the rights

Specified by:
setRights in interface Source
Parameters:
value - The atom:rights text value
type - The atom:rights text type
Returns:
The newly created atom:rights element

setRights

public Text setRights(Div value)
Description copied from interface: Source
Sets the value of the rights as @type="xhtml"

Specified by:
setRights in interface Source
Parameters:
value - The XHTML div element
Returns:
The newly created atom:rights element

setRightsAsHtml

public Text setRightsAsHtml(String value)
Description copied from interface: Source
Sets the value of the rights as @type="html"

Specified by:
setRightsAsHtml in interface Source
Parameters:
value - The atom:rights text value
Returns:
The newly created atom:rights element

setRightsAsXhtml

public Text setRightsAsXhtml(String value)
Description copied from interface: Source
Sets the value of the rights as @type="xhtml"

Specified by:
setRightsAsXhtml in interface Source
Parameters:
value - The atom:rights text value
Returns:
The newly created atom:rights element

setRightsElement

public <T extends Source> T setRightsElement(Text text)
Description copied from interface: Source

The rights element is typically used to convey a human readable copyright (e.g. "<atom:rights>Copyright (c), 2006</atom:rights>).

RFC4287: The "atom:rights" element is a Text construct that conveys information about rights held in and over an entry or feed.

Specified by:
setRightsElement in interface Source
Parameters:
text - The atom:rights element

setSubtitle

public Text setSubtitle(String value)
Description copied from interface: Source
Sets the value of the subtitle as @type="text"

Specified by:
setSubtitle in interface Source
Parameters:
value - the value of the atom:subtitle element
Returns:
The atom:subtitle element

setSubtitle

public Text setSubtitle(String value,
                        Text.Type type)
Description copied from interface: Source
Sets the value of the subtitle

Specified by:
setSubtitle in interface Source
Parameters:
value - The value of the atom:subtitle element
type - The atom:subtitle Text.Type
Returns:
The newly created atom:subtitle element

setSubtitle

public Text setSubtitle(Div value)
Description copied from interface: Source
Sets the value of the subtitle as @type="xhtml"

Specified by:
setSubtitle in interface Source
Parameters:
value - The atom:subtitle element
Returns:
The newly created atom:subtitle element

setSubtitleAsHtml

public Text setSubtitleAsHtml(String value)
Description copied from interface: Source
Sets the value of the subtitle as @type="html"

Specified by:
setSubtitleAsHtml in interface Source
Parameters:
value - The value of the atom:subtitle element
Returns:
The newly created atom:subtitle element

setSubtitleAsXhtml

public Text setSubtitleAsXhtml(String value)
Description copied from interface: Source
Sets the value of the subtitle as @type="xhtml"

Specified by:
setSubtitleAsXhtml in interface Source
Parameters:
value - The value of the atom:subtitle element
Returns:
The newly created atom:subtitle element

setSubtitleElement

public <T extends Source> T setSubtitleElement(Text text)
Description copied from interface: Source
RFC4287: The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed.

Specified by:
setSubtitleElement in interface Source
Parameters:
text - A atom:subtitle element

setTitle

public Text setTitle(String value)
Description copied from interface: Source
Sets the value of the title as @type="text"

Specified by:
setTitle in interface Source
Parameters:
value - The atom:title value
Returns:
The newly created atom:title element

setTitle

public Text setTitle(String value,
                     Text.Type type)
Description copied from interface: Source
Sets the value of the title

Specified by:
setTitle in interface Source
Parameters:
value - The atom:title value
type - The atom:title Text.Type
Returns:
The newly created atom:title element

setTitle

public Text setTitle(Div value)
Description copied from interface: Source
Sets the value of the title as @type="xhtml"

Specified by:
setTitle in interface Source
Parameters:
value - The XHTML div
Returns:
The newly created atom:title element

setTitleAsHtml

public Text setTitleAsHtml(String value)
Description copied from interface: Source
Sets the value of the title as @type="html"

Specified by:
setTitleAsHtml in interface Source
Parameters:
value - The atom:title value
Returns:
The newly created atom:title element

setTitleAsXhtml

public Text setTitleAsXhtml(String value)
Description copied from interface: Source
Sets the value of the title as @type="xhtml"

Specified by:
setTitleAsXhtml in interface Source
Parameters:
value - The atom:title value
Returns:
The newly created atom:title element

setTitleElement

public <T extends Source> T setTitleElement(Text text)
Description copied from interface: Source
RFC4287: The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.

Specified by:
setTitleElement in interface Source
Parameters:
text - The atom:title element

setUpdated

public DateTime setUpdated(Date value)
Description copied from interface: Source
Set the atom:updated value

Specified by:
setUpdated in interface Source
Parameters:
value - The java.util.Date
Returns:
The newly created atom:updated element

setUpdated

public DateTime setUpdated(String value)
Description copied from interface: Source
Set the atom:updated value

Specified by:
setUpdated in interface Source
Parameters:
value - The serialized string date
Returns:
The newly created atom:updated element

setUpdatedElement

public <T extends Source> T setUpdatedElement(DateTime dateTime)
Description copied from interface: Source
RFC4287: The "atom:updated" element is a Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant. Therefore, not all modifications necessarily result in a changed atom:updated value.

Specified by:
setUpdatedElement in interface Source
Parameters:
dateTime - A atom:updated element

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

getAttributeValue

public String getAttributeValue(String name)
Description copied from interface: Element
Returns the value of the named attribute

Specified by:
getAttributeValue in interface Element
Overrides:
getAttributeValue in class ElementWrapper
Parameters:
name - The name of the attribute
Returns:
The value of the attribute

getAttributeValue

public String getAttributeValue(QName qname)
Description copied from interface: Element
Returns the value of the named attribute

Specified by:
getAttributeValue in interface Element
Overrides:
getAttributeValue in class ElementWrapper
Parameters:
qname - The XML QName of the attribute
Returns:
The value of the attribute

getAttributes

public List<QName> getAttributes()
Description copied from interface: Element
Returns a listing of all attributes on this element

Specified by:
getAttributes in interface Element
Overrides:
getAttributes in class ElementWrapper
Returns:
The listing of attributes for this element

getExtensionAttributes

public List<QName> getExtensionAttributes()
Description copied from interface: Element
Returns a listing of extension attributes on this element (extension attributes are attributes whose namespace URI is different than the elements)

Specified by:
getExtensionAttributes in interface Element
Overrides:
getExtensionAttributes in class ElementWrapper
Returns:
The listing non-Atom attributes

getLanguage

public String getLanguage()
Description copied from interface: Element
Returns the value of this elements xml:lang attribute or null if xml:lang is undefined.

Specified by:
getLanguage in interface Element
Overrides:
getLanguage in class ElementWrapper
Returns:
The xml:lang value

removeAttribute

public <T extends Element> T removeAttribute(QName qname)
Description copied from interface: Element
Remove the named Attribute

Specified by:
removeAttribute in interface Element
Overrides:
removeAttribute in class ElementWrapper
Parameters:
qname - The XML QName of the attribute to remove

setAttributeValue

public <T extends Element> T setAttributeValue(String name,
                                               String value)
Description copied from interface: Element
Sets the value of the named attribute

Specified by:
setAttributeValue in interface Element
Overrides:
setAttributeValue in class ElementWrapper
Parameters:
name - The name of the attribute
value - The value of the attribute

setAttributeValue

public <T extends Element> T setAttributeValue(QName qname,
                                               String value)
Description copied from interface: Element
Sets the value of the named attribute

Specified by:
setAttributeValue in interface Element
Overrides:
setAttributeValue in class ElementWrapper
Parameters:
qname - The XML QName of the attribute
value - The value of the attribute

setBaseUri

public <T extends Element> T setBaseUri(IRI base)
Description copied from interface: Element
Sets the value of this element's xml:base attribute.

Specified by:
setBaseUri in interface Element
Overrides:
setBaseUri in class ElementWrapper
Parameters:
base - The IRI base value

setBaseUri

public <T extends Element> T setBaseUri(String base)
Description copied from interface: Element
Sets the value of this element's xml:base attribute.

Specified by:
setBaseUri in interface Element
Overrides:
setBaseUri in class ElementWrapper
Parameters:
base - The Base IRI

setLanguage

public <T extends Element> T setLanguage(String language)
Description copied from interface: Element
Sets the value of this elements xml:lang attribute.

Specified by:
setLanguage in interface Element
Overrides:
setLanguage in class ElementWrapper
Parameters:
language - the value of the xml:lang element

getVersion

public String getVersion()

getAsFeed

public Feed getAsFeed()
Description copied from interface: Source
Convert the Source element into an empty Feed element

Specified by:
getAsFeed in interface Source


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