com.esri.arcgis.carto
Class DataSourceHelper

java.lang.Object
  extended by com.esri.arcgis.carto.DataSourceHelper
All Implemented Interfaces:
IDataSourceHelperLayer, IDataSourceHelperMap, IDataSourceHelperMapDocument, IDataSourceHelperStandaloneTable, com.esri.arcgis.interop.RemoteObjRef, java.io.Serializable

public class DataSourceHelper
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, IDataSourceHelperMapDocument, IDataSourceHelperMap, IDataSourceHelperLayer, IDataSourceHelperStandaloneTable

COM Class 'DataSourceHelper'. Generated 3/19/2015 1:20:42 PM from 'C:\ArcGIS\COM\esriCarto.olb'

Description 'Coclass that implements the data source repair methods for MXD.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.carto.IDataSourceHelperMapDocument
IID, IIDbd16c25f_5ac2_4e6d_8e34_bcc5feb395dd, xxDummy
 
Fields inherited from interface com.esri.arcgis.carto.IDataSourceHelperMap
IID, IIDa31a9a8a_3b4a_4a6e_abbd_589296e1ec02, xxDummy
 
Fields inherited from interface com.esri.arcgis.carto.IDataSourceHelperLayer
IID, IIDe448a908_20be_477e_bb03_b948a4b97ebf, xxDummy
 
Fields inherited from interface com.esri.arcgis.carto.IDataSourceHelperStandaloneTable
IID, IID5c5a6b80_f0a3_4478_b8d6_4eea1a1a121a, xxDummy
 
Constructor Summary
DataSourceHelper()
          Constructs a DataSourceHelper using ArcGIS Engine.
DataSourceHelper(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
DataSourceHelper theDataSourceHelper = (DataSourceHelper) obj;
 
Method Summary
 boolean equals(java.lang.Object o)
          Compare this object with another
 void findAndReplaceWorkspaceNamePath(IBasicMap pBasicMap, java.lang.String oldWorkspaceName, java.lang.String newWorkspaceName, boolean validate)
          String version of ReplaceWorkspaceName; Also does find and replace of parts of the workspace path name.
 void findAndReplaceWorkspaceNamePath(ILayer pLayer, java.lang.String oldWorkspaceName, java.lang.String newWorkspaceName, boolean validate)
          Replaces the layer's workspace path name with the given workspace path name; Also does find and replace of parts of the workspace path name.
 void findAndReplaceWorkspaceNamePath(IMapDocument pMapDocument, java.lang.String oldWorkspaceName, java.lang.String newWorkspaceName, boolean validate)
          String version of ReplaceWorkspaceName.
 void findAndReplaceWorkspaceNamePath(IStandaloneTable pStandaloneTable, java.lang.String oldWorkspaceName, java.lang.String newWorkspaceName, boolean validate)
          Replaces the table's workspace path name with the given workspace path name; Also does find and replace of parts of the workspace path name.
static java.lang.String getClsid()
          getClsid.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 int hashCode()
          the hashcode for this object
 void release()
          Release a DataSourceHelper.
 void repair(IBasicMap pBasicMap, IDataLayer pDataLayer, IName pName, boolean validate)
          Repairs the specified layer and attempt to repair all other broken layers with same workspace path name as the specified layer.
 void repair(IMapDocument pMapDocument, IDataLayer pDataLayer, IName pName, boolean validate)
          Repairs the specified layer and attempt to repair all other broken layers with same workspace path name as the specified layer.
 void replaceName(ILayer pLayer, IName pName, boolean validate)
          Replaces the layer's IName with the given IName.
 void replaceName(IStandaloneTable pStandaloneTable, IName pName, boolean validate)
          Replaces the specified standalone table's IName with the given IName.
 void replaceWorkspaceName(IBasicMap pBasicMap, IWorkspaceName pOldWorkspaceName, IWorkspaceName pNewWorkspaceName, boolean validate)
          Replaces all layers having matching workspace path names with the new workspace name object.
 void replaceWorkspaceName(IMapDocument pMapDocument, IWorkspaceName pOldWorkspaceName, IWorkspaceName pNewWorkspaceName, boolean validate)
          Replaces all layers having matching workspace path names with the new workspace name object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceHelper

public DataSourceHelper()
                 throws java.io.IOException,
                        java.net.UnknownHostException
Constructs a DataSourceHelper using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

DataSourceHelper

public DataSourceHelper(java.lang.Object obj)
                 throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
DataSourceHelper theDataSourceHelper = (DataSourceHelper) obj;

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

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

getClsid

public static java.lang.String getClsid()
getClsid.


equals

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

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.Object

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
Deprecated. Internal use only.

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

release

public void release()
Release a DataSourceHelper.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

replaceWorkspaceName

public void replaceWorkspaceName(IMapDocument pMapDocument,
                                 IWorkspaceName pOldWorkspaceName,
                                 IWorkspaceName pNewWorkspaceName,
                                 boolean validate)
                          throws java.io.IOException,
                                 AutomationException
Replaces all layers having matching workspace path names with the new workspace name object.

Specified by:
replaceWorkspaceName in interface IDataSourceHelperMapDocument
Parameters:
pMapDocument - A reference to a com.esri.arcgis.carto.IMapDocument (in)
pOldWorkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
pNewWorkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

repair

public void repair(IMapDocument pMapDocument,
                   IDataLayer pDataLayer,
                   IName pName,
                   boolean validate)
            throws java.io.IOException,
                   AutomationException
Repairs the specified layer and attempt to repair all other broken layers with same workspace path name as the specified layer.

Specified by:
repair in interface IDataSourceHelperMapDocument
Parameters:
pMapDocument - A reference to a com.esri.arcgis.carto.IMapDocument (in)
pDataLayer - A reference to a com.esri.arcgis.carto.IDataLayer (in)
pName - A reference to a com.esri.arcgis.system.IName (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findAndReplaceWorkspaceNamePath

public void findAndReplaceWorkspaceNamePath(IMapDocument pMapDocument,
                                            java.lang.String oldWorkspaceName,
                                            java.lang.String newWorkspaceName,
                                            boolean validate)
                                     throws java.io.IOException,
                                            AutomationException
String version of ReplaceWorkspaceName. Also does find and replace of parts of the workspace path name.

Specified by:
findAndReplaceWorkspaceNamePath in interface IDataSourceHelperMapDocument
Parameters:
pMapDocument - A reference to a com.esri.arcgis.carto.IMapDocument (in)
oldWorkspaceName - The oldWorkspaceName (in)
newWorkspaceName - The newWorkspaceName (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceWorkspaceName

public void replaceWorkspaceName(IBasicMap pBasicMap,
                                 IWorkspaceName pOldWorkspaceName,
                                 IWorkspaceName pNewWorkspaceName,
                                 boolean validate)
                          throws java.io.IOException,
                                 AutomationException
Replaces all layers having matching workspace path names with the new workspace name object.

Specified by:
replaceWorkspaceName in interface IDataSourceHelperMap
Parameters:
pBasicMap - A reference to a com.esri.arcgis.carto.IBasicMap (in)
pOldWorkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
pNewWorkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

repair

public void repair(IBasicMap pBasicMap,
                   IDataLayer pDataLayer,
                   IName pName,
                   boolean validate)
            throws java.io.IOException,
                   AutomationException
Repairs the specified layer and attempt to repair all other broken layers with same workspace path name as the specified layer.

Specified by:
repair in interface IDataSourceHelperMap
Parameters:
pBasicMap - A reference to a com.esri.arcgis.carto.IBasicMap (in)
pDataLayer - A reference to a com.esri.arcgis.carto.IDataLayer (in)
pName - A reference to a com.esri.arcgis.system.IName (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findAndReplaceWorkspaceNamePath

public void findAndReplaceWorkspaceNamePath(IBasicMap pBasicMap,
                                            java.lang.String oldWorkspaceName,
                                            java.lang.String newWorkspaceName,
                                            boolean validate)
                                     throws java.io.IOException,
                                            AutomationException
String version of ReplaceWorkspaceName; Also does find and replace of parts of the workspace path name.

Specified by:
findAndReplaceWorkspaceNamePath in interface IDataSourceHelperMap
Parameters:
pBasicMap - A reference to a com.esri.arcgis.carto.IBasicMap (in)
oldWorkspaceName - The oldWorkspaceName (in)
newWorkspaceName - The newWorkspaceName (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceName

public void replaceName(ILayer pLayer,
                        IName pName,
                        boolean validate)
                 throws java.io.IOException,
                        AutomationException
Replaces the layer's IName with the given IName.

Specified by:
replaceName in interface IDataSourceHelperLayer
Parameters:
pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
pName - A reference to a com.esri.arcgis.system.IName (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findAndReplaceWorkspaceNamePath

public void findAndReplaceWorkspaceNamePath(ILayer pLayer,
                                            java.lang.String oldWorkspaceName,
                                            java.lang.String newWorkspaceName,
                                            boolean validate)
                                     throws java.io.IOException,
                                            AutomationException
Replaces the layer's workspace path name with the given workspace path name; Also does find and replace of parts of the workspace path name.

Specified by:
findAndReplaceWorkspaceNamePath in interface IDataSourceHelperLayer
Parameters:
pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
oldWorkspaceName - The oldWorkspaceName (in)
newWorkspaceName - The newWorkspaceName (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceName

public void replaceName(IStandaloneTable pStandaloneTable,
                        IName pName,
                        boolean validate)
                 throws java.io.IOException,
                        AutomationException
Replaces the specified standalone table's IName with the given IName.

Specified by:
replaceName in interface IDataSourceHelperStandaloneTable
Parameters:
pStandaloneTable - A reference to a com.esri.arcgis.carto.IStandaloneTable (in)
pName - A reference to a com.esri.arcgis.system.IName (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findAndReplaceWorkspaceNamePath

public void findAndReplaceWorkspaceNamePath(IStandaloneTable pStandaloneTable,
                                            java.lang.String oldWorkspaceName,
                                            java.lang.String newWorkspaceName,
                                            boolean validate)
                                     throws java.io.IOException,
                                            AutomationException
Replaces the table's workspace path name with the given workspace path name; Also does find and replace of parts of the workspace path name.

Specified by:
findAndReplaceWorkspaceNamePath in interface IDataSourceHelperStandaloneTable
Parameters:
pStandaloneTable - A reference to a com.esri.arcgis.carto.IStandaloneTable (in)
oldWorkspaceName - The oldWorkspaceName (in)
newWorkspaceName - The newWorkspaceName (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.