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

public Class RSS10Parser

extends RSS090Parser
Class Inheritance
Imports
java.util.Locale, org.jdom2.Document, .Element, .Namespace, com.rometools.rome.feed.WireFeed, com.rometools.rome.feed.rss.Channel, .Content, .Description, .Item

Field Summary

Modifier and TypeField and Description
private static final Namespace
private static final String

Constructor Summary

AccessConstructor and Description
public
protected
RSS10Parser(final String type, final Namespace ns)

Method Summary

Modifier and TypeMethod and Description
protected Namespace

Returns:

returns "http://purl.org/rss/1.0/".
getRSSNamespace
()

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

Returns the namespace used by RSS elements in document of the RSS 1.0

public boolean

Returns:

true if the document is RSS1., false otherwise.
isMyType
(final Document
document to check if it can be parsed with this parser implementation.
document
)

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

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

Indicates if a JDom document is an RSS instance that can be parsed with the parser.
protected WireFeed
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 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:
getContentNamespacegetImagegetItemsgetRDFNamespacegetTextInputparseparseImageparseItemsparseTextInputvalidateFeed

Field Detail

RSS_NSback to summary
private static final Namespace RSS_NS

Hides com.rometools.rome.io.impl.RSS090Parser.RSS_NS.

RSS_URIback to summary
private static final String RSS_URI

Hides com.rometools.rome.io.impl.RSS090Parser.RSS_URI.

Constructor Detail

RSS10Parserback to summary
public RSS10Parser()
RSS10Parserback to summary
protected RSS10Parser(final String type, final Namespace ns)

Method Detail

getRSSNamespaceback to summary
protected Namespace getRSSNamespace()

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

Returns the namespace used by RSS elements in document of the RSS 1.0

Returns:Namespace

returns "http://purl.org/rss/1.0/".

Annotations
@Override
isMyTypeback to summary
public boolean isMyType(final Document document)

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

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

Indicates if a JDom document is an RSS instance that can be parsed with the parser.

It checks for RDF ("http://www.w3.org/1999/02/22-rdf-syntax-ns#") namespace being defined in the root element and for the RSS 1.0 ("http://purl.org/rss/1.0/") namespace in the channel element.

Parameters
document:Document

document to check if it can be parsed with this parser implementation.

Returns:boolean

true if the document is RSS1., false otherwise.

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

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

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

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

It reads title, link and description and delegates to parseImage, parseItems and parseTextInput. This delegation always passes the root element of the RSS document as different RSS version may have this information in different parts of the XML tree (no assumptions made thanks to the specs variaty)

Parameters
rssRoot:Element

the root element of the RSS document to parse.

Returns:WireFeed

the parsed Channel 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)