com.esri.core.tasks.ags.geocode
Class LocatorFindParameters

java.lang.Object
  extended by com.esri.core.tasks.ags.geocode.LocatorFindParameters

public class LocatorFindParameters
extends Object

The class holding the parameters to support the find operation for a geocoding service.

The find operation of a geocoding service is used for single field geocoding, such as:


Field Summary
protected  com.esri.core.internal.tasks.ags.geocode.GeocodeParametersInternal params
           
 
Constructor Summary
LocatorFindParameters(String text)
          Constructs a FindParameters object with the given the search text.
 
Method Summary
 boolean equals(Object obj)
           
 double getDistance()
          Gets the search distance in m.
 SpatialReference getInSR()
          Returns the spatial reference of search extent.
 Point getLocation()
          Gets the location point.
 SpatialReference getLocationSR()
          Gets the location point spatial reference.
 int getMaxLocations()
          Returns the maximum number for the returned candidates.
 List<String> getOutFields()
          Return a list of fields to be returned in the response.
 SpatialReference getOutSR()
          Returns the spatial reference of the xy coordinates for the geocode request.
 Envelope getSearchExtent()
          Returns searching extent;
 String getSourceCountry()
          string value representing the country.
 String getText()
          Returns the search text string.
 int hashCode()
           
 void setDistance(double distance)
          Sets the search distance in m.
 void setLocation(Point point, SpatialReference spatialReference)
          Sets the search location.
 void setMaxLocations(int maxLocations)
          Sets the maximum number for returned candidates.
 void setOutFields(List<String> outFields)
          Sets a list of fields to be returned in the response.
 void setOutSR(SpatialReference outSR)
          Sets the spatial reference for the xy coordinates returned by the geocode request.
 void setSearchExtent(Envelope searchExtent, SpatialReference inSR)
          Sets the search extent
 void setSourceCountry(String sourceCountry)
          Sets a string value representing the country.
 void setText(String text)
          Sets the search text.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

params

protected com.esri.core.internal.tasks.ags.geocode.GeocodeParametersInternal params
Constructor Detail

LocatorFindParameters

public LocatorFindParameters(String text)
Constructs a FindParameters object with the given the search text.

Parameters:
text - a String for address, Points of interest (POI), a postal code.
Method Detail

getLocation

public Point getLocation()
Gets the location point.

Returns:
the location

getLocationSR

public SpatialReference getLocationSR()
Gets the location point spatial reference.

Returns:
the location sr

getDistance

public double getDistance()
Gets the search distance in m.

Returns:
the distance

setLocation

public void setLocation(Point point,
                        SpatialReference spatialReference)
Sets the search location. If location is set then distance must be set.

Parameters:
point - the point
spatialReference - the spatial reference

setDistance

public void setDistance(double distance)
Sets the search distance in m. If distance is set then location must be set.

Parameters:
distance - the new distance

getSourceCountry

public String getSourceCountry()
string value representing the country.

Returns:
a String.

setSourceCountry

public void setSourceCountry(String sourceCountry)
Sets a string value representing the country. Providing this value increases geocoding speed. e.g. "USA"

Parameters:
sourceCountry - a String

getInSR

public SpatialReference getInSR()
Returns the spatial reference of search extent.

Returns:
the spatial reference of the search extent

getSearchExtent

public Envelope getSearchExtent()
Returns searching extent;

Returns:
an Envelope object.

setSearchExtent

public void setSearchExtent(Envelope searchExtent,
                            SpatialReference inSR)
Sets the search extent

Parameters:
searchExtent - an Envelope object.
inSR - the spatial reference of the Envelope object.

getOutSR

public SpatialReference getOutSR()
Returns the spatial reference of the xy coordinates for the geocode request.

Returns:
SpatialReference a spatial reference the location candidates will be projected to

setOutSR

public void setOutSR(SpatialReference outSR)
Sets the spatial reference for the xy coordinates returned by the geocode request.

Parameters:
outSR - SpatialReference a spatial reference the location candidates will be projected to

getOutFields

public List<String> getOutFields()
Return a list of fields to be returned in the response.

Returns:
a list field names

setOutFields

public void setOutFields(List<String> outFields)
Sets a list of fields to be returned in the response.

Parameters:
outFields - a list field names

getText

public String getText()
Returns the search text string.

Returns:
search text string

setText

public void setText(String text)
Sets the search text.

Parameters:
text -

getMaxLocations

public int getMaxLocations()
Returns the maximum number for the returned candidates.

Returns:
an integer

setMaxLocations

public void setMaxLocations(int maxLocations)
Sets the maximum number for returned candidates. The default number is 10;

Parameters:
maxLocations - an integer

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.