net.sourceforge.rssowl.dao.feedparser
Class Atom_1_0_Parser

java.lang.Object
  extended by net.sourceforge.rssowl.dao.feedparser.AbstractFeedParser
      extended by net.sourceforge.rssowl.dao.feedparser.Atom_1_0_Parser

public class Atom_1_0_Parser
extends AbstractFeedParser

Parser for the Atom 1.0 Format
Specification: http://www.atomenabled.org/developers/syndication/

Version:
1.2.4
Author:
Benjamin Pasero

Field Summary
private static org.jdom.Namespace xhtml
          Namespace: XHTML
 
Fields inherited from class net.sourceforge.rssowl.dao.feedparser.AbstractFeedParser
content, dc, defNs, document, rdf, root, rssChannel, sy, url
 
Constructor Summary
Atom_1_0_Parser(org.jdom.Document document, Channel rssChannel, java.lang.String url, org.jdom.Namespace[] nameSpaces)
          Instantiate a new Parser for this format.
 
Method Summary
protected  java.lang.String getChildText(java.lang.String element, org.jdom.Element parent)
          Get a text-value from the atom document.
protected  void parse()
          Parse elements that are defined in the specifications and add them to the Channel.
private  java.lang.String resolve(java.net.URI base, java.lang.String rel)
          Resolve the given String to the given Base URI.
 
Methods inherited from class net.sourceforge.rssowl.dao.feedparser.AbstractFeedParser
getAttributeValue, getAttributeValue, getChildElement, getChildElement, getChildren, getChildren, getChildValue, getChildValue, parseContentModule, parseDCModule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xhtml

private static final org.jdom.Namespace xhtml
Namespace: XHTML

Constructor Detail

Atom_1_0_Parser

public Atom_1_0_Parser(org.jdom.Document document,
                       Channel rssChannel,
                       java.lang.String url,
                       org.jdom.Namespace[] nameSpaces)
                throws NewsfeedFactoryException
Instantiate a new Parser for this format.

Parameters:
document - The document containing the data to parse
rssChannel - The Channel to fill with data from the document
url - The URL of the Newsfeed that is parsed
nameSpaces - Possible NameSpaces of the XML document
Throws:
NewsfeedFactoryException - If any error occurs
Method Detail

resolve

private java.lang.String resolve(java.net.URI base,
                                 java.lang.String rel)
Resolve the given String to the given Base URI.

Parameters:
base - The Base URI to use for resolving.
rel - The relative to resolve against the URI.
Returns:
The resolved URI as String.

getChildText

protected java.lang.String getChildText(java.lang.String element,
                                        org.jdom.Element parent)
Get a text-value from the atom document. The text can either be of the type "text", "html" or "xhtml".

Parameters:
element - The element's name
parent - The parent element
Returns:
String the value or null

parse

protected void parse()
Description copied from class: AbstractFeedParser
Parse elements that are defined in the specifications and add them to the Channel.

Specified by:
parse in class AbstractFeedParser
See Also:
AbstractFeedParser.parse()


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo