|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Source
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.
Method Summary | ||
---|---|---|
|
addAuthor(Person person)
Adds an individual author to the entry |
|
Person |
addAuthor(String name)
Adds an author |
|
Person |
addAuthor(String name,
String email,
String iri)
Adds an author |
|
|
addCategory(Category category)
Adds an individual category to the entry |
|
Category |
addCategory(String term)
Adds a category to the feed |
|
Category |
addCategory(String scheme,
String term,
String label)
Adds a category to the feed |
|
|
addContributor(Person person)
Adds an individual contributor to this entry |
|
Person |
addContributor(String name)
Adds a contributor |
|
Person |
addContributor(String name,
String email,
String iri)
Adds a contributor |
|
|
addLink(Link link)
Adds an individual link to the entry |
|
Link |
addLink(String href)
Adds an individual link element |
|
Link |
addLink(String href,
String rel)
Adds an individual link element |
|
Link |
addLink(String href,
String rel,
String type,
String title,
String hreflang,
long length)
Adds an individual link element |
|
Link |
getAlternateLink()
Returns this entries first alternate link |
|
Link |
getAlternateLink(String type,
String hreflang)
|
|
IRI |
getAlternateLinkResolvedHref()
|
|
IRI |
getAlternateLinkResolvedHref(String type,
String hreflang)
|
|
Feed |
getAsFeed()
Convert the Source element into an empty Feed element |
|
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 |
|
Collection |
getCollection()
Return an app:collection element associatd with this atom:source. |
|
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(String rel)
Returns the first link with the specified rel attribute value |
|
IRI |
getLinkResolvedHref(String rel)
|
|
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 |
|
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. |
|
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()
|
|
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 |
|
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 |
|
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. |
|
String |
getUpdatedString()
Return the atom:updated value |
|
IRIElement |
newId()
Creates a new randomized atom:id for the entry |
|
|
setCollection(Collection collection)
Set the app:collection element |
|
|
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(String iri,
String version,
String value)
RFC4287: The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes. |
|
IRIElement |
setIcon(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... |
|
|
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(String id)
Sets the universally unique identifier for this feed |
|
IRIElement |
setId(String id,
boolean normalize)
Sets the universally unique identifier for this feed |
|
|
setIdElement(IRIElement id)
RFC4287: The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed. |
|
IRIElement |
setLogo(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. |
|
|
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(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" |
|
|
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(String value)
Sets the value of the subtitle as @type="text" |
|
Text |
setSubtitle(String value,
Text.Type type)
Sets the value of the subtitle |
|
Text |
setSubtitleAsHtml(String value)
Sets the value of the subtitle as @type="html" |
|
Text |
setSubtitleAsXhtml(String value)
Sets the value of the subtitle as @type="xhtml" |
|
|
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(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" |
|
|
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(Date value)
Set the atom:updated value |
|
DateTime |
setUpdated(String value)
Set the atom:updated value |
|
|
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. |
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()
<T extends Source> T addAuthor(Person person)
person
- an atom:author elementPerson addAuthor(String name)
name
- The author name
Person addAuthor(String name, String email, String iri)
name
- The author nameemail
- The author emailiri
- The author iri
IRISyntaxException
- if the iri is malformedList<Category> getCategories()
List<Category> getCategories(String scheme)
scheme
- A Scheme IRI
IRISyntaxException
- if the scheme is malformed<T extends Source> T addCategory(Category category)
category
- A atom:category elementCategory addCategory(String term)
term
- A category term
Category addCategory(String scheme, String term, String label)
scheme
- A category schemeterm
- A category termlabel
- The human readable label
IRISyntaxException
- if the scheme is malformedList<Person> getContributors()
<T extends Source> T addContributor(Person person)
person
- a atom:contributor elementPerson addContributor(String name)
name
- The name of a contributor
Person addContributor(String name, String email, String iri)
name
- The contributor nameemail
- The contributor emailiri
- The contributor uri
IRISyntaxException
- if the iri is malformedGenerator getGenerator()
<T extends Source> T setGenerator(Generator generator)
generator
- A atom:generator elementGenerator setGenerator(String iri, String version, String value)
iri
- The iri attributeversion
- The version attributevalue
- The value attribute
IRISyntaxException
- if the iri is malformedIRIElement getIconElement()
<T extends Source> T setIconElement(IRIElement iri)
iri
- The atom:icon elementIRIElement setIcon(String iri)
iri
- The atom:icon IRI value
IRISyntaxException
- 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(String id)
id
- The atom:id value
IRISyntaxException
- if the id is malformedIRIElement newId()
IRIElement setId(String id, boolean normalize)
id
- The atom:id valuenormalize
- True if the atom:id value should be normalized
IRISyntaxException
- if the id is malformedList<Link> getLinks()
List<Link> getLinks(String rel)
rel
- A link relation
List<Link> getLinks(String... rel)
rels
- A listing of link relations
<T extends Source> T addLink(Link link)
link
- A atom:link elementLink addLink(String href)
href
- The href IRI of the link
IRISyntaxException
- if the href is malformedLink addLink(String href, String rel)
href
- The href IRI of the linkrel
- The link rel attribute
IRISyntaxException
- if the href is malformedLink addLink(String href, String rel, String type, String title, 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 attribute
IRISyntaxException
- if the href is malformedIRIElement getLogoElement()
<T extends Source> T setLogoElement(IRIElement iri)
iri
- The atom:logo elementIRIElement setLogo(String iri)
iri
- The atom:logo value
IRISyntaxException
- 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(String value)
value
- The atom:rights text value
Text setRightsAsHtml(String value)
value
- The atom:rights text value
Text setRightsAsXhtml(String value)
value
- The atom:rights text value
Text setRights(String value, Text.Type type)
value
- The atom:rights text valuetype
- The atom:rights text type
Text setRights(Div value)
value
- The XHTML div element
String getRights()
Text.Type getRightsType()
Text getSubtitleElement()
<T extends Source> T setSubtitleElement(Text text)
text
- A atom:subtitle elementText setSubtitle(String value)
value
- the value of the atom:subtitle element
Text setSubtitleAsHtml(String value)
value
- The value of the atom:subtitle element
Text setSubtitleAsXhtml(String value)
value
- The value of the atom:subtitle element
Text setSubtitle(String value, Text.Type type)
value
- The value of the atom:subtitle elementtype
- The atom:subtitle Text.Type
Text setSubtitle(Div value)
value
- The atom:subtitle element
String getSubtitle()
Text.Type getSubtitleType()
Text getTitleElement()
<T extends Source> T setTitleElement(Text text)
text
- The atom:title elementText setTitle(String value)
value
- The atom:title value
Text setTitleAsHtml(String value)
value
- The atom:title value
Text setTitleAsXhtml(String value)
value
- The atom:title value
Text setTitle(String value, Text.Type type)
value
- The atom:title valuetype
- The atom:title Text.Type
Text setTitle(Div value)
value
- The XHTML div
String getTitle()
Text.Type getTitleType()
DateTime getUpdatedElement()
<T extends Source> T setUpdatedElement(DateTime dateTime)
dateTime
- A atom:updated elementString getUpdatedString()
Date getUpdated()
DateTime setUpdated(Date value)
value
- The java.util.Date
DateTime setUpdated(String value)
value
- The serialized string date
Link getLink(String rel)
rel
- A link relation
Link getSelfLink()
Link getAlternateLink()
Link getAlternateLink(String type, String hreflang)
type
- A media typehreflang
- A target language
MimeTypeParseException
- if the type if malformedIRI getLinkResolvedHref(String rel)
rel
- A link relation
IRI getSelfLinkResolvedHref()
IRI getAlternateLinkResolvedHref()
IRI getAlternateLinkResolvedHref(String type, String hreflang)
type
- A media typehreflang
- A target language
MimeTypeParseException
- if the type if malformedCollection getCollection()
<T extends Source> T setCollection(Collection collection)
collection
- An app:collection elementFeed getAsFeed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |