Package com.ibm.fhir.search.location
Class NearLocationHandler
- java.lang.Object
-
- com.ibm.fhir.search.location.NearLocationHandler
-
public class NearLocationHandler extends java.lang.Object
FHIR Search: Special Location - Positional Searching
Custom processing of the NEAR Location into Bounding Boxes or Bounding Radius.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
boundingRadius
static double
DEFAULT_DISTANCE
static java.lang.String
DEFAULT_UNIT
static java.lang.String
LATITUDE
static java.lang.String
LONGITUDE
static java.lang.String
NEAR
-
Constructor Summary
Constructors Constructor Description NearLocationHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoundingBox
createBoundingBox(double latitude, double longitude, double distance, java.lang.String unit)
build a bounding box given a latitude, longitude and distance.Bounding
createBoundingRadius(double latitude, double longitude, double distance, java.lang.String unit)
create bounding radius.java.util.List<Bounding>
generateLocationPositionsFromParameters(java.util.List<QueryParameter> queryParameters)
generates location positions for processing from parameters.void
setBounding(boolean boundingRadius)
overrides the bounding functionality.
-
-
-
Field Detail
-
LATITUDE
public static final java.lang.String LATITUDE
- See Also:
- Constant Field Values
-
LONGITUDE
public static final java.lang.String LONGITUDE
- See Also:
- Constant Field Values
-
NEAR
public static final java.lang.String NEAR
- See Also:
- Constant Field Values
-
DEFAULT_DISTANCE
public static final double DEFAULT_DISTANCE
- See Also:
- Constant Field Values
-
DEFAULT_UNIT
public static final java.lang.String DEFAULT_UNIT
- See Also:
- Constant Field Values
-
boundingRadius
boolean boundingRadius
-
-
Method Detail
-
createBoundingBox
public BoundingBox createBoundingBox(double latitude, double longitude, double distance, java.lang.String unit) throws FHIRSearchException
build a bounding box given a latitude, longitude and distance.
WGS84 format [latitude]|[longitude]|[distance]|[units]- Parameters:
latitude
-longitude
-distance
-unit
-- Returns:
- Throws:
FHIRSearchException
-
generateLocationPositionsFromParameters
public java.util.List<Bounding> generateLocationPositionsFromParameters(java.util.List<QueryParameter> queryParameters) throws FHIRSearchException
generates location positions for processing from parameters.- Parameters:
queryParameters
-- Returns:
- Throws:
FHIRSearchException
-
createBoundingRadius
public Bounding createBoundingRadius(double latitude, double longitude, double distance, java.lang.String unit) throws FHIRSearchException
create bounding radius.- Parameters:
latitude
-longitude
-distance
-unit
-- Returns:
- Throws:
FHIRSearchException
-
setBounding
public void setBounding(boolean boundingRadius)
overrides the bounding functionality.- Parameters:
boundingRadius
-
-
-