org.rometools.io.impl
Class OPML10Parser

java.lang.Object
  extended by com.sun.syndication.io.impl.BaseWireFeedParser
      extended by org.rometools.io.impl.OPML10Parser
All Implemented Interfaces:
com.sun.syndication.io.WireFeedParser
Direct Known Subclasses:
OPML20Parser

public class OPML10Parser
extends com.sun.syndication.io.impl.BaseWireFeedParser
implements com.sun.syndication.io.WireFeedParser

Author:
Robert "kebernet" Cooper

Constructor Summary
OPML10Parser()
          Creates a new instance of Opml10Parser
OPML10Parser(String type)
           
 
Method Summary
 boolean isMyType(org.jdom.Document document)
          Inspects an XML Document (JDOM) to check if it can parse it.
 com.sun.syndication.feed.WireFeed parse(org.jdom.Document document, boolean validate)
          Parses an XML document (JDOM Document) into a feed bean.
protected  Outline parseOutline(org.jdom.Element e, boolean validate)
           
protected  List parseOutlines(List elements, boolean validate)
           
protected  boolean readBoolean(String value)
           
protected  int[] readIntArray(String value)
           
protected  Integer readInteger(String value)
           
 
Methods inherited from class com.sun.syndication.io.impl.BaseWireFeedParser
extractForeignMarkup, getAttribute, getAttributeValue, getType, parseFeedModules, parseItemModules, parsePersonModules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.syndication.io.WireFeedParser
getType
 

Constructor Detail

OPML10Parser

public OPML10Parser()
Creates a new instance of Opml10Parser


OPML10Parser

public OPML10Parser(String type)
Method Detail

isMyType

public boolean isMyType(org.jdom.Document document)
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 com.sun.syndication.io.WireFeedParser
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 com.sun.syndication.feed.WireFeed parse(org.jdom.Document document,
                                               boolean validate)
                                        throws IllegalArgumentException,
                                               com.sun.syndication.io.FeedException
Parses an XML document (JDOM Document) into a feed bean.

Specified by:
parse in interface com.sun.syndication.io.WireFeedParser
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:
IllegalArgumentException - thrown if the parser cannot handle the given feed type.
com.sun.syndication.io.FeedException - thrown if a feed bean cannot be created out of the XML document (JDOM).

parseOutline

protected Outline parseOutline(org.jdom.Element e,
                               boolean validate)
                        throws com.sun.syndication.io.FeedException
Throws:
com.sun.syndication.io.FeedException

parseOutlines

protected List parseOutlines(List elements,
                             boolean validate)
                      throws com.sun.syndication.io.FeedException
Throws:
com.sun.syndication.io.FeedException

readBoolean

protected boolean readBoolean(String value)

readIntArray

protected int[] readIntArray(String value)

readInteger

protected Integer readInteger(String value)


Copyright © 2013 ROME Project. All Rights Reserved.