com.google.gdata.wireformats.input
Class AtomDualParser

java.lang.Object
  extended by com.google.gdata.wireformats.input.AtomDualParser
All Implemented Interfaces:
InputParser<IAtom>

public class AtomDualParser
extends java.lang.Object
implements InputParser<IAtom>

The AtomDualModeParser class provides an InputParser implementation that is capable of parsing into classes that use the old or new data model. The actual parsing is done by delegating to an instance of the AtomDataParser or ElementParser class.


Constructor Summary
AtomDualParser()
           
 
Method Summary
 AltFormat getAltFormat()
          Returns the alternate representation format that is expected as input to the parser.
 java.lang.Class<IAtom> getResultType()
          Returns the target type that is populated by the parser from the input stream.
<R extends IAtom>
R
parse(ParseSource parseSource, InputProperties inProps, java.lang.Class<R> resultClass)
          Parses data in the supported representation format from the input stream based upon the provided input properties into the provided target object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomDualParser

public AtomDualParser()
Method Detail

getAltFormat

public AltFormat getAltFormat()
Description copied from interface: InputParser
Returns the alternate representation format that is expected as input to the parser.

Specified by:
getAltFormat in interface InputParser<IAtom>

getResultType

public java.lang.Class<IAtom> getResultType()
Description copied from interface: InputParser
Returns the target type that is populated by the parser from the input stream.

Specified by:
getResultType in interface InputParser<IAtom>

parse

public <R extends IAtom> R parse(ParseSource parseSource,
                                 InputProperties inProps,
                                 java.lang.Class<R> resultClass)
                      throws java.io.IOException,
                             ServiceException
Description copied from interface: InputParser
Parses data in the supported representation format from the input stream based upon the provided input properties into the provided target object.

Specified by:
parse in interface InputParser<IAtom>
Parameters:
parseSource - providing the source of the data
inProps - properties describing the input data
resultClass - specific type of result expected from the parse
Throws:
java.io.IOException
ServiceException