Class LocationUtil
- java.lang.Object
- 
- com.ibm.fhir.search.location.util.LocationUtil
 
- 
 public class LocationUtil extends java.lang.ObjectCommon Location related functions.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.DoublecheckAndLimitMaximumLatitude(java.lang.Double value)force the latitude to a minimumstatic java.lang.DoublecheckAndLimitMaximumLongitude(java.lang.Double value)force the longitude to a minimumstatic booleancheckLatValid(java.lang.Double lat)common constraint for valid latitude and longitude.static booleancheckLonValid(java.lang.Double lon)common constraint for valid latitude and longitude.static booleancheckNull(java.lang.Double val)if null, return true.static voidcheckOverUnderNinety(java.lang.Double up, java.lang.Double down)check if the location/area spans over the pole (either one).static intfindNearParameterIndex(java.util.List<QueryParameter> searchParameters)Finds the index of the 'near' parameter in the passed list of search parameters.static booleanisLocation(java.lang.Class<?> resourceType, QueryParameter queryParm)Check if it's a location and 'near'
 
- 
- 
- 
Method Detail- 
checkAndLimitMaximumLatitudepublic static java.lang.Double checkAndLimitMaximumLatitude(java.lang.Double value) force the latitude to a minimum- Parameters:
- value-
- Returns:
 
 - 
checkAndLimitMaximumLongitudepublic static java.lang.Double checkAndLimitMaximumLongitude(java.lang.Double value) force the longitude to a minimum- Parameters:
- value-
- Returns:
 
 - 
findNearParameterIndexpublic static int findNearParameterIndex(java.util.List<QueryParameter> searchParameters) Finds the index of the 'near' parameter in the passed list of search parameters. If not found, -1 is returned.- Parameters:
- searchParameters-
- Returns:
- int - The index of the 'near' parameter in the passed List.
 
 - 
isLocationpublic static boolean isLocation(java.lang.Class<?> resourceType, QueryParameter queryParm)Check if it's a location and 'near'- Parameters:
- resourceType-
- queryParm-
- Returns:
 
 - 
checkNullpublic static boolean checkNull(java.lang.Double val) if null, return true.- Parameters:
- val-
- Returns:
 
 - 
checkLatValidpublic static boolean checkLatValid(java.lang.Double lat) common constraint for valid latitude and longitude.- Parameters:
- lat-
- Returns:
 
 - 
checkLonValidpublic static boolean checkLonValid(java.lang.Double lon) common constraint for valid latitude and longitude.- Parameters:
- lon-
- Returns:
 
 - 
checkOverUnderNinetypublic static void checkOverUnderNinety(java.lang.Double up, java.lang.Double down) throws FHIRSearchExceptioncheck if the location/area spans over the pole (either one). If it does, just frankly, it's hard to do the math properly.- Parameters:
- up-
- down-
- Throws:
- FHIRSearchException
 
 
- 
 
-