public interface Source extends ExtensibleElement
Per 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. atomSource = element atom:source { atomCommonAttributes, (atomAuthor* & atomCategory* & atomContributor* & atomGenerator? & atomIcon? & atomId? & atomLink* & atomLogo? & atomRights? & atomSubtitle? & atomTitle? & atomUpdated? & extensionElement*) } The atom:source element is designed to allow the aggregation of entries from different feeds while retaining information about an entry's source feed. For this reason, Atom Processors that are performing such aggregation SHOULD include at least the required feed-level Metadata elements (atom:id, atom:title, and atom:updated) in the atom:source element.
Modifier and Type | Method and Description |
---|---|
<T extends Source> |
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 iri)
Adds an author
|
<T extends Source> |
addCategory(Category category)
Adds an individual category to the entry
|
Category |
addCategory(java.lang.String term)
Adds a category to the feed
|
Category |
addCategory(java.lang.String scheme,
java.lang.String term,
java.lang.String label)
Adds a category to the feed
|
<T extends Source> |
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 iri)
Adds a contributor
|
<T extends Source> |
addLink(Link link)
Adds an individual link to the entry
|
Link |
addLink(java.lang.String href)
Adds an individual link element
|
Link |
addLink(java.lang.String href,
java.lang.String rel)
Adds an individual link element
|
Link |
addLink(java.lang.String href,
java.lang.String rel,
java.lang.String type,
java.lang.String title,
java.lang.String hreflang,
long length)
Adds an individual link element
|
Link |
getAlternateLink()
Returns this entries first alternate link
|
Link |
getAlternateLink(java.lang.String type,
java.lang.String hreflang) |
IRI |
getAlternateLinkResolvedHref() |
IRI |
getAlternateLinkResolvedHref(java.lang.String type,
java.lang.String hreflang) |
Feed |
getAsFeed()
Convert the Source element into an empty Feed element
|
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
|
Collection |
getCollection()
Return an app:collection element associatd with this atom:source.
|
java.util.List<Person> |
getContributors()
Lists the complete set of contributors for this entry
|
Generator |
getGenerator()
RFC4287: The "atom:generator" element's content identifies the
agent used to generate a feed, for debugging and other purposes.
|
IRI |
getIcon()
RFC4287: The "atom:icon" element's content is an IRI reference
[RFC3987] that identifies an image that provides iconic visual
identification for a feed...
|
IRIElement |
getIconElement()
RFC4287: The "atom:icon" element's content is an IRI reference
[RFC3987] that identifies an image that provides iconic visual
identification for a feed...
|
IRI |
getId()
Returns the universally unique identifier for this feed
|
IRIElement |
getIdElement()
RFC4287: The "atom:id" element conveys a permanent, universally unique
identifier for an entry or feed.
|
Link |
getLink(java.lang.String rel)
Returns the first link with the specified rel attribute value
|
IRI |
getLinkResolvedHref(java.lang.String rel) |
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
|
IRI |
getLogo()
RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987]
that identifies an image that provides visual identification for a feed.
|
IRIElement |
getLogoElement()
RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987]
that identifies an image that provides visual identification for a feed.
|
java.lang.String |
getRights()
Returns the text of atom:rights
|
Text |
getRightsElement()
The rights element is typically used to convey a human readable
copyright (e.g.
|
Text.Type |
getRightsType()
Returns the type of atom:rights
|
Link |
getSelfLink()
Returns the first link using the rel attribute value "self"
|
IRI |
getSelfLinkResolvedHref() |
java.lang.String |
getSubtitle()
Returns the text value of atom:subtitle
|
Text |
getSubtitleElement()
RFC4287: The "atom:subtitle" element is a Text construct that
conveys a human-readable description or subtitle for a feed.
|
Text.Type |
getSubtitleType()
Returns the atom:subtitle type
|
java.lang.String |
getTitle()
Returns the text of atom:title
|
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 atom:title
|
java.util.Date |
getUpdated()
Return the atom:updated value
|
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.
|
java.lang.String |
getUpdatedString()
Return the atom:updated value
|
IRIElement |
newId()
Creates a new randomized atom:id for the entry
|
<T extends Source> |
setCollection(Collection collection)
Set the app:collection element
|
<T extends Source> |
setGenerator(Generator generator)
RFC4287: The "atom:generator" element's content identifies the
agent used to generate a feed, for debugging and other purposes.
|
Generator |
setGenerator(java.lang.String iri,
java.lang.String version,
java.lang.String value)
RFC4287: The "atom:generator" element's content identifies the
agent used to generate a feed, for debugging and other purposes.
|
IRIElement |
setIcon(java.lang.String iri)
RFC4287: The "atom:icon" element's content is an IRI reference
[RFC3987] that identifies an image that provides iconic visual
identification for a feed...
|
<T extends Source> |
setIconElement(IRIElement iri)
RFC4287: The "atom:icon" element's content is an IRI reference
[RFC3987] that identifies an image that provides iconic visual
identification for a feed...
|
IRIElement |
setId(java.lang.String id)
Sets the universally unique identifier for this feed
|
IRIElement |
setId(java.lang.String id,
boolean normalize)
Sets the universally unique identifier for this feed
|
<T extends Source> |
setIdElement(IRIElement id)
RFC4287: The "atom:id" element conveys a permanent, universally unique
identifier for an entry or feed.
|
IRIElement |
setLogo(java.lang.String iri)
RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987]
that identifies an image that provides visual identification for a feed.
|
<T extends Source> |
setLogoElement(IRIElement iri)
RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987]
that identifies an image that provides visual identification for a feed.
|
Text |
setRights(Div value)
Sets the value of the rights 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"
|
<T extends Source> |
setRightsElement(Text text)
The rights element is typically used to convey a human readable
copyright (e.g.
|
Text |
setSubtitle(Div value)
Sets the value of the subtitle as @type="xhtml"
|
Text |
setSubtitle(java.lang.String value)
Sets the value of the subtitle as @type="text"
|
Text |
setSubtitle(java.lang.String value,
Text.Type type)
Sets the value of the subtitle
|
Text |
setSubtitleAsHtml(java.lang.String value)
Sets the value of the subtitle as @type="html"
|
Text |
setSubtitleAsXhtml(java.lang.String value)
Sets the value of the subtitle as @type="xhtml"
|
<T extends Source> |
setSubtitleElement(Text text)
RFC4287: The "atom:subtitle" element is a Text construct that
conveys a human-readable description or subtitle for a feed.
|
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"
|
<T extends Source> |
setTitleElement(Text text)
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
|
<T extends Source> |
setUpdatedElement(DateTime dateTime)
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, getSimpleExtension
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
Person getAuthor()
java.util.List<Person> getAuthors()
<T extends Source> T addAuthor(Person person)
person
- an atom:author elementPerson addAuthor(java.lang.String name)
name
- The author namePerson addAuthor(java.lang.String name, java.lang.String email, java.lang.String iri)
name
- The author nameemail
- The author emailiri
- The author iriIRISyntaxException
- if the iri is malformedjava.util.List<Category> getCategories()
java.util.List<Category> getCategories(java.lang.String scheme)
scheme
- A Scheme IRIIRISyntaxException
- if the scheme is malformed<T extends Source> T addCategory(Category category)
category
- A atom:category elementCategory addCategory(java.lang.String term)
term
- A category termCategory addCategory(java.lang.String scheme, java.lang.String term, java.lang.String label)
scheme
- A category schemeterm
- A category termlabel
- The human readable labelIRISyntaxException
- if the scheme is malformedjava.util.List<Person> getContributors()
<T extends Source> T addContributor(Person person)
person
- a atom:contributor elementPerson addContributor(java.lang.String name)
name
- The name of a contributorPerson addContributor(java.lang.String name, java.lang.String email, java.lang.String iri)
name
- The contributor nameemail
- The contributor emailiri
- The contributor uriIRISyntaxException
- if the iri is malformedGenerator getGenerator()
<T extends Source> T setGenerator(Generator generator)
generator
- A atom:generator elementGenerator setGenerator(java.lang.String iri, java.lang.String version, java.lang.String value)
iri
- The iri attributeversion
- The version attributevalue
- The value attributeIRISyntaxException
- if the iri is malformedIRIElement getIconElement()
<T extends Source> T setIconElement(IRIElement iri)
iri
- The atom:icon elementIRIElement setIcon(java.lang.String iri)
iri
- The atom:icon IRI valueIRISyntaxException
- if the iri is malformedIRI getIcon()
IRISyntaxException
- if the atom:icon value is malformedIRIElement getIdElement()
<T extends Source> T setIdElement(IRIElement id)
id
- A atom:id elementIRI getId()
IRISyntaxException
- if the atom:id is malformedIRIElement setId(java.lang.String id)
id
- The atom:id valueIRISyntaxException
- if the id is malformedIRIElement newId()
IRIElement setId(java.lang.String id, boolean normalize)
id
- The atom:id valuenormalize
- True if the atom:id value should be normalizedIRISyntaxException
- if the id is malformedjava.util.List<Link> getLinks()
java.util.List<Link> getLinks(java.lang.String rel)
rel
- A link relationjava.util.List<Link> getLinks(java.lang.String... rel)
rels
- A listing of link relations<T extends Source> T addLink(Link link)
link
- A atom:link elementLink addLink(java.lang.String href)
href
- The href IRI of the linkIRISyntaxException
- if the href is malformedLink addLink(java.lang.String href, java.lang.String rel)
href
- The href 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 href IRI of the linkrel
- The link rel attributetype
- The link type attributehreflang
- The link hreflang attributelength
- The length attributeIRISyntaxException
- if the href is malformedIRIElement getLogoElement()
<T extends Source> T setLogoElement(IRIElement iri)
iri
- The atom:logo elementIRIElement setLogo(java.lang.String iri)
iri
- The atom:logo valueIRISyntaxException
- if the iri is malformedIRI getLogo()
IRISyntaxException
- if the atom:logo value is malformedText 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.
<T extends Source> T 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 atom:rights text valueText setRightsAsHtml(java.lang.String value)
value
- The atom:rights text valueText setRightsAsXhtml(java.lang.String value)
value
- The atom:rights text valueText setRights(java.lang.String value, Text.Type type)
value
- The atom:rights text valuetype
- The atom:rights text typeText setRights(Div value)
value
- The XHTML div elementjava.lang.String getRights()
Text.Type getRightsType()
Text getSubtitleElement()
<T extends Source> T setSubtitleElement(Text text)
text
- A atom:subtitle elementText setSubtitle(java.lang.String value)
value
- the value of the atom:subtitle elementText setSubtitleAsHtml(java.lang.String value)
value
- The value of the atom:subtitle elementText setSubtitleAsXhtml(java.lang.String value)
value
- The value of the atom:subtitle elementText setSubtitle(java.lang.String value, Text.Type type)
value
- The value of the atom:subtitle elementtype
- The atom:subtitle Text.TypeText setSubtitle(Div value)
value
- The atom:subtitle elementjava.lang.String getSubtitle()
Text.Type getSubtitleType()
Text getTitleElement()
<T extends Source> T setTitleElement(Text text)
text
- The atom:title elementText setTitle(java.lang.String value)
value
- The atom:title valueText setTitleAsHtml(java.lang.String value)
value
- The atom:title valueText setTitleAsXhtml(java.lang.String value)
value
- The atom:title valueText setTitle(java.lang.String value, Text.Type type)
value
- The atom:title valuetype
- The atom:title Text.TypeText setTitle(Div value)
value
- The XHTML divjava.lang.String getTitle()
Text.Type getTitleType()
DateTime getUpdatedElement()
<T extends Source> T setUpdatedElement(DateTime dateTime)
dateTime
- A atom:updated elementjava.lang.String getUpdatedString()
java.util.Date getUpdated()
DateTime setUpdated(java.util.Date value)
value
- The java.util.DateDateTime setUpdated(java.lang.String value)
value
- The serialized string dateLink getLink(java.lang.String rel)
rel
- A link relationLink getSelfLink()
Link getAlternateLink()
Link getAlternateLink(java.lang.String type, java.lang.String hreflang)
type
- A media typehreflang
- A target languageMimeTypeParseException
- if the type if malformedIRI getLinkResolvedHref(java.lang.String rel)
rel
- A link relationIRI getSelfLinkResolvedHref()
IRI getAlternateLinkResolvedHref()
IRI getAlternateLinkResolvedHref(java.lang.String type, java.lang.String hreflang)
type
- A media typehreflang
- A target languageMimeTypeParseException
- if the type if malformedCollection getCollection()
<T extends Source> T setCollection(Collection collection)
collection
- An app:collection elementFeed getAsFeed()
Copyright © 2010 - 2020 Adobe. All Rights Reserved