public class GeoCoderPlugin extends Object implements PreIngestPlugin
GeoCoderPlugin
is responsible for adding a Location.COUNTRY_CODE
in ISO
3166-1 format to Metacard
s that have the Metacard.GEOGRAPHY
attribute.Modifier and Type | Field and Description |
---|---|
static String |
RADIUS_IN_KM |
Constructor and Description |
---|
GeoCoderPlugin(ServiceSelector<GeoCoder> geoCoderFactory) |
Modifier and Type | Method and Description |
---|---|
int |
getRadius() |
CreateRequest |
process(CreateRequest input)
Process a
CreateRequest prior to CatalogProvider.create(CreateRequest) . |
DeleteRequest |
process(DeleteRequest input)
Processes the
DeleteRequest prior to the execution of the update operation. |
UpdateRequest |
process(UpdateRequest input)
Process a
UpdateRequest prior to CatalogProvider.update(UpdateRequest) . |
void |
setRadiusInKm(int radius) |
void |
updateConfiguration(Map<String,Object> properties) |
public static final String RADIUS_IN_KM
public GeoCoderPlugin(ServiceSelector<GeoCoder> geoCoderFactory)
public CreateRequest process(CreateRequest input) throws PluginExecutionException, StopProcessingException
PreIngestPlugin
CreateRequest
prior to CatalogProvider.create(CreateRequest)
.process
in interface PreIngestPlugin
input
- the CreateRequest
to processCreateRequest
to pass to the next PreIngestPlugin
, or to the CatalogProvider
if this is the last
PreIngestPlugin
to be calledPluginExecutionException
- if an error in processing occursStopProcessingException
public UpdateRequest process(UpdateRequest input) throws PluginExecutionException, StopProcessingException
PreIngestPlugin
UpdateRequest
prior to CatalogProvider.update(UpdateRequest)
.process
in interface PreIngestPlugin
input
- the UpdateRequest
to processUpdateRequest
to pass to the next PreIngestPlugin
, or to the CatalogProvider
if this is the last
PreIngestPlugin
to be calledPluginExecutionException
- if an error in processing occursStopProcessingException
public DeleteRequest process(DeleteRequest input) throws PluginExecutionException, StopProcessingException
PreIngestPlugin
DeleteRequest
prior to the execution of the update operation.process
in interface PreIngestPlugin
input
- the DeleteRequest
to processDeleteRequest
to pass to the next PreIngestPlugin
, or if this is the last PreIngestPlugin
to be calledPluginExecutionException
- thrown when an error in processing occursStopProcessingException
public void setRadiusInKm(int radius)
public int getRadius()
This work is licensed under a Creative Commons Attribution 4.0 International License.