org.apache.abdera.model
Interface Entry

All Superinterfaces:
Base, Cloneable, Element, ExtensibleElement, Iterable<Element>

public interface Entry
extends ExtensibleElement

Represents an Atom Entry element.

Per RFC4287:

 The "atom:entry" element represents an individual entry, acting as a
 container for metadata and data associated with the entry.  This
 element can appear as a child of the atom:feed element, or it can
 appear as the document (i.e., top-level) element of a stand-alone
 Atom Entry Document.
 
 atomEntry =
    element atom:entry {
       atomCommonAttributes,
       (atomAuthor*
        & atomCategory*
        & atomContent?
        & atomContributor*
        & atomId
        & atomLink*
        & atomPublished?
        & atomRights?
        & atomSource?
        & atomSummary?
        & atomTitle
        & atomUpdated
        & extensionElement*)
    }
 
 This specification assigns no significance to the order of appearance
 of the child elements of atom:entry.
 
 The following child elements are defined by this specification (note
 that it requires the presence of some of these elements):
 
 o  atom:entry elements MUST contain one or more atom:author elements,
    unless the atom:entry contains an atom:source element that
    contains an atom:author element or, in an Atom Feed Document, the
    atom:feed element contains an atom:author element itself.
 o  atom:entry elements MAY contain any number of atom:category
    elements.
 o  atom:entry elements MUST NOT contain more than one atom:content
    element.
 o  atom:entry elements MAY contain any number of atom:contributor
    elements.
 o  atom:entry elements MUST contain exactly one atom:id element.
 o  atom:entry elements that contain no child atom:content element
    MUST contain at least one atom:link element with a rel attribute
    value of "alternate".
 o  atom:entry elements MUST NOT contain more than one atom:link
    element with a rel attribute value of "alternate" that has the
    same combination of type and hreflang attribute values.
 o  atom:entry elements MAY contain additional atom:link elements
    beyond those described above.
 o  atom:entry elements MUST NOT contain more than one atom:published
    element.
 o  atom:entry elements MUST NOT contain more than one atom:rights
    element.
 o  atom:entry elements MUST NOT contain more than one atom:source
    element.
 o  atom:entry elements MUST contain an atom:summary element in either
    of the following cases:
    *  the atom:entry contains an atom:content that has a "src"
       attribute (and is thus empty).
    *  the atom:entry contains content that is encoded in Base64;
       i.e., the "type" attribute of atom:content is a MIME media type
       [MIMEREG], but is not an XML media type [RFC3023], does not
       begin with "text/", and does not end with "/xml" or "+xml".
 o  atom:entry elements MUST NOT contain more than one atom:summary
    element.
 o  atom:entry elements MUST contain exactly one atom:title element.
 o  atom:entry elements MUST contain exactly one atom:updated element.
 


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
 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...
 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.
 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
 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.
 
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
 

Method Detail

getAuthor

Person getAuthor()
Returns the first author listed for the entry

Returns:
The atom:author

getAuthors

List<Person> getAuthors()
Returns the complete set of authors listed for the entry

Returns:
The listing of atom:author elements

addAuthor

Entry addAuthor(Person person)
Adds an individual author to the entry

Parameters:
person - The person to add

addAuthor

Person addAuthor(String name)
Adds an author

Parameters:
name - The name of the author
Returns:
The newly created atom:author element

addAuthor

Person addAuthor(String name,
                 String email,
                 String uri)
Adds an author

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
Throws:
IRISyntaxException - if the URI is malformed

getCategories

List<Category> getCategories()
Lists the complete set of categories listed for the entry

Returns:
The listing of atom:category elements

getCategories

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

Throws:
IRISyntaxException - if the scheme is malformed

addCategory

Entry addCategory(Category category)
Adds an individual category to the entry

Parameters:
category - The atom:category element to add

addCategory

Category addCategory(String term)
Adds a category to the entry

Parameters:
term - The category term to add
Returns:
The newly created atom:category

addCategory

Category addCategory(String scheme,
                     String term,
                     String label)
Adds a category to the entry

Parameters:
scheme - The category scheme
term - The category term
label - The human readable label
Returns:
The newly create atom:category
Throws:
IRISyntaxException - if the scheme is malformed

getContentElement

Content getContentElement()
Returns the content for this entry

Returns:
The atom:content element

setContentElement

Entry setContentElement(Content content)
Sets the content for this entry

Parameters:
content - The atom:content element

setContent

Content setContent(String value)
Sets the content for this entry as @type="text"

Parameters:
value - The text value of the content
Returns:
The newly created atom:content

setContentAsHtml

Content setContentAsHtml(String value)
Sets the content for this entry as @type="html"

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

Content setContentAsXhtml(String value)
Sets the content for this entry as @type="xhtml"

Parameters:
value - The text value of the content. The text will be parsed as XHTML
Returns:
The newly created atom:content

setContent

Content setContent(String value,
                   Content.Type type)
Sets the content for this entry

Parameters:
value - The text value of the content
type - The Content Type of the text
Returns:
The newly created atom:content

setContent

Content setContent(Element value)
Sets the content for this 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

Content setContent(Element element,
                   String mediaType)
Sets the content for this entry

Parameters:
element - The element value
mediaType - The media type of the element
Throws:
MimeTypeParseException - if the mediaType is malformed

setContent

Content setContent(javax.activation.DataHandler dataHandler)
Sets the content for this entry

Parameters:
dataHandler - The Data Handler containing the binary content needing Base64 encoding.
Throws:
MimeTypeParseException - if the media Type specified by the dataHandler is malformed

setContent

Content setContent(javax.activation.DataHandler dataHandler,
                   String mediatype)
Sets the content for this entry

Parameters:
dataHandler - The Data Handler containing the binary content needing Base64 encoding.
mediaType - The mediatype of the binary content
Returns:
The created content element
Throws:
MimeTypeParseException - if the media type specified is malformed

setContent

Content setContent(InputStream inputStream)
Sets the content for this entry

Parameters:
inputStream - An inputstream providing binary content
Returns:
The created content element

setContent

Content setContent(InputStream inputStream,
                   String mediatype)
Sets the content for this entry

Parameters:
inputStream - An inputstream providing binary content
mediaType - The mediatype of the binary content
Returns:
The created content element
Throws:
MimeTypeParseException - if the media type specified is malformed

setContent

Content setContent(String value,
                   String mediatype)
Sets the content for this entry

Parameters:
value - the string value of the content
mediatype - the media type for the content
Returns:
The newly created atom:content
Throws:
MimeTypeParseException - if the media type is malformed

setContent

Content setContent(IRI uri,
                   String mediatype)
Sets the content for this entry as out of line.

Parameters:
uri - URI of the content (value of the "src" attribute).
mediatype - Type of the content.
Returns:
The new content element.
Throws:
MimeTypeParseException - if the mime type is invalid.
IRISyntaxException - if the URI is invalid.

getContent

String getContent()
Returns the text of the content element

Returns:
text content

getContentStream

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

Throws:
IOException

getContentSrc

IRI getContentSrc()
Returns the content/@src attribute, if any

Returns:
The src IRI
Throws:
IRISyntaxException - if the src attribute is invalid

getContentType

Content.Type getContentType()
Returns the content type

Returns:
The content type

getContentMimeType

javax.activation.MimeType getContentMimeType()
Returns the media type of the content type or null if type equals 'text', 'html' or 'xhtml'

Returns:
The content media type

getContributors

List<Person> getContributors()
Lists the complete set of contributors for this entry

Returns:
The listing of atom:contributor elements

addContributor

Entry addContributor(Person person)
Adds an individual contributor to this entry

Parameters:
person - The atom:contributor element

addContributor

Person addContributor(String name)
Adds a contributor

Parameters:
name - The contributor name
Returns:
The newly created atom:contributor

addContributor

Person addContributor(String name,
                      String email,
                      String uri)
Adds an author

Parameters:
name - The contributor name
email - The contributor's email address
uri - The contributor's URI
Returns:
The newly created atom:contributor
Throws:
IRISyntaxException - if the uri is malformed

getIdElement

IRIElement getIdElement()
Returns the universally unique identifier for this entry

Returns:
The atom:id element

setIdElement

Entry setIdElement(IRIElement id)
Sets the universally unique identifier for this entry

Parameters:
id - The atom:id element

getId

IRI getId()
Returns the universally unique identifier for this entry

Throws:
IRISyntaxException - if the atom:id value is malformed

setId

IRIElement setId(String id)
Sets the universally unique identifier for this entry

Parameters:
id - The atom:id value
Returns:
The newly created atom:id element
Throws:
IRISyntaxException - if the atom:id value is malformed

newId

IRIElement newId()
Creates a new randomized atom:id for the entry


setId

IRIElement setId(String id,
                 boolean normalize)
Sets the universally unique identifier for this 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
Throws:
IRISyntaxException - if the atom:id value is malformed

getLinks

List<Link> getLinks()
Lists the complete set of links for this entry

Returns:
The listing of atom:link elements

getLinks

List<Link> getLinks(String rel)
Lists the complete set of links using the specified rel attribute value

Parameters:
rel - The rel attribute value to look for
Returns:
The listing of atom:link element's with the rel attribute

getLinks

List<Link> getLinks(String... rel)
Lists the complete set of links using the specified rel attributes values

Parameters:
rels - A listing of link relations
Returns:
A listof atom:link elements

addLink

Entry addLink(Link link)
Adds an individual link to the entry

Parameters:
link - the atom:link to add

addLink

Link addLink(String href)
Add a link to the entry

Parameters:
href - The IRI of the link
Returns:
The newly created atom:link
Throws:
IRISyntaxException - if the href is malformed

addLink

Link addLink(String href,
             String rel)
Add a link to the entry

Parameters:
href - The IRI of the link
rel - The link rel attribute
Returns:
The newly created atom:link
Throws:
IRISyntaxException - if the href is malformed

addLink

Link addLink(String href,
             String rel,
             String type,
             String title,
             String hreflang,
             long length)
Add a link to the 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
Throws:
IRISyntaxException - if the href is malformed

getPublishedElement

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... Typically, atom:published will be associated with the initial creation or first availability of the resource.

Returns:
The atom:published element

setPublishedElement

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... Typically, atom:published will be associated with the initial creation or first availability of the resource.

Parameters:
dateTime - the atom:published element

getPublished

Date getPublished()
Return the value of the atom:published element

Returns:
a java.util.Date for the atom:published value

setPublished

DateTime setPublished(Date value)
Set the value of the atom:published element

Parameters:
value - The java.util.Date
Returns:
The newly created atom:published element

setPublished

DateTime setPublished(String value)
Set the value of the atom:published element using the serialized string value

Parameters:
value - The serialized date
Returns:
The newly created atom:published element

getRightsElement

Text getRightsElement()

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.

Returns:
The atom:rights element

setRightsElement

Entry setRightsElement(Text text)

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.

Parameters:
text - The atom:rights element

setRights

Text setRights(String value)
Sets the value of the rights as @type="text"

Parameters:
value - The text value of the atom:rights element
Returns:
The newly created atom:rights element

setRightsAsHtml

Text setRightsAsHtml(String value)
Sets the value of the rights as @type="html". Special characters like & will be automatically escaped

Parameters:
value - The text value of the atom:rights element.
Returns:
The newly created atom:rights element

setRightsAsXhtml

Text setRightsAsXhtml(String value)
Sets the value of the rights as @type="xhtml"

Parameters:
value - The text value of the atom:rights element
Returns:
The newly created atom:rights element

setRights

Text setRights(String value,
               Text.Type type)
Sets the value of the rights

Parameters:
value - The text value of the atom:rights element
type - The text type
Returns:
The newly create atom:rights element

setRights

Text setRights(Div value)
Sets the value of the right as @type="xhtml"

Parameters:
value - The XHTML div for the atom:rights element
Returns:
The newly created atom:rights element

getRights

String getRights()
Return the String value of the atom:rights element

Returns:
The text value of the atom:rights element

getRightsType

Text.Type getRightsType()
Return the @type of the atom:rights element

Returns:
The Text.Type of the atom:rights element

getSource

Source getSource()

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.

Returns:
The atom:source element

setSource

Entry setSource(Source source)

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.

Parameters:
source - The atom:source element

getSummaryElement

Text getSummaryElement()
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.

Returns:
The atom:summary element

setSummaryElement

Entry setSummaryElement(Text text)
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.

Parameters:
text - The atom:summary element

setSummary

Text setSummary(String value)
Sets the value of the summary as @type="text"

Parameters:
value - The text value of the atom:summary element
Returns:
the newly created atom:summary element

setSummaryAsHtml

Text setSummaryAsHtml(String value)
Sets the value of the summary as @type="html"

Parameters:
value - The text value of the atom:summary element
Returns:
the newly created atom:summary element

setSummaryAsXhtml

Text setSummaryAsXhtml(String value)
Sets the value of the summary as @type="xhtml"

Parameters:
value - The text value of the atom:summary element
Returns:
the newly created atom:summary element

setSummary

Text setSummary(String value,
                Text.Type type)
Sets the value of the summary

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

Text setSummary(Div value)
Sets the value of the summary as @type="xhtml"

Parameters:
value - The XHTML div
Returns:
the newly created atom:summary element

getSummary

String getSummary()
Returns the text string value of this summary

Returns:
the text value of the atom:summary

getSummaryType

Text.Type getSummaryType()
Returns the summary type

Returns:
the Text.Type of the atom:summary

getTitleElement

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

Returns:
the atom:title element

setTitleElement

Entry setTitleElement(Text title)
RFC4287: The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.

Parameters:
title - the atom:title element

setTitle

Text setTitle(String value)
Sets the value of the title as @type="text"

Parameters:
value - The title value
Returns:
The newly created atom:title element

setTitleAsHtml

Text setTitleAsHtml(String value)
Sets the value of the title as @type="html"

Parameters:
value - The title value
Returns:
The newly created atom:title element

setTitleAsXhtml

Text setTitleAsXhtml(String value)
Sets the value of the title as @type="xhtml"

Parameters:
value - The title value
Returns:
The newly created atom:title element

setTitle

Text setTitle(String value,
              Text.Type type)
Sets the value of the title

Parameters:
value - The title value
type - The Text.Type of the title
Returns:
the newly created atom:title element

setTitle

Text setTitle(Div value)
Sets the value of the title as @type="xhtml"

Parameters:
value - The XHTML div
Returns:
the newly created atom:title element

getTitle

String getTitle()
Returns the text string value of the title element

Returns:
text value of the atom:title

getTitleType

Text.Type getTitleType()
Returns the @type of this entries title

Returns:
the Text.Type of the atom:title

getUpdatedElement

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. Therefore, not all modifications necessarily result in a changed atom:updated value.

Returns:
the atom:updated element

setUpdatedElement

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. Therefore, not all modifications necessarily result in a changed atom:updated value.

Parameters:
updated - the atom:updated element.

getUpdated

Date getUpdated()
Return atom:updated

Returns:
A java.util.Date value

setUpdated

DateTime setUpdated(Date value)
Set the atom:updated value

Parameters:
value - The new value
Returns:
The newly created atom:updated element

setUpdated

DateTime setUpdated(String value)
Set the atom:updated value

Parameters:
value - The new value
Returns:
The newly created atom:updated element

getEditedElement

DateTime getEditedElement()
APP Introduces a new app:edited element whose value changes every time the entry is updated

Returns:
the app:edited element

setEditedElement

void setEditedElement(DateTime modified)
Set the app:edited element

Parameters:
modified - The app:edited element

getEdited

Date getEdited()
Return the value of app:edited

Returns:
app:edited

setEdited

DateTime setEdited(Date value)
Set the value of app:edited

Parameters:
value - The java.util.Date value
Returns:
The newly created app:edited element

setEdited

DateTime setEdited(String value)
Set the value of app:edited

Parameters:
value - the serialized string value for app:edited
Returns:
The newly created app:edited element

getControl

Control getControl(boolean create)
Returns this entries Atom Publishing Protocol control element. A new control element will be created if one currently does not exist

Returns:
The app:control element

getControl

Control getControl()
Returns this entries Atom Publishing Protocol control element

Returns:
The app:control element

setControl

Entry setControl(Control control)
Sets this entries Atom Publishing Protocol control element

Parameters:
control - The app:contorl element

setDraft

Entry setDraft(boolean draft)
Sets whether or not this entry is a draft

Parameters:
draft - true if this entry should be marked as a draft

isDraft

boolean isDraft()
Returns true if this entry is a draft

Returns:
True if this entry is a date

getLink

Link getLink(String rel)
Returns the first link with the specified rel attribute value

Parameters:
rel - The link rel
Returns:
a Link with the specified rel attribute

getAlternateLink

Link getAlternateLink()
Returns this entries first alternate link

Returns:
the Alternate link

getAlternateLink

Link getAlternateLink(String type,
                      String hreflang)
Returns the first alternate link matching the specified type and hreflang

Parameters:
type - The link media type
hreflang - The link target language
Returns:
The matching atom:link
Throws:
MimeTypeParseException
MimeTypeParseException - if the type is malformed

getEnclosureLink

Link getEnclosureLink()
Returns this entries first enclosure link

Returns:
the Enclosure link

getEditLink

Link getEditLink()
Returns this entries first edit link

Returns:
the Edit Link

getEditMediaLink

Link getEditMediaLink()
Returns this entries first edit-media link (if any)

Returns:
the Edit Media Link

getEditMediaLink

Link getEditMediaLink(String type,
                      String hreflang)
Returns the first edit-media link matching the specified type and hreflang

Parameters:
type - a media type
hreflang - a target language
Returns:
A matching atom:link element
Throws:
MimeTypeParseException

getSelfLink

Link getSelfLink()
Returns this entries first self link

Returns:
the Self Link

getLinkResolvedHref

IRI getLinkResolvedHref(String rel)
Return a link href resolved against the in-scope Base URI

Parameters:
rel - The rel attribute value
Returns:
The resolved IRI
Throws:
IRISyntaxException - if the href attribute is malformed

getAlternateLinkResolvedHref

IRI getAlternateLinkResolvedHref()
Return a link href resolved against the in-scope Base URI

Returns:
The resolved IRI
Throws:
IRISyntaxException - if the href attribute is malformed

getAlternateLinkResolvedHref

IRI getAlternateLinkResolvedHref(String type,
                                 String hreflang)
Return a link href resolved against the in-scope Base URI

Parameters:
type - A target type
hreflang - A target language
Returns:
The resolved IRI
Throws:
IRISyntaxException - if the href attribute is malformed

getEnclosureLinkResolvedHref

IRI getEnclosureLinkResolvedHref()
Return a link href resolved against the in-scope Base URI

Returns:
The resolved IRI
Throws:
IRISyntaxException - if the href attribute is malformed

getEditLinkResolvedHref

IRI getEditLinkResolvedHref()
Return a link href resolved against the in-scope Base URI

Returns:
The resolved IRI
Throws:
IRISyntaxException - if the href attribute is malformed

getEditMediaLinkResolvedHref

IRI getEditMediaLinkResolvedHref()
Return a link href resolved against the in-scope Base URI

Returns:
The resolved IRI
Throws:
IRISyntaxException - if the href attribute is malformed

getEditMediaLinkResolvedHref

IRI getEditMediaLinkResolvedHref(String type,
                                 String hreflang)
Return a link href resolved against the in-scope Base URI

Parameters:
type - A target type
hreflang - A target language
Returns:
The resolved IRI
Throws:
IRISyntaxException - if the href attribute is malformed
MimeTypeParseException - if the type is malformed

getSelfLinkResolvedHref

IRI getSelfLinkResolvedHref()
Return a link href resolved against the in-scope Base URI

Returns:
The resolved IRI
Throws:
IRISyntaxException - if the href attribute is malformed

addControl

Control addControl()


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