Class RSS091UserlandParser

    • Constructor Detail

      • RSS091UserlandParser

        public RSS091UserlandParser()
      • RSS091UserlandParser

        protected RSS091UserlandParser​(String type)
    • Method Detail

      • isMyType

        public boolean isMyType​(org.jdom2.Document document)
        Description copied from interface: WireFeedParser
        Inspects an XML Document (JDOM) to check if it can parse it.

        It checks if the given document if the type of feeds the parser understands.

        Specified by:
        isMyType in interface WireFeedParser
        Overrides:
        isMyType in class RSS090Parser
        Parameters:
        document - XML Document (JDOM) to check if it can be parsed by this parser.
        Returns:
        true if the parser know how to parser this feed, false otherwise.
      • getRSSVersion

        protected String getRSSVersion()
      • getRSSNamespace

        protected org.jdom2.Namespace getRSSNamespace()
        Description copied from class: RSS090Parser
        Returns the namespace used by RSS elements in document of the RSS version the parser supports.

        This implementation returns the EMTPY namespace.

        Overrides:
        getRSSNamespace in class RSS090Parser
        Returns:
        returns the EMPTY namespace.
      • isHourFormat24

        protected boolean isHourFormat24​(org.jdom2.Element rssRoot)
        To be overriden by RSS 0.91 Netscape and RSS 0.94
      • parseChannel

        protected WireFeed parseChannel​(org.jdom2.Element rssRoot,
                                        Locale locale)
        Parses the root element of an RSS document into a Channel bean.

        It first invokes super.parseChannel and then parses and injects the following properties if present: language, pubDate, rating and copyright.

        Overrides:
        parseChannel in class RSS090Parser
        Parameters:
        rssRoot - the root element of the RSS document to parse.
        Returns:
        the parsed Channel bean.
      • parseImage

        protected Image parseImage​(org.jdom2.Element rssRoot)
        Parses the root element of an RSS document looking for image information.

        It first invokes super.parseImage and then parses and injects the following properties if present: url, link, width, height and description.

        Overrides:
        parseImage in class RSS090Parser
        Parameters:
        rssRoot - the root element of the RSS document to parse for image information.
        Returns:
        the parsed RSSImage bean.
      • getItems

        protected List<org.jdom2.Element> getItems​(org.jdom2.Element rssRoot)
        It looks for the 'item' elements under the 'channel' elemment.
        Overrides:
        getItems in class RSS090Parser
      • getImage

        protected org.jdom2.Element getImage​(org.jdom2.Element rssRoot)
        It looks for the 'image' elements under the 'channel' elemment.
        Overrides:
        getImage in class RSS090Parser
      • getTextInputLabel

        protected String getTextInputLabel()
        To be overriden by RSS 0.91 Netscape parser
      • getTextInput

        protected org.jdom2.Element getTextInput​(org.jdom2.Element rssRoot)
        It looks for the 'textinput' elements under the 'channel' elemment.
        Overrides:
        getTextInput in class RSS090Parser
      • parseItem

        protected Item parseItem​(org.jdom2.Element rssRoot,
                                 org.jdom2.Element eItem,
                                 Locale locale)
        Parses an item element of an RSS document looking for item information.

        It first invokes super.parseItem and then parses and injects the description property if present.

        Overrides:
        parseItem in class RSS090Parser
        Parameters:
        rssRoot - the root element of the RSS document in case it's needed for context.
        eItem - the item element to parse.
        Returns:
        the parsed RSSItem bean.
      • parseItemDescription

        protected Description parseItemDescription​(org.jdom2.Element rssRoot,
                                                   org.jdom2.Element eDesc)