Class Source


public class Source extends CommonEntry
Represents metadata from the source feed when an entry is copied from one feed to another.

When entries are aggregated, copied, or republished from their original feed, the source element preserves metadata about the original feed. This is crucial for proper attribution and maintaining provenance information.

The source element is a child of entry and contains a subset of feed-level metadata that identifies where the entry originally came from. All child elements are optional, but including at minimum the source feed's ID, title, and updated timestamp is recommended.

Common use cases:

  • Feed aggregation - Combining entries from multiple sources
  • Content syndication - Republishing entries from other feeds
  • Attribution - Crediting the original source
Schema

atomSource = element atom:source { atomCommonAttributes, (atomAuthor* & atomCategory* & atomContributor* & atomGenerator? & atomIcon? & atomId? & atomLink* & atomLogo? & atomRights? & atomSubtitle? & atomTitle? & atomUpdated? & extensionElement*) }

Example:

// Entry copied from another feed Entry entry = new Entry( "tag:myaggregator.example.com,2024:entry1", "Interesting Article", "2024-01-15T12:00:00Z" ) .setSource( new Source() .setId("tag:originalblog.example.com,2024:feed") .setTitle("Original Blog") .setUpdated("2024-01-15T12:00:00Z") .setLinks( new Link("self", "application/atom+xml", "http://originalblog.example.com/feed.atom") ) );

Specification:

Represents an atomSource construct in the RFC 4287 - Section 4.2.11 specification.

See Also:
  • Constructor Details

  • Method Details

    • getGenerator

      Bean property getter: generator.

      The generator info of this source.

      Returns:
      The property value, or null if it is not set.
    • setGenerator

      public Source setGenerator(Generator value)
      Bean property setter: generator.

      The generator info of this source.

      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • getIcon

      public Icon getIcon()
      Bean property getter: icon.

      The icon of this source.

      Returns:
      The property value, or null if it is not set.
    • setIcon

      public Source setIcon(Icon value)
      Bean property setter: icon.

      The icon of this source.

      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • getLogo

      public Logo getLogo()
      Bean property getter: logo.

      The logo of this source.

      Returns:
      The property value, or null if it is not set.
    • setLogo

      public Source setLogo(Logo value)
      Bean property setter: logo.

      The logo of this source.

      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • getSubtitle

      public Text getSubtitle()
      Bean property getter: subtitle.

      The subtitle of this source.

      Returns:
      The property value, or null if it is not set.
    • setSubtitle

      public Source setSubtitle(Text value)
      Bean property setter: subtitle.

      The subtitle of this source.

      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • setSubtitle

      public Source setSubtitle(String value)
      Bean property fluent setter: subtitle.

      The subtitle of this source.

      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • setBase

      public Source setBase(Object value)
      Description copied from class: Common
      Bean property setter: base.

      Sets the base URI for resolving relative URI references (xml:base attribute).

      The value can be of any of the following types: URI, URL, String. Strings must be valid URIs.

      Example:

      Feed feed = new Feed(...) .setBase("http://example.org/");

      Overrides:
      setBase in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • setLang

      public Source setLang(String value)
      Description copied from class: Common
      Bean property setter: lang.

      Sets the natural language of the element's content (xml:lang attribute).

      Example:

      Text title = new Text("text") .setText("Mon Blog") .setLang("fr");

      Overrides:
      setLang in class CommonEntry
      Parameters:
      value - The new value for this property (e.g., "en", "fr", "de", "en-US").
      Can be null to unset the property.
      Returns:
      This object.
    • setAuthors

      public Source setAuthors(Person... value)
      Description copied from class: CommonEntry
      Bean property setter: authors.

      The list of authors for this object.

      Overrides:
      setAuthors in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • setCategories

      public Source setCategories(Category... value)
      Description copied from class: CommonEntry
      Bean property setter: categories.

      The list of categories of this object.

      Overrides:
      setCategories in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • setContributors

      public Source setContributors(Person... value)
      Description copied from class: CommonEntry
      Bean property setter: contributors.

      The list of contributors of this object.

      Overrides:
      setContributors in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • setId

      public Source setId(String value)
      Description copied from class: CommonEntry
      Bean property fluent setter: id.

      The ID of this object.

      Overrides:
      setId in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • setId

      public Source setId(Id value)
      Description copied from class: CommonEntry
      Bean property setter: id.

      The ID of this object.

      Overrides:
      setId in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • setLinks

      public Source setLinks(Link... value)
      Description copied from class: CommonEntry
      Bean property setter: links.

      The list of links of this object.

      Overrides:
      setLinks in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • setRights

      public Source setRights(String value)
      Description copied from class: CommonEntry
      Bean property fluent setter: rights.

      The rights statement of this object.

      Overrides:
      setRights in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • setRights

      public Source setRights(Text value)
      Description copied from class: CommonEntry
      Bean property setter: rights.

      The rights statement of this object.

      Overrides:
      setRights in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • setTitle

      public Source setTitle(String value)
      Description copied from class: CommonEntry
      Bean property fluent setter: title.

      The title of this object.

      Overrides:
      setTitle in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • setTitle

      public Source setTitle(Text value)
      Description copied from class: CommonEntry
      Bean property setter: title.

      The title of this object.

      Overrides:
      setTitle in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • setUpdated

      public Source setUpdated(String value)
      Description copied from class: CommonEntry
      Bean property fluent setter: updated.

      The update timestamp of this object.

      Overrides:
      setUpdated in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • setUpdated

      public Source setUpdated(Calendar value)
      Description copied from class: CommonEntry
      Bean property setter: updated.

      The update timestamp of this object.

      Overrides:
      setUpdated in class CommonEntry
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object