Class Feed

  • All Implemented Interfaces:
    javax.xml.namespace.NamespaceContext

    public class Feed
    extends SaxRepresentation
    Atom Feed Document, acting as a component for metadata and data associated with the feed.
    Author:
    Jerome Louvel
    • Field Detail

      • ATOM_NAMESPACE

        public static final java.lang.String ATOM_NAMESPACE
        Atom Syndication Format namespace.
        See Also:
        Constant Field Values
      • XHTML_NAMESPACE

        public static final java.lang.String XHTML_NAMESPACE
        XHTML namespace.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Feed

        public Feed()
        Constructor.
      • Feed

        public Feed​(org.restlet.Client clientDispatcher,
                    java.lang.String feedUri)
             throws java.io.IOException
        Constructor.
        Parameters:
        clientDispatcher - The client HTTP dispatcher.
        feedUri - The feed URI.
        Throws:
        java.io.IOException
      • Feed

        public Feed​(org.restlet.Context context,
                    java.lang.String feedUri)
             throws java.io.IOException
        Constructor.
        Parameters:
        context - The context from which the client dispatcher will be retrieved.
        feedUri - The feed URI.
        Throws:
        java.io.IOException
      • Feed

        public Feed​(org.restlet.representation.Representation xmlFeed)
             throws java.io.IOException
        Constructor.
        Parameters:
        xmlFeed - The XML feed document.
        Throws:
        java.io.IOException
      • Feed

        public Feed​(org.restlet.representation.Representation xmlFeed,
                    FeedReader feedReader)
             throws java.io.IOException
        Constructor.
        Parameters:
        xmlFeed - The XML feed document.
        feedReader - Custom feed reader.
        Throws:
        java.io.IOException
      • Feed

        public Feed​(java.lang.String feedUri)
             throws java.io.IOException
        Constructor.
        Parameters:
        feedUri - The feed URI.
        Throws:
        java.io.IOException
    • Method Detail

      • getAuthors

        public java.util.List<Person> getAuthors()
        Returns the authors of the feed.
        Returns:
        The authors of the feed.
      • getBaseReference

        public org.restlet.data.Reference getBaseReference()
        Returns the base reference used to resolve relative references found within the scope of the xml:base attribute.
        Returns:
        The base reference used to resolve relative references found within the scope of the xml:base attribute.
      • getCategories

        public java.util.List<Category> getCategories()
        Returns the categories associated with the feed.
        Returns:
        The categories associated with the feed.
      • getContributors

        public java.util.List<Person> getContributors()
        Returns the contributors to the feed.
        Returns:
        The contributors to the feed.
      • getEntries

        public java.util.List<Entry> getEntries()
        Returns the individual entries, acting as a components for associated metadata and data.
        Returns:
        The individual entries, acting as a components for associated metadata and data.
      • getGenerator

        public Generator getGenerator()
        Returns the agent used to generate a feed.
        Returns:
        The agent used to generate a feed.
      • getIcon

        public org.restlet.data.Reference getIcon()
        Returns the image that provides iconic visual identification for a feed.
        Returns:
        The image that provides iconic visual identification for a feed.
      • getId

        public java.lang.String getId()
        Returns the permanent, universally unique identifier for the feed.
        Returns:
        The permanent, universally unique identifier for the feed.
      • getLinks

        public java.util.List<Link> getLinks()
        Returns the references from the entry to Web resources.
        Returns:
        The references from the entry to Web resources.
      • getLogo

        public org.restlet.data.Reference getLogo()
        Returns the image that provides visual identification for a feed.
        Returns:
        The image that provides visual identification for a feed.
      • getRights

        public Text getRights()
        Returns the information about rights held in and over an feed.
        Returns:
        The information about rights held in and over an feed.
      • getSubtitle

        public Text getSubtitle()
        Returns the short summary, abstract, or excerpt of an feed.
        Returns:
        The short summary, abstract, or excerpt of an feed.
      • getTitle

        public Text getTitle()
        Returns the human-readable title for the feed.
        Returns:
        The human-readable title for the feed.
      • getUpdated

        public java.util.Date getUpdated()
        Returns the most recent moment when the entry was modified in a significant way.
        Returns:
        The most recent moment when the entry was modified in a significant way.
      • setBaseReference

        public void setBaseReference​(org.restlet.data.Reference baseReference)
        Sets the base reference used to resolve relative references found within the scope of the xml:base attribute.
        Parameters:
        baseReference - The base reference used to resolve relative references found within the scope of the xml:base attribute.
      • setBaseReference

        public void setBaseReference​(java.lang.String baseUri)
        Sets the base URI used to resolve relative references found within the scope of the xml:base attribute.
        Parameters:
        baseUri - The base URI used to resolve relative references found within the scope of the xml:base attribute.
      • setGenerator

        public void setGenerator​(Generator generator)
        Sets the agent used to generate a feed.
        Parameters:
        generator - The agent used to generate a feed.
      • setIcon

        public void setIcon​(org.restlet.data.Reference icon)
        Sets the image that provides iconic visual identification for a feed.
        Parameters:
        icon - The image that provides iconic visual identification for a feed.
      • setId

        public void setId​(java.lang.String id)
        Sets the permanent, universally unique identifier for the feed.
        Parameters:
        id - The permanent, universally unique identifier for the feed.
      • setLogo

        public void setLogo​(org.restlet.data.Reference logo)
        Sets the image that provides visual identification for a feed.
        Parameters:
        logo - The image that provides visual identification for a feed.
      • setRights

        public void setRights​(java.lang.String rights)
        Sets the information about rights held in and over an feed.
        Parameters:
        rights - The information about rights held in and over an feed.
      • setRights

        public void setRights​(Text rights)
        Sets the information about rights held in and over an feed.
        Parameters:
        rights - The information about rights held in and over an feed.
      • setSubtitle

        public void setSubtitle​(java.lang.String subtitle)
        Sets the short summary, abstract, or excerpt of an feed.
        Parameters:
        subtitle - The short summary, abstract, or excerpt of an feed.
      • setSubtitle

        public void setSubtitle​(Text subtitle)
        Sets the short summary, abstract, or excerpt of an feed.
        Parameters:
        subtitle - The short summary, abstract, or excerpt of an feed.
      • setTitle

        public void setTitle​(java.lang.String title)
        Sets the human-readable title for the feed.
        Parameters:
        title - The human-readable title for the feed.
      • setTitle

        public void setTitle​(Text title)
        Sets the human-readable title for the feed.
        Parameters:
        title - The human-readable title for the feed.
      • setUpdated

        public void setUpdated​(java.util.Date updated)
        Sets the most recent moment when the feed was modified in a significant way.
        Parameters:
        updated - The most recent moment when the feed was modified in a significant way.
      • write

        public void write​(XmlWriter writer)
                   throws java.io.IOException
        Writes the representation to a XML writer.
        Overrides:
        write in class SaxRepresentation
        Parameters:
        writer - The XML writer to write to.
        Throws:
        java.io.IOException
      • writeElement

        public void writeElement​(XmlWriter writer)
                          throws org.xml.sax.SAXException
        Writes the current object as an XML element using the given SAX writer.
        Parameters:
        writer - The SAX writer.
        Throws:
        org.xml.sax.SAXException