|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Entry
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 |
|---|
Person getAuthor()
List<Person> getAuthors()
Entry addAuthor(Person person)
person - The person to addPerson addAuthor(String name)
name - The name of the author
Person addAuthor(String name,
String email,
String uri)
name - The name of the authoremail - The author's email addressuri - A URI belonging to the author
IRISyntaxException - if the URI is malformedList<Category> getCategories()
List<Category> getCategories(String scheme)
IRISyntaxException - if the scheme is malformedEntry addCategory(Category category)
category - The atom:category element to addCategory addCategory(String term)
term - The category term to add
Category addCategory(String scheme,
String term,
String label)
scheme - The category schemeterm - The category termlabel - The human readable label
IRISyntaxException - if the scheme is malformedContent getContentElement()
Entry setContentElement(Content content)
content - The atom:content elementContent setContent(String value)
value - The text value of the content
Content setContentAsHtml(String value)
value - The text value of the content. Special characters will be escaped (e.g. & will become &)
Content setContentAsXhtml(String value)
value - The text value of the content. The text will be parsed as XHTML
Content setContent(String value,
Content.Type type)
value - The text value of the contenttype - The Content Type of the text
Content 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,
String mediaType)
element - The element valuemediaType - The media type of the element
MimeTypeParseException - 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 malformed
Content setContent(javax.activation.DataHandler dataHandler,
String mediatype)
dataHandler - The Data Handler containing the binary content needing Base64 encoding.mediaType - The mediatype of the binary content
MimeTypeParseException - if the media type specified is malformedContent setContent(InputStream inputStream)
inputStream - An inputstream providing binary content
Content setContent(InputStream inputStream,
String mediatype)
inputStream - An inputstream providing binary contentmediaType - The mediatype of the binary content
MimeTypeParseException - if the media type specified is malformed
Content setContent(String value,
String mediatype)
value - the string value of the contentmediatype - the media type for the content
MimeTypeParseException - if the media type is malformed
Content setContent(IRI uri,
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.String getContent()
InputStream getContentStream()
throws IOException
IOExceptionIRI getContentSrc()
IRISyntaxException - if the src attribute is invalidContent.Type getContentType()
javax.activation.MimeType getContentMimeType()
List<Person> getContributors()
Entry addContributor(Person person)
person - The atom:contributor elementPerson addContributor(String name)
name - The contributor name
Person addContributor(String name,
String email,
String uri)
name - The contributor nameemail - The contributor's email addressuri - The contributor's URI
IRISyntaxException - 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(String id)
id - The atom:id value
IRISyntaxException - if the atom:id value is malformedIRIElement newId()
IRIElement setId(String id,
boolean normalize)
id - The atom:id valuenormalize - true if the atom:id value should be normalized as called for by RFC4287
IRISyntaxException - if the atom:id value is malformedList<Link> getLinks()
List<Link> getLinks(String rel)
rel - The rel attribute value to look for
List<Link> getLinks(String... rel)
rels - A listing of link relations
Entry addLink(Link link)
link - the atom:link to addLink addLink(String href)
href - The IRI of the link
IRISyntaxException - if the href is malformed
Link addLink(String href,
String rel)
href - The IRI of the linkrel - The link rel attribute
IRISyntaxException - if the href is malformed
Link addLink(String href,
String rel,
String type,
String title,
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 resource
IRISyntaxException - if the href is malformedDateTime getPublishedElement()
Entry setPublishedElement(DateTime dateTime)
dateTime - the atom:published elementDate getPublished()
DateTime setPublished(Date value)
value - The java.util.Date
DateTime setPublished(String value)
value - The serialized date
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.
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(String value)
value - The text value of the atom:rights element
Text setRightsAsHtml(String value)
value - The text value of the atom:rights element.
Text setRightsAsXhtml(String value)
value - The text value of the atom:rights element
Text setRights(String value,
Text.Type type)
value - The text value of the atom:rights elementtype - The text type
Text setRights(Div value)
value - The XHTML div for the atom:rights element
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(String value)
value - The text value of the atom:summary element
Text setSummaryAsHtml(String value)
value - The text value of the atom:summary element
Text setSummaryAsXhtml(String value)
value - The text value of the atom:summary element
Text setSummary(String value,
Text.Type type)
value - The text value of the atom:summary elementtype - The Text.Type of the atom:summary element
Text setSummary(Div value)
value - The XHTML div
String getSummary()
Text.Type getSummaryType()
Text getTitleElement()
Entry setTitleElement(Text title)
title - the atom:title elementText setTitle(String value)
value - The title value
Text setTitleAsHtml(String value)
value - The title value
Text setTitleAsXhtml(String value)
value - The title value
Text setTitle(String value,
Text.Type type)
value - The title valuetype - The Text.Type of the title
Text setTitle(Div value)
value - The XHTML div
String getTitle()
Text.Type getTitleType()
DateTime getUpdatedElement()
Entry setUpdatedElement(DateTime updated)
updated - the atom:updated element.Date getUpdated()
DateTime setUpdated(Date value)
value - The new value
DateTime setUpdated(String value)
value - The new value
DateTime getEditedElement()
void setEditedElement(DateTime modified)
modified - The app:edited elementDate getEdited()
DateTime setEdited(Date value)
value - The java.util.Date value
DateTime setEdited(String value)
value - the serialized string value for app:edited
Control 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(String rel)
rel - The link rel
Link getAlternateLink()
Link getAlternateLink(String type,
String hreflang)
type - The link media typehreflang - The link target language
MimeTypeParseException
MimeTypeParseException - if the type is malformedLink getEnclosureLink()
Link getEditLink()
Link getEditMediaLink()
Link getEditMediaLink(String type,
String hreflang)
type - a media typehreflang - a target language
MimeTypeParseExceptionLink getSelfLink()
IRI getLinkResolvedHref(String rel)
rel - The rel attribute value
IRISyntaxException - if the href attribute is malformedIRI getAlternateLinkResolvedHref()
IRISyntaxException - if the href attribute is malformed
IRI getAlternateLinkResolvedHref(String type,
String hreflang)
type - A target typehreflang - A target language
IRISyntaxException - 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 malformed
IRI getEditMediaLinkResolvedHref(String type,
String hreflang)
type - A target typehreflang - A target language
IRISyntaxException - if the href attribute is malformed
MimeTypeParseException - if the type is malformedIRI getSelfLinkResolvedHref()
IRISyntaxException - if the href attribute is malformedControl addControl()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||