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 com.google.api.client.xml.atom.AbstractAtomFeedParser<T>

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

Since:
1.0
Author:
Yaniv Inbar

Field Summary
 
Fields inherited from class com.google.api.client.xml.atom.AbstractAtomFeedParser
feedClass, inputStream, namespaceDictionary, parser
 
Constructor Summary
MultiKindFeedParser()
          Deprecated. (scheduled to be removed in 1.6) Use create(HttpResponse, XmlNamespaceDictionary, Class, Class...)
 
Method Summary
static
<T,E> MultiKindFeedParser<T>
create(com.google.api.client.http.HttpResponse response, com.google.api.client.xml.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
 

Constructor Detail

MultiKindFeedParser

@Deprecated
public MultiKindFeedParser()
Deprecated. (scheduled to be removed in 1.6) Use create(HttpResponse, XmlNamespaceDictionary, Class, Class...)

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 com.google.api.client.xml.atom.AbstractAtomFeedParser<T>
Throws:
IOException
org.xmlpull.v1.XmlPullParserException

create

public static <T,E> MultiKindFeedParser<T> create(com.google.api.client.http.HttpResponse response,
                                                  com.google.api.client.xml.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.