org.apache.lucene.gdata.server
Class GDataEntityBuilder

java.lang.Object
  extended by org.apache.lucene.gdata.server.GDataEntityBuilder

public class GDataEntityBuilder
extends Object

BaseFeed, BaseEntry instances have to be build from a Reader instance as they come in from a client request or out of a storage.

To provide a generic builder class the GDataEntityBuilder requests the type of the feed / entry and the corresponding ExtensionProfile form the global GDataServerRegistry and builds the instances from the provided reader.

This build will not returne the abstract base classes.

Author:
Simon Willnauer

Constructor Summary
GDataEntityBuilder()
           
 
Method Summary
static com.google.gdata.data.BaseEntry buildEntry(GDataRequest request)
          Builds a BaseEntry instance from the Reader provided by the GDataRequest
static com.google.gdata.data.BaseEntry buildEntry(Reader reader, ProvidedService config)
          Builds a BaseFeed instance from the Reader provided by the GDataRequest
static com.google.gdata.data.BaseFeed buildFeed(GDataRequest request)
          Builds a BaseFeed instance from the Reader provided by the GDataRequest
static com.google.gdata.data.BaseFeed buildFeed(Reader reader, ProvidedService config)
          Builds a BaseFeed from the provided Reader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GDataEntityBuilder

public GDataEntityBuilder()
Method Detail

buildFeed

public static com.google.gdata.data.BaseFeed buildFeed(GDataRequest request)
                                                throws IOException,
                                                       com.google.gdata.util.ParseException
Builds a BaseFeed instance from the Reader provided by the GDataRequest

Parameters:
request - - the request to build the instance from
Returns:
- a BaseFeed instance
Throws:
IOException - - if an I/O Exception occures on the provided reader
com.google.gdata.util.ParseException - - if the feed could not be parsed

buildFeed

public static com.google.gdata.data.BaseFeed buildFeed(Reader reader,
                                                       ProvidedService config)
                                                throws com.google.gdata.util.ParseException,
                                                       IOException
Builds a BaseFeed from the provided Reader

Parameters:
reader - - the reader to build the feed from
config - - the feed instance config containing the extension profile to parse the resource
Returns:
- a BaseFeed instance
Throws:
IOException - - if an I/O Exception occures on the provided reader
com.google.gdata.util.ParseException - - if the feed could not be parsed

buildEntry

public static com.google.gdata.data.BaseEntry buildEntry(GDataRequest request)
                                                  throws IOException,
                                                         com.google.gdata.util.ParseException
Builds a BaseEntry instance from the Reader provided by the GDataRequest

Parameters:
request - - the request to build the instance from
Returns:
- a BaseEntry instance
Throws:
IOException - - if an I/O Exception occures on the provided reader
com.google.gdata.util.ParseException - - if the entry could not be parsed

buildEntry

public static com.google.gdata.data.BaseEntry buildEntry(Reader reader,
                                                         ProvidedService config)
                                                  throws com.google.gdata.util.ParseException,
                                                         IOException
Builds a BaseFeed instance from the Reader provided by the GDataRequest

Parameters:
reader - - the reader to build the feed from
config - - the instance config containing the extension profile to parse the resource
Returns:
- a BaseFeed instance
Throws:
IOException - - if an I/O Exception occures on the provided reader
com.google.gdata.util.ParseException - - if the entry could not be parsed


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.