yarfraw.core.datamodel
Class ChannelFeed

java.lang.Object
  extended by yarfraw.core.datamodel.ChannelFeed
All Implemented Interfaces:
Serializable

public class ChannelFeed
extends Object

The name of the channel. It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, the title of your channel should be the same as the title of your website.

for Atom 1.0 format, the field also maps to <feed> element.

  • Rss 1.0 - <channel> and second level elements such as <item> elements under <rdf:RDF>
  • Rss 2.0 - <channel>
  • Atom 1.0 - <feed> The "atom:feed" element is the document (i.e., top-level) element of an Atom Feed Document, acting as a container for metadata and data associated with the feed. Its element children consist of metadata elements followed by zero or more atom:entry child elements.
  • Author:
    jliang
    See Also:
    Serialized Form

    Field Summary
    protected  String _about
               
    protected  String _base
               
    protected  String _lang
               
    protected  Map<QName,String> _otherAttributes
               
    protected  List<Element> _otherElements
               
    protected  String _resource
               
     
    Constructor Summary
    ChannelFeed()
               
     
    Method Summary
     ChannelFeed addCategorySubject(CategorySubject... categorySubject)
              Rss 1.0 - <dc:subject> The topic of the content of the resource.
     ChannelFeed addCategorySubject(String... categorySubjectOrTerm)
              Rss 1.0 - <dc:subject> The topic of the content of the resource.
     ChannelFeed addContributor(Person... contributor)
              Rss 1.0 - <dc:creator> An entity responsible for making contributions to the content of the resource.
     ChannelFeed addContributor(String... emailOrText)
              Rss 1.0 - <dc:creator> An entity responsible for making contributions to the content of the resource.
     ChannelFeed addItem(ItemEntry... items)
              Rss 1.0 - <item> While commonly a news headline, with RSS 1.0's modular extensibility, this can be just about anything: discussion posting, job listing, software patch -- any object with a URI.
     ChannelFeed addLink(Link... link)
              Rss 1.0 - The URL to which an HTML rendering of the channel title will link, commonly the parent site's home or news page.
     ChannelFeed addLink(String... href)
              Rss 1.0 - The URL to which an HTML rendering of the channel title will link, commonly the parent site's home or news page.
     ChannelFeed addManagingEditorOrAuthorOrPublisher(Person... persons)
              Rss 1.0 - <dc:publisher> An entity responsible for making the resource available Rss 2.0 - <managingEditor> Email address for person responsible for editorial content.
     ChannelFeed addManagingEditorOrAuthorOrPublisher(String... emails)
              Rss 1.0 - <dc:publisher> An entity responsible for making the resource available Rss 2.0 - <managingEditor> Email address for person responsible for editorial content.
     ChannelFeed addOtherAttributes(QName namespace, String attribute)
              Add an attribute that is not in the RSS 2.0 specs.
     ChannelFeed addOtherElement(Element element)
              Add an element that is not specified in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.
     ChannelFeed addOtherElement(String xmlString)
              Add an element that is not specified in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.
     ChannelFeed addSkipDay(Day... day)
              Rss 2.0 only
    Add a skip day.
     ChannelFeed addSkipHour(int... hour)
              Rss 2.0 only
    Add a skip hour to the feed;
     ChannelFeed addWebMasterOrCreator(Person... webMasterOrCreator)
              Rss 1.0 - <dc:creator> An entity primarily responsible for making the content of the resource.
     ChannelFeed addWebMasterOrCreator(String... emailOrText)
              Rss 1.0 - <dc:creator> An entity primarily responsible for making the content of the resource.
     boolean equals(Object other)
               
     String getAbout()
              This maps to the required 'about' attribute that present of all second level elements (channel, image, item, and textinput).
     String getAttributeValueByLocalName(String localName)
              Search for attributes that are not in the spec by its local name.
     String getAttributeValueByQName(QName name)
              Search for attributes that are not in the spec by its QName.
     String getBase()
              This maps to the 'base' attribute that is common in all Atom 1.0 elements.
     Set<CategorySubject> getCategorySubjects()
              Rss 1.0 - <dc:subject> The topic of the content of the resource.
     Cloud getCloud()
              Rss 2.0 only
    Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.
     List<Person> getContributors()
              Rss 1.0 - <dc:creator> An entity responsible for making contributions to the content of the resource.
     Text getDescriptionOrSubtitle()
              Rss 1.0 - <description> A brief description of the channel's content, function, source, etc.
     String getDescriptionOrSubtitleText()
              Rss 1.0 - <description> A brief description of the channel's content, function, source, etc.
     String getDocs()
              Rss 2.0 only
    A URL that points to the documentation for the format used in the RSS file.
     Element getElementByLocalName(String localName)
              Search through the other element list and return the FIRST element that matches the input localName.
     Element getElementByNS(String namespaceURI, String localName)
              Search through the other element list and return the first element that matches both input the namespaceURI and the localName.
     Generator getGenerator()
              Rss 1.0 - Not supported, this is ignored. Rss 2.0 - <generator> A string indicating the program used to generate the channel.
     Image getImageOrIcon()
              Rss 1.0 - <image> Establishes an RDF association between the optional image element [5.4] and this particular RSS channel.
     List<ItemEntry> getItems()
              Rss 1.0 - <item> While commonly a news headline, with RSS 1.0's modular extensibility, this can be just about anything: discussion posting, job listing, software patch -- any object with a URI.
     String getLang()
              The language attribute indicates the language that is used by the enclosed element.
     Locale getLangAsLocale()
              The language attribute indicates the language that is used by the enclosed element.
     String getLastBuildOrUpdatedDate()
              Rss 1.0 - Not supported, this field is ignored.
     List<Link> getLinks()
              Rss 1.0 - The URL to which an HTML rendering of the channel title will link, commonly the parent site's home or news page.
     Image getLogo()
              Atom 1.0 only
    The "atom:logo" element's content is an IRI reference [RFC3987] which identifies an image which provides visual identification for a feed.
     List<Person> getManagingEditorOrAuthorOrPublisher()
              Rss 1.0 - <dc:publisher> An entity responsible for making the resource available Rss 2.0 - <managingEditor> Email address for person responsible for editorial content.
     Map<QName,String> getOtherAttributes()
              Any other attribute that is not in the RSS specs.
     List<Element> getOtherElements()
              Other additional elements that are not in the Rss specs.
     String getPubDate()
              Rss 1.0 - <dc:date> A date associated with an event in the life cycle of the resource.
     String getResource()
              This maps to the optional 'resource' attribute that present in some Rss 1.0 elements.
     Text getRights()
              Rss 1.0 - <dc:rights> Information about rights held in and over the resource.
     String getRightsText()
              Rss 1.0 - <dc:rights> Information about rights held in and over the resource.
     Set<Day> getSkipDays()
              Rss 2.0 only
    value is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday.
     Set<Integer> getSkipHours()
              Rss 2.0 only
    An XML element that contains up to 24 sub-elements whose value is a number between 0 and 23, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on hours listed in the skipHours element.
     TextInput getTexInput()
              Rss 1.0 and Rss 2.0 only
    Rss 1.0 - Establishes an RDF association between the optional textinput element [5.6] and this particular RSS channel.
     Text getTitle()
              Rss 1.0 - The channel's title.
     String getTitleText()
              Rss 1.0 - The channel's title.
     Integer getTtl()
              Rss 1.0 - This value is parsed from both the <sy:updatePeriod> and <sy:updateFrequency>
    for example: updatePeriod:hourly and updateFrequency:2 = ttl: 30 minutes Rss 2.0 - ttl stands for time to live.
     Id getUid()
              Rss 1.0 - Not supported, this field is ignored.
     List<Person> getWebMasterOrCreator()
              Rss 1.0 - <dc:creator> An entity primarily responsible for making the content of the resource.
     int hashCode()
               
     ChannelFeed setAbout(String about)
              Rss 1.0 only
     ChannelFeed setBase(String base)
              Atom 1.0 only
    Any element defined by this specification MAY have an xml:base attribute [W3C.REC-xmlbase-20010627].
     ChannelFeed setCategorySubjects(Set<CategorySubject> categorySubjects)
              Rss 1.0 - <dc:subject> The topic of the content of the resource.
     ChannelFeed setCloud(Cloud cloud)
              Rss 2.0 only
    Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.
     ChannelFeed setContributors(List<Person> contributors)
              Rss 1.0 - <dc:creator> An entity responsible for making contributions to the content of the resource.
     ChannelFeed setDescriptionOrSubtitle(String descriptionOrSubtitle)
              Rss 1.0 - <description> A brief description of the channel's content, function, source, etc.
     ChannelFeed setDescriptionOrSubtitle(Text descriptionOrSubtitle)
              Rss 1.0 - <description> A brief description of the channel's content, function, source, etc.
     ChannelFeed setDocs(String docs)
              Rss 2.0 only
    A URL that points to the documentation for the format used in the RSS file.
     ChannelFeed setGenerator(Generator generator)
              Rss 1.0 - Not supported, this is ignored. Rss 2.0 - <generator> A string indicating the program used to generate the channel.
     ChannelFeed setGenerator(String generatorValue)
              Rss 1.0 - Not supported, this is ignored. Rss 2.0 - <generator> A string indicating the program used to generate the channel.
     ChannelFeed setImageOrIcon(Image imageOrIcon)
              Rss 1.0 - <image> Establishes an RDF association between the optional image element [5.4] and this particular RSS channel.
     ChannelFeed setItems(List<ItemEntry> items)
              Rss 1.0 - <item> While commonly a news headline, with RSS 1.0's modular extensibility, this can be just about anything: discussion posting, job listing, software patch -- any object with a URI.
     ChannelFeed setLang(Locale lang)
              Rss 2.0 - <language> element.
     ChannelFeed setLang(String lang)
              Rss 2.0 - <language> element.
     ChannelFeed setLastBuildOrUpdatedDate(Date lastBuildOrUpdatedDate, SimpleDateFormat format)
              Rss 1.0 - Not supported, this field is ignored.
     ChannelFeed setLastBuildOrUpdatedDate(String lastBuildOrUpdatedDate)
              Rss 1.0 - Not supported, this field is ignored.
     ChannelFeed setLinks(List<Link> links)
              Rss 1.0 - The URL to which an HTML rendering of the channel title will link, commonly the parent site's home or news page.
     ChannelFeed setLogo(Image logo)
              Atom 1.0 only
    The "atom:logo" element's content is an IRI reference [RFC3987] which identifies an image which provides visual identification for a feed.
     ChannelFeed setManagingEditorOrAuthorOrPublisher(List<Person> managingEditorOrAuthorOrPublisher)
              Rss 1.0 - <dc:publisher> An entity responsible for making the resource available Rss 2.0 - <managingEditor> Email address for person responsible for editorial content.
     ChannelFeed setOtherAttributes(Map<QName,String> otherAttributes)
              Any other attribute that is not in the RSS 2.0 specs.
     ChannelFeed setOtherElements(List<Element> otherElements)
              Other additional elements that are not in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.
     ChannelFeed setPubDate(Date pubDate, SimpleDateFormat format)
              Rss 1.0 - <dc:date> A date associated with an event in the life cycle of the resource.
     ChannelFeed setPubDate(String pubDate)
              Rss 1.0 - <dc:date> A date associated with an event in the life cycle of the resource.
     ChannelFeed setResource(String resource)
              Rss 1.0 only
     ChannelFeed setRights(String rights)
              Rss 1.0 - <dc:rights> Information about rights held in and over the resource.
     ChannelFeed setRights(Text rights)
              Rss 1.0 - <dc:rights> Information about rights held in and over the resource.
     ChannelFeed setSkipDays(Set<Day> skipDays)
              Rss 2.0 only
    value is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday.
     ChannelFeed setSkipHours(Set<Integer> skipHours)
              Rss 2.0 only
    An XML element that contains up to 24 sub-elements whose value is a number between 0 and 23, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on hours listed in the skipHours element.
     ChannelFeed setTexInput(TextInput texInput)
              Rss 1.0 and Rss 2.0 only
    Rss 1.0 - Establishes an RDF association between the optional textinput element [5.6] and this particular RSS channel.
     ChannelFeed setTitle(String title)
              Rss 1.0 - The channel's title.
     ChannelFeed setTitle(Text title)
              Rss 1.0 - The channel's title.
     ChannelFeed setTtl(Integer ttl)
              Rss 1.0 - This value is parsed from both the <sy:updatePeriod> and <sy:updateFrequency>
    for example: updatePeriod:hourly and updateFrequency:2 = ttl: 30 minutes Rss 2.0 - ttl stands for time to live.
     ChannelFeed setUid(Id uid)
              Rss 1.0 - Not supported, this field is ignored.
     ChannelFeed setUid(String uid)
              Rss 1.0 - Not supported, this field is ignored.
     ChannelFeed setWebMasterOrCreator(List<Person> webMasterOrCreator)
              Rss 1.0 - <dc:creator> An entity primarily responsible for making the content of the resource.
     String toString()
               
     void validate(FeedFormat format)
               
     
    Methods inherited from class java.lang.Object
    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
     

    Field Detail

    _base

    protected String _base

    _lang

    protected String _lang

    _resource

    protected String _resource

    _about

    protected String _about

    _otherAttributes

    protected Map<QName,String> _otherAttributes

    _otherElements

    protected List<Element> _otherElements
    Constructor Detail

    ChannelFeed

    public ChannelFeed()
    Method Detail

    getItems

    public List<ItemEntry> getItems()
  • Rss 1.0 - <item> While commonly a news headline, with RSS 1.0's modular extensibility, this can be just about anything: discussion posting, job listing, software patch -- any object with a URI. There may be a minimum of one item per RSS document. While RSS 1.0 does not enforce an upper limit, for backward compatibility with RSS 0.9 and 0.91, a maximum of fifteen items is recommended.
  • Rss 2.0 - <item> A channel may contain any number of s. An item may represent a "story" -- much like a story in a newspaper or magazine; if so its description is a synopsis of the story, and the link points to the full story. An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed; see examples), and the link and title may be omitted. All elements of an item are optional, however at least one of title or description must be present.
  • Atom 1.0 - <entry> 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 standalone Atom Entry Document.
  • Returns:

    setItems

    public ChannelFeed setItems(List<ItemEntry> items)
  • Rss 1.0 - <item> While commonly a news headline, with RSS 1.0's modular extensibility, this can be just about anything: discussion posting, job listing, software patch -- any object with a URI. There may be a minimum of one item per RSS document. While RSS 1.0 does not enforce an upper limit, for backward compatibility with RSS 0.9 and 0.91, a maximum of fifteen items is recommended.
  • Rss 2.0 - <item> A channel may contain any number of s. An item may represent a "story" -- much like a story in a newspaper or magazine; if so its description is a synopsis of the story, and the link points to the full story. An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed; see examples), and the link and title may be omitted. All elements of an item are optional, however at least one of title or description must be present.
  • Atom 1.0 - <entry> 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 standalone Atom Entry Document.
  • Parameters:
    items -
    Returns:

    addItem

    public ChannelFeed addItem(ItemEntry... items)
  • Rss 1.0 - <item> While commonly a news headline, with RSS 1.0's modular extensibility, this can be just about anything: discussion posting, job listing, software patch -- any object with a URI. There may be a minimum of one item per RSS document. While RSS 1.0 does not enforce an upper limit, for backward compatibility with RSS 0.9 and 0.91, a maximum of fifteen items is recommended.
  • Rss 2.0 - <item> A channel may contain any number of s. An item may represent a "story" -- much like a story in a newspaper or magazine; if so its description is a synopsis of the story, and the link points to the full story. An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed; see examples), and the link and title may be omitted. All elements of an item are optional, however at least one of title or description must be present.
  • Atom 1.0 - <entry> 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 standalone Atom Entry Document.

  • This method adds all the input ItemEntry to the end of the items list.

    Parameters:
    items -
    Returns:

    getTitle

    public Text getTitle()
  • Rss 1.0 - The channel's title.
  • Rss 2.0 - The title of the channel.
  • Atom 1.0 - The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.

  • Note: Rss 1.0 and Rss 2.0 only use the text content of the title field, the other fields in the Text object are ignored.

    Returns:

    getTitleText

    public String getTitleText()
  • Rss 1.0 - The channel's title.
  • Rss 2.0 - The title of the channel.
  • Atom 1.0 - The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.

  • This method returns the text content of the title field.

    Returns:

    setTitle

    public ChannelFeed setTitle(Text title)
  • Rss 1.0 - The channel's title.
  • Rss 2.0 - The title of the channel.
  • Atom 1.0 - The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.

  • Note: Rss 1.0 and Rss 2.0 only use the text content of the title field, the other fields in the Text object are ignored.

    Parameters:
    title -
    Returns:

    setTitle

    public ChannelFeed setTitle(String title)
  • Rss 1.0 - The channel's title.
  • Rss 2.0 - The title of the channel.
  • Atom 1.0 - The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.

  • This method constructs a new Text object with the input string as its text content.
    Note: Rss 1.0 and Rss 2.0 only use the text content of the title field, the other fields in the Text object are ignored.

    Parameters:
    title -
    Returns:

    getLinks

    public List<Link> getLinks()
  • Rss 1.0 - The URL to which an HTML rendering of the channel title will link, commonly the parent site's home or news page.
  • Rss 2.0 - The URL to the HTML website corresponding to the channel.
  • Atom 1.0 - The "atom:link" element defines a reference from an entry or feed to a Web resource. This specification assigns no meaning to the content (if any) of this element.

  • Note: According to the specs, only Atom 1.0 allows multiple links under the ChannelFeed. Therefore, for Rss 1.0 and Rss 2.0, only the first link will be interpreted, the rest will be ignored.

    Returns:

    setLinks

    public ChannelFeed setLinks(List<Link> links)
  • Rss 1.0 - The URL to which an HTML rendering of the channel title will link, commonly the parent site's home or news page.
  • Rss 2.0 - The URL to the HTML website corresponding to the channel.
  • Atom 1.0 - The "atom:link" element defines a reference from an entry or feed to a Web resource. This specification assigns no meaning to the content (if any) of this element.

  • Note: According to the specs, only Atom 1.0 allows multiple links under the ChannelFeed. Therefore, for Rss 1.0 and Rss 2.0, only the first link will be interpreted, the rest will be ignored.

    Parameters:
    links -
    Returns:

    addLink

    public ChannelFeed addLink(String... href)
  • Rss 1.0 - The URL to which an HTML rendering of the channel title will link, commonly the parent site's home or news page.
  • Rss 2.0 - The URL to the HTML website corresponding to the channel.
  • Atom 1.0 - The "atom:link" element defines a reference from an entry or feed to a Web resource. This specification assigns no meaning to the content (if any) of this element.

  • Note: According to the specs, only Atom 1.0 allows multiple links under the ChannelFeed. Therefore, for Rss 1.0 and Rss 2.0, only the first link will be interpreted, the rest will be ignored.
    This method creates new Link objects and adds them to the END of the links list.

    Parameters:
    href -
    Returns:

    addLink

    public ChannelFeed addLink(Link... link)
  • Rss 1.0 - The URL to which an HTML rendering of the channel title will link, commonly the parent site's home or news page.
  • Rss 2.0 - The URL to the HTML website corresponding to the channel.
  • Atom 1.0 - The "atom:link" element defines a reference from an entry or feed to a Web resource. This specification assigns no meaning to the content (if any) of this element.

  • Note: According to the specs, only Atom 1.0 allows multiple links under the ChannelFeed. Therefore, for Rss 1.0 and Rss 2.0, only the first link will be interpreted, the rest will be ignored.

    This method adds input Link to the END of the links list.

    Parameters:
    link -
    Returns:

    getDescriptionOrSubtitle

    public Text getDescriptionOrSubtitle()
  • Rss 1.0 - <description> A brief description of the channel's content, function, source, etc.
  • Rss 2.0 - <description> Phrase or sentence describing the channel.
  • Atom 1.0 - This maps to <subtitle>. The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed.
  • Returns:

    getDescriptionOrSubtitleText

    public String getDescriptionOrSubtitleText()
  • Rss 1.0 - <description> A brief description of the channel's content, function, source, etc.
  • Rss 2.0 - <description> Phrase or sentence describing the channel.
  • Atom 1.0 - This maps to <subtitle>. The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed.

  • This method returns the text content of the descriptionOrSubtitle field.

    Returns:

    setDescriptionOrSubtitle

    public ChannelFeed setDescriptionOrSubtitle(Text descriptionOrSubtitle)
  • Rss 1.0 - <description> A brief description of the channel's content, function, source, etc.
  • Rss 2.0 - <description> Phrase or sentence describing the channel.
  • Atom 1.0 - This maps to <subtitle>. The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed.
  • Parameters:
    descriptionOrSubtitle -
    Returns:

    setDescriptionOrSubtitle

    public ChannelFeed setDescriptionOrSubtitle(String descriptionOrSubtitle)
  • Rss 1.0 - <description> A brief description of the channel's content, function, source, etc.
  • Rss 2.0 - <description> Phrase or sentence describing the channel.
  • Atom 1.0 - This maps to <subtitle>. The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed.

  • This method constructs a new Text object with the input string as its text content.

    Parameters:
    descriptionOrSubtitle -
    Returns:

    getRights

    public Text getRights()
  • Rss 1.0 - <dc:rights> Information about rights held in and over the resource.
  • Rss 2.0 - <copyright> Copyright notice for content in the channel.
  • Atom 1.0 - <rights> The "atom:rights" element is a Text construct that conveys information about rights held in and over an entry or feed.
  • Returns:

    getRightsText

    public String getRightsText()
  • Rss 1.0 - <dc:rights> Information about rights held in and over the resource.
  • Rss 2.0 - <copyright> Copyright notice for content in the channel.
  • Atom 1.0 - <rights> The "atom:rights" element is a Text construct that conveys information about rights held in and over an entry or feed.
  • Returns:
    the text content of the rights field.

    setRights

    public ChannelFeed setRights(Text rights)
  • Rss 1.0 - <dc:rights> Information about rights held in and over the resource.
  • Rss 2.0 - <copyright> Copyright notice for content in the channel.
  • Atom 1.0 - <rights> The "atom:rights" element is a Text construct that conveys information about rights held in and over an entry or feed.
  • Parameters:
    rights -
    Returns:

    setRights

    public ChannelFeed setRights(String rights)
  • Rss 1.0 - <dc:rights> Information about rights held in and over the resource.
  • Rss 2.0 - <copyright> Copyright notice for content in the channel.
  • Atom 1.0 - <rights> The "atom:rights" element is a Text construct that conveys information about rights held in and over an entry or feed.

  • This method creates a new Text object using the input string as its content and sets rights field to this object.

    Parameters:
    rights -
    Returns:

    getManagingEditorOrAuthorOrPublisher

    public List<Person> getManagingEditorOrAuthorOrPublisher()
  • Rss 1.0 - <dc:publisher> An entity responsible for making the resource available
  • Rss 2.0 - <managingEditor> Email address for person responsible for editorial content.
  • Atom 1.0 - <author> The "atom:author" element is a Person construct that indicates the author of the entry or feed.

  • Note: This is a list because Atom 1.0 allows multiple <author>. For Rss 1.0 and Rss 2.0, only the first Person is interpreted, the rest are ignored.

    Returns:

    setManagingEditorOrAuthorOrPublisher

    public ChannelFeed setManagingEditorOrAuthorOrPublisher(List<Person> managingEditorOrAuthorOrPublisher)
  • Rss 1.0 - <dc:publisher> An entity responsible for making the resource available
  • Rss 2.0 - <managingEditor> Email address for person responsible for editorial content.
  • Atom 1.0 - <author> The "atom:author" element is a Person construct that indicates the author of the entry or feed.

  • Note: This is a list because Atom 1.0 allows multiple <author>. For Rss 1.0 and Rss 2.0, only the first Person is interpreted, the rest are ignored.

    Parameters:
    managingEditorOrAuthorOrPublisher -
    Returns:

    addManagingEditorOrAuthorOrPublisher

    public ChannelFeed addManagingEditorOrAuthorOrPublisher(String... emails)
  • Rss 1.0 - <dc:publisher> An entity responsible for making the resource available
  • Rss 2.0 - <managingEditor> Email address for person responsible for editorial content.
  • Atom 1.0 - <author> The "atom:author" element is a Person construct that indicates the author of the entry or feed.

  • Note: This is a list because Atom 1.0 allows multiple <author>. For Rss 1.0 and Rss 2.0, only the first Person is interpreted, the rest are ignored.
    This method constructs a new Person object with input email as its email and adds it to the end of the list.

    Parameters:
    managingEditorOrAuthorOrPublisher -
    Returns:

    addManagingEditorOrAuthorOrPublisher

    public ChannelFeed addManagingEditorOrAuthorOrPublisher(Person... persons)
  • Rss 1.0 - <dc:publisher> An entity responsible for making the resource available
  • Rss 2.0 - <managingEditor> Email address for person responsible for editorial content.
  • Atom 1.0 - <author> The "atom:author" element is a Person construct that indicates the author of the entry or feed.

  • Note: This is a list because Atom 1.0 allows multiple <author>. For Rss 1.0 and Rss 2.0, only the first Person is interpreted, the rest are ignored.
    This method adds all input Person to the END of the list.

    Parameters:
    managingEditorOrAuthorOrPublisher -
    Returns:

    getWebMasterOrCreator

    public List<Person> getWebMasterOrCreator()
  • Rss 1.0 - <dc:creator> An entity primarily responsible for making the content of the resource.
  • Rss 2.0 - <webMaster> Email address for person responsible for technical issues relating to channel.
  • Atom 1.0 - Not supported, this field is ignored.

  • Notes: according to Rss 2.0 specs, there can be only 1 <webMaster> element under <channel>, therefore, only the first Person is interpreted, the rest are ignored.

    Returns:

    setWebMasterOrCreator

    public ChannelFeed setWebMasterOrCreator(List<Person> webMasterOrCreator)
  • Rss 1.0 - <dc:creator> An entity primarily responsible for making the content of the resource.
  • Rss 2.0 - <webMaster> Email address for person responsible for technical issues relating to channel.
  • Atom 1.0 - Not supported, this field is ignored.

  • Notes: according to Rss 2.0 specs, there can be only 1 <webMaster> element under <channel>, therefore, only the first Person is interpreted, the rest are ignored.

    Parameters:
    webMasterOrCreator -
    Returns:

    addWebMasterOrCreator

    public ChannelFeed addWebMasterOrCreator(Person... webMasterOrCreator)
  • Rss 1.0 - <dc:creator> An entity primarily responsible for making the content of the resource.
  • Rss 2.0 - <webMaster> Email address for person responsible for technical issues relating to channel.
  • Atom 1.0 - Not supported, this field is ignored.

  • This method adds all the input Person to the END of the list.
    Notes: according to Rss 2.0 specs, there can be only 1 <webMaster> element under <channel>, therefore, only the first Person is interpreted, the rest are ignored.

    Parameters:
    webMasterOrCreator -
    Returns:

    addWebMasterOrCreator

    public ChannelFeed addWebMasterOrCreator(String... emailOrText)
  • Rss 1.0 - <dc:creator> An entity primarily responsible for making the content of the resource.
  • Rss 2.0 - <webMaster> Email address for person responsible for technical issues relating to channel.
  • Atom 1.0 - Not supported, this field is ignored.

  • This method constructs new Person object and adds them all to the END of the list.
    Notes: according to Rss 2.0 specs, there can be only 1 <webMaster> element under <channel>, therefore, only the first Person is interpreted, the rest are ignored.

    Parameters:
    emailOrText -
    Returns:

    getContributors

    public List<Person> getContributors()
  • Rss 1.0 - <dc:creator> An entity responsible for making contributions to the content of the resource.
  • Rss 2.0 - Not supported, this field is ignored.
  • Atom 1.0 - <contributor> The "atom:contributor" element is a Person construct that indicates a person or other entity who contributed to the entry or feed.
  • Returns:

    setContributors

    public ChannelFeed setContributors(List<Person> contributors)
  • Rss 1.0 - <dc:creator> An entity responsible for making contributions to the content of the resource.
  • Rss 2.0 - Not supported, this field is ignored.
  • Atom 1.0 - <contributor> The "atom:contributor" element is a Person construct that indicates a person or other entity who contributed to the entry or feed.
  • Parameters:
    contributors -
    Returns:

    addContributor

    public ChannelFeed addContributor(Person... contributor)
  • Rss 1.0 - <dc:creator> An entity responsible for making contributions to the content of the resource.
  • Rss 2.0 - Not supported, this field is ignored.
  • Atom 1.0 - <contributor> The "atom:contributor" element is a Person construct that indicates a person or other entity who contributed to the entry or feed.

  • This method adds all the input Person to the END of the list.

    Parameters:
    contributor -
    Returns:

    addContributor

    public ChannelFeed addContributor(String... emailOrText)
  • Rss 1.0 - <dc:creator> An entity responsible for making contributions to the content of the resource.
  • Rss 2.0 - Not supported, this field is ignored.
  • Atom 1.0 - <contributor> The "atom:contributor" element is a Person construct that indicates a person or other entity who contributed to the entry or feed.

  • This method constructs new Person object and adds them all to the END of the list.

    Returns:

    getCategorySubjects

    public Set<CategorySubject> getCategorySubjects()
  • Rss 1.0 - <dc:subject> The topic of the content of the resource.
  • Rss 2.0 - Includes the item in one or more categories.
  • Atom 1.0 - The "atom:category" element conveys information about a category associated with an entry or feed. This specification assigns no meaning to the content (if any) of this element.
  • Returns:

    setCategorySubjects

    public ChannelFeed setCategorySubjects(Set<CategorySubject> categorySubjects)
  • Rss 1.0 - <dc:subject> The topic of the content of the resource.
  • Rss 2.0 - Includes the item in one or more categories.
  • Atom 1.0 - The "atom:category" element conveys information about a category associated with an entry or feed. This specification assigns no meaning to the content (if any) of this element.
  • Parameters:
    categorySubjects -
    Returns:

    addCategorySubject

    public ChannelFeed addCategorySubject(String... categorySubjectOrTerm)
  • Rss 1.0 - <dc:subject> The topic of the content of the resource.
  • Rss 2.0 - Includes the item in one or more categories.
  • Atom 1.0 - The "atom:category" element conveys information about a category associated with an entry or feed. This specification assigns no meaning to the content (if any) of this element.

  • This method creates new CategorySubject objects using the input strings and add them to the category set.

    Parameters:
    categorySubjectOrTerm -
    Returns:

    addCategorySubject

    public ChannelFeed addCategorySubject(CategorySubject... categorySubject)
  • Rss 1.0 - <dc:subject> The topic of the content of the resource.
  • Rss 2.0 - Includes the item in one or more categories.
  • Atom 1.0 - The "atom:category" element conveys information about a category associated with an entry or feed. This specification assigns no meaning to the content (if any) of this element.

  • This method adds the input CategorySubject objects to the category set.

    Parameters:
    categorySubject -
    Returns:

    getPubDate

    public String getPubDate()
  • Rss 1.0 - <dc:date> A date associated with an event in the life cycle of the resource.
  • Rss 2.0 - <pubDate> Indicates when the item was published.
  • Atom 1.0 - Not supported, this field is ignored.
  • Returns:

    setPubDate

    public ChannelFeed setPubDate(String pubDate)
  • Rss 1.0 - <dc:date> A date associated with an event in the life cycle of the resource.
  • Rss 2.0 - <pubDate> Indicates when the item was published.
  • Atom 1.0 - Not supported, this field is ignored.
  • Parameters:
    pubDate -
    Returns:

    setPubDate

    public ChannelFeed setPubDate(Date pubDate,
                                  SimpleDateFormat format)
  • Rss 1.0 - <dc:date> A date associated with an event in the life cycle of the resource.
  • Rss 2.0 - <pubDate> Indicates when the item was published.
  • Atom 1.0 - Not supported, this field is ignored.

  • This method uses the input SimpleDateFormat object to format the date into a string.

    Parameters:
    pubDate -
    format -
    Returns:

    getLastBuildOrUpdatedDate

    public String getLastBuildOrUpdatedDate()
  • Rss 1.0 - Not supported, this field is ignored.
  • Rss 2.0 - <lastBuildDate> The last time the content of the channel changed.
  • Atom 1.0 - <updated> 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. Therefore, not all modifications necessarily result in a changed atom:updated value.
  • Returns:

    setLastBuildOrUpdatedDate

    public ChannelFeed setLastBuildOrUpdatedDate(String lastBuildOrUpdatedDate)
  • Rss 1.0 - Not supported, this field is ignored.
  • Rss 2.0 - <lastBuildDate> The last time the content of the channel changed.
  • Atom 1.0 - <updated> 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. Therefore, not all modifications necessarily result in a changed atom:updated value.
  • Parameters:
    lastBuildOrUpdatedDate -
    Returns:

    setLastBuildOrUpdatedDate

    public ChannelFeed setLastBuildOrUpdatedDate(Date lastBuildOrUpdatedDate,
                                                 SimpleDateFormat format)
  • Rss 1.0 - Not supported, this field is ignored.
  • Rss 2.0 - <lastBuildDate> The last time the content of the channel changed.
  • Atom 1.0 - <updated> 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. Therefore, not all modifications necessarily result in a changed atom:updated value.

  • This method uses the input SimpleDateFormat object to format the date into a string.

    Parameters:
    lastBuildOrUpdatedDate -
    Returns:

    getUid

    public Id getUid()
  • Rss 1.0 - Not supported, this field is ignored.
  • Rss 2.0 - Not supported, this field is ignored.
  • Atom 1.0 - The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed.
  • Returns:

    setUid

    public ChannelFeed setUid(Id uid)
  • Rss 1.0 - Not supported, this field is ignored.
  • Rss 2.0 - Not supported, this field is ignored.
  • Atom 1.0 - The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed.
  • Parameters:
    uid -
    Returns:

    setUid

    public ChannelFeed setUid(String uid)
  • Rss 1.0 - Not supported, this field is ignored.
  • Rss 2.0 - Not supported, this field is ignored.
  • Atom 1.0 - The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed.

  • This method constructs a new Id object and sets the uid field to this object.

    Parameters:
    uid -
    Returns:

    getGenerator

    public Generator getGenerator()
  • Rss 1.0 - Not supported, this is ignored.
  • Rss 2.0 - <generator> A string indicating the program used to generate the channel.
  • Atom 1.0 - <generator> The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.
  • Returns:

    setGenerator

    public ChannelFeed setGenerator(Generator generator)
  • Rss 1.0 - Not supported, this is ignored.
  • Rss 2.0 - <generator> A string indicating the program used to generate the channel.
  • Atom 1.0 - <generator> The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.
  • Parameters:
    generator -
    Returns:

    setGenerator

    public ChannelFeed setGenerator(String generatorValue)
  • Rss 1.0 - Not supported, this is ignored.
  • Rss 2.0 - <generator> A string indicating the program used to generate the channel.
  • Atom 1.0 - <generator> The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.

  • This method constructs a new Generator object.

    Parameters:
    generatorValue -
    Returns:

    getDocs

    public String getDocs()
    Rss 2.0 only
    A URL that points to the documentation for the format used in the RSS file. It's probably a pointer to this page. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.

    Returns:

    setDocs

    public ChannelFeed setDocs(String docs)
    Rss 2.0 only
    A URL that points to the documentation for the format used in the RSS file. It's probably a pointer to this page. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.

    Parameters:
    docs -
    Returns:

    getTtl

    public Integer getTtl()
  • Rss 1.0 - This value is parsed from both the <sy:updatePeriod> and <sy:updateFrequency>
    for example: updatePeriod:hourly and updateFrequency:2 = ttl: 30 minutes
  • Rss 2.0 - ttl stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source.
  • Atom 1.0 - Not supported, this field is ignored.
  • Returns:

    setTtl

    public ChannelFeed setTtl(Integer ttl)
  • Rss 1.0 - This value is parsed from both the <sy:updatePeriod> and <sy:updateFrequency>
    for example: updatePeriod:hourly and updateFrequency:2 = ttl: 30 minutes
  • Rss 2.0 - ttl stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source.
  • Atom 1.0 - Not supported, this field is ignored.
  • Parameters:
    ttl -
    Returns:

    getCloud

    public Cloud getCloud()
    Rss 2.0 only
    Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.

    Returns:

    setCloud

    public ChannelFeed setCloud(Cloud cloud)
    Rss 2.0 only
    Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.

    Parameters:
    cloud -
    Returns:

    getImageOrIcon

    public Image getImageOrIcon()
  • Rss 1.0 - <image> Establishes an RDF association between the optional image element [5.4] and this particular RSS channel. The rdf:resource's {image_uri} must be the same as the image element's rdf:about {image_uri}.
  • Rss 2.0 - <image> Specifies a GIF, JPEG or PNG image that can be displayed with the channel.
  • Atom 1.0 - <icon> The "atom:icon" element's content is an IRI reference [RFC3987] which identifies an image which provides iconic visual identification for a feed.
  • Returns:

    setImageOrIcon

    public ChannelFeed setImageOrIcon(Image imageOrIcon)
  • Rss 1.0 - <image> Establishes an RDF association between the optional image element [5.4] and this particular RSS channel. The rdf:resource's {image_uri} must be the same as the image element's rdf:about {image_uri}.
  • Rss 2.0 - <image> Specifies a GIF, JPEG or PNG image that can be displayed with the channel.
  • Atom 1.0 - <icon> The "atom:icon" element's content is an IRI reference [RFC3987] which identifies an image which provides iconic visual identification for a feed.
  • Parameters:
    imageOrIcon -
    Returns:

    getLogo

    public Image getLogo()
    Atom 1.0 only
    The "atom:logo" element's content is an IRI reference [RFC3987] which identifies an image which provides visual identification for a feed.

    Returns:

    setLogo

    public ChannelFeed setLogo(Image logo)
    Atom 1.0 only
    The "atom:logo" element's content is an IRI reference [RFC3987] which identifies an image which provides visual identification for a feed.

    Parameters:
    logo -
    Returns:

    getTexInput

    public TextInput getTexInput()
    Rss 1.0 and Rss 2.0 only
  • Rss 1.0 - Establishes an RDF association between the optional textinput element [5.6] and this particular RSS channel. The {textinput_uri} rdf:resource must be the same as the textinput element's rdf:about {textinput_uri}.
  • Rss 2.0 - Specifies a text input box that can be displayed with the channel.
  • Returns:

    setTexInput

    public ChannelFeed setTexInput(TextInput texInput)
    Rss 1.0 and Rss 2.0 only
  • Rss 1.0 - Establishes an RDF association between the optional textinput element [5.6] and this particular RSS channel. The {textinput_uri} rdf:resource must be the same as the textinput element's rdf:about {textinput_uri}.
  • Rss 2.0 - Specifies a text input box that can be displayed with the channel.
  • Parameters:
    texInput -
    Returns:

    getSkipHours

    public Set<Integer> getSkipHours()
    Rss 2.0 only
    An XML element that contains up to 24 sub-elements whose value is a number between 0 and 23, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on hours listed in the skipHours element.
    The hour beginning at midnight is hour zero.


    setSkipHours

    public ChannelFeed setSkipHours(Set<Integer> skipHours)
    Rss 2.0 only
    An XML element that contains up to 24 sub-elements whose value is a number between 0 and 23, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on hours listed in the skipHours element.
    The hour beginning at midnight is hour zero.


    addSkipHour

    public ChannelFeed addSkipHour(int... hour)
    Rss 2.0 only
    Add a skip hour to the feed;

    Parameters:
    hour - value is a number between 0 and 23, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on hours listed in the skipHours element.
    The hour beginning at midnight is hour zero.

    getSkipDays

    public Set<Day> getSkipDays()
    Rss 2.0 only
    value is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday. Aggregators may not read the channel during days listed in the skipDays element.


    setSkipDays

    public ChannelFeed setSkipDays(Set<Day> skipDays)
    Rss 2.0 only
    value is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday. Aggregators may not read the channel during days listed in the skipDays element.


    addSkipDay

    public ChannelFeed addSkipDay(Day... day)
    Rss 2.0 only
    Add a skip day.


    setOtherAttributes

    public ChannelFeed setOtherAttributes(Map<QName,String> otherAttributes)
    Any other attribute that is not in the RSS 2.0 specs.


    addOtherAttributes

    public ChannelFeed addOtherAttributes(QName namespace,
                                          String attribute)
    Add an attribute that is not in the RSS 2.0 specs.


    setOtherElements

    public ChannelFeed setOtherElements(List<Element> otherElements)
    Other additional elements that are not in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.


    addOtherElement

    public ChannelFeed addOtherElement(Element element)
    Add an element that is not specified in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.

    Parameters:
    element - - any element

    addOtherElement

    public ChannelFeed addOtherElement(String xmlString)
                                throws SAXException,
                                       IOException,
                                       ParserConfigurationException
    Add an element that is not specified in the Rss specs.
    **Note** The element should not have an empty namespace to avoid collision with the specs elements.

    Parameters:
    xmlString - - any element
    Throws:
    ParserConfigurationException
    IOException
    SAXException

    setBase

    public ChannelFeed setBase(String base)
    Atom 1.0 only
    Any element defined by this specification MAY have an xml:base attribute [W3C.REC-xmlbase-20010627]. When xml:base is used in an Atom Document, it serves the function described in section 5.1.1 of [RFC3986], establishing the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.

    Parameters:
    base -
    Returns:

    setLang

    public ChannelFeed setLang(String lang)
  • Rss 2.0 - <language> element. The language the channel is written in. This allows aggregators to group all Italian language sites, for example, on a single page. A list of allowable values for this element, as provided by Netscape, is here. You may also use values defined by the W3C. Only <channel> support this element.
  • Rss 1.0 - <dc:language> element. A language of the intellectual content of the resource. Only <channel> and <item> support this element.
  • Atom 1.0 - 'lang' attribute

  • Note: for Rss 2.0 and Rss 1.0, only <channel> and <item>

    Parameters:
    lang -
    Returns:

    setLang

    public ChannelFeed setLang(Locale lang)
  • Rss 2.0 - <language> element. The language the channel is written in. This allows aggregators to group all Italian language sites, for example, on a single page. A list of allowable values for this element, as provided by Netscape, is here. You may also use values defined by the W3C. Only <channel> support this element.
  • Rss 1.0 - <dc:language> element. A language of the intellectual content of the resource. Only <channel> and <item> support this element.
  • Atom 1.0 - 'lang' attribute

  • Note: for Rss 2.0 and Rss 1.0, only <channel> and <item>

    Parameters:
    lang -
    Returns:

    setResource

    public ChannelFeed setResource(String resource)
    Rss 1.0 only

    Parameters:
    resource -
    Returns:

    setAbout

    public ChannelFeed setAbout(String about)
    Rss 1.0 only

    Parameters:
    about -
    Returns:

    validate

    public void validate(FeedFormat format)
                  throws ValidationException
    Throws:
    ValidationException

    getBase

    public String getBase()
    This maps to the 'base' attribute that is common in all Atom 1.0 elements. Other FeedFormat will ignore this attribute.

    Returns:
    - attribute value.

    getLang

    public String getLang()
    The language attribute indicates the language that is used by the enclosed element.

    Returns:
    - attribute value.

    getLangAsLocale

    public Locale getLangAsLocale()
    The language attribute indicates the language that is used by the enclosed element.

    Returns:
    - a new Locale Object by parsing the lang attribute.

    getResource

    public String getResource()
    This maps to the optional 'resource' attribute that present in some Rss 1.0 elements. Other FeedFormat will ignore this attribute.

    Returns:
    - attribute value.

    getAbout

    public String getAbout()
    This maps to the required 'about' attribute that present of all second level elements (channel, image, item, and textinput). Other FeedFormat will ignore this attribute.

    Returns:
    - attribute value.

    getOtherElements

    public List<Element> getOtherElements()
    Other additional elements that are not in the Rss specs.


    getElementByNS

    public Element getElementByNS(String namespaceURI,
                                  String localName)
    Search through the other element list and return the first element that matches both input the namespaceURI and the localName.

    Parameters:
    namespaceURI - - namespaceURI of the element to be search for
    localName - - localName of the element
    Returns:
    - null if no matching element is found, the matching element otherwise.

    getElementByLocalName

    public Element getElementByLocalName(String localName)
    Search through the other element list and return the FIRST element that matches the input localName.

    Parameters:
    localName - - localName of the element
    Returns:
    - null if no matching element is found, the matching element otherwise.

    getOtherAttributes

    public Map<QName,String> getOtherAttributes()
    Any other attribute that is not in the RSS specs.


    getAttributeValueByLocalName

    public String getAttributeValueByLocalName(String localName)
    Search for attributes that are not in the spec by its local name.

    Parameters:
    localName - localName of the attribute
    Returns:
    null if attribute is not found, the value of the attribute otherwise

    getAttributeValueByQName

    public String getAttributeValueByQName(QName name)
    Search for attributes that are not in the spec by its QName.

    Parameters:
    name - QName of the attribute
    Returns:
    null if attribute is not found, the value of the attribute otherwise

    toString

    public String toString()
    Overrides:
    toString in class Object

    equals

    public boolean equals(Object other)
    Overrides:
    equals in class Object

    hashCode

    public int hashCode()
    Overrides:
    hashCode in class Object


    Copyright © 2008. All Rights Reserved.