Top Description Methods
com.rometools.rome.io

public Interface WireFeedParser

Known Direct Implementers
com.rometools.rome.io.impl.BaseWireFeedParser
Imports
java.util.Locale, org.jdom2.Document, com.rometools.rome.feed.WireFeed

Parses an XML document (JDOM) into a feed bean.

WireFeedParser instances must thread safe.

Todo

explain how developers can plugin their own implementations.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the type of feed the parser handles.
getType
()

Returns the type of feed the parser handles.

public boolean

Returns:

true if the parser know how to parser this feed, false otherwise.
isMyType
(Document
XML Document (JDOM) to check if it can be parsed by this parser.
document
)

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

public WireFeed

Returns:

the resulting feed bean.
parse
(Document
XML document (JDOM) to parse.
document
,
boolean
indicates if the feed should be strictly validated (NOT YET IMPLEMENTED).
validate
,
final Locale locale)

Parses an XML document (JDOM Document) into a feed bean.

Method Detail

getTypeback to summary
public String getType()

Returns the type of feed the parser handles.

Returns:String

the type of feed the parser handles.

See Also
{@link WireFeed} for details on the format of this string.

isMyTypeback to summary
public boolean isMyType(Document document)

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.

parseback to summary
public WireFeed parse(Document document, boolean validate, final Locale locale) throws IllegalArgumentException, FeedException

Parses an XML document (JDOM Document) into a feed bean.

Parameters
document:Document

XML document (JDOM) to parse.

validate:boolean

indicates if the feed should be strictly validated (NOT YET IMPLEMENTED).

Returns:WireFeed

the resulting feed bean.

Exceptions
IllegalArgumentException:
thrown if the parser cannot handle the given feed type.
FeedException:
thrown if a feed bean cannot be created out of the XML document (JDOM).