com.sun.syndication.io.impl
Class RSS091Parser

java.lang.Object
  extended bycom.sun.syndication.io.impl.RSS090Parser
      extended bycom.sun.syndication.io.impl.RSS091Parser
All Implemented Interfaces:
FeedParser
Direct Known Subclasses:
RSS092Parser

public class RSS091Parser
extends RSS090Parser


Constructor Summary
  RSS091Parser()
           
protected RSS091Parser(java.lang.String type)
           
 
Method Summary
protected  org.jdom.Element getImage(org.jdom.Element rssRoot)
          It looks for the 'image' elements under the 'channel' elemment.
protected  java.util.List getItems(org.jdom.Element rssRoot)
          It looks for the 'item' elements under the 'channel' elemment.
protected  org.jdom.Namespace getRSSNamespace()
          Returns the namespace used by RSS elements in document of the RSS version the parser supports.
protected  java.lang.String getRSSVersion()
           
protected  org.jdom.Element getTextInput(org.jdom.Element rssRoot)
          It looks for the 'textinput' elements under the 'channel' elemment.
protected  boolean isHourFormat24(org.jdom.Element rssRoot)
           
 boolean isMyType(org.jdom.Document document)
          Inspects an XML Document (JDOM) to check if it can parse it.
protected  AbstractFeed parseChannel(org.jdom.Element rssRoot)
          Parses the root element of an RSS document into a Channel bean.
protected  Image parseImage(org.jdom.Element rssRoot)
          Parses the root element of an RSS document looking for image information.
protected  Item parseItem(org.jdom.Element rssRoot, org.jdom.Element eItem)
          Parses an item element of an RSS document looking for item information.
protected  Description parseItemDescription(org.jdom.Element rssRoot, org.jdom.Element eDesc)
           
 
Methods inherited from class com.sun.syndication.io.impl.RSS090Parser
getType, parse, parseItems, parseTextInput, validateFeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSS091Parser

public RSS091Parser()

RSS091Parser

protected RSS091Parser(java.lang.String type)
Method Detail

isMyType

public boolean isMyType(org.jdom.Document document)
Description copied from interface: FeedParser
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 FeedParser
Overrides:
isMyType in class RSS090Parser

getRSSVersion

protected java.lang.String getRSSVersion()

getRSSNamespace

protected org.jdom.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.jdom.Element rssRoot)

parseChannel

protected AbstractFeed parseChannel(org.jdom.Element rssRoot)
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.jdom.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 java.util.List getItems(org.jdom.Element rssRoot)
It looks for the 'item' elements under the 'channel' elemment.

Overrides:
getItems in class RSS090Parser

getImage

protected org.jdom.Element getImage(org.jdom.Element rssRoot)
It looks for the 'image' elements under the 'channel' elemment.

Overrides:
getImage in class RSS090Parser

getTextInput

protected org.jdom.Element getTextInput(org.jdom.Element rssRoot)
It looks for the 'textinput' elements under the 'channel' elemment.

Overrides:
getTextInput in class RSS090Parser

parseItem

protected Item parseItem(org.jdom.Element rssRoot,
                         org.jdom.Element eItem)
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.jdom.Element rssRoot,
                                           org.jdom.Element eDesc)


Copyright © 2004 Sun Microsystems. All Rights Reserved.