com.esri.arcgis.location
Class GeocodeServer

java.lang.Object
  extended by com.esri.arcgis.location.GeocodeServer
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IGeocodeServer, IGeocodeServerObjects, IGeocodeServerSingleLine, IInitGeocodeServer, IServerObject, IServerObjectExtensionManager, IObjectConstruct, IRequestHandler, IRequestHandler2, IRESTRequestHandler, Serializable

public class GeocodeServer
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IObjectConstruct, IRequestHandler, IRequestHandler2, IGeocodeServer, IGeocodeServerObjects, IGeocodeServerSingleLine, IInitGeocodeServer, IServerObject, IServerObjectExtensionManager, IRESTRequestHandler

A class that provides geocoding as a service.

Remarks

A GeocodeServer object uses an address locator to provide coarse-grained geocoding functionality either in Desktop and Engine applications, or using ArcGIS for Server over an Internet connection. In a Desktop or Engine environment, developers can use the GeocodeServer to perform coarse-grained geocoding tasks, such as geocoding a table of addresses, more easily than with the finer-grained geocoding ArcObjects. In an ArcGIS Server environment, GeocodeServer objects can be accessed over an Internet connection to provide geocoding functionality hosted by a remote server.

All of the coarse-grained functionality of the GeocodeServer can be accessed through the IGeocodeServer interface. Using this interface, you can geocode single addresses, geocode tables of addresses, find the address closest to a point, and access all of the support functionality required to accomplish these tasks.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.system.IRequestHandler
IID, IID46a0e2ea_3b64_4a46_bd78_88a1660f35bb, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IRESTRequestHandler
IID, IID9d66a418_d54a_48ed_88bd_043a25fa9c83, xxDummy
 
Constructor Summary
GeocodeServer()
          Constructs a GeocodeServer using ArcGIS Engine.
GeocodeServer(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GeocodeServer theGeocodeServer = (GeocodeServer) obj;
 
Method Summary
 void attachToLocator(ILocatorName locName)
          Attach this service to the locator specified by the locator name.
 void construct(IPropertySet props)
          Two phase object construction.
 boolean equals(Object o)
          Compare this object with another
 IRecordSet findAddressCandidates(IPropertySet address, IPropertySet propMods)
          Generates candidates for an address (normal or standardized form).
 IServerObjectExtension findExtensionByCLSID(String cLSID)
          Returns a server object extension found using a string representation of its class ID.
 IServerObjectExtension findExtensionByTypeName(String name)
          Returns a server object extension found using its type name.
 IPropertySet geocodeAddress(IPropertySet address, IPropertySet propMods)
          Geocodes a single address (normal or standardized form).
 IRecordSet geocodeAddresses(IRecordSet addressTable, IPropertySet addressFieldMapping, IPropertySet propMods)
          Geocodes a table of addresses.
 IFields getAddressFields()
          Fields needed to geocode a table of addresses.
 ILocator getAddressLocator()
          The address locator used by the geocode server.
 String getAdjustableProperties()
          The list of properties (comma delimited) that can be modified at runtime (for a given method).
 IFields getCandidateFields(IPropertySet propMods)
          Fields contained in a list of candidates.
static String getClsid()
          getClsid.
 String getConfigurationName()
          Name of the server object configuration that defines the server object.
 IPropertySet getDefaultInputFieldMapping()
          Suggested field name mappings for all input fields.
 Object getDefaultInputFieldNames()
          Recognized names for the single line input field.
 IFields getIntersectionCandidateFields(IPropertySet propMods)
          Fields contained by intersection candidates.
 IPropertySet getLocatorProperties()
          Default properties for a locator.
 IFields getResultFields(IPropertySet propMods)
          Fields contained in the geocoding result.
 String getSchema()
          This method returns the resource hierarchy of a REST based SOE.
 IField getSingleLineAddressField()
          Field needed to geocode a single line address.
 IFields getStandardizedFields()
          Fields contained in a standardized address.
 IFields getStandardizedIntersectionFields()
          Fields contained in a standardized intersection.
 int getSuggestedBatchSize()
          The suggested number of addresses to send to a server in one batch request.
 String getTypeName()
          Type of the server object (MapServer or GeocodeServer).
 byte[] handleBinaryRequest(byte[] request)
          Handles a binary request.
 byte[] handleBinaryRequest2(String capabilities, byte[] request)
          Handles a binary request with explicit capabilities.
 byte[] handleRESTRequest(String capabilities, String resourceName, String operationName, String operationInput, String outputFormat, String requestProperties, String[] responseProperties)
          Handles REST requests for SOE.
 String handleStringRequest(String capabilities, String request)
          Handles a SOAP string request.
 int hashCode()
          the hashcode for this object
 IPropertySet reverseGeocode(IPoint location, boolean bReturnIntersection, IPropertySet propMods)
          Generates an address for a point.
 void setAdjustableProperties(String propertyList)
          The list of properties (comma delimited) that can be modified at runtime (for a given method).
 void setSuggestedBatchSize(int size)
          The suggested number of addresses to send to a server in one batch request.
 IPropertySet standardizeAddress(IPropertySet address, IPropertySet propMods)
          Standardizes an address.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

GeocodeServer

public GeocodeServer()
              throws IOException,
                     UnknownHostException
Constructs a GeocodeServer using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

GeocodeServer

public GeocodeServer(Object obj)
              throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GeocodeServer theGeocodeServer = (GeocodeServer) obj;

Construct a GeocodeServer using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to GeocodeServer.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

construct

public void construct(IPropertySet props)
               throws IOException,
                      AutomationException
Two phase object construction.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
construct in interface IObjectConstruct
Parameters:
props - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleBinaryRequest

public byte[] handleBinaryRequest(byte[] request)
                           throws IOException,
                                  AutomationException
Handles a binary request.

Specified by:
handleBinaryRequest in interface IRequestHandler
Parameters:
request - An unsigned byte (in)
Returns:
An unsigned byte
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleStringRequest

public String handleStringRequest(String capabilities,
                                  String request)
                           throws IOException,
                                  AutomationException
Handles a SOAP string request.

Specified by:
handleStringRequest in interface IRequestHandler
Parameters:
capabilities - The capabilities (in)
request - The request (in)
Returns:
The response
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleBinaryRequest2

public byte[] handleBinaryRequest2(String capabilities,
                                   byte[] request)
                            throws IOException,
                                   AutomationException
Handles a binary request with explicit capabilities.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
handleBinaryRequest2 in interface IRequestHandler2
Parameters:
capabilities - The capabilities (in)
request - An unsigned byte (in)
Returns:
An unsigned byte
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

geocodeAddress

public IPropertySet geocodeAddress(IPropertySet address,
                                   IPropertySet propMods)
                            throws IOException,
                                   AutomationException
Geocodes a single address (normal or standardized form).

Remarks

The GeocodeAddress method geocodes a single address defined by the address PropertySet, and returns a PropertySet containing the match property values.

The address parameter is a PropertySet containing the address to be geocoded. The names of the properties in this PropertySet are the names of the address fields used by the GeocodeServer. The most common way to geocode an address using the GeocodeAddress method is to allow the GeocodeServer to standardize the address before searching for a match for the address. In this case, use the GetAddressFields method to retrieve the definitions of the address fields used by the GeocodeServer, and use the names of these fields as the names of the properties defined in the address PropertySet. The Required property on each Field object indicates whether the address field is required by the GeocodeServer. Failing to specify a required address property results in an error.

The propMods parameter is a PropertySet containing the GeocodeServer properties to use to geocode the address. The GetLocatorProperties method returns the set of default geocoding properties for the GeocodeServer. In some cases, you may want to modify the geocoding properties used to geocode an address. For example, you may wish to change the spelling sensitivity used to search for a match for the address, or you may want to change the side and end offset applied to the geocoded location. Modify the properties in the PropertySet returned by the GetLocatorProperties method, and pass the modified PropertySet to the propMods parameter. The PropertySet passed to the propMods parameter only needs to contain properties that are different than the default properties for the GeocodeServer. If you don't wish to modify any of the default properties returned used by the GeocodeServer, you can either pass a null value to the propMods parameter, or pass the unmodified PropertySet returned by the GetLocatorProperties method.

The GeocodeAddress method returns a PropertySet that contains a set of properties that define the match found by the GeocodeServer . The names of these properties are defined by the names of the Field objects returned by the GetResultFields method.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
geocodeAddress in interface IGeocodeServer
Parameters:
address - A reference to a com.esri.arcgis.system.IPropertySet (in)
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

geocodeAddresses

public IRecordSet geocodeAddresses(IRecordSet addressTable,
                                   IPropertySet addressFieldMapping,
                                   IPropertySet propMods)
                            throws IOException,
                                   AutomationException
Geocodes a table of addresses.

Remarks

The GeocodeAddresses method geocodes a RecordSet of addresses, and returns a RecordSet containing the match properties for each address.

The AddressTable parameter is a RecordSet containing the addresses to be geocoded. To create the RecordSet, first co-create a RecordSet coclass, then use the IRecordSetInit::SetSourceTable method set a reference to the table that contains the addresses to geocode. In order to reduce the amount of data that needs to be sent to the server, use the pFilter parameter on the IRecordSetInit::SetSourceTable method to define a QueryFilter that includes only the ObjectID and address fields from the address table.

The addressFieldMapping parameter defines the mapping of address fields used by the GeocodeServer to fields in the AddressTable RecordSet. The names of the properties in this PropertySet are the names of the address fields used by the GeocodeServer. Use the GetAddressFields method to get the set of fields used by the GeocodeServer. The values of the properties are the names of the corresponding fields in the RecordSet.

The propMods parameter is a PropertySet containing the GeocodeServer properties to use to geocode the address. The GetLocatorProperties method returns the set of default geocoding properties for the GeocodeServer. In some cases, you may want to modify the geocoding properties used to geocode addresses. For example, you may wish to change the spelling sensitivity used to search for matches for addresses, or you may want to change the side and end offset applied to the geocoded locations. Modify the properties in the PropertySet returned by the GetLocatorProperties method, and pass the modified PropertySet to the propMods parameter. The PropertySet passed to the propMods parameter only needs to contain properties that are different than the default properties for the GeocodeServer. If you don't wish to modify any of the default properties returned used by the GeocodeServer, you can either pass a null value to the propMods parameter, or pass the unmodified PropertySet returned by the GetLocatorProperties method.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
geocodeAddresses in interface IGeocodeServer
Parameters:
addressTable - A reference to a com.esri.arcgis.geodatabase.IRecordSet (in)
addressFieldMapping - A reference to a com.esri.arcgis.system.IPropertySet (in)
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRecordSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

standardizeAddress

public IPropertySet standardizeAddress(IPropertySet address,
                                       IPropertySet propMods)
                                throws IOException,
                                       AutomationException
Standardizes an address. One of the properties returned indicates if it is an intersection or not.

Remarks

NOTE: This method is not supported for locators that were built using the second generation geocoding engine.

The StandardizeAddress method standardizes an address using the geocoding rules used by the GeocodeServer.

The address parameter is a PropertySet that contains the address to standardize. The names of the properties are the input address fields used by the GeocodeServer, as defined by the GetAddressFields method.

The propMods parameter is a PropertySet containing the GeocodeServer properties to use to standardize the address. The GetLocatorProperties method returns the set of default geocoding properties for the GeocodeServer. In some cases, you may want to modify the properties used to standardize an address. Modify the properties in the PropertySet returned by the GetLocatorProperties method, and pass the modified PropertySet to the propMods parameter. The PropertySet passed to the propMods parameter only needs to contain properties that are different than the default properties for the GeocodeServer. If you don't wish to modify any of the default properties returned used by the GeocodeServer, you can either pass a null value to the propMods parameter, or pass the unmodified PropertySet returned by the GetLocatorPropertiesmethod.

The PropertySet returned by the StandardizeAddress method contains the standardized address. In addition to the standardized address components, this PropertySet contains a property named "Addr_type" that indicates the type of address. If the value of this property is "A", then the address was standardized as a non-intersection address. If the value of this property is "I", then the address was standardized as an intersection address. The set of remaining properties will depend on the value of this property. If the standardized address returned is a non-intersection address, then use the names of the fields returned by the GetStandardizedFields method to retrieve the components of the standardized address. If the standardized address returned is an intersection address, then use the names of the fields returned by the GetStandardizedIntersectionFields method to retrieve the components of the standardized address.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
standardizeAddress in interface IGeocodeServer
Parameters:
address - A reference to a com.esri.arcgis.system.IPropertySet (in)
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findAddressCandidates

public IRecordSet findAddressCandidates(IPropertySet address,
                                        IPropertySet propMods)
                                 throws IOException,
                                        AutomationException
Generates candidates for an address (normal or standardized form).

Remarks

The FindAddressCandidates method finds candidates for a single address defined by the address PropertySet, and returns a Recordset containing the candidates.

The address parameter is a PropertySet containing the address for which to find candidates. The names of the properties in this PropertySet are the names of the address fields used by the GeocodeServer. The most common way to find candidates for an address using the FindAddressCandidates method is to allow the GeocodeServer to standardize the address before searching for candidates for the address. In this case, use the GetAddressFields method to retrieve the definitions of the address fields used by the GeocodeServer, and use the names of these fields as the names of the properties defined in the address PropertySet. The Required property on each Field object indicates whether the address field is required by the GeocodeServer. Failing to specify a required address property results in an error.

In some cases, you may want to geocode an address that has been standardized with the input of the user or through some other method. In these cases, use the GetStandardizedFields or GetStandardizedIntersectionFields methods to retrieve the names of the standardized address fields used by the GeocodeServer , and use the names of these fields as the names of the properties defined in the address PropertySet. You must also add an additional property to the address PropertySet to indicate that the address is a standardized address. The name of this property must be "ADDR_TYPE", and its value must be "A" for a standardized address, or "I" for a standardized intersection.

The propMods parameter is a PropertySet containing the GeocodeServer properties to use to find candidates for the address. The GetLocatorProperties method returns the set of default geocoding properties for the GeocodeServer. In some cases, you may want to modify the geocoding properties used to find candidates for an address. For example, you may wish to change the spelling sensitivity used to search for candidates for the address, or you may want to change the side and end offset applied to the candidate locations. Modify the properties in the PropertySet returned by the GetLocatorProperties method, and pass the modified PropertySet to the propMods parameter. The PropertySet passed to the propMods parameter only needs to contain properties that are different than the default properties for the GeocodeServer. If you don't wish to modify any of the default properties returned used by the GeocodeServer, you can either pass a null value to the propMods parameter, or pass the unmodified PropertySet returned by the GetLocatorProperties method.

The FindAddressCandidates method returns a Recordset that contains Rows that define candidates for the address found by the GeocodeServer. For non-intersection addresses, use the GetCandidateFields method to get the set of fields contained in the Recordset. For intersection addresses, use the GetIntersectionCandidateFields method to get the set of fields contained in the Recordset.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
findAddressCandidates in interface IGeocodeServer
Parameters:
address - A reference to a com.esri.arcgis.system.IPropertySet (in)
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRecordSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAddressFields

public IFields getAddressFields()
                         throws IOException,
                                AutomationException
Fields needed to geocode a table of addresses.

Remarks

The GetAddressFields method returns a Fields object containing the input address fields used by the GeocodeServer. The IField::Required property on each Field object indicates if the GeocodeServer requires this field when geocoding addresses.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAddressFields in interface IGeocodeServer
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCandidateFields

public IFields getCandidateFields(IPropertySet propMods)
                           throws IOException,
                                  AutomationException
Fields contained in a list of candidates.

Remarks

The GetCandidateFields object returns a Fields object that contains definitions of the Fields in the Recordset returned by the FindAddressCandidates method for non-intersection addresses.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCandidateFields in interface IGeocodeServer
Parameters:
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIntersectionCandidateFields

public IFields getIntersectionCandidateFields(IPropertySet propMods)
                                       throws IOException,
                                              AutomationException
Fields contained by intersection candidates.

Remarks

The GetIntersectionCandidateFields object returns a Fields object that contains definitions of the Fields in the Recordset returned by the FindAddressCandidates method for intersection addresses.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getIntersectionCandidateFields in interface IGeocodeServer
Parameters:
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStandardizedFields

public IFields getStandardizedFields()
                              throws IOException,
                                     AutomationException
Fields contained in a standardized address.

Remarks

NOTE: This method is not supported for locators that were built using the second generation geocoding engine.

The GetStandardizedFields method returns a set of fields that define the elements of a standardized non-intersection address. Use this method when constructing a PropertySet that represents a standardized address to pass to the GeocodeAddress or FindAddressCandidates methods, and when inspecting an address that has been standardized using the StandardizeAddress method.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getStandardizedFields in interface IGeocodeServer
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStandardizedIntersectionFields

public IFields getStandardizedIntersectionFields()
                                          throws IOException,
                                                 AutomationException
Fields contained in a standardized intersection.

Remarks

NOTE: This method is not supported for locators that were built using the second generation geocoding engine.

The GetStandardizedIntersectionFields method returns a set of fields that define the elements of a standardized intersection address. Use this method when constructing a PropertySet that represents a standardized address to pass to the GeocodeAddress or FindAddressCandidates methods, and when inspecting an address that has been standardized using the StandardizeAddress method.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getStandardizedIntersectionFields in interface IGeocodeServer
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getResultFields

public IFields getResultFields(IPropertySet propMods)
                        throws IOException,
                               AutomationException
Fields contained in the geocoding result.

Remarks

The GetResultFields property returns a Fields object that defines the fields returned by the address locator on which the GeocodeServer is based. For more information on the fields returned by address locators, see IAddressGeocoding::MatchFields.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getResultFields in interface IGeocodeServer
Parameters:
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IAddressGeocoding.getMatchFields()

getDefaultInputFieldMapping

public IPropertySet getDefaultInputFieldMapping()
                                         throws IOException,
                                                AutomationException
Suggested field name mappings for all input fields.

Remarks

The GetDefaultInputFieldMapping property returns suggested names for fields in an address table that map to input address fields used by the GeocodeServer. Use this method when preparing a table for the GeocodeAddresses method to automatically detect the fields in the address table that contain address information.

The names of the properties contained in the PropertySet returned by this method are the names of the input address fields. Use the GetAddressFields method to get the names of the input address fields used by the GeocodeServer. The value of each property is a comma-delimited list of suggested field names for each input address field.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDefaultInputFieldMapping in interface IGeocodeServer
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLocatorProperties

public IPropertySet getLocatorProperties()
                                  throws IOException,
                                         AutomationException
Default properties for a locator.

Remarks

The GetLocatorProperties method returns a PropertySet containing all of the geocoding properties used by the GeocodeServer. To change the geocoding properties used when calling other methods on the IGeocodeServer interface, modify the properties in this PropertySet, then pass the PropertySet to the method you are calling using the propMods parameter on the method.

The following table describes all of the properties that might be contained in the PropertySet returned by the GetLocatorProperties method:

Name Description Values
EndOffset The end offset used by the address locator. A long integer value between 0 and 50
IntersectionConnectors The intersection connectors used by the address locator. A string value containing the space-delimited list of intersection connectors (e.g., "| & @")
MatchIfScoresTie Indicates if the GeocodeServer should match an addresses to a candidate if two or more candidates share the same best candidate score. "TRUE" or "FALSE"
MinimumCandidateScore The minimum candidate score used by the address locator. A long integer value between 0 and 100
MinimumMatchScore The minimum match score used by the address locator. A long integer value between 0 and 100
ReverseDistance The search distance to use to search for reference data features when reverse geocoding. The ReverseDistance value is specified in the reverse distance units used by the address locator. A double floating-point value
ReverseDistanceUnits The search distance units used by the address locator when reverse geocoding. Valid values include all of the enumeration constant names included in the esriUnits enumeration, without the "esri" prefix (e.g., "Meters"). A string representing the reverse geocoding distance units
SideOffset The side offset used by the address locator. The SideOffset value is specified in the side offset units used by the address locator. A double floating-point value
SideOffsetUnits The side offset units used by the address locator. Valid values include all of the enumeration constant names included in the esriUnits enumeration, without the "esri" prefix (e.g., "Meters"). A string representing the side offset units
SpellingSensitivity The spelling sensitivity used by the address locator. A long integer value between 0 and 100
SuggestedBatchSize The batch size to use when batch geocoding a table of addresses. A long integer value
UICLSID The Class ID of the LocatorUI object to use for the GeocodeServer's user interface in desktop applications. A string value containing the CLSID

For more information on the properties listed above, please refer to the IGeocodingProperties interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLocatorProperties in interface IGeocodeServer
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reverseGeocode

public IPropertySet reverseGeocode(IPoint location,
                                   boolean bReturnIntersection,
                                   IPropertySet propMods)
                            throws IOException,
                                   AutomationException
Generates an address for a point.

Remarks

The ReverseGeocode method returns the address closest to the given point, and within a specified search distance.

The location parameter is a Point object that represents the point at which to search for the closest address. Note that the Point passed to this parameter have the same spatial reference as the GeocodeServer's output. The easiest way to get the spatial reference from the GeocodeServer is to use the GetResultFields method to get the result Fields, and then get the spatial reference from the shape field's GeometryDef object. If the Point is in some other spatial reference (such as a point feature from another feature class), then you must first project the point into the GeocodeServer's output spatial reference. This is most easily done using the IPoint::Project method.

The bReturnIntersection parameter indicates whether the GeocodeServer should return the nearest intersection to the given point. If the value of this parameter is True, then the GeocodeServer will return the nearest intersection to the given point, provided that the GeocodeServer supports intersection geocoding, and provided that there is an intersection within the reverse geocoding search distance. If the value of this parameter is False, then the GeocodeServer will return the nearest address to the given point, provided that there is an address within the GeocodeServer 's reverse geocoding search tolerance.

The propMods parameter is a PropertySet containing the geocoding properties to use for reverse geocoding. There are two properties that are relevant to reverse geocoding. The ReverseDistance and ReverseDistanceUnits properties specify the distance from the given point to which to search for addresses. When specifying the ReverseDistanceUnits property, use a string to indicate the units to use. For example, when searching for an address using a search distance specified in esriMeters, use the string "Meters" to specify the search distance units. Refer to the esriUnits enumeration for a list of all supported search distance units.

The PropertySet returned by the ReverseGeocode method contains properties that describe the address. The names of the properties are the names of the Fields returned by the GetAddressFields method, and their values correspond to the components of the nearest address. In fact, the PropertySet returned by the ReverseGeocode method could be passed to the GeocodeAddress method to get the geometry of the closest address to the given point.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
reverseGeocode in interface IGeocodeServer
Parameters:
location - A reference to a com.esri.arcgis.geometry.IPoint (in)
bReturnIntersection - The bReturnIntersection (in)
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAddressLocator

public ILocator getAddressLocator()
                           throws IOException,
                                  AutomationException
The address locator used by the geocode server.

Remarks

This IGeocodeServerObjects interface is available only if the GeocodeServer was obtained by co-creating the GeocodeServer object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAddressLocator in interface IGeocodeServerObjects
Returns:
A reference to a com.esri.arcgis.geodatabase.ILocator
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSingleLineAddressField

public IField getSingleLineAddressField()
                                 throws IOException,
                                        AutomationException
Field needed to geocode a single line address.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getSingleLineAddressField in interface IGeocodeServerSingleLine
Returns:
A reference to a com.esri.arcgis.geodatabase.IField
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultInputFieldNames

public Object getDefaultInputFieldNames()
                                 throws IOException,
                                        AutomationException
Recognized names for the single line input field.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getDefaultInputFieldNames in interface IGeocodeServerSingleLine
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

attachToLocator

public void attachToLocator(ILocatorName locName)
                     throws IOException,
                            AutomationException
Attach this service to the locator specified by the locator name. This is the locator that the service will use internally.

Remarks

To create a new GeocodeServer in a Desktop or Engine environment, simply create a new GeocodeServer object and attach the address locator on which you want to base the GeocodeServer using the AttachToLocator method.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
attachToLocator in interface IInitGeocodeServer
Parameters:
locName - A reference to a com.esri.arcgis.geodatabase.ILocatorName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAdjustableProperties

public String getAdjustableProperties()
                               throws IOException,
                                      AutomationException
The list of properties (comma delimited) that can be modified at runtime (for a given method).

Remarks

The IInitGeocodeServer interface is available only if the GeocodeServer was obtained for use by co-creating the GeocodeServer object.

The AdjustableProperties method returns a comma-delimited string containing the list of properties that a user or developer can modify at runtime when using a GeocodeServer. Use this method to inspect and restrict the set of properties that users and developers can modify. Refer to the IGeocodeServer::GetLocatorProperties method for a list of property names that can be used.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAdjustableProperties in interface IInitGeocodeServer
Returns:
The propertyList
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAdjustableProperties

public void setAdjustableProperties(String propertyList)
                             throws IOException,
                                    AutomationException
The list of properties (comma delimited) that can be modified at runtime (for a given method).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setAdjustableProperties in interface IInitGeocodeServer
Parameters:
propertyList - The propertyList (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSuggestedBatchSize

public int getSuggestedBatchSize()
                          throws IOException,
                                 AutomationException
The suggested number of addresses to send to a server in one batch request.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSuggestedBatchSize in interface IInitGeocodeServer
Returns:
The size
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSuggestedBatchSize

public void setSuggestedBatchSize(int size)
                           throws IOException,
                                  AutomationException
The suggested number of addresses to send to a server in one batch request.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSuggestedBatchSize in interface IInitGeocodeServer
Parameters:
size - The size (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConfigurationName

public String getConfigurationName()
                            throws IOException,
                                   AutomationException
Name of the server object configuration that defines the server object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getConfigurationName in interface IServerObject
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTypeName

public String getTypeName()
                   throws IOException,
                          AutomationException
Type of the server object (MapServer or GeocodeServer).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTypeName in interface IServerObject
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findExtensionByCLSID

public IServerObjectExtension findExtensionByCLSID(String cLSID)
                                            throws IOException,
                                                   AutomationException
Returns a server object extension found using a string representation of its class ID.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
findExtensionByCLSID in interface IServerObjectExtensionManager
Parameters:
cLSID - The cLSID (in)
Returns:
A reference to a com.esri.arcgis.server.IServerObjectExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findExtensionByTypeName

public IServerObjectExtension findExtensionByTypeName(String name)
                                               throws IOException,
                                                      AutomationException
Returns a server object extension found using its type name.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
findExtensionByTypeName in interface IServerObjectExtensionManager
Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.server.IServerObjectExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleRESTRequest

public byte[] handleRESTRequest(String capabilities,
                                String resourceName,
                                String operationName,
                                String operationInput,
                                String outputFormat,
                                String requestProperties,
                                String[] responseProperties)
                         throws IOException,
                                AutomationException
Handles REST requests for SOE.

This method is invoked by ArcGIS Server's REST handler, which intercepts client's request (in URL form), parses it and passes it on to this method in form of parameter values.

The REST SOE developer must add logic to use these parameter values to determine which resource/operation is being requested and accordingly handle these requests and generate responses in the output format indicated by the "outputFormat" parameter. For more information on developing REST SOEs, please consult the Java ArcObjects Developer Guide.

Developer doc: Developing extensions > Server Object Extensions > SOE Web Services > REST Web Services > Developing SOE REST Web Services
Samples: Samples > Server Object Extensions section

Specified by:
handleRESTRequest in interface IRESTRequestHandler
Parameters:
capabilities - The capabilities supported by the SOE. An admin can choose which capabilities are enabled on a particular SOE (in ArcGIS Manager or ArcCatalog), based on certain criteria such as security roles. This list of allowed capabilities is then sent to this method, at runtime, as a comma separated list. (in)
resourceName - Name of the resource being addressed. If empty, its assumed that root resource is being addressed. (in)
operationName - Name of the operation being invoked. If empty, description of resource is returned. (in)
operationInput - Input parameters, in form of comma separated list, to the operation specified by operationName parameter. (in)
outputFormat - OutputFormat of operation. Possible formats are JSON, HTML, AMF, etc. (in)
requestProperties - The requestProperties (in)
responseProperties - The responseProperties (out)
Returns:
Output generated by the SOE
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSchema

public String getSchema()
                 throws IOException,
                        AutomationException
This method returns the resource hierarchy of a REST based SOE. This hierarchy is in JSON format as shown in the example below:

For an SOE that has a root resource (called "root") with one operation ("operation0"), and 2 sub-resources with one operation each ("operation1" and "operation2" respectively), the schema would look like:


 {
   "name": "MyRESTSOE",
   "description": "My REST SOE with 3 resources and 1 operation each.",
   "isCollection": false,
   "operations": [
   {
      "name": "operation0",
      "parameters": ["param01"],
      "supportedOutputFormats": ["json"]
    }
 ],
 "resources": [
  {
      "name": "subresource1",
      "description": "Sub Resource 1",
      "isCollection": true,
      "operations": [
       {
          "name": "operation1",
          "parameters": ["param10", "param11"],
          "supportedOutputFormats": ["json"]
       }
    ]
  },
  {
      "name": "subresource2",
      "description": "Sub Resource 2",
      "isCollection": true,
      "operations": [
       {
          "name": "operation2",
          "parameters": ["param20", "param21"],
          "supportedOutputFormats": ["json"]
       }
    ]
  }
 ]
}

Specified by:
getSchema in interface IRESTRequestHandler
Returns:
resource hierarchy of REST SOE, as String
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.