com.citygrid
Class CGBuilder

java.lang.Object
  extended by com.citygrid.CGBuilder

public class CGBuilder
extends Object


Field Summary
private static Logger logger
           
private static org.codehaus.jackson.map.ObjectMapper mapper
           
private static SimpleDateFormat SSSZ_formatter
           
private static SimpleDateFormat ssz_formatter
           
private static SimpleDateFormat ssZ_formatter
           
private static SimpleDateFormat ssZZZ_formatter
           
private static SimpleDateFormat zulu_formatter
           
 
Constructor Summary
CGBuilder()
           
 
Method Summary
static String formatDate(Date date)
           
static String ipAddress()
           
static boolean isEmpty(String value)
           
static boolean isNotEmpty(String value)
           
static Date jsonNodeToDate(org.codehaus.jackson.JsonNode node)
           
static String[] jsonNodeToStringArray(org.codehaus.jackson.JsonNode node)
           
static URI jsonNodeToUri(org.codehaus.jackson.JsonNode node)
           
static boolean nullSafeGetBooleanValue(org.codehaus.jackson.JsonNode node)
           
static double nullSafeGetDoubleValue(org.codehaus.jackson.JsonNode node)
           
static int nullSafeGetIntValue(org.codehaus.jackson.JsonNode node)
           
static String nullSafeGetTextValue(org.codehaus.jackson.JsonNode node)
           
static Date parseDate(String string)
          CG returned date string has a colon between hours and minutes in timezone offset.
static org.codehaus.jackson.JsonNode parseJsonFile(String jsonFilePath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static Logger logger

ssZZZ_formatter

private static SimpleDateFormat ssZZZ_formatter

ssz_formatter

private static SimpleDateFormat ssz_formatter

ssZ_formatter

private static SimpleDateFormat ssZ_formatter

SSSZ_formatter

private static SimpleDateFormat SSSZ_formatter

zulu_formatter

private static SimpleDateFormat zulu_formatter

mapper

private static org.codehaus.jackson.map.ObjectMapper mapper
Constructor Detail

CGBuilder

public CGBuilder()
Method Detail

ipAddress

public static String ipAddress()

jsonNodeToUri

public static URI jsonNodeToUri(org.codehaus.jackson.JsonNode node)

jsonNodeToDate

public static Date jsonNodeToDate(org.codehaus.jackson.JsonNode node)

formatDate

public static String formatDate(Date date)

parseDate

public static Date parseDate(String string)
CG returned date string has a colon between hours and minutes in timezone offset. Need to strip it before parsing.

Parameters:
string -
Returns:

nullSafeGetBooleanValue

public static boolean nullSafeGetBooleanValue(org.codehaus.jackson.JsonNode node)

nullSafeGetIntValue

public static int nullSafeGetIntValue(org.codehaus.jackson.JsonNode node)

nullSafeGetDoubleValue

public static double nullSafeGetDoubleValue(org.codehaus.jackson.JsonNode node)

nullSafeGetTextValue

public static String nullSafeGetTextValue(org.codehaus.jackson.JsonNode node)

jsonNodeToStringArray

public static String[] jsonNodeToStringArray(org.codehaus.jackson.JsonNode node)

isEmpty

public static boolean isEmpty(String value)

isNotEmpty

public static boolean isNotEmpty(String value)

parseJsonFile

public static org.codehaus.jackson.JsonNode parseJsonFile(String jsonFilePath)
                                                   throws CGException
Throws:
CGException


Copyright © 2011. All Rights Reserved.