de.nava.informa.parsers
Class Atom_1_0_Parser

java.lang.Object
  extended by de.nava.informa.parsers.Atom_1_0_Parser
All Implemented Interfaces:
ChannelParserIF

public class Atom_1_0_Parser
extends Object
implements ChannelParserIF

Parser which reads in document instances according to the Atom 1.0 specification and generates a news channel object. Currently the support for the atom syntax is not complete. This parser is based on code of Atom 0.3 parser. Some good sources of information regarding Atom 1.0 are: http://www.atomenabled.org/developers/syndication/atom-format-spec.php http://rakaz.nl/item/moving_from_atom_03_to_10 http://www.atomenabled.org/developers/syndication/ http://www-128.ibm.com/developerworks/xml/library/x-atom10.html

Author:
Nilesh Bansal

Method Summary
(package private) static String getAuthorString(List authors, org.jdom.Namespace defNS)
          a semicolon separated list of authors
static String getDescription(org.jdom.Element item, org.jdom.Namespace namespace)
          Looks for "content" elements and takes first from them or looks for "summary" element if "content" not found.
static Atom_1_0_Parser getInstance()
          Get the Atom_1_0_Parser instance.
(package private) static String getMode(org.jdom.Element elt)
          returns mode of a element based on its mime type
(package private) static String getMode(String type)
           
 ChannelIF parse(ChannelBuilderIF cBuilder, org.jdom.Element channel)
          Method that implements the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Atom_1_0_Parser getInstance()
Get the Atom_1_0_Parser instance.


getAuthorString

static String getAuthorString(List authors,
                              org.jdom.Namespace defNS)
a semicolon separated list of authors


getDescription

public static String getDescription(org.jdom.Element item,
                                    org.jdom.Namespace namespace)
Looks for "content" elements and takes first from them or looks for "summary" element if "content" not found.

Parameters:
item - item element.
namespace - namespace.
Returns:
description for item.

getMode

static String getMode(org.jdom.Element elt)
returns mode of a element based on its mime type


getMode

static String getMode(String type)

parse

public ChannelIF parse(ChannelBuilderIF cBuilder,
                       org.jdom.Element channel)
                throws ParseException
Description copied from interface: ChannelParserIF
Method that implements the parser.

Specified by:
parse in interface ChannelParserIF
Throws:
ParseException
See Also:
ChannelParserIF.parse(de.nava.informa.core.ChannelBuilderIF, org.jdom.Element)


Copyright © 2002-2007 Niko Schmuck. All Rights Reserved.