de.nava.informa.parsers
Class Atom_0_3_Parser

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

 class Atom_0_3_Parser
extends Object
implements ChannelParserIF

Parser which reads in document instances according to the Atom 0.3 specification and generates a news channel object. Currently the support for the atom syntax is not complete.

Author:
Niko Schmuck

Field Summary
static org.apache.commons.logging.Log LOGGER
           
 
Method Summary
(package private) static String getContent(org.jdom.Element elt)
          Returns the content from content element.
(package private) static String getCopyright(org.jdom.Element elt)
          Returns copyright from element.
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_0_3_Parser getInstance()
          Get the Atom_0_3_Parser instance.
(package private) static String getTitle(org.jdom.Element elt)
          Returns the title from title element.
(package private) static String getValue(org.jdom.Element elt)
           
 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
 

Field Detail

LOGGER

public static final org.apache.commons.logging.Log LOGGER
Method Detail

getInstance

public static Atom_0_3_Parser getInstance()
Get the Atom_0_3_Parser instance.


getValue

static String getValue(org.jdom.Element elt)

getContent

static String getContent(org.jdom.Element elt)
Returns the content from content element.


getCopyright

static String getCopyright(org.jdom.Element elt)
Returns copyright from element.


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.

getTitle

static String getTitle(org.jdom.Element elt)
Returns the title from title element.


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.