|
|||||||||
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 | |
---|---|
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)
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 |
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 |
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 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 |
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(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" |
void |
setContentElement(Content content)
Sets the content for this entry |
void |
setControl(Control control)
Sets this entries Atom Publishing Protocol control element |
void |
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 |
void |
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 |
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)
Set the atom:updated value |
DateTime |
setUpdated(java.lang.String value)
Set the atom:updated 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 |
---|
declareNS, discard, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDocument, getExtensionAttributes, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, 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 |
---|
addComment, clone, getFactory, writeTo, writeTo |
Method Detail |
---|
Person getAuthor()
java.util.List<Person> getAuthors()
void addAuthor(Person person)
person
- The person to addPerson addAuthor(java.lang.String name)
name
- The name of the author
Person addAuthor(java.lang.String name, java.lang.String email, java.lang.String uri) throws IRISyntaxException
name
- The name of the authoremail
- The author's email addressuri
- A URI belonging to the author
IRISyntaxException
- if the URI is malformedjava.util.List<Category> getCategories()
java.util.List<Category> getCategories(java.lang.String scheme) throws IRISyntaxException
IRISyntaxException
- if the scheme is malformedvoid addCategory(Category category)
category
- The atom:category element to addCategory addCategory(java.lang.String term)
term
- The category term to add
Category addCategory(java.lang.String scheme, java.lang.String term, java.lang.String label) throws IRISyntaxException
scheme
- The category schemeterm
- The category termlabel
- The human readable label
IRISyntaxException
- if the scheme is malformedContent getContentElement()
void setContentElement(Content content)
content
- The atom:content elementContent setContent(java.lang.String value)
value
- The text value of the content
Content 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 XHTML
Content setContent(java.lang.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, java.lang.String mediaType) throws javax.activation.MimeTypeParseException
element
- The element valuemediaType
- The media type of the element
javax.activation.MimeTypeParseException
- if the mediaType is malformedContent setContent(javax.activation.DataHandler dataHandler) throws javax.activation.MimeTypeParseException
dataHandler
- The Data Handler containing the binary content needing Base64 encoding.
javax.activation.MimeTypeParseException
- if the media Type specified by the dataHandler is malformedContent setContent(javax.activation.DataHandler dataHandler, java.lang.String mediatype) throws javax.activation.MimeTypeParseException
dataHandler
- The Data Handler containing the binary content needing Base64 encoding.
javax.activation.MimeTypeParseException
- if the media type specified is malformedContent setContent(java.lang.String value, java.lang.String mediatype) throws javax.activation.MimeTypeParseException
value
- the string value of the contentmediatype
- the media type for the content
javax.activation.MimeTypeParseException
- if the media type is malformedContent setContent(IRI uri, java.lang.String mediatype) throws javax.activation.MimeTypeParseException, IRISyntaxException
uri
- URI of the content (value of the "src" attribute).mediatype
- Type of the content.
javax.activation.MimeTypeParseException
- if the mime type is invalid.
IRISyntaxException
- if the URI is invalid.java.lang.String getContent()
IRI getContentSrc() throws IRISyntaxException
IRISyntaxException
- if the src attribute is invalidContent.Type getContentType()
javax.activation.MimeType getContentMimeType()
java.util.List<Person> getContributors()
void addContributor(Person person)
person
- The atom:contributor elementPerson addContributor(java.lang.String name)
name
- The contributor name
Person addContributor(java.lang.String name, java.lang.String email, java.lang.String uri) throws IRISyntaxException
name
- The contributor nameemail
- The contributor's email addressuri
- The contributor's URI
IRISyntaxException
- if the uri is malformedIRIElement getIdElement()
void setIdElement(IRIElement id)
id
- The atom:id elementIRI getId() throws IRISyntaxException
IRISyntaxException
- if the atom:id value is malformedIRIElement setId(java.lang.String id) throws IRISyntaxException
id
- The atom:id value
IRISyntaxException
- if the atom:id value is malformedIRIElement setId(java.lang.String id, boolean normalize) throws IRISyntaxException
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 malformedjava.util.List<Link> getLinks()
java.util.List<Link> getLinks(java.lang.String rel)
rel
- The rel attribute value to look for
void addLink(Link link)
link
- the atom:link to addLink addLink(java.lang.String href) throws IRISyntaxException
href
- The IRI of the link
IRISyntaxException
- if the href is malformedLink addLink(java.lang.String href, java.lang.String rel) throws IRISyntaxException
href
- The IRI of the linkrel
- The link rel attribute
IRISyntaxException
- 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) throws IRISyntaxException, javax.activation.MimeTypeParseException
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 malformed
javax.activation.MimeTypeParseException
DateTime getPublishedElement()
void setPublishedElement(DateTime dateTime)
dateTime
- the atom:published elementjava.util.Date getPublished()
DateTime setPublished(java.util.Date value)
value
- The java.util.Date
DateTime setPublished(java.lang.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.
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.
text
- The atom:rights elementText setRights(java.lang.String value)
value
- The text value of the atom:rights element
Text 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 element
Text setRights(java.lang.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
java.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.
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.
source
- The atom:source elementText getSummaryElement()
void setSummaryElement(Text text)
text
- The atom:summary elementText setSummary(java.lang.String value)
value
- The text value of the atom:summary element
Text setSummaryAsHtml(java.lang.String value)
value
- The text value of the atom:summary element
Text setSummaryAsXhtml(java.lang.String value)
value
- The text value of the atom:summary element
Text setSummary(java.lang.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
java.lang.String getSummary()
Text.Type getSummaryType()
Text getTitleElement()
void setTitleElement(Text title)
title
- the atom:title elementText setTitle(java.lang.String value)
value
- The title value
Text setTitleAsHtml(java.lang.String value)
value
- The title value
Text setTitleAsXhtml(java.lang.String value)
value
- The title value
Text setTitle(java.lang.String value, Text.Type type)
value
- The title valuetype
- The Text.Type of the title
Text setTitle(Div value)
value
- The XHTML div
java.lang.String getTitle()
Text.Type getTitleType()
DateTime getUpdatedElement()
void setUpdatedElement(DateTime updated)
updated
- the atom:updated element.java.util.Date getUpdated()
DateTime setUpdated(java.util.Date value)
value
- The new value
DateTime setUpdated(java.lang.String value)
value
- The new value
DateTime getEditedElement()
void setEditedElement(DateTime modified)
modified
- The app:edited elementjava.util.Date getEdited()
DateTime setEdited(java.util.Date value)
value
- The java.util.Date value
DateTime setEdited(java.lang.String value)
value
- the serialized string value for app:edited
Control getControl()
void setControl(Control control)
control
- The app:contorl elementvoid setDraft(boolean draft)
draft
- true if this entry should be marked as a draftboolean isDraft()
Link getLink(java.lang.String rel)
rel
- The link rel
Link getAlternateLink()
Link getAlternateLink(java.lang.String type, java.lang.String hreflang) throws javax.activation.MimeTypeParseException
type
- The link media typehreflang
- The link target language
javax.activation.MimeTypeParseException
javax.activation.MimeTypeParseException
- if the type is malformedLink getEnclosureLink()
Link getEditLink()
Link getEditMediaLink()
Link getEditMediaLink(java.lang.String type, java.lang.String hreflang) throws javax.activation.MimeTypeParseException
type
- a media typehreflang
- a target language
javax.activation.MimeTypeParseException
Link getSelfLink()
IRI getLinkResolvedHref(java.lang.String rel) throws IRISyntaxException
rel
- The rel attribute value
IRISyntaxException
- if the href attribute is malformedIRI getAlternateLinkResolvedHref() throws IRISyntaxException
IRISyntaxException
- if the href attribute is malformedIRI getAlternateLinkResolvedHref(java.lang.String type, java.lang.String hreflang) throws IRISyntaxException, javax.activation.MimeTypeParseException
type
- A target typehreflang
- A target language
IRISyntaxException
- if the href attribute is malformed
javax.activation.MimeTypeParseException
IRI getEnclosureLinkResolvedHref() throws IRISyntaxException
IRISyntaxException
- if the href attribute is malformedIRI getEditLinkResolvedHref() throws IRISyntaxException
IRISyntaxException
- if the href attribute is malformedIRI getEditMediaLinkResolvedHref() throws IRISyntaxException
IRISyntaxException
- if the href attribute is malformedIRI getEditMediaLinkResolvedHref(java.lang.String type, java.lang.String hreflang) throws IRISyntaxException, javax.activation.MimeTypeParseException
type
- A target typehreflang
- A target language
IRISyntaxException
- if the href attribute is malformed
javax.activation.MimeTypeParseException
- if the type is malformedIRI getSelfLinkResolvedHref() throws IRISyntaxException
IRISyntaxException
- if the href attribute is malformed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |