Package com.rometools.rome.io.impl
Class RSS091UserlandParser
- java.lang.Object
-
- com.rometools.rome.io.impl.BaseWireFeedParser
-
- com.rometools.rome.io.impl.RSS090Parser
-
- com.rometools.rome.io.impl.RSS091UserlandParser
-
- All Implemented Interfaces:
WireFeedParser
- Direct Known Subclasses:
RSS091NetscapeParser,RSS092Parser
public class RSS091UserlandParser extends RSS090Parser
-
-
Constructor Summary
Constructors Modifier Constructor Description RSS091UserlandParser()protectedRSS091UserlandParser(String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.jdom2.ElementgetImage(org.jdom2.Element rssRoot)It looks for the 'image' elements under the 'channel' elemment.protected List<org.jdom2.Element>getItems(org.jdom2.Element rssRoot)It looks for the 'item' elements under the 'channel' elemment.protected org.jdom2.NamespacegetRSSNamespace()Returns the namespace used by RSS elements in document of the RSS version the parser supports.protected StringgetRSSVersion()protected org.jdom2.ElementgetTextInput(org.jdom2.Element rssRoot)It looks for the 'textinput' elements under the 'channel' elemment.protected StringgetTextInputLabel()To be overriden by RSS 0.91 Netscape parserprotected booleanisHourFormat24(org.jdom2.Element rssRoot)To be overriden by RSS 0.91 Netscape and RSS 0.94booleanisMyType(org.jdom2.Document document)Inspects an XML Document (JDOM) to check if it can parse it.protected WireFeedparseChannel(org.jdom2.Element rssRoot, Locale locale)Parses the root element of an RSS document into a Channel bean.protected ImageparseImage(org.jdom2.Element rssRoot)Parses the root element of an RSS document looking for image information.protected ItemparseItem(org.jdom2.Element rssRoot, org.jdom2.Element eItem, Locale locale)Parses an item element of an RSS document looking for item information.protected DescriptionparseItemDescription(org.jdom2.Element rssRoot, org.jdom2.Element eDesc)-
Methods inherited from class com.rometools.rome.io.impl.RSS090Parser
getContentNamespace, getRDFNamespace, parse, parseItems, parseTextInput, validateFeed
-
Methods inherited from class com.rometools.rome.io.impl.BaseWireFeedParser
extractForeignMarkup, getAttribute, getAttributeValue, getStyleSheet, getType, parseFeedModules, parseItemModules, parsePersonModules
-
-
-
-
Constructor Detail
-
RSS091UserlandParser
public RSS091UserlandParser()
-
RSS091UserlandParser
protected RSS091UserlandParser(String type)
-
-
Method Detail
-
isMyType
public boolean isMyType(org.jdom2.Document document)
Description copied from interface:WireFeedParserInspects 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:
isMyTypein interfaceWireFeedParser- Overrides:
isMyTypein classRSS090Parser- Parameters:
document- XML Document (JDOM) to check if it can be parsed by this parser.- Returns:
- true if the parser know how to parser this feed, false otherwise.
-
getRSSVersion
protected String getRSSVersion()
-
getRSSNamespace
protected org.jdom2.Namespace getRSSNamespace()
Description copied from class:RSS090ParserReturns the namespace used by RSS elements in document of the RSS version the parser supports.This implementation returns the EMTPY namespace.
- Overrides:
getRSSNamespacein classRSS090Parser- Returns:
- returns the EMPTY namespace.
-
isHourFormat24
protected boolean isHourFormat24(org.jdom2.Element rssRoot)
To be overriden by RSS 0.91 Netscape and RSS 0.94
-
parseChannel
protected WireFeed parseChannel(org.jdom2.Element rssRoot, Locale locale)
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:
parseChannelin classRSS090Parser- Parameters:
rssRoot- the root element of the RSS document to parse.- Returns:
- the parsed Channel bean.
-
parseImage
protected Image parseImage(org.jdom2.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:
parseImagein classRSS090Parser- Parameters:
rssRoot- the root element of the RSS document to parse for image information.- Returns:
- the parsed RSSImage bean.
-
getItems
protected List<org.jdom2.Element> getItems(org.jdom2.Element rssRoot)
It looks for the 'item' elements under the 'channel' elemment.- Overrides:
getItemsin classRSS090Parser
-
getImage
protected org.jdom2.Element getImage(org.jdom2.Element rssRoot)
It looks for the 'image' elements under the 'channel' elemment.- Overrides:
getImagein classRSS090Parser
-
getTextInputLabel
protected String getTextInputLabel()
To be overriden by RSS 0.91 Netscape parser
-
getTextInput
protected org.jdom2.Element getTextInput(org.jdom2.Element rssRoot)
It looks for the 'textinput' elements under the 'channel' elemment.- Overrides:
getTextInputin classRSS090Parser
-
parseItem
protected Item parseItem(org.jdom2.Element rssRoot, org.jdom2.Element eItem, Locale locale)
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:
parseItemin classRSS090Parser- 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.jdom2.Element rssRoot, org.jdom2.Element eDesc)
-
-