public class GeoSpatialDefaultLiteralSerializer extends Object implements IGeoSpatialLiteralSerializer
IGeoSpatialLiteralSerializer
, translating
literals of the form F1#F2#...#Fn to a component string of length n and back.Constructor and Description |
---|
GeoSpatialDefaultLiteralSerializer() |
Modifier and Type | Method and Description |
---|---|
String |
fromComponents(Object[] components)
Recomposes the components into a string, should typically use
the object's toString() method.
|
IV<?,?> |
serializeCoordSystem(BigdataValueFactory vf,
Object coordinateSystem)
Serialize a coordinate system value contained in a geospatial datatype.
|
IV<?,?> |
serializeCustomFields(BigdataValueFactory vf,
Object... customFields)
Serialize a custom fields value contained in a geospatial datatype.
|
IV<?,?> |
serializeDistance(BigdataValueFactory vf,
Double distance,
ICoordinate.UNITS unit)
Serialize a distance value.
|
IV<?,?> |
serializeLatitude(BigdataValueFactory vf,
Object latitude)
Serialize a latitude value contained in a geospatial datatype.
|
IV<?,?> |
serializeLocation(BigdataValueFactory vf,
Object latitude,
Object longitude)
Serialize a geo-location of latitude and longitude.
|
IV<?,?> |
serializeLocationAndTime(BigdataValueFactory vf,
Object latitude,
Object longitude,
Object time)
Serialize a latitude+longitude+time value contained in a geospatial datatype.
|
IV<?,?> |
serializeLongitude(BigdataValueFactory vf,
Object longitude)
Serialize a longitude value contained in a geospatial datatype.
|
IV<?,?> |
serializeTime(BigdataValueFactory vf,
Object time)
Serialize a time value contained in a geospatial datatype.
|
String[] |
toComponents(String literalString)
Decomposes a string[] into an array of strings identifying the
individual components.
|
protected IV<?,?> |
toSeparatedString(BigdataValueFactory vf,
Object... args)
Converts the input passed via args into string using its toString() method,
separating the components via {GeoSpatial#CUSTOM_FIELDS_SEPARATOR}.
|
public String[] toComponents(String literalString)
IGeoSpatialLiteralSerializer
toComponents
in interface IGeoSpatialLiteralSerializer
public String fromComponents(Object[] components)
IGeoSpatialLiteralSerializer
fromComponents
in interface IGeoSpatialLiteralSerializer
public IV<?,?> serializeLocation(BigdataValueFactory vf, Object latitude, Object longitude)
IGeoSpatialLiteralSerializer
serializeLocation
in interface IGeoSpatialLiteralSerializer
public IV<?,?> serializeLocationAndTime(BigdataValueFactory vf, Object latitude, Object longitude, Object time)
IGeoSpatialLiteralSerializer
serializeLocationAndTime
in interface IGeoSpatialLiteralSerializer
public IV<?,?> serializeTime(BigdataValueFactory vf, Object time)
IGeoSpatialLiteralSerializer
serializeTime
in interface IGeoSpatialLiteralSerializer
public IV<?,?> serializeLatitude(BigdataValueFactory vf, Object latitude)
IGeoSpatialLiteralSerializer
serializeLatitude
in interface IGeoSpatialLiteralSerializer
public IV<?,?> serializeLongitude(BigdataValueFactory vf, Object longitude)
IGeoSpatialLiteralSerializer
serializeLongitude
in interface IGeoSpatialLiteralSerializer
public IV<?,?> serializeCoordSystem(BigdataValueFactory vf, Object coordinateSystem)
IGeoSpatialLiteralSerializer
serializeCoordSystem
in interface IGeoSpatialLiteralSerializer
public IV<?,?> serializeCustomFields(BigdataValueFactory vf, Object... customFields)
IGeoSpatialLiteralSerializer
serializeCustomFields
in interface IGeoSpatialLiteralSerializer
public IV<?,?> serializeDistance(BigdataValueFactory vf, Double distance, ICoordinate.UNITS unit)
IGeoSpatialLiteralSerializer
ICoordinate.UNITS
in which the value is represented. The ICoordinate.UNITS
depend on the
units that are specified within the query. Given that the user should be aware of the ICoordinate.UNITS
,
you may choose to return a numerical value, just ignoring the latter.serializeDistance
in interface IGeoSpatialLiteralSerializer
protected IV<?,?> toSeparatedString(BigdataValueFactory vf, Object... args)
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.