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.
| Modifier and Type | Method and Description |
|---|---|
Entry |
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
|
Entry |
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
|
Entry |
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
|
Control |
addControl() |
Entry |
addLink(Link link)
Adds an individual link to the entry
|
Link |
addLink(java.lang.String href)
Add a link to the entry
|
Link |
addLink(java.lang.String href,
java.lang.String rel)
Add a link to the entry
|
Link |
addLink(java.lang.String href,
java.lang.String rel,
java.lang.String type,
java.lang.String title,
java.lang.String hreflang,
long length)
Add a link to the entry
|
Link |
getAlternateLink()
Returns this entries first alternate link
|
Link |
getAlternateLink(java.lang.String type,
java.lang.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(java.lang.String type,
java.lang.String hreflang)
Return a link href resolved against the in-scope Base URI
|
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 A listing of atom:category elements using the
specified scheme
|
java.lang.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
|
java.io.InputStream |
getContentStream()
Returns an input stream from the content element value.
|
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
|
Control |
getControl(boolean create)
Returns this entries Atom Publishing Protocol control element.
|
java.util.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(java.lang.String type,
java.lang.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(java.lang.String type,
java.lang.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(java.lang.String rel)
Returns the first link with the specified rel attribute value
|
IRI |
getLinkResolvedHref(java.lang.String rel)
Return a link href resolved against the in-scope Base URI
|
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 attributes values
|
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()
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...
|
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
|
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.
|
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()
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,
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.io.InputStream inputStream)
Sets the content for this entry
|
Content |
setContent(java.io.InputStream inputStream,
java.lang.String mediatype)
Sets the content for this entry
|
Content |
setContent(IRI uri,
java.lang.String mediatype)
Sets the content for this entry as out of line.
|
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"
|
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(java.util.Date value)
Set the value of app:edited
|
DateTime |
setEdited(java.lang.String value)
Set the value of app:edited
|
void |
setEditedElement(DateTime modified)
Set the app:edited element
|
IRIElement |
setId(java.lang.String id)
Sets the universally unique identifier for this entry
|
IRIElement |
setId(java.lang.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(java.util.Date value)
Set the value of the atom:published element
|
DateTime |
setPublished(java.lang.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(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"
|
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(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"
|
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(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"
|
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(java.util.Date value)
Set the atom:updated value
|
DateTime |
setUpdated(java.lang.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.
|
addExtension, addExtension, addExtension, addExtension, addExtension, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getSimpleExtension, getSimpleExtensiondeclareNS, 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, setTextPerson getAuthor()
java.util.List<Person> getAuthors()
Entry addAuthor(Person person)
person - The person to addPerson addAuthor(java.lang.String name)
name - The name of the authorPerson addAuthor(java.lang.String name, java.lang.String email, java.lang.String uri)
name - The name of the authoremail - The author's email addressuri - A URI belonging to the authorIRISyntaxException - if the URI is malformedjava.util.List<Category> getCategories()
java.util.List<Category> getCategories(java.lang.String scheme)
IRISyntaxException - if the scheme is malformedEntry addCategory(Category category)
category - The atom:category element to addCategory addCategory(java.lang.String term)
term - The category term to addCategory addCategory(java.lang.String scheme, java.lang.String term, java.lang.String label)
scheme - The category schemeterm - The category termlabel - The human readable labelIRISyntaxException - if the scheme is malformedContent getContentElement()
Entry setContentElement(Content content)
content - The atom:content elementContent setContent(java.lang.String value)
value - The text value of the contentContent setContentAsHtml(java.lang.String value)
value - The text value of the content. Special characters will be escaped (e.g. & will become &)Content setContentAsXhtml(java.lang.String value)
value - The text value of the content. The text will be parsed as XHTMLContent setContent(java.lang.String value, Content.Type type)
value - The text value of the contenttype - The Content Type of the textContent setContent(Element value)
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"Content setContent(Element element, java.lang.String mediaType)
element - The element valuemediaType - The media type of the elementMimeTypeParseException - if the mediaType is malformedContent setContent(javax.activation.DataHandler dataHandler)
dataHandler - The Data Handler containing the binary content needing Base64 encoding.MimeTypeParseException - if the media Type specified by the dataHandler is malformedContent setContent(javax.activation.DataHandler dataHandler, java.lang.String mediatype)
dataHandler - The Data Handler containing the binary content needing Base64 encoding.mediaType - The mediatype of the binary contentMimeTypeParseException - if the media type specified is malformedContent setContent(java.io.InputStream inputStream)
inputStream - An inputstream providing binary contentContent setContent(java.io.InputStream inputStream, java.lang.String mediatype)
inputStream - An inputstream providing binary contentmediaType - The mediatype of the binary contentMimeTypeParseException - if the media type specified is malformedContent setContent(java.lang.String value, java.lang.String mediatype)
value - the string value of the contentmediatype - the media type for the contentMimeTypeParseException - if the media type is malformedContent setContent(IRI uri, java.lang.String mediatype)
uri - URI of the content (value of the "src" attribute).mediatype - Type of the content.MimeTypeParseException - if the mime type is invalid.IRISyntaxException - if the URI is invalid.java.lang.String getContent()
java.io.InputStream getContentStream()
throws java.io.IOException
java.io.IOExceptionIRI getContentSrc()
IRISyntaxException - if the src attribute is invalidContent.Type getContentType()
javax.activation.MimeType getContentMimeType()
java.util.List<Person> getContributors()
Entry addContributor(Person person)
person - The atom:contributor elementPerson addContributor(java.lang.String name)
name - The contributor namePerson addContributor(java.lang.String name, java.lang.String email, java.lang.String uri)
name - The contributor nameemail - The contributor's email addressuri - The contributor's URIIRISyntaxException - if the uri is malformedIRIElement getIdElement()
Entry setIdElement(IRIElement id)
id - The atom:id elementIRI getId()
IRISyntaxException - if the atom:id value is malformedIRIElement setId(java.lang.String id)
id - The atom:id valueIRISyntaxException - if the atom:id value is malformedIRIElement newId()
IRIElement setId(java.lang.String id, boolean normalize)
id - The atom:id valuenormalize - true if the atom:id value should be normalized as called for by RFC4287IRISyntaxException - if the atom:id value is malformedjava.util.List<Link> getLinks()
java.util.List<Link> getLinks(java.lang.String rel)
rel - The rel attribute value to look forjava.util.List<Link> getLinks(java.lang.String... rel)
rels - A listing of link relationsEntry addLink(Link link)
link - the atom:link to addLink addLink(java.lang.String href)
href - The IRI of the linkIRISyntaxException - if the href is malformedLink addLink(java.lang.String href, java.lang.String rel)
href - The IRI of the linkrel - The link rel attributeIRISyntaxException - if the href is malformedLink addLink(java.lang.String href, java.lang.String rel, java.lang.String type, java.lang.String title, java.lang.String hreflang, long length)
href - The IRI of the linkrel - The link rel attributetype - The media type of the linkhreflang - The language of the targetlength - The length of the resourceIRISyntaxException - if the href is malformedDateTime getPublishedElement()
Entry setPublishedElement(DateTime dateTime)
dateTime - the atom:published elementjava.util.Date getPublished()
DateTime setPublished(java.util.Date value)
value - The java.util.DateDateTime setPublished(java.lang.String value)
value - The serialized dateText 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.
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.
text - The atom:rights elementText setRights(java.lang.String value)
value - The text value of the atom:rights elementText setRightsAsHtml(java.lang.String value)
value - The text value of the atom:rights element.Text setRightsAsXhtml(java.lang.String value)
value - The text value of the atom:rights elementText setRights(java.lang.String value, Text.Type type)
value - The text value of the atom:rights elementtype - The text typeText setRights(Div value)
value - The XHTML div for the atom:rights elementjava.lang.String getRights()
Text.Type getRightsType()
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.
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.
source - The atom:source elementText getSummaryElement()
Entry setSummaryElement(Text text)
text - The atom:summary elementText setSummary(java.lang.String value)
value - The text value of the atom:summary elementText setSummaryAsHtml(java.lang.String value)
value - The text value of the atom:summary elementText setSummaryAsXhtml(java.lang.String value)
value - The text value of the atom:summary elementText setSummary(java.lang.String value, Text.Type type)
value - The text value of the atom:summary elementtype - The Text.Type of the atom:summary elementText setSummary(Div value)
value - The XHTML divjava.lang.String getSummary()
Text.Type getSummaryType()
Text getTitleElement()
Entry setTitleElement(Text title)
title - the atom:title elementText setTitle(java.lang.String value)
value - The title valueText setTitleAsHtml(java.lang.String value)
value - The title valueText setTitleAsXhtml(java.lang.String value)
value - The title valueText setTitle(java.lang.String value, Text.Type type)
value - The title valuetype - The Text.Type of the titleText setTitle(Div value)
value - The XHTML divjava.lang.String getTitle()
Text.Type getTitleType()
DateTime getUpdatedElement()
Entry setUpdatedElement(DateTime updated)
updated - the atom:updated element.java.util.Date getUpdated()
DateTime setUpdated(java.util.Date value)
value - The new valueDateTime setUpdated(java.lang.String value)
value - The new valueDateTime getEditedElement()
void setEditedElement(DateTime modified)
modified - The app:edited elementjava.util.Date getEdited()
DateTime setEdited(java.util.Date value)
value - The java.util.Date valueDateTime setEdited(java.lang.String value)
value - the serialized string value for app:editedControl getControl(boolean create)
Control getControl()
Entry setControl(Control control)
control - The app:contorl elementEntry setDraft(boolean draft)
draft - true if this entry should be marked as a draftboolean isDraft()
Link getLink(java.lang.String rel)
rel - The link relLink getAlternateLink()
Link getAlternateLink(java.lang.String type, java.lang.String hreflang)
type - The link media typehreflang - The link target languageMimeTypeParseExceptionMimeTypeParseException - if the type is malformedLink getEnclosureLink()
Link getEditLink()
Link getEditMediaLink()
Link getEditMediaLink(java.lang.String type, java.lang.String hreflang)
type - a media typehreflang - a target languageMimeTypeParseExceptionLink getSelfLink()
IRI getLinkResolvedHref(java.lang.String rel)
rel - The rel attribute valueIRISyntaxException - if the href attribute is malformedIRI getAlternateLinkResolvedHref()
IRISyntaxException - if the href attribute is malformedIRI getAlternateLinkResolvedHref(java.lang.String type, java.lang.String hreflang)
type - A target typehreflang - A target languageIRISyntaxException - if the href attribute is malformedIRI getEnclosureLinkResolvedHref()
IRISyntaxException - if the href attribute is malformedIRI getEditLinkResolvedHref()
IRISyntaxException - if the href attribute is malformedIRI getEditMediaLinkResolvedHref()
IRISyntaxException - if the href attribute is malformedIRI getEditMediaLinkResolvedHref(java.lang.String type, java.lang.String hreflang)
type - A target typehreflang - A target languageIRISyntaxException - if the href attribute is malformedMimeTypeParseException - if the type is malformedIRI getSelfLinkResolvedHref()
IRISyntaxException - if the href attribute is malformedControl addControl()
Copyright © 2010 - 2023 Adobe. All Rights Reserved