org.apache.lucene.gdata.server
Class GDataEntityBuilder

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

public class GDataEntityBuilder
extends Object

com.google.gdata.data.BaseFeed, com.google.gdata.data.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 com.google.gdata.data.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 BaseEntry buildEntry(GDataRequest request)
          Builds a BaseEntry instance from the Reader provided by the GDataRequest
static BaseEntry buildEntry(Reader reader, ProvidedService config)
          Builds a BaseFeed instance from the Reader provided by the GDataRequest
static BaseFeed buildFeed(GDataRequest request)
          Builds a BaseFeed instance from the Reader provided by the GDataRequest
static 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 BaseFeed buildFeed(GDataRequest request)
                          throws IOException,
                                 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
ParseException - - if the feed could not be parsed

buildFeed

public static BaseFeed buildFeed(Reader reader,
                                 ProvidedService config)
                          throws 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
ParseException - - if the feed could not be parsed

buildEntry

public static BaseEntry buildEntry(GDataRequest request)
                            throws IOException,
                                   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
ParseException - - if the entry could not be parsed

buildEntry

public static BaseEntry buildEntry(Reader reader,
                                   ProvidedService config)
                            throws 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
ParseException - - if the entry could not be parsed


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