com.google.api.client.googleapis.xml.atom
Class MultiKindFeedParser<T>

java.lang.Object
  extended by com.google.api.client.xml.atom.AbstractAtomFeedParser<T>
      extended by com.google.api.client.googleapis.xml.atom.MultiKindFeedParser<T>
Type Parameters:
T - feed type

public final class MultiKindFeedParser<T>
extends AbstractAtomFeedParser<T>

GData Atom feed pull parser when the entry class can be computed from the kind.

Since:
1.0
Author:
Yaniv Inbar

Method Summary
static
<T,E> MultiKindFeedParser<T>
create(HttpResponse response, XmlNamespaceDictionary namespaceDictionary, Class<T> feedClass, Class<E>... entryClasses)
          Parses the given HTTP response using the given feed class and entry classes.
protected  Object parseEntryInternal()
           
 void setEntryClasses(Class<?>... entryClasses)
          Sets the entry classes to use when parsing.
 
Methods inherited from class com.google.api.client.xml.atom.AbstractAtomFeedParser
close, getFeedClass, getInputStream, getNamespaceDictionary, getParser, parseFeed, parseNextEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setEntryClasses

public void setEntryClasses(Class<?>... entryClasses)
Sets the entry classes to use when parsing.


parseEntryInternal

protected Object parseEntryInternal()
                             throws IOException,
                                    org.xmlpull.v1.XmlPullParserException
Specified by:
parseEntryInternal in class AbstractAtomFeedParser<T>
Throws:
IOException
org.xmlpull.v1.XmlPullParserException

create

public static <T,E> MultiKindFeedParser<T> create(HttpResponse response,
                                                  XmlNamespaceDictionary namespaceDictionary,
                                                  Class<T> feedClass,
                                                  Class<E>... entryClasses)
                                     throws IOException,
                                            org.xmlpull.v1.XmlPullParserException
Parses the given HTTP response using the given feed class and entry classes.

Type Parameters:
T - feed type
E - entry type
Parameters:
response - HTTP response
namespaceDictionary - XML namespace dictionary
feedClass - feed class
entryClasses - entry class
Returns:
Atom multi-kind feed pull parser
Throws:
IOException - I/O exception
org.xmlpull.v1.XmlPullParserException - XML pull parser exception


Copyright © 2010-2011 Google. All Rights Reserved.