public class WebMVSService extends java.lang.Object implements MVSService, LocationService
MVSService implementation used to communicate with a web MVSuggest service instance. The service location should be the URL of the MVSuggest service.| Constructor and Description |
|---|
WebMVSService() |
| Modifier and Type | Method and Description |
|---|---|
MVSQueryRequester |
createQueryRequester()
Creates an instance of
MVSQueryRequester used to send match requests |
void |
environmentCleanup(org.apache.hadoop.conf.Configuration conf)
Performs cleanning tasks like removing temporal file.
|
void |
environmentSetup(org.apache.hadoop.conf.Configuration conf)
Performs the necessary setup before running a job.
|
java.lang.String[] |
getLayers()
Gets the layers indexed by MVSuggest
|
MVSConfig |
getMVSConfig()
Gets the MVSuggest configuration bean
|
java.lang.String |
getTemplate(java.lang.String layer)
Gets the template content for a single layer
|
void |
init(org.apache.hadoop.conf.Configuration conf)
Initializes a single instance per task.
|
protected void |
init(MVSConfig mvsConfig) |
void |
init(java.lang.String serverURL, java.lang.String[] matchLayers)
Initialize the service with the specified server URL.
|
protected java.util.List<GeoAreaInfo> |
query(java.lang.String jsonQry) |
java.util.List<GeoAreaInfo> |
searchResult(java.util.List<java.lang.String> records)
Return the geometric area informations of the data strings.
|
GeoAreaInfo |
searchResult(java.lang.String data)
Return the geometric area information of the data string.
|
protected void |
setMatchLayers(java.lang.String[] matchLayers) |
public void environmentSetup(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
MVSServiceenvironmentSetup in interface MVSServiceconf - the job configurationjava.io.IOException
public void environmentCleanup(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
MVSServiceenvironmentCleanup in interface MVSServiceconf - the job configurationjava.io.IOException
public void init(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
MVSServiceinit in interface MVSServiceconf - the job configurationjava.io.IOExceptionpublic MVSConfig getMVSConfig()
MVSServicegetMVSConfig in interface MVSServicepublic java.lang.String[] getLayers()
MVSServicegetLayers in interface MVSServicepublic java.lang.String getTemplate(java.lang.String layer)
MVSServicegetTemplate in interface MVSServicelayer - the template content in JSON formatpublic MVSQueryRequester createQueryRequester()
MVSServiceMVSQueryRequester used to send match requestscreateQueryRequester in interface MVSService
public void init(java.lang.String serverURL,
java.lang.String[] matchLayers)
throws java.io.IOException
LocationServiceinit in interface LocationServiceserverURL - the server URLmatchLayers - optional - which layers should be used to searchjava.io.IOException - thrown if an IOException occurs.protected void init(MVSConfig mvsConfig) throws java.io.IOException
java.io.IOExceptionprotected void setMatchLayers(java.lang.String[] matchLayers)
public GeoAreaInfo searchResult(java.lang.String data) throws java.io.IOException
searchResult in interface LocationServicedata - data stringjava.io.IOException - thrown if an IOException occurs.public java.util.List<GeoAreaInfo> searchResult(java.util.List<java.lang.String> records) throws java.io.IOException
searchResult in interface LocationServicerecords - data stringsjava.io.IOException - thrown if an IOException occurs.protected java.util.List<GeoAreaInfo> query(java.lang.String jsonQry) throws java.io.IOException
java.io.IOExceptionCopyright © 2016 Oracle and/or its affiliates. All Rights Reserved.