Class GeometryAdapter
- java.lang.Object
-
- com.google.gson.TypeAdapter<Geometry>
-
- com.github.filosganga.geogson.gson.GeometryAdapter
-
public class GeometryAdapter extends com.google.gson.TypeAdapter<Geometry>
-
-
Field Summary
Fields Modifier and Type Field Description static StringGEOMETRY_COORDINATES_KEYstatic StringGEOMETRY_GEOMETRIES_KEYstatic StringGEOMETRY_TYPE_KEYstatic StringMSG_GEOMETRIES_JSON_INVALID_TEMPLATEstatic StringMSG_GEOMETRY_JSON_INVALID_TEMPLATEstatic StringMSG_MISSING_KEY_COORDINATESstatic StringMSG_MISSING_KEY_GEOMETRIESstatic StringMSG_MISSING_KEY_GEOMETRY_TYPEstatic StringMSG_NOT_VALID_GEOMETRY_COLLECTIONstatic StringMSG_WRONG_GEOMETRY_TYPE_TEMPLATE
-
Constructor Summary
Constructors Constructor Description GeometryAdapter(com.google.gson.Gson gson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Geometry<?>read(com.google.gson.stream.JsonReader in)voidwrite(com.google.gson.stream.JsonWriter out, Geometry value)
-
-
-
Field Detail
-
GEOMETRY_TYPE_KEY
public static final String GEOMETRY_TYPE_KEY
- See Also:
- Constant Field Values
-
GEOMETRY_GEOMETRIES_KEY
public static final String GEOMETRY_GEOMETRIES_KEY
- See Also:
- Constant Field Values
-
GEOMETRY_COORDINATES_KEY
public static final String GEOMETRY_COORDINATES_KEY
- See Also:
- Constant Field Values
-
MSG_NOT_VALID_GEOMETRY_COLLECTION
public static final String MSG_NOT_VALID_GEOMETRY_COLLECTION
- See Also:
- Constant Field Values
-
MSG_MISSING_KEY_COORDINATES
public static final String MSG_MISSING_KEY_COORDINATES
-
MSG_MISSING_KEY_GEOMETRY_TYPE
public static final String MSG_MISSING_KEY_GEOMETRY_TYPE
-
MSG_MISSING_KEY_GEOMETRIES
public static final String MSG_MISSING_KEY_GEOMETRIES
-
MSG_WRONG_GEOMETRY_TYPE_TEMPLATE
public static final String MSG_WRONG_GEOMETRY_TYPE_TEMPLATE
- See Also:
- Constant Field Values
-
MSG_GEOMETRIES_JSON_INVALID_TEMPLATE
public static final String MSG_GEOMETRIES_JSON_INVALID_TEMPLATE
- See Also:
- Constant Field Values
-
MSG_GEOMETRY_JSON_INVALID_TEMPLATE
public static final String MSG_GEOMETRY_JSON_INVALID_TEMPLATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
write
public void write(com.google.gson.stream.JsonWriter out, Geometry value) throws IOException- Specified by:
writein classcom.google.gson.TypeAdapter<Geometry>- Throws:
IOException
-
read
public Geometry<?> read(com.google.gson.stream.JsonReader in) throws IOException
- Specified by:
readin classcom.google.gson.TypeAdapter<Geometry>- Throws:
IOException
-
-