public class RSS090Parser extends BaseWireFeedParser
Modifier | Constructor and Description |
---|---|
|
RSS090Parser() |
protected |
RSS090Parser(String type,
org.jdom2.Namespace ns) |
Modifier and Type | Method and Description |
---|---|
protected org.jdom2.Namespace |
getContentNamespace()
Returns the namespace used by Content Module elements in document.
|
protected org.jdom2.Element |
getImage(org.jdom2.Element rssRoot)
This method exists because RSS0.90 and RSS1.0 have the 'image' element under the root
elemment.
|
protected List<org.jdom2.Element> |
getItems(org.jdom2.Element rssRoot)
This method exists because RSS0.90 and RSS1.0 have the 'item' elements under the root
elemment.
|
protected org.jdom2.Namespace |
getRDFNamespace()
Returns the namespace used by RDF elements in document of the RSS version the parser
supports.
|
protected org.jdom2.Namespace |
getRSSNamespace()
Returns the namespace used by RSS elements in document of the RSS version the parser
supports.
|
protected org.jdom2.Element |
getTextInput(org.jdom2.Element rssRoot)
This method exists because RSS0.90 and RSS1.0 have the 'textinput' element under the root
elemment.
|
boolean |
isMyType(org.jdom2.Document document)
Inspects an XML Document (JDOM) to check if it can parse it.
|
WireFeed |
parse(org.jdom2.Document document,
boolean validate,
Locale locale)
Parses an XML document (JDOM Document) into a feed bean.
|
protected WireFeed |
parseChannel(org.jdom2.Element rssRoot,
Locale locale)
Parses the root element of an RSS document into a Channel bean.
|
protected Image |
parseImage(org.jdom2.Element rssRoot)
Parses the root element of an RSS document looking for image information.
|
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.
|
protected List<Item> |
parseItems(org.jdom2.Element rssRoot,
Locale locale)
Parses the root element of an RSS document looking for all items information.
|
protected TextInput |
parseTextInput(org.jdom2.Element rssRoot)
Parses the root element of an RSS document looking for text-input information.
|
protected void |
validateFeed(org.jdom2.Document document) |
extractForeignMarkup, getAttribute, getAttributeValue, getStyleSheet, getType, parseFeedModules, parseItemModules, parsePersonModules
public RSS090Parser()
protected RSS090Parser(String type, org.jdom2.Namespace ns)
public boolean isMyType(org.jdom2.Document document)
WireFeedParser
It checks if the given document if the type of feeds the parser understands.
document
- XML Document (JDOM) to check if it can be parsed by this parser.public WireFeed parse(org.jdom2.Document document, boolean validate, Locale locale) throws IllegalArgumentException, FeedException
WireFeedParser
document
- XML document (JDOM) to parse.validate
- indicates if the feed should be strictly validated (NOT YET IMPLEMENTED).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).protected void validateFeed(org.jdom2.Document document) throws FeedException
FeedException
protected org.jdom2.Namespace getRSSNamespace()
This implementation returns the EMTPY namespace.
protected org.jdom2.Namespace getRDFNamespace()
This implementation returns the EMTPY namespace.
protected org.jdom2.Namespace getContentNamespace()
This implementation returns the EMTPY namespace.
protected WireFeed parseChannel(org.jdom2.Element rssRoot, Locale locale)
rssRoot
- the root element of the RSS document to parse.protected List<org.jdom2.Element> getItems(org.jdom2.Element rssRoot)
protected org.jdom2.Element getImage(org.jdom2.Element rssRoot)
protected org.jdom2.Element getTextInput(org.jdom2.Element rssRoot)
protected Image parseImage(org.jdom2.Element rssRoot)
rssRoot
- the root element of the RSS document to parse for image information.protected List<Item> parseItems(org.jdom2.Element rssRoot, Locale locale)
rssRoot
- the root element of the RSS document to parse for all items information.protected Item parseItem(org.jdom2.Element rssRoot, org.jdom2.Element eItem, Locale locale)
rssRoot
- the root element of the RSS document in case it's needed for context.eItem
- the item element to parse.protected TextInput parseTextInput(org.jdom2.Element rssRoot)
rssRoot
- the root element of the RSS document to parse for text-input information.Copyright © 2020. All rights reserved.