com.sun.syndication.io.impl
Class Atom03Parser

java.lang.Object
  extended bycom.sun.syndication.io.impl.Atom03Parser
All Implemented Interfaces:
FeedParser

public class Atom03Parser
extends java.lang.Object
implements FeedParser


Constructor Summary
Atom03Parser()
           
 
Method Summary
protected  org.jdom.Namespace getAtomNamespace()
           
 java.lang.String getType()
          Returns the type of feed the parser handles.
 boolean isMyType(org.jdom.Document document)
          Inspects an XML Document (JDOM) to check if it can parse it.
 AbstractFeed parse(org.jdom.Document document, boolean validate)
          Parses an XML document (JDOM Document) into a feed bean.
protected  AbstractFeed parseFeed(org.jdom.Element eFeed)
           
protected  void validateFeed(org.jdom.Document document)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Atom03Parser

public Atom03Parser()
Method Detail

getType

public java.lang.String getType()
Description copied from interface: FeedParser
Returns the type of feed the parser handles.

Specified by:
getType in interface FeedParser
Returns:
the type of feed the parser handles.
See Also:
for details on the format of this string.


getAtomNamespace

protected org.jdom.Namespace getAtomNamespace()

isMyType

public boolean isMyType(org.jdom.Document document)
Description copied from interface: FeedParser
Inspects 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:
isMyType in interface FeedParser
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.

parse

public AbstractFeed parse(org.jdom.Document document,
                          boolean validate)
                   throws java.lang.IllegalArgumentException,
                          FeedException
Description copied from interface: FeedParser
Parses an XML document (JDOM Document) into a feed bean.

Specified by:
parse in interface FeedParser
Parameters:
document - XML document (JDOM) to parse.
validate - indicates if the feed should be strictly validated (NOT YET IMPLEMENTED).
Returns:
the resulting feed bean.
Throws:
java.lang.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).

validateFeed

protected void validateFeed(org.jdom.Document document)
                     throws FeedException
Throws:
FeedException

parseFeed

protected AbstractFeed parseFeed(org.jdom.Element eFeed)


Copyright © 2004 Sun Microsystems. All Rights Reserved.