Package com.rometools.rome.io.impl
Class FeedParsers
- java.lang.Object
-
- com.rometools.rome.io.impl.PluginManager<WireFeedParser>
-
- com.rometools.rome.io.impl.FeedParsers
-
public class FeedParsers extends PluginManager<WireFeedParser>
Parses an XML document (JDOM Document) into a Feed.It accepts all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feeds.
The WireFeedParser is a liberal parser.
WireFeedParser instances are thread safe.
Parsers for a specific type must extend this class and register in the parser list. (Right now registration is hardcoded in the WireFeedParser constructor).
-
-
Field Summary
Fields Modifier and Type Field Description static StringFEED_PARSERS_KEYWireFeedParser.classes= [className] ...
-
Constructor Summary
Constructors Constructor Description FeedParsers()Creates a parser instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetKey(WireFeedParser obj)WireFeedParsergetParserFor(org.jdom2.Document document)Finds the real parser type for the given document feed.List<String>getSupportedFeedTypes()-
Methods inherited from class com.rometools.rome.io.impl.PluginManager
getKeys, getPlugin, getPluginMap, getPlugins
-
-
-
-
Field Detail
-
FEED_PARSERS_KEY
public static final String FEED_PARSERS_KEY
WireFeedParser.classes= [className] ...- See Also:
- Constant Field Values
-
-
Method Detail
-
getParserFor
public WireFeedParser getParserFor(org.jdom2.Document document)
Finds the real parser type for the given document feed.- Parameters:
document- document feed to find the parser for.- Returns:
- the parser for the given document or null if there is no parser for that document.
-
getKey
protected String getKey(WireFeedParser obj)
- Specified by:
getKeyin classPluginManager<WireFeedParser>
-
-