org.apache.abdera.ext.rss
Class RssItem

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

public class RssItem
extends ExtensibleElementWrapper
implements Entry, IRIElement


Constructor Summary
RssItem(Element internal)
           
RssItem(Factory factory, QName qname)
           
 
Method Summary
 Entry addAuthor(Person person)
          Adds an individual author to the entry
 Person addAuthor(String name)
          Adds an author
 Person addAuthor(String name, String email, String uri)
          Adds an author
 Entry addCategory(Category category)
          Adds an individual category to the entry
 Category addCategory(String term)
          Adds a category to the entry
 Category addCategory(String scheme, String term, String label)
          Adds a category to the entry
 Entry addContributor(Person person)
          Adds an individual contributor to this entry
 Person addContributor(String name)
          Adds a contributor
 Person addContributor(String name, String email, String uri)
          Adds an author
 Control addControl()
           
 Entry addLink(Link link)
          Adds an individual link to the entry
 Link addLink(String href)
          Add a link to the entry
 Link addLink(String href, String rel)
          Add a link to the entry
 Link addLink(String href, String rel, String type, String title, String hreflang, long length)
          Add a link to the entry
 Link getAlternateLink()
          Returns this entries first alternate link
 Link getAlternateLink(String type, String hreflang)
          Returns the first alternate link matching the specified type and hreflang
 IRI getAlternateLinkResolvedHref()
          Return a link href resolved against the in-scope Base URI
 IRI getAlternateLinkResolvedHref(String type, String hreflang)
          Return a link href resolved against the in-scope Base URI
 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 A listing of atom:category elements using the specified scheme
 Link getComments()
           
 String getContent()
          Returns the text of the content element
 Content getContentElement()
          Returns the content for this entry
 javax.activation.MimeType getContentMimeType()
          Returns the media type of the content type or null if type equals 'text', 'html' or 'xhtml'
 IRI getContentSrc()
          Returns the content/@src attribute, if any
 InputStream getContentStream()
          Returns an input stream from the content element value.
 Content.Type getContentType()
          Returns the content type
 List<Person> getContributors()
          Lists the complete set of contributors for this entry
 Control getControl()
          Returns this entries Atom Publishing Protocol control element
 Control getControl(boolean create)
          Returns this entries Atom Publishing Protocol control element.
 Date getEdited()
          Return the value of app:edited
 DateTime getEditedElement()
          APP Introduces a new app:edited element whose value changes every time the entry is updated
 Link getEditLink()
          Returns this entries first edit link
 IRI getEditLinkResolvedHref()
          Return a link href resolved against the in-scope Base URI
 Link getEditMediaLink()
          Returns this entries first edit-media link (if any)
 Link getEditMediaLink(String type, String hreflang)
          Returns the first edit-media link matching the specified type and hreflang
 IRI getEditMediaLinkResolvedHref()
          Return a link href resolved against the in-scope Base URI
 IRI getEditMediaLinkResolvedHref(String type, String hreflang)
          Return a link href resolved against the in-scope Base URI
 Link getEnclosureLink()
          Returns this entries first enclosure link
 IRI getEnclosureLinkResolvedHref()
          Return a link href resolved against the in-scope Base URI
 IRI getId()
          Returns the universally unique identifier for this entry
 IRIElement getIdElement()
          Returns the universally unique identifier for this entry
 Link getLink(String rel)
          Returns the first link with the specified rel attribute value
 IRI getLinkResolvedHref(String rel)
          Return a link href resolved against the in-scope Base URI
 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
 Date getPublished()
          Return the value of the atom:published element
 DateTime getPublishedElement()
          RFC4287: The "atom:published" element is a Date construct indicating an instant in time associated with an event early in the life cycle of the entry...
 IRI getResolvedValue()
          Returns the value of the element resolved against the current in-scope Base URI
 String getRights()
          Return the String value of the atom:rights element
 Text getRightsElement()
           The rights element is typically used to convey a human readable copyright (e.g.
 Text.Type getRightsType()
          Return the @type of the atom:rights element
 Link getSelfLink()
          Returns this entries first self link
 IRI getSelfLinkResolvedHref()
          Return a link href resolved against the in-scope Base URI
 Source getSource()
           Returns the source element for this entry.
 String getSummary()
          Returns the text string value of this summary
 Text getSummaryElement()
          RFC4287: The "atom:summary" element is a Text construct that conveys a short summary, abstract, or excerpt of an entry...
 Text.Type getSummaryType()
          Returns the summary type
 String getTitle()
          Returns the text string value of the title element
 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 this entries title
 Date getUpdated()
          Return atom:updated
 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.
 IRI getValue()
          Returns the value of the element as a java.net.URI
 boolean isDraft()
          Returns true if this entry is a draft
 IRIElement newId()
          Creates a new randomized atom:id for the entry
 Content setContent(javax.activation.DataHandler dataHandler)
          Sets the content for this entry
 Content setContent(javax.activation.DataHandler dataHandler, String mediatype)
          Sets the content for this entry
 Content setContent(Element value)
          Sets the content for this entry
 Content setContent(Element element, String mediaType)
          Sets the content for this entry
 Content setContent(InputStream inputStream)
          Sets the content for this entry
 Content setContent(InputStream inputStream, String mediatype)
          Sets the content for this entry
 Content setContent(IRI uri, String mediatype)
          Sets the content for this entry as out of line.
 Content setContent(String value)
          Sets the content for this entry as @type="text"
 Content setContent(String value, Content.Type type)
          Sets the content for this entry
 Content setContent(String value, String mediatype)
          Sets the content for this entry
 Content setContentAsHtml(String value)
          Sets the content for this entry as @type="html"
 Content setContentAsXhtml(String value)
          Sets the content for this entry as @type="xhtml"
 Entry setContentElement(Content content)
          Sets the content for this entry
 Entry setControl(Control control)
          Sets this entries Atom Publishing Protocol control element
 Entry setDraft(boolean draft)
          Sets whether or not this entry is a draft
 DateTime setEdited(Date value)
          Set the value of app:edited
 DateTime setEdited(String value)
          Set the value of app:edited
 void setEditedElement(DateTime modified)
          Set the app:edited element
 IRIElement setId(String id)
          Sets the universally unique identifier for this entry
 IRIElement setId(String id, boolean normalize)
          Sets the universally unique identifier for this entry
 Entry setIdElement(IRIElement id)
          Sets the universally unique identifier for this entry
 IRIElement setNormalizedValue(String iri)
          Set the value of this element using the normalization as specified in RFC4287
 DateTime setPublished(Date value)
          Set the value of the atom:published element
 DateTime setPublished(String value)
          Set the value of the atom:published element using the serialized string value
 Entry setPublishedElement(DateTime dateTime)
          RFC4287: The "atom:published" element is a Date construct indicating an instant in time associated with an event early in the life cycle of the entry...
 Text setRights(Div value)
          Sets the value of the right 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"
 Entry setRightsElement(Text text)
           The rights element is typically used to convey a human readable copyright (e.g.
 Entry setSource(Source source)
           Returns the source element for this entry.
 Text setSummary(Div value)
          Sets the value of the summary as @type="xhtml"
 Text setSummary(String value)
          Sets the value of the summary as @type="text"
 Text setSummary(String value, Text.Type type)
          Sets the value of the summary
 Text setSummaryAsHtml(String value)
          Sets the value of the summary as @type="html"
 Text setSummaryAsXhtml(String value)
          Sets the value of the summary as @type="xhtml"
 Entry setSummaryElement(Text text)
          RFC4287: The "atom:summary" element is a Text construct that conveys a short summary, abstract, or excerpt of an entry...
 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"
 Entry setTitleElement(Text title)
          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
 Entry setUpdatedElement(DateTime updated)
          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.
 IRIElement setValue(String iri)
          Sets the value of the element
 
Methods inherited from class org.apache.abdera.model.ExtensibleElementWrapper
addExtension, addExtension, addExtension, addExtension, addExtension, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getExtInternal, getMustPreserveWhitespace, getSimpleExtension, getSimpleExtension, 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, addExtension, addExtension, addExtension, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getSimpleExtension, getSimpleExtension
 
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

RssItem

public RssItem(Element internal)

RssItem

public RssItem(Factory factory,
               QName qname)
Method Detail

addAuthor

public Entry addAuthor(Person person)
Description copied from interface: Entry
Adds an individual author to the entry

Specified by:
addAuthor in interface Entry
Parameters:
person - The person to add

addAuthor

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

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

addAuthor

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

Specified by:
addAuthor in interface Entry
Parameters:
name - The name of the author
email - The author's email address
uri - A URI belonging to the author
Returns:
The newly created atom:author element

addCategory

public Entry addCategory(Category category)
Description copied from interface: Entry
Adds an individual category to the entry

Specified by:
addCategory in interface Entry
Parameters:
category - The atom:category element to add

addCategory

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

Specified by:
addCategory in interface Entry
Parameters:
term - The category term to add
Returns:
The newly created atom:category

addCategory

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

Specified by:
addCategory in interface Entry
Parameters:
scheme - The category scheme
term - The category term
label - The human readable label
Returns:
The newly create atom:category

addContributor

public Entry addContributor(Person person)
Description copied from interface: Entry
Adds an individual contributor to this entry

Specified by:
addContributor in interface Entry
Parameters:
person - The atom:contributor element

addContributor

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

Specified by:
addContributor in interface Entry
Parameters:
name - The contributor name
Returns:
The newly created atom:contributor

addContributor

public Person addContributor(String name,
                             String email,
                             String uri)
Description copied from interface: Entry
Adds an author

Specified by:
addContributor in interface Entry
Parameters:
name - The contributor name
email - The contributor's email address
uri - The contributor's URI
Returns:
The newly created atom:contributor

addLink

public Entry addLink(Link link)
Description copied from interface: Entry
Adds an individual link to the entry

Specified by:
addLink in interface Entry
Parameters:
link - the atom:link to add

addLink

public Link addLink(String href)
Description copied from interface: Entry
Add a link to the entry

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

addLink

public Link addLink(String href,
                    String rel)
Description copied from interface: Entry
Add a link to the entry

Specified by:
addLink in interface Entry
Parameters:
href - The 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: Entry
Add a link to the entry

Specified by:
addLink in interface Entry
Parameters:
href - The IRI of the link
rel - The link rel attribute
type - The media type of the link
hreflang - The language of the target
length - The length of the resource
Returns:
The newly created atom:link

getAlternateLink

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

Specified by:
getAlternateLink in interface Entry
Returns:
the Alternate link

getAlternateLink

public Link getAlternateLink(String type,
                             String hreflang)
Description copied from interface: Entry
Returns the first alternate link matching the specified type and hreflang

Specified by:
getAlternateLink in interface Entry
Parameters:
type - The link media type
hreflang - The link target language
Returns:
The matching atom:link

getAlternateLinkResolvedHref

public IRI getAlternateLinkResolvedHref()
Description copied from interface: Entry
Return a link href resolved against the in-scope Base URI

Specified by:
getAlternateLinkResolvedHref in interface Entry
Returns:
The resolved IRI

getAlternateLinkResolvedHref

public IRI getAlternateLinkResolvedHref(String type,
                                        String hreflang)
Description copied from interface: Entry
Return a link href resolved against the in-scope Base URI

Specified by:
getAlternateLinkResolvedHref in interface Entry
Parameters:
type - A target type
hreflang - A target language
Returns:
The resolved IRI

getAuthor

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

Specified by:
getAuthor in interface Entry
Returns:
The atom:author

getAuthors

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

Specified by:
getAuthors in interface Entry
Returns:
The listing of atom:author elements

getCategories

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

Specified by:
getCategories in interface Entry
Returns:
The listing of atom:category elements

getCategories

public List<Category> getCategories(String scheme)
Description copied from interface: Entry
Lists the complete set of categories using the specified scheme A listing of atom:category elements using the specified scheme

Specified by:
getCategories in interface Entry

getContent

public String getContent()
Description copied from interface: Entry
Returns the text of the content element

Specified by:
getContent in interface Entry
Returns:
text content

getContentElement

public Content getContentElement()
Description copied from interface: Entry
Returns the content for this entry

Specified by:
getContentElement in interface Entry
Returns:
The atom:content element

getContentMimeType

public javax.activation.MimeType getContentMimeType()
Description copied from interface: Entry
Returns the media type of the content type or null if type equals 'text', 'html' or 'xhtml'

Specified by:
getContentMimeType in interface Entry
Returns:
The content media type

getContentSrc

public IRI getContentSrc()
Description copied from interface: Entry
Returns the content/@src attribute, if any

Specified by:
getContentSrc in interface Entry
Returns:
The src IRI

getContentStream

public InputStream getContentStream()
                             throws IOException
Description copied from interface: Entry
Returns an input stream from the content element value. This is particularly useful when dealing with Base64 binary content.

Specified by:
getContentStream in interface Entry
Throws:
IOException

getContentType

public Content.Type getContentType()
Description copied from interface: Entry
Returns the content type

Specified by:
getContentType in interface Entry
Returns:
The content type

getContributors

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

Specified by:
getContributors in interface Entry
Returns:
The listing of atom:contributor elements

getControl

public Control getControl(boolean create)
Description copied from interface: Entry
Returns this entries Atom Publishing Protocol control element. A new control element will be created if one currently does not exist

Specified by:
getControl in interface Entry
Returns:
The app:control element

getControl

public Control getControl()
Description copied from interface: Entry
Returns this entries Atom Publishing Protocol control element

Specified by:
getControl in interface Entry
Returns:
The app:control element

getEditLink

public Link getEditLink()
Description copied from interface: Entry
Returns this entries first edit link

Specified by:
getEditLink in interface Entry
Returns:
the Edit Link

getEditLinkResolvedHref

public IRI getEditLinkResolvedHref()
Description copied from interface: Entry
Return a link href resolved against the in-scope Base URI

Specified by:
getEditLinkResolvedHref in interface Entry
Returns:
The resolved IRI

getEditMediaLink

public Link getEditMediaLink()
Description copied from interface: Entry
Returns this entries first edit-media link (if any)

Specified by:
getEditMediaLink in interface Entry
Returns:
the Edit Media Link

getEditMediaLink

public Link getEditMediaLink(String type,
                             String hreflang)
Description copied from interface: Entry
Returns the first edit-media link matching the specified type and hreflang

Specified by:
getEditMediaLink in interface Entry
Parameters:
type - a media type
hreflang - a target language
Returns:
A matching atom:link element

getEditMediaLinkResolvedHref

public IRI getEditMediaLinkResolvedHref()
Description copied from interface: Entry
Return a link href resolved against the in-scope Base URI

Specified by:
getEditMediaLinkResolvedHref in interface Entry
Returns:
The resolved IRI

getEditMediaLinkResolvedHref

public IRI getEditMediaLinkResolvedHref(String type,
                                        String hreflang)
Description copied from interface: Entry
Return a link href resolved against the in-scope Base URI

Specified by:
getEditMediaLinkResolvedHref in interface Entry
Parameters:
type - A target type
hreflang - A target language
Returns:
The resolved IRI

getEdited

public Date getEdited()
Description copied from interface: Entry
Return the value of app:edited

Specified by:
getEdited in interface Entry
Returns:
app:edited

getEditedElement

public DateTime getEditedElement()
Description copied from interface: Entry
APP Introduces a new app:edited element whose value changes every time the entry is updated

Specified by:
getEditedElement in interface Entry
Returns:
the app:edited element

getEnclosureLink

public Link getEnclosureLink()
Description copied from interface: Entry
Returns this entries first enclosure link

Specified by:
getEnclosureLink in interface Entry
Returns:
the Enclosure link

getEnclosureLinkResolvedHref

public IRI getEnclosureLinkResolvedHref()
Description copied from interface: Entry
Return a link href resolved against the in-scope Base URI

Specified by:
getEnclosureLinkResolvedHref in interface Entry
Returns:
The resolved IRI

getId

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

Specified by:
getId in interface Entry

getIdElement

public IRIElement getIdElement()
Description copied from interface: Entry
Returns the universally unique identifier for this entry

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

getLink

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

Specified by:
getLink in interface Entry
Parameters:
rel - The link rel
Returns:
a Link with the specified rel attribute

getLinkResolvedHref

public IRI getLinkResolvedHref(String rel)
Description copied from interface: Entry
Return a link href resolved against the in-scope Base URI

Specified by:
getLinkResolvedHref in interface Entry
Parameters:
rel - The rel attribute value
Returns:
The resolved IRI

getLinks

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

Specified by:
getLinks in interface Entry
Returns:
The listing of atom:link elements

getLinks

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

Specified by:
getLinks in interface Entry
Parameters:
rel - The rel attribute value to look for
Returns:
The listing of atom:link element's with the rel attribute

getLinks

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

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

getPublished

public Date getPublished()
Description copied from interface: Entry
Return the value of the atom:published element

Specified by:
getPublished in interface Entry
Returns:
a java.util.Date for the atom:published value

getPublishedElement

public DateTime getPublishedElement()
Description copied from interface: Entry
RFC4287: The "atom:published" element is a Date construct indicating an instant in time associated with an event early in the life cycle of the entry... Typically, atom:published will be associated with the initial creation or first availability of the resource.

Specified by:
getPublishedElement in interface Entry
Returns:
The atom:published element

getRights

public String getRights()
Description copied from interface: Entry
Return the String value of the atom:rights element

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

getRightsElement

public Text getRightsElement()
Description copied from interface: Entry

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 Entry
Returns:
The atom:rights element

getRightsType

public Text.Type getRightsType()
Description copied from interface: Entry
Return the @type of the atom:rights element

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

getSelfLink

public Link getSelfLink()
Description copied from interface: Entry
Returns this entries first self link

Specified by:
getSelfLink in interface Entry
Returns:
the Self Link

getSelfLinkResolvedHref

public IRI getSelfLinkResolvedHref()
Description copied from interface: Entry
Return a link href resolved against the in-scope Base URI

Specified by:
getSelfLinkResolvedHref in interface Entry
Returns:
The resolved IRI

getSource

public Source getSource()
Description copied from interface: Entry

Returns the source element for this entry.

RFC4287: If an atom:entry is copied from one feed into another feed, then the source atom:feed's metadata (all child elements of atom:feed other than the atom:entry elements) MAY be preserved within the copied entry by adding an atom:source child element, if it is not already present in the entry, and including some or all of the source feed's Metadata elements as the atom:source element's children. Such metadata SHOULD be preserved if the source atom:feed contains any of the child elements atom:author, atom:contributor, atom:rights, or atom:category and those child elements are not present in the source atom:entry.

Specified by:
getSource in interface Entry
Returns:
The atom:source element

getSummary

public String getSummary()
Description copied from interface: Entry
Returns the text string value of this summary

Specified by:
getSummary in interface Entry
Returns:
the text value of the atom:summary

getSummaryElement

public Text getSummaryElement()
Description copied from interface: Entry
RFC4287: The "atom:summary" element is a Text construct that conveys a short summary, abstract, or excerpt of an entry... It is not advisable for the atom:summary element to duplicate atom:title or atom:content because Atom Processors might assume there is a useful summary when there is none.

Specified by:
getSummaryElement in interface Entry
Returns:
The atom:summary element

getSummaryType

public Text.Type getSummaryType()
Description copied from interface: Entry
Returns the summary type

Specified by:
getSummaryType in interface Entry
Returns:
the Text.Type of the atom:summary

getTitle

public String getTitle()
Description copied from interface: Entry
Returns the text string value of the title element

Specified by:
getTitle in interface Entry
Returns:
text value of the atom:title

getTitleElement

public Text getTitleElement()
Description copied from interface: Entry
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 Entry
Returns:
the atom:title element

getTitleType

public Text.Type getTitleType()
Description copied from interface: Entry
Returns the @type of this entries title

Specified by:
getTitleType in interface Entry
Returns:
the Text.Type of the atom:title

getUpdated

public Date getUpdated()
Description copied from interface: Entry
Return atom:updated

Specified by:
getUpdated in interface Entry
Returns:
A java.util.Date value

getUpdatedElement

public DateTime getUpdatedElement()
Description copied from interface: Entry
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 Entry
Returns:
the atom:updated element

isDraft

public boolean isDraft()
Description copied from interface: Entry
Returns true if this entry is a draft

Specified by:
isDraft in interface Entry
Returns:
True if this entry is a date

newId

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

Specified by:
newId in interface Entry

setContent

public Content setContent(String value)
Description copied from interface: Entry
Sets the content for this entry as @type="text"

Specified by:
setContent in interface Entry
Parameters:
value - The text value of the content
Returns:
The newly created atom:content

setContent

public Content setContent(String value,
                          Content.Type type)
Description copied from interface: Entry
Sets the content for this entry

Specified by:
setContent in interface Entry
Parameters:
value - The text value of the content
type - The Content Type of the text
Returns:
The newly created atom:content

setContent

public Content setContent(Element value)
Description copied from interface: Entry
Sets the content for this entry

Specified by:
setContent in interface Entry
Parameters:
value - The content element value. If the value is a Div, the the type attribute will be set to type="xhtml", otherwise type="application/xml"
Returns:
The newly create atom:content

setContent

public Content setContent(Element element,
                          String mediaType)
Description copied from interface: Entry
Sets the content for this entry

Specified by:
setContent in interface Entry
Parameters:
element - The element value
mediaType - The media type of the element

setContent

public Content setContent(javax.activation.DataHandler dataHandler)
Description copied from interface: Entry
Sets the content for this entry

Specified by:
setContent in interface Entry
Parameters:
dataHandler - The Data Handler containing the binary content needing Base64 encoding.

setContent

public Content setContent(javax.activation.DataHandler dataHandler,
                          String mediatype)
Description copied from interface: Entry
Sets the content for this entry

Specified by:
setContent in interface Entry
Parameters:
dataHandler - The Data Handler containing the binary content needing Base64 encoding.
Returns:
The created content element

setContent

public Content setContent(InputStream inputStream)
Description copied from interface: Entry
Sets the content for this entry

Specified by:
setContent in interface Entry
Parameters:
inputStream - An inputstream providing binary content
Returns:
The created content element

setContent

public Content setContent(InputStream inputStream,
                          String mediatype)
Description copied from interface: Entry
Sets the content for this entry

Specified by:
setContent in interface Entry
Parameters:
inputStream - An inputstream providing binary content
Returns:
The created content element

setContent

public Content setContent(String value,
                          String mediatype)
Description copied from interface: Entry
Sets the content for this entry

Specified by:
setContent in interface Entry
Parameters:
value - the string value of the content
mediatype - the media type for the content
Returns:
The newly created atom:content

setContent

public Content setContent(IRI uri,
                          String mediatype)
Description copied from interface: Entry
Sets the content for this entry as out of line.

Specified by:
setContent in interface Entry
Parameters:
uri - URI of the content (value of the "src" attribute).
mediatype - Type of the content.
Returns:
The new content element.

setContentAsHtml

public Content setContentAsHtml(String value)
Description copied from interface: Entry
Sets the content for this entry as @type="html"

Specified by:
setContentAsHtml in interface Entry
Parameters:
value - The text value of the content. Special characters will be escaped (e.g. & will become &amp;)
Returns:
The newly created atom:content

setContentAsXhtml

public Content setContentAsXhtml(String value)
Description copied from interface: Entry
Sets the content for this entry as @type="xhtml"

Specified by:
setContentAsXhtml in interface Entry
Parameters:
value - The text value of the content. The text will be parsed as XHTML
Returns:
The newly created atom:content

setContentElement

public Entry setContentElement(Content content)
Description copied from interface: Entry
Sets the content for this entry

Specified by:
setContentElement in interface Entry
Parameters:
content - The atom:content element

setControl

public Entry setControl(Control control)
Description copied from interface: Entry
Sets this entries Atom Publishing Protocol control element

Specified by:
setControl in interface Entry
Parameters:
control - The app:contorl element

setDraft

public Entry setDraft(boolean draft)
Description copied from interface: Entry
Sets whether or not this entry is a draft

Specified by:
setDraft in interface Entry
Parameters:
draft - true if this entry should be marked as a draft

setEdited

public DateTime setEdited(Date value)
Description copied from interface: Entry
Set the value of app:edited

Specified by:
setEdited in interface Entry
Parameters:
value - The java.util.Date value
Returns:
The newly created app:edited element

setEdited

public DateTime setEdited(String value)
Description copied from interface: Entry
Set the value of app:edited

Specified by:
setEdited in interface Entry
Parameters:
value - the serialized string value for app:edited
Returns:
The newly created app:edited element

setEditedElement

public void setEditedElement(DateTime modified)
Description copied from interface: Entry
Set the app:edited element

Specified by:
setEditedElement in interface Entry
Parameters:
modified - The app:edited element

setId

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

Specified by:
setId in interface Entry
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: Entry
Sets the universally unique identifier for this entry

Specified by:
setId in interface Entry
Parameters:
id - The atom:id value
normalize - true if the atom:id value should be normalized as called for by RFC4287
Returns:
The newly created atom:id element

setIdElement

public Entry setIdElement(IRIElement id)
Description copied from interface: Entry
Sets the universally unique identifier for this entry

Specified by:
setIdElement in interface Entry
Parameters:
id - The atom:id element

setPublished

public DateTime setPublished(Date value)
Description copied from interface: Entry
Set the value of the atom:published element

Specified by:
setPublished in interface Entry
Parameters:
value - The java.util.Date
Returns:
The newly created atom:published element

setPublished

public DateTime setPublished(String value)
Description copied from interface: Entry
Set the value of the atom:published element using the serialized string value

Specified by:
setPublished in interface Entry
Parameters:
value - The serialized date
Returns:
The newly created atom:published element

setPublishedElement

public Entry setPublishedElement(DateTime dateTime)
Description copied from interface: Entry
RFC4287: The "atom:published" element is a Date construct indicating an instant in time associated with an event early in the life cycle of the entry... Typically, atom:published will be associated with the initial creation or first availability of the resource.

Specified by:
setPublishedElement in interface Entry
Parameters:
dateTime - the atom:published element

setRights

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

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

setRights

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

Specified by:
setRights in interface Entry
Parameters:
value - The text value of the atom:rights element
type - The text type
Returns:
The newly create atom:rights element

setRights

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

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

setRightsAsHtml

public Text setRightsAsHtml(String value)
Description copied from interface: Entry
Sets the value of the rights as @type="html". Special characters like & will be automatically escaped

Specified by:
setRightsAsHtml in interface Entry
Parameters:
value - The text value of the atom:rights element.
Returns:
The newly created atom:rights element

setRightsAsXhtml

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

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

setRightsElement

public Entry setRightsElement(Text text)
Description copied from interface: Entry

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 Entry
Parameters:
text - The atom:rights element

setSource

public Entry setSource(Source source)
Description copied from interface: Entry

Returns the source element for this entry.

RFC4287: If an atom:entry is copied from one feed into another feed, then the source atom:feed's metadata (all child elements of atom:feed other than the atom:entry elements) MAY be preserved within the copied entry by adding an atom:source child element, if it is not already present in the entry, and including some or all of the source feed's Metadata elements as the atom:source element's children. Such metadata SHOULD be preserved if the source atom:feed contains any of the child elements atom:author, atom:contributor, atom:rights, or atom:category and those child elements are not present in the source atom:entry.

Specified by:
setSource in interface Entry
Parameters:
source - The atom:source element

setSummary

public Text setSummary(String value)
Description copied from interface: Entry
Sets the value of the summary as @type="text"

Specified by:
setSummary in interface Entry
Parameters:
value - The text value of the atom:summary element
Returns:
the newly created atom:summary element

setSummary

public Text setSummary(String value,
                       Text.Type type)
Description copied from interface: Entry
Sets the value of the summary

Specified by:
setSummary in interface Entry
Parameters:
value - The text value of the atom:summary element
type - The Text.Type of the atom:summary element
Returns:
The newly created atom:summary element

setSummary

public Text setSummary(Div value)
Description copied from interface: Entry
Sets the value of the summary as @type="xhtml"

Specified by:
setSummary in interface Entry
Parameters:
value - The XHTML div
Returns:
the newly created atom:summary element

setSummaryAsHtml

public Text setSummaryAsHtml(String value)
Description copied from interface: Entry
Sets the value of the summary as @type="html"

Specified by:
setSummaryAsHtml in interface Entry
Parameters:
value - The text value of the atom:summary element
Returns:
the newly created atom:summary element

setSummaryAsXhtml

public Text setSummaryAsXhtml(String value)
Description copied from interface: Entry
Sets the value of the summary as @type="xhtml"

Specified by:
setSummaryAsXhtml in interface Entry
Parameters:
value - The text value of the atom:summary element
Returns:
the newly created atom:summary element

setSummaryElement

public Entry setSummaryElement(Text text)
Description copied from interface: Entry
RFC4287: The "atom:summary" element is a Text construct that conveys a short summary, abstract, or excerpt of an entry... It is not advisable for the atom:summary element to duplicate atom:title or atom:content because Atom Processors might assume there is a useful summary when there is none.

Specified by:
setSummaryElement in interface Entry
Parameters:
text - The atom:summary element

setTitle

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

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

setTitle

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

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

setTitle

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

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

setTitleAsHtml

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

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

setTitleAsXhtml

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

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

setTitleElement

public Entry setTitleElement(Text title)
Description copied from interface: Entry
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 Entry
Parameters:
title - the atom:title element

setUpdated

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

Specified by:
setUpdated in interface Entry
Parameters:
value - The new value
Returns:
The newly created atom:updated element

setUpdated

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

Specified by:
setUpdated in interface Entry
Parameters:
value - The new value
Returns:
The newly created atom:updated element

setUpdatedElement

public Entry setUpdatedElement(DateTime updated)
Description copied from interface: Entry
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 Entry
Parameters:
updated - the atom:updated element.

getComments

public Link getComments()

getResolvedValue

public IRI getResolvedValue()
Description copied from interface: IRIElement
Returns the value of the element resolved against the current in-scope Base URI

Specified by:
getResolvedValue in interface IRIElement
Returns:
The resolved IRI value

getValue

public IRI getValue()
Description copied from interface: IRIElement
Returns the value of the element as a java.net.URI

Specified by:
getValue in interface IRIElement
Returns:
The IRI value of this element

setNormalizedValue

public IRIElement setNormalizedValue(String iri)
Description copied from interface: IRIElement
Set the value of this element using the normalization as specified in RFC4287

Specified by:
setNormalizedValue in interface IRIElement
Parameters:
iri - A non-normalized IRI

setValue

public IRIElement setValue(String iri)
Description copied from interface: IRIElement
Sets the value of the element

Specified by:
setValue in interface IRIElement
Parameters:
iri - The iri value

addControl

public Control addControl()
Specified by:
addControl in interface Entry


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