org.apache.abdera.model
Interface Entry

All Superinterfaces:
Base, java.lang.Cloneable, Element, ExtensibleElement, java.io.Serializable

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
 void addAuthor(Person person)
          Adds an individual author to the entry
 Person addAuthor(java.lang.String name)
          Adds an author
 Person addAuthor(java.lang.String name, java.lang.String email, java.lang.String uri)
          Adds an author
 void addCategory(Category category)
          Adds an individual category to the entry
 Category addCategory(java.lang.String term)
          Adds a category to the entry
 Category addCategory(java.lang.String scheme, java.lang.String term, java.lang.String label)
          Adds a category to the entry
 void addContributor(Person person)
          Adds an individual contributor to this entry
 Person addContributor(java.lang.String name)
          Adds a contributor
 Person addContributor(java.lang.String name, java.lang.String email, java.lang.String uri)
          Adds an author
 void addLink(Link link)
          Adds an individual link to the entry
 Link addLink(java.lang.String href)
           
 Link addLink(java.lang.String href, java.lang.String rel)
           
 Link addLink(java.lang.String href, java.lang.String rel, java.lang.String type, java.lang.String title, java.lang.String hreflang, long length)
           
 Link getAlternateLink()
          Returns this entries first alternate link
 Person getAuthor()
          Returns the first author listed for the entry
 java.util.List<Person> getAuthors()
          Returns the complete set of authors listed for the entry
 java.util.List<Category> getCategories()
          Lists the complete set of categories listed for the entry
 java.util.List<Category> getCategories(java.lang.String scheme)
          Lists the complete set of categories using the specified scheme
 java.lang.String getContent()
          Returns the text of the content element
 Content getContentElement()
          Returns the content for this entry
 Content.Type getContentType()
          Returns the content type
 java.util.List<Person> getContributors()
          Lists the complete set of contributors for this entry
 Control getControl()
          Returns this entries Atom Publishing Protocol control element
 Link getEditLink()
          Returns this entries first edit link
 Link getEnclosureLink()
          Returns this entries first enclosure link
 java.net.URI getId()
          Returns the universally unique identifier for this entry
 IRI getIdElement()
          Returns the universally unique identifier for this entry
 Link getLink(java.lang.String rel)
          Returns the first link with the specified rel attribute value
 java.util.List<Link> getLinks()
          Lists the complete set of links for this entry
 java.util.List<Link> getLinks(java.lang.String rel)
          Lists the complete set of links using the specified rel attribute value
 java.util.Date getPublished()
           
 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...
 java.lang.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
 Source getSource()
          Returns the source element for this entry.
 java.lang.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
 java.lang.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
 java.util.Date getUpdated()
           
 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.
 Content setContent(javax.activation.DataHandler dataHandler)
          Sets the content for this entry
 Content setContent(javax.activation.DataHandler dataHandler, java.lang.String mediatype)
          Sets the content for this entry
 Content setContent(Element value)
          Sets the content for this entry
 Content setContent(Element element, java.lang.String mediaType)
          Sets the content for this entry
 Content setContent(java.lang.String value)
          Sets the content for this entry as @type="text"
 Content setContent(java.lang.String value, Content.Type type)
          Sets the content for this entry
 Content setContent(java.lang.String value, java.lang.String mediatype)
          Sets the content for this entry
 Content setContentAsHtml(java.lang.String value)
          Sets the content for this entry as @type="html"
 Content setContentAsXhtml(java.lang.String value)
          Sets the content for this entry as @type="xhtml"
 void setContentElement(Content content)
          Sets the content for this entry
 void setControl(Control control)
          Sets this entries Atom Publishing Protocol control element
 IRI setId(java.lang.String id)
          Sets the universally unique identifier for this entry
 IRI setId(java.lang.String id, boolean normalize)
          Sets the universally unique identifier for this entry
 void setIdElement(IRI id)
          Sets the universally unique identifier for this entry
 DateTime setPublished(java.util.Date value)
           
 DateTime setPublished(java.lang.String value)
           
 void 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(java.lang.String value)
          Sets the value of the rights as @type="text"
 Text setRights(java.lang.String value, Text.Type type)
          Sets the value of the rights
 Text setRightsAsHtml(java.lang.String value)
          Sets the value of the rights as @type="html"
 Text setRightsAsXhtml(java.lang.String value)
          Sets the value of the rights as @type="xhtml"
 void setRightsElement(Text text)
          The rights element is typically used to convey a human readable copyright (e.g.
 void 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(java.lang.String value)
          Sets the value of the summary as @type="text"
 Text setSummary(java.lang.String value, Text.Type type)
          Sets the value of the summary
 Text setSummaryAsHtml(java.lang.String value)
          Sets the value of the summary as @type="html"
 Text setSummaryAsXhtml(java.lang.String value)
          Sets the value of the summary as @type="xhtml"
 void 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(java.lang.String value)
          Sets the value of the title as @type="text"
 Text setTitle(java.lang.String value, Text.Type type)
          Sets the value of the title
 Text setTitleAsHtml(java.lang.String value)
          Sets the value of the title as @type="html"
 Text setTitleAsXhtml(java.lang.String value)
          Sets the value of the title as @type="xhtml"
 void 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(java.util.Date value)
           
 DateTime setUpdated(java.lang.String value)
           
 void 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, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getSimpleExtension, getSimpleExtension
 
Methods inherited from interface org.apache.abdera.model.Element
discard, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDocument, getExtensionAttributes, getFirstChild, getFirstChild, getLanguage, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setParentElement, setText
 
Methods inherited from interface org.apache.abdera.model.Base
clone, getFactory, writeTo, writeTo
 

Method Detail

getAuthor

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


getAuthors

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


addAuthor

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


addAuthor

Person addAuthor(java.lang.String name)
Adds an author


addAuthor

Person addAuthor(java.lang.String name,
                 java.lang.String email,
                 java.lang.String uri)
                 throws java.net.URISyntaxException
Adds an author

Throws:
java.net.URISyntaxException

getCategories

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


getCategories

java.util.List<Category> getCategories(java.lang.String scheme)
                                       throws java.net.URISyntaxException
Lists the complete set of categories using the specified scheme

Throws:
java.net.URISyntaxException

addCategory

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


addCategory

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


addCategory

Category addCategory(java.lang.String scheme,
                     java.lang.String term,
                     java.lang.String label)
                     throws java.net.URISyntaxException
Adds a category to the entry

Throws:
java.net.URISyntaxException

getContentElement

Content getContentElement()
Returns the content for this entry


setContentElement

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


setContent

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


setContentAsHtml

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


setContentAsXhtml

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


setContent

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


setContent

Content setContent(Element value)
Sets the content for this entry


setContent

Content setContent(Element element,
                   java.lang.String mediaType)
                   throws javax.activation.MimeTypeParseException
Sets the content for this entry

Throws:
javax.activation.MimeTypeParseException

setContent

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

Throws:
javax.activation.MimeTypeParseException

setContent

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

Throws:
javax.activation.MimeTypeParseException

setContent

Content setContent(java.lang.String value,
                   java.lang.String mediatype)
                   throws javax.activation.MimeTypeParseException
Sets the content for this entry

Throws:
javax.activation.MimeTypeParseException

getContent

java.lang.String getContent()
Returns the text of the content element


getContentType

Content.Type getContentType()
Returns the content type


getContributors

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


addContributor

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


addContributor

Person addContributor(java.lang.String name)
Adds a contributor


addContributor

Person addContributor(java.lang.String name,
                      java.lang.String email,
                      java.lang.String uri)
                      throws java.net.URISyntaxException
Adds an author

Throws:
java.net.URISyntaxException

getIdElement

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


setIdElement

void setIdElement(IRI id)
Sets the universally unique identifier for this entry


getId

java.net.URI getId()
                   throws java.net.URISyntaxException
Returns the universally unique identifier for this entry

Throws:
java.net.URISyntaxException

setId

IRI setId(java.lang.String id)
          throws java.net.URISyntaxException
Sets the universally unique identifier for this entry

Throws:
java.net.URISyntaxException

setId

IRI setId(java.lang.String id,
          boolean normalize)
          throws java.net.URISyntaxException
Sets the universally unique identifier for this entry

Throws:
java.net.URISyntaxException

getLinks

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


getLinks

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


addLink

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


addLink

Link addLink(java.lang.String href)
             throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

addLink

Link addLink(java.lang.String href,
             java.lang.String rel)
             throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

addLink

Link addLink(java.lang.String href,
             java.lang.String rel,
             java.lang.String type,
             java.lang.String title,
             java.lang.String hreflang,
             long length)
             throws java.net.URISyntaxException,
                    javax.activation.MimeTypeParseException
Throws:
java.net.URISyntaxException
javax.activation.MimeTypeParseException

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.


setPublishedElement

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


getPublished

java.util.Date getPublished()

setPublished

DateTime setPublished(java.util.Date value)

setPublished

DateTime setPublished(java.lang.String value)

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.


setRightsElement

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


setRights

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


setRightsAsHtml

Text setRightsAsHtml(java.lang.String value)
Sets the value of the rights as @type="html"


setRightsAsXhtml

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


setRights

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


setRights

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


getRights

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


getRightsType

Text.Type getRightsType()
Return the @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.


setSource

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


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.


setSummaryElement

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


setSummary

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


setSummaryAsHtml

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


setSummaryAsXhtml

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


setSummary

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


setSummary

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


getSummary

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


getSummaryType

Text.Type getSummaryType()
Returns the summary type


getTitleElement

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


setTitleElement

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


setTitle

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


setTitleAsHtml

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


setTitleAsXhtml

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


setTitle

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


setTitle

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


getTitle

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


getTitleType

Text.Type getTitleType()
Returns the @type of this entries 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.


setUpdatedElement

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


getUpdated

java.util.Date getUpdated()

setUpdated

DateTime setUpdated(java.util.Date value)

setUpdated

DateTime setUpdated(java.lang.String value)

getControl

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


setControl

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


getLink

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


getAlternateLink

Link getAlternateLink()
Returns this entries first alternate link


getEnclosureLink

Link getEnclosureLink()
Returns this entries first enclosure link


getEditLink

Link getEditLink()
Returns this entries first edit link