com.esri.arcgis.location
Class AGSLocatorWorkspace

java.lang.Object
  extended bycom.esri.arcgis.location.AGSLocatorWorkspace
All Implemented Interfaces:
IAGSLocatorWorkspace, ILocatorAttach, ILocatorAttach2, ILocatorWorkspace, ISupportErrorInfo, java.io.Serializable

public class AGSLocatorWorkspace
extends java.lang.Object
implements ILocatorWorkspace, IAGSLocatorWorkspace, ILocatorAttach, ILocatorAttach2, ISupportErrorInfo

A locator workspace that exposes geocoding services from an ArcGIS Server.

Product Availability

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

Description

An AGSLocatorWorkspace is a locator workspace that contains GeocodeServer objects served by an ArcGIS Server.

Remarks

An AGSLocatorWorkspace is a read-only locator workspace that contains locators representing GeocodeServer objects served by an ArcGIS Server. Because it is a read-only locator workspace, developers cannot modify the set of locators in an AGSLocatorWorkspace using the ILocatorWorkspace interface. Instead, use the ServerObjectAdmin class to administer the set of GeocodeServers served by an ArcGIS Server.

AGSLocatorWorkspaces contain locators, but do not contain locator styles.

See Also:
ServerObjectAdmin, GeocodeServer, AGSAddressLocator, Serialized Form

Constructor Summary
AGSLocatorWorkspace(java.lang.Object obj)
          Construct a AGSLocatorWorkspace using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 ILocator addLocator(java.lang.String name, ILocator locator, java.lang.String configKeyword, ITrackCancel cancelTracker)
          Adds a locator to the locator workspace.
 void addLocatorStyle(java.lang.String name, java.lang.String category, ILocatorStyle locatorStyle)
          Adds a locator style.
 void attachLocator(ILocator locator, ITable attachToTable, ITable inputTable, java.lang.String inputFieldNames, java.lang.String inputJoinFieldName, ITable outputTable, java.lang.String outputFieldNames, java.lang.String outputJoinFieldName)
          Attaches a locator to a table.
 void attachLocator(ILocator locator, ITable attachToTable, java.lang.String inputFieldNames, java.lang.String outputFieldNames)
          Attaches a locator to a table (simple function).
 void copyLocator(java.lang.String srcName, java.lang.String dstName)
          Copies a locator.
 void deleteLocator(java.lang.String name)
          Deletes a locator.
 boolean equals(java.lang.Object o)
          Compare this object with another
 IAGSServerConnectionName getAGSServerConnection()
          The ArcGIS server connection that contains the locator workspace.
 IAGSLocatorWorkspace getAsIAGSLocatorWorkspace()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ILocatorAttach getAsILocatorAttach()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ILocatorAttach2 getAsILocatorAttach2()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ILocatorWorkspace getAsILocatorWorkspace()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ISupportErrorInfo getAsISupportErrorInfo()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ILocator getLocator(java.lang.String name)
          Gets a locator.
 ILocatorName getLocatorName(java.lang.String name)
          Gets a LocatorName object.
 IEnumLocatorName getLocatorNames(int queryType, java.lang.String category)
          LocatorName objects in the locator workspace.
 IEnumLocator getLocators(int queryType, java.lang.String category)
          Locators in the locator workspace.
 ILocatorStyle getLocatorStyle(java.lang.String name)
          Gets a locator style.
 ILocatorWorkspaceName getName()
          The Name object for the locator workspace.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          Supported Platforms
 void renameLocator(java.lang.String oldName, java.lang.String newName)
          Renames a locator.
 void updateLocator(ILocator locator)
          Modifies the properties of a locator.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AGSLocatorWorkspace

public AGSLocatorWorkspace(java.lang.Object obj)
                    throws java.io.IOException
Construct a AGSLocatorWorkspace using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to AGSLocatorWorkspace.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
AGSLocatorWorkspace o = (AGSLocatorWorkspace)obj; // will not work

AGSLocatorWorkspace o = new AGSLocatorWorkspace(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server AGSLocatorWorkspace theAGSLocatorWorkspace = (AGSLocatorWorkspace) obj;

Throws:
java.io.IOException - if there are interop problems
Method Detail

getAsILocatorWorkspace

public ILocatorWorkspace getAsILocatorWorkspace()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIAGSLocatorWorkspace

public IAGSLocatorWorkspace getAsIAGSLocatorWorkspace()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsILocatorAttach

public ILocatorAttach getAsILocatorAttach()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsILocatorAttach2

public ILocatorAttach2 getAsILocatorAttach2()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsISupportErrorInfo

public ISupportErrorInfo getAsISupportErrorInfo()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

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


hashCode

public int hashCode()
the hashcode for this object


getName

public ILocatorWorkspaceName getName()
                              throws java.io.IOException,
                                     AutomationException
Description copied from interface: ILocatorWorkspace
The Name object for the locator workspace.

Supported Platforms

Windows, Solaris, Linux

Description

The Name property returns a reference to a LocatorWorkspaceName object that represents the locator workspace.

Specified by:
getName in interface ILocatorWorkspace
Returns:
A reference to a com.esri.arcgis.geodatabase.ILocatorWorkspaceName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
LocatorWorkspaceName

getLocatorNames

public IEnumLocatorName getLocatorNames(int queryType,
                                        java.lang.String category)
                                 throws java.io.IOException,
                                        AutomationException
Description copied from interface: ILocatorWorkspace
LocatorName objects in the locator workspace.

Supported Platforms

Windows, Solaris, Linux

Remarks

The LocatorNames property returns a LocatorNameEnumerator containing LocatorName objects representing locators in the locator workspace.

Use the queryType parameter to specify whether to include locators, locator styles, or both in the LocatorNameEnumerator.

Use the Category parameter to specify which category of locators and locator styles to include in the LocatorNameEnumerator. Address locators and address locator styles provided with ArcGIS all have a category of "Address". Specify an empty string for the Category parameter if you want to include locators or locator styles from all categories.

Specified by:
getLocatorNames in interface ILocatorWorkspace
Parameters:
queryType - A com.esri.arcgis.geodatabase.esriLocatorQuery constant (in)
category - The category (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumLocatorName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLocators

public IEnumLocator getLocators(int queryType,
                                java.lang.String category)
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: ILocatorWorkspace
Locators in the locator workspace.

Supported Platforms

Windows, Solaris, Linux

Remarks

The Locators property returns a LocatorEnumerator containing locators from the locator workspace.

Use the queryType parameter to specify whether to include locators, locator styles, or both in the LocatorEnumerator.

Use the Category parameter to specify which category of locators and locator styles to include in the LocatorEnumerator. Address locators and address locator styles provided with ArcGIS all have a category of "Address". Specify an empty string for the Category parameter if you want to include locators or locator styles from all categories.

Specified by:
getLocators in interface ILocatorWorkspace
Parameters:
queryType - A com.esri.arcgis.geodatabase.esriLocatorQuery constant (in)
category - The category (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumLocator
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getLocatorName

public ILocatorName getLocatorName(java.lang.String name)
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: ILocatorWorkspace
Gets a LocatorName object.

Supported Platforms

Windows, Solaris, Linux

Description

The GetLocatorName method retrieves a LocatorName object from a locator workspace.

Remarks

The Name parameter is the name of the locator that you want to retrieve from the locator workspace.

In ArcSDE workspaces, locator names are prefixed by the name of the ArcSDE user that owns the locator, as in "jack.My Locator".  When you call methods in ArcObjects that have parameters that specify locators in a ArcSDE workspace, you must specify the full name of the locator, including the user name. Failing to do so will result in an error. 

Specified by:
getLocatorName in interface ILocatorWorkspace
Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ILocatorName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
LocatorName

getLocator

public ILocator getLocator(java.lang.String name)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: ILocatorWorkspace
Gets a locator.

Supported Platforms

Windows, Solaris, Linux

Description

The GetLocator method retrieves a locator from a locator workspace.

Remarks

The Name parameter is the name of the locator that you want to retrieve from the locator workspace.

Within the default local locator workspace, and within ArcSDE locator workspaces, locator names are prefixed by a user name, as in "jack.My Locator". In local locator workspaces, the locator name is prefixed by the user name of the current user. In ArcSDE workspaces, the locator name is prefixed by the name of the ArcSDE user that owns the locator. When you call methods in ArcObjects that have parameters that specify locators in a locator workspace, you must specify the full name of the locator, including the user name. Failing to do so will result in an error.  

Specified by:
getLocator in interface ILocatorWorkspace
Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ILocator
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLocatorStyle

public ILocatorStyle getLocatorStyle(java.lang.String name)
                              throws java.io.IOException,
                                     AutomationException
Description copied from interface: ILocatorWorkspace
Gets a locator style.

Supported Platforms

Windows, Solaris, Linux

Description

The GetLocatorStyle method retrieves a locator style from a locator workspace.

Remarks

The Name parameter is the name of the locator style that you want to retrieve from the locator workspace.

Within ArcSDE locator workspaces, locator style names are prefixed by the name of the SDE user that owns the locator style (usually the default SDE user), as in "SDE.US Streets with Zone". You must specify the SDE user as a part of the Name parameter when calling the GetLocatorStyle method on an ArcSDE locator workspace.

Specified by:
getLocatorStyle in interface ILocatorWorkspace
Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ILocatorStyle
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

addLocator

public ILocator addLocator(java.lang.String name,
                           ILocator locator,
                           java.lang.String configKeyword,
                           ITrackCancel cancelTracker)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: ILocatorWorkspace
Adds a locator to the locator workspace.

Supported Platforms

Windows, Solaris, Linux

Description

The AddLocator method adds the specified locator to the locator workspace with the specified name.

Remarks

In general, when creating a locator, you will first retrieve a locator style from the locator workspace, set the properties on the locator style, then use the AddLocator method to create a new locator.

The Name parameter specifies the name for the new locator.

The Locator parameter is a reference to the locator that you want to add to the locator workspace.

The ConfigKeyword parameter is used to specify the ArcSDE storage keyword used to create the reference data indexes for the new locator. This parameter is only used if the locator workspace is in an ArcSDE database. Using a configuration keyword specifies certain parameters for storing tables to the ArcSDE database, and the proper configuration can improve the performance of your locators. For more information on ArcSDE configuration keywords, refer to the ArcSDE Configuration and Tuning Guide for your relational database management system (RDBMS). To use the default storage keyword for the ArcSDE database, specify a blank string for this parameter.

ICancelTracker is an optional parameter that you can use to specify a CancelTracker object that is used to display the reference data index building progress and allows the user to cancel the process.

Specified by:
addLocator in interface ILocatorWorkspace
Parameters:
name - The name (in)
locator - A reference to a com.esri.arcgis.geodatabase.ILocator (in)
configKeyword - The configKeyword (in)
cancelTracker - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ILocator
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addLocatorStyle

public void addLocatorStyle(java.lang.String name,
                            java.lang.String category,
                            ILocatorStyle locatorStyle)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: ILocatorWorkspace
Adds a locator style.

Supported Platforms

Windows, Solaris, Linux

Description

The AddLocatorStyle method adds the specified locator style to the locator workspace.

Remarks

In general, you will only use this method if you have created your own custom locator style and want to copy it from one locator workspace to another.

The Name parameter specifies the name for the new locator style.

The Category parameter is used to specify the category of the new locator style. Address locator styles provided with ArcGIS all have a category of "Address".

The LocatorStyle parameter is a reference to the locator style to add to the locator workspace.

Specified by:
addLocatorStyle in interface ILocatorWorkspace
Parameters:
name - The name (in)
category - The category (in)
locatorStyle - A reference to a com.esri.arcgis.geodatabase.ILocatorStyle (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

updateLocator

public void updateLocator(ILocator locator)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: ILocatorWorkspace
Modifies the properties of a locator.

Supported Platforms

Windows, Solaris, Linux

Remarks

To update a locator or locator style, first get the locator or locator style from the locator workspace using one of the members of the ILocatorWorkspace interface. Modify the properties of the locator or locator style, then update the locator or locator style using this method.

Specified by:
updateLocator in interface ILocatorWorkspace
Parameters:
locator - A reference to a com.esri.arcgis.geodatabase.ILocator (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

deleteLocator

public void deleteLocator(java.lang.String name)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: ILocatorWorkspace
Deletes a locator.

Supported Platforms

Windows, Solaris, Linux

Description

The DeleteLocator method deletes a locator or locator style from a locator workspace.

Remarks

The Name parameter is the name of the locator or locator style that you want to remove from the locator workspace.

In ArcSDE workspaces, locator names are prefixed by the name of the ArcSDE user that owns the locator, as in "jack.My Locator".  When you call methods in ArcObjects that have parameters that specify locators in a ArcSDE workspace, you must specify the full name of the locator, including the user name. Failing to do so will result in an error.  

Specified by:
deleteLocator in interface ILocatorWorkspace
Parameters:
name - The name (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

renameLocator

public void renameLocator(java.lang.String oldName,
                          java.lang.String newName)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: ILocatorWorkspace
Renames a locator.

Supported Platforms

Windows, Solaris, Linux

Remarks

The oldName parameter is the current name of the locator or locator style that you want to rename. The newName parameter is the new name for the locator or locator style.

In ArcSDE workspaces, locator names are prefixed by the name of the ArcSDE user that owns the locator, as in "jack.My Locator".  When you call methods in ArcObjects that have parameters that specify locators in a ArcSDE workspace, you must specify the full name of the locator, including the user name. Failing to do so will result in an error.  You must fully-qualify the oldName parameter with a user name. Do not qualify the newName parameter with a user name; the locator workspace will add the user name automatically.

Specified by:
renameLocator in interface ILocatorWorkspace
Parameters:
oldName - The oldName (in)
newName - The newName (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

copyLocator

public void copyLocator(java.lang.String srcName,
                        java.lang.String dstName)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: ILocatorWorkspace
Copies a locator.

Supported Platforms

Windows, Solaris, Linux

Description

The CopyLocator method creates a copy of the specified locator in the same locator workspace.

Remarks

The srcName parameter is the name of the locator that you want to copy. The dstName parameter is the name for the copy of the locator.

In ArcSDE workspaces, locator names are prefixed by the name of the ArcSDE user that owns the locator, as in "jack.My Locator".  When you call methods in ArcObjects that have parameters that specify locators in a ArcSDE workspace, you must specify the full name of the locator, including the user name. Failing to do so will result in an error.  

 

Specified by:
copyLocator in interface ILocatorWorkspace
Parameters:
srcName - The srcName (in)
dstName - The dstName (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAGSServerConnection

public IAGSServerConnectionName getAGSServerConnection()
                                                throws java.io.IOException,
                                                       AutomationException
Description copied from interface: IAGSLocatorWorkspace
The ArcGIS server connection that contains the locator workspace.

Specified by:
getAGSServerConnection in interface IAGSLocatorWorkspace
Returns:
A reference to a com.esri.arcgis.gisclient.IAGSServerConnectionName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

attachLocator

public void attachLocator(ILocator locator,
                          ITable attachToTable,
                          ITable inputTable,
                          java.lang.String inputFieldNames,
                          java.lang.String inputJoinFieldName,
                          ITable outputTable,
                          java.lang.String outputFieldNames,
                          java.lang.String outputJoinFieldName)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: ILocatorAttach
Attaches a locator to a table.

Supported Platforms

Windows, Solaris, Linux

Remarks

The AttachLocator method attaches a locator to a dataset. After creating a dataset using a locator, you should attach the locator to the dataset so that it can be rematched.

The Locator parameter specifies the locator that you want to attach to the dataset. Usually, this is the locator that you used to create the dataset.

The attachToTable parameter specifies the dataset to which you want to attach the locator.

The InputTable parameter specifies the dataset that contains the input attributes required by the locator. When you locate a table, you should copy the input attributes to the output dataset, and this property should then refer to the located dataset.

The InputFieldNames parameter is a comma-delimited string that specifies the names of the fields in InputTable that contain the input attributes required by the locator.

Use the InputJoinFieldName parameter to specify the attribute in InputTable that relates records in the input table to records in the located dataset. Normally, you will use the name of the ObjectID attribute in the located dataset for this parameter.

The OutputFieldNames parameter is a comma-delimited string that specifies the names of the fields in the located dataset that contain the match attributes generated by the locator. If the locator supports the IAddressGeocoding interface, you can use the MatchFields property to determine which fields contain the match attributes.

Use the OutputJoinFieldName parameter to specify the attribute in the located dataset that relates records in the located dataset to records in InputTable. Normally, you will use the name of the ObjectID attribute in the located dataset for this parameter.

The OutputTable parameter specifies the dataset that contains the result fields created by the address locator. Typically, this is the geocoded feature class, and is the dataset to which you are attaching the locator.

Specified by:
attachLocator in interface ILocatorAttach
Parameters:
locator - A reference to a com.esri.arcgis.geodatabase.ILocator (in)
attachToTable - A reference to a com.esri.arcgis.geodatabase.ITable (in)
inputTable - A reference to a com.esri.arcgis.geodatabase.ITable (in)
inputFieldNames - The inputFieldNames (in)
inputJoinFieldName - The inputJoinFieldName (in)
outputTable - A reference to a com.esri.arcgis.geodatabase.ITable (in)
outputFieldNames - The outputFieldNames (in)
outputJoinFieldName - The outputJoinFieldName (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

attachLocator

public void attachLocator(ILocator locator,
                          ITable attachToTable,
                          java.lang.String inputFieldNames,
                          java.lang.String outputFieldNames)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: ILocatorAttach2
Attaches a locator to a table (simple function).

Supported Platforms

Windows, Solaris, Linux

Remarks

The AttachLocator method attaches a copy of a locator to a dataset. This is generally done after geocoding a table of addresses to a feature class. A copy of the locator that was used to geocode the table of addresses is then attached to the geocoded feature class so that the geocoded feature class can be rematched at a later time.

The Locator parameter is the locator of which a copy will be attached to the dataset specified by the attachToTable parameter. Generally, the attachToTable parameter is a reference to a geocoded feature class, and the Locator parameter is a reference to the locator that was used to create it.

The InputFieldNames parameter is a comma-delimited list of the fields in the dataset represented by the attachToTable parameter that map to the input fields used by the locator. The OutputFieldNames parameter is a comma-delimited list of the fields in the dataset represented by the attachToTable parameter that contain the match attributes generated by the locator. Use the IAddressGeocoding::MatchFields property to determine which match attributes the locator generates.

To retrieve an attached locator from a dataset, use the ILocatorManager::GetLocatorFromDataset method.

Specified by:
attachLocator in interface ILocatorAttach2
Parameters:
locator - A reference to a com.esri.arcgis.geodatabase.ILocator (in)
attachToTable - A reference to a com.esri.arcgis.geodatabase.ITable (in)
inputFieldNames - The inputFieldNames (in)
outputFieldNames - The outputFieldNames (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
Description copied from interface: ISupportErrorInfo

Supported Platforms

Windows, Solaris, Linux

Description

Indicates whether the interface supports IErrorInfo.

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.