com.google.gdata.wireformats.input
Class AtomDataParser
java.lang.Object
com.google.gdata.wireformats.input.AbstractParser<T>
com.google.gdata.wireformats.input.CharacterParser<T>
com.google.gdata.wireformats.input.XmlInputParser<IAtom>
com.google.gdata.wireformats.input.AtomDataParser
- All Implemented Interfaces:
- InputParser<IAtom>
public class AtomDataParser
- extends XmlInputParser<IAtom>
Parses Atom feed or entry data using classes based upon the old data
model in com.google.gdata.data
.
Constructor Summary |
AtomDataParser()
Constructs a new AtomDataParser instance. |
Method Summary |
|
parse(java.io.Reader inputReader,
InputProperties inProps,
java.lang.Class<R> resultClass)
Parses character content with the specified properties to produce a result
of an expected type. |
protected
|
parse(XmlEventSource eventSource,
InputProperties inProps,
java.lang.Class<R> resultClass)
The parse method should be implemented by subclasses and should parse
input data from the provided XmlEventSource instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AtomDataParser
public AtomDataParser()
- Constructs a new AtomDataParser instance.
parse
public <R extends IAtom> R parse(java.io.Reader inputReader,
InputProperties inProps,
java.lang.Class<R> resultClass)
throws java.io.IOException,
ServiceException
- Description copied from class:
CharacterParser
- Parses character content with the specified properties to produce a result
of an expected type. Concrete subclasses will provide an implementation
of this method that constructs a result type instance of the result class
and then parses into it from the provided
Reader
.
- Specified by:
parse
in class CharacterParser<IAtom>
- Type Parameters:
R
- expected result type- Parameters:
inputReader
- reader to parse data frominProps
- input propertiesresultClass
- class to instantiate and parse result into.
- Returns:
- result object from parse
- Throws:
java.io.IOException
- if an error occurred reading data while parsing
ServiceException
- if an error occurred within the content
parse
protected <R extends IAtom> R parse(XmlEventSource eventSource,
InputProperties inProps,
java.lang.Class<R> resultClass)
throws java.io.IOException,
ServiceException
- Description copied from class:
XmlInputParser
- The parse method should be implemented by subclasses and should parse
input data from the provided
XmlEventSource
instance.
- Specified by:
parse
in class XmlInputParser<IAtom>
- Type Parameters:
R
- result type- Parameters:
eventSource
- event source.inProps
- input properties.resultClass
- result type.
- Returns:
- instance of result type.
- Throws:
java.io.IOException
- error reading data from event source.
ServiceException
- parsing error.