com.google.gdata.wireformats.input
Class AtomServiceDataParser

java.lang.Object
  extended by com.google.gdata.wireformats.input.AbstractParser<T>
      extended by com.google.gdata.wireformats.input.CharacterParser<T>
          extended by com.google.gdata.wireformats.input.XmlInputParser<ServiceDocument>
              extended by com.google.gdata.wireformats.input.AtomServiceDataParser
All Implemented Interfaces:
InputParser<ServiceDocument>

public class AtomServiceDataParser
extends XmlInputParser<ServiceDocument>

The AtomServiceDataParser class provides an InputParser implementation for Atom Service Documents.


Field Summary
 
Fields inherited from class com.google.gdata.wireformats.input.AbstractParser
altFormat, resultType
 
Constructor Summary
AtomServiceDataParser()
          Constructs a new AtomServiceDataParser.
 
Method Summary
<R extends ServiceDocument>
R
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
<R extends ServiceDocument>
R
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 com.google.gdata.wireformats.input.XmlInputParser
parse
 
Methods inherited from class com.google.gdata.wireformats.input.CharacterParser
getCharset
 
Methods inherited from class com.google.gdata.wireformats.input.AbstractParser
createResult, createResult, getAltFormat, getResultType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomServiceDataParser

public AtomServiceDataParser()
Constructs a new AtomServiceDataParser.

Method Detail

parse

protected <R extends ServiceDocument> R parse(XmlEventSource eventSource,
                                              InputProperties inProps,
                                              java.lang.Class<R> resultClass)
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<ServiceDocument>
Type Parameters:
R - result type
Parameters:
eventSource - event source.
inProps - input properties.
resultClass - result type.
Returns:
instance of result type.

parse

public <R extends ServiceDocument> 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<ServiceDocument>
Type Parameters:
R - expected result type
Parameters:
inputReader - reader to parse data from
inProps - input properties
resultClass - 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