Top Constructors Methods
com.rometools.rome.io.impl

public Class RSS091UserlandParser

extends RSS090Parser
Class Inheritance
Known Direct Subclasses
com.rometools.rome.io.impl.RSS092Parser, com.rometools.rome.io.impl.RSS091NetscapeParser
Imports
com.rometools.rome.feed.WireFeed, com.rometools.rome.feed.rss.*, org.jdom2.Attribute, .Document, .Element, .Namespace, java.util.ArrayList, .Collections, .List, .Locale

Constructor Summary

AccessConstructor and Description
public
protected

Method Summary

Modifier and TypeMethod and Description
protected Element
getImage(final Element rssRoot)

Overrides com.rometools.rome.io.impl.RSS090Parser.getImage.

It looks for the 'image' elements under the 'channel' elemment.
protected List<Element>
getItems(final Element rssRoot)

Overrides com.rometools.rome.io.impl.RSS090Parser.getItems.

It looks for the 'item' elements under the 'channel' elemment.
protected Namespace
getRSSNamespace()

Overrides com.rometools.rome.io.impl.RSS090Parser.getRSSNamespace.

Returns the namespace used by RSS elements in document of the RSS version the parser supports.
protected String
protected Element
getTextInput(final Element rssRoot)

Overrides com.rometools.rome.io.impl.RSS090Parser.getTextInput.

It looks for the 'textinput' elements under the 'channel' elemment.
protected String
getTextInputLabel()

To be overriden by RSS 0.91 Netscape parser

protected boolean
isHourFormat24(final Element rssRoot)

To be overriden by RSS 0.91 Netscape and RSS 0.94

public boolean
isMyType(final Document
XML Document (JDOM) to check if it can be parsed by this parser.
document
)

Overrides com.rometools.rome.io.impl.RSS090Parser.isMyType.

Implements com.rometools.rome.io.WireFeedParser.isMyType.

Inspects an XML Document (JDOM) to check if it can parse it.
protected WireFeed

Returns:

the parsed Channel bean.
parseChannel
(final Element
the root element of the RSS document to parse.
rssRoot
,
final Locale locale)

Overrides com.rometools.rome.io.impl.RSS090Parser.parseChannel.

Parses the root element of an RSS document into a Channel bean.
protected Image

Returns:

the parsed RSSImage bean.
parseImage
(final Element
the root element of the RSS document to parse for image information.
rssRoot
)

Overrides com.rometools.rome.io.impl.RSS090Parser.parseImage.

Parses the root element of an RSS document looking for image information.
protected Item

Returns:

the parsed RSSItem bean.
parseItem
(final Element
the root element of the RSS document in case it's needed for context.
rssRoot
,
final Element
the item element to parse.
eItem
,
final Locale locale)

Overrides com.rometools.rome.io.impl.RSS090Parser.parseItem.

Parses an item element of an RSS document looking for item information.
protected Description
parseItemDescription(final Element rssRoot, final Element eDesc)

Inherited from com.rometools.rome.io.impl.RSS090Parser:
getContentNamespacegetRDFNamespaceparseparseItemsparseTextInputvalidateFeed

Constructor Detail

RSS091UserlandParserback to summary
public RSS091UserlandParser()
RSS091UserlandParserback to summary
protected RSS091UserlandParser(final String type)

Method Detail

getImageback to summary
protected Element getImage(final Element rssRoot)

Overrides com.rometools.rome.io.impl.RSS090Parser.getImage.

It looks for the 'image' elements under the 'channel' elemment.

Annotations
@Override
getItemsback to summary
protected List<Element> getItems(final Element rssRoot)

Overrides com.rometools.rome.io.impl.RSS090Parser.getItems.

It looks for the 'item' elements under the 'channel' elemment.

Annotations
@Override
getRSSNamespaceback to summary
protected Namespace getRSSNamespace()

Overrides com.rometools.rome.io.impl.RSS090Parser.getRSSNamespace.

Doc from com.rometools.rome.io.impl.RSS090Parser.getRSSNamespace.

Returns the namespace used by RSS elements in document of the RSS version the parser supports.

This implementation returns the EMTPY namespace.

Returns:Namespace

returns the EMPTY namespace.

Annotations
@Override
getRSSVersionback to summary
protected String getRSSVersion()
getTextInputback to summary
protected Element getTextInput(final Element rssRoot)

Overrides com.rometools.rome.io.impl.RSS090Parser.getTextInput.

It looks for the 'textinput' elements under the 'channel' elemment.

Annotations
@Override
getTextInputLabelback to summary
protected String getTextInputLabel()

To be overriden by RSS 0.91 Netscape parser

isHourFormat24back to summary
protected boolean isHourFormat24(final Element rssRoot)

To be overriden by RSS 0.91 Netscape and RSS 0.94

isMyTypeback to summary
public boolean isMyType(final Document document)

Overrides com.rometools.rome.io.impl.RSS090Parser.isMyType.

Implements com.rometools.rome.io.WireFeedParser.isMyType.

Doc from com.rometools.rome.io.WireFeedParser.isMyType.

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.

Parameters
document:Document

XML Document (JDOM) to check if it can be parsed by this parser.

Returns:boolean

true if the parser know how to parser this feed, false otherwise.

Annotations
@Override
parseChannelback to summary
protected WireFeed parseChannel(final Element rssRoot, final Locale locale)

Overrides com.rometools.rome.io.impl.RSS090Parser.parseChannel.

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.

Parameters
rssRoot:Element

the root element of the RSS document to parse.

Returns:WireFeed

the parsed Channel bean.

Annotations
@Override
parseImageback to summary
protected Image parseImage(final Element rssRoot)

Overrides com.rometools.rome.io.impl.RSS090Parser.parseImage.

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.

Parameters
rssRoot:Element

the root element of the RSS document to parse for image information.

Returns:Image

the parsed RSSImage bean.

Annotations
@Override
parseItemback to summary
protected Item parseItem(final Element rssRoot, final Element eItem, final Locale locale)

Overrides com.rometools.rome.io.impl.RSS090Parser.parseItem.

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.

Parameters
rssRoot:Element

the root element of the RSS document in case it's needed for context.

eItem:Element

the item element to parse.

Returns:Item

the parsed RSSItem bean.

Annotations
@Override
parseItemDescriptionback to summary
protected Description parseItemDescription(final Element rssRoot, final Element eDesc)