com.shephertz.app42.paas.sdk.jme.geo
Class GeoResponseBuilder

java.lang.Object
  extended by com.shephertz.app42.paas.sdk.jme.App42ResponseBuilder
      extended by com.shephertz.app42.paas.sdk.jme.geo.GeoResponseBuilder

public class GeoResponseBuilder
extends App42ResponseBuilder

GeoResponseBuilder class converts the JSON response retrieved from the server to the value object i.e Geo


Constructor Summary
GeoResponseBuilder()
           
 
Method Summary
 java.util.Vector buildArrayResponse(java.lang.String json)
          Converts the response in JSON format to the list of value objects i.e Geo
 void buildObjectFromJSONTree(java.lang.Object obj, org.json.jme.JSONObject jsonObj)
          Handling the geo and point object.
 Geo buildResponse(java.lang.String json)
          Converts the response in JSON format to the value object i.e Geo
static void main(java.lang.String[] args)
           
 
Methods inherited from class com.shephertz.app42.paas.sdk.jme.App42ResponseBuilder
getNames, getServiceJSONObject, getTotalRecords, isResponseSuccess
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoResponseBuilder

public GeoResponseBuilder()
Method Detail

buildArrayResponse

public java.util.Vector buildArrayResponse(java.lang.String json)
                                    throws java.lang.Exception
Converts the response in JSON format to the list of value objects i.e Geo

Parameters:
json - - response in JSON format
Returns:
List of Geo Points object filled with json data
Throws:
java.lang.Exception

buildObjectFromJSONTree

public void buildObjectFromJSONTree(java.lang.Object obj,
                                    org.json.jme.JSONObject jsonObj)
                             throws java.lang.Exception
Handling the geo and point object.

Specified by:
buildObjectFromJSONTree in class App42ResponseBuilder
Parameters:
json - - response in JSON format
Throws:
java.lang.Exception

buildResponse

public Geo buildResponse(java.lang.String json)
                  throws java.lang.Exception
Converts the response in JSON format to the value object i.e Geo

Parameters:
json - - response in JSON format
Returns:
Geo object filled with json data
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception