com.esri.arcgis.carto
Class MSDHelper

java.lang.Object
  extended by com.esri.arcgis.carto.MSDHelper
All Implemented Interfaces:
IMSDHelper, IMSDHelper2, com.esri.arcgis.interop.RemoteObjRef, java.io.Serializable

public class MSDHelper
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, IMSDHelper, IMSDHelper2

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

Description 'Coclass implementing methods to open, save, repair mapserver definition files.' 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.IMSDHelper2
IID, IID2a400bb8_3083_4abe_9c5d_8fcfce1d2b2c, xxDummy
 
Fields inherited from interface com.esri.arcgis.carto.IMSDHelper
IID4c0b3fb1_b9b0_4387_b047_1b9be19098c3
 
Constructor Summary
MSDHelper()
          Constructs a MSDHelper using ArcGIS Engine.
MSDHelper(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MSDHelper theMSDHelper = (MSDHelper) obj;
 
Method Summary
 void close()
          Close the mapserver defintion file.
 boolean equals(java.lang.Object o)
          Compare this object with another
static java.lang.String getClsid()
          getClsid.
 java.lang.String getDataset(java.lang.String layerPath)
          Given the layer's catalog path, returns the dataset name.
 java.lang.String getDatasetFromTable(java.lang.String mapPath, int tableIndex)
          getDatasetFromTable
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 java.lang.String getLayerDisplayName(java.lang.String layerPath)
          Given the layer's catalog path, returns its TOC display name.
 IStringArray getLayers(java.lang.String mapPath)
          Given the map's catalog path, returns the catalog path for all layers in the map.
 java.lang.String getLayerType(java.lang.String layerPath)
          Given the layer's catalog path, returns the layer type.
 java.lang.String getMapDisplayName(java.lang.String mapPath)
          Given the map's catalog path returns the map's TOC display name.
 IStringArray getMaps()
          Method returns a String Array containing the catalog paths to all the maps in the msd.
 IStringArray getSubLayers(java.lang.String layerPath)
          Given the layer's catalog path, returns the catalog path to its sub layers, if it has any.
 java.lang.String getTableDisplayName(java.lang.String mapPath, int tableIndex)
          getTableDisplayName
 int getTables(java.lang.String mapPath)
          getTables
 java.lang.String getWorkspaceConnectionStringFromLayer(java.lang.String layerPath)
          Given the layer's catalog path, returns the workspace connection string.
 java.lang.String getWorkspaceConnectionStringFromTable(java.lang.String mapPath, int tableIndex)
          getWorkspaceConnectionStringFromTable
 java.lang.String getWorkspaceFactoryType(java.lang.String layerPath)
          Given the layer's catalog path, returns the workspace type.
 java.lang.String getWorkspaceFactoryTypeFromTable(java.lang.String mapPath, int tableIndex)
          getWorkspaceFactoryTypeFromTable
 int hashCode()
          the hashcode for this object
 boolean isActiveMap(java.lang.String mapPath)
          Given the map's catalog path, returns a boolean inidicating if it is the active map.
 boolean isDataLayer(java.lang.String layerPath)
          isDataLayer
 boolean isLayerValid(java.lang.String layerPath)
          Given the layer's catalog path, returns a boolean indicating if it is valid.
 boolean isTableValid(java.lang.String mapPath, int tableIndex)
          isTableValid
 void open(java.lang.String path)
          Open the mapserver definition file.
 void putWorkspaceConnectionStringInLayer(java.lang.String layerPath, java.lang.String workspaceConnectionString, boolean validate)
          Given the layer's catalog path, updates its workspace connection string.
 void putWorkspaceConnectionStringInTable(java.lang.String mapPath, int tableIndex, java.lang.String newWorkspaceConnection, boolean validate)
          putWorkspaceConnectionStringInTable
 boolean relativePaths()
          relativePaths
 void release()
          Release a MSDHelper.
 void replaceAll(java.lang.String mapPath, java.lang.String oldWorkspaceConnectionString, java.lang.String newWorkspaceConnectionString, boolean validate)
          Replaces the workspace connection string for all layers in the given map.
 void save(boolean relativePath)
          Save the mapserver defintion file.
 void saveAs(java.lang.String path, boolean relativePath)
          Save a copy of the open mapserver definition file at the specified location with the specified name.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSDHelper

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

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

MSDHelper

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

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

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 MSDHelper.

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

open

public void open(java.lang.String path)
          throws java.io.IOException,
                 AutomationException
Open the mapserver definition file.

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

close

public void close()
           throws java.io.IOException,
                  AutomationException
Close the mapserver defintion file.

Specified by:
close in interface IMSDHelper
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(boolean relativePath)
          throws java.io.IOException,
                 AutomationException
Save the mapserver defintion file.

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

saveAs

public void saveAs(java.lang.String path,
                   boolean relativePath)
            throws java.io.IOException,
                   AutomationException
Save a copy of the open mapserver definition file at the specified location with the specified name.

Specified by:
saveAs in interface IMSDHelper
Parameters:
path - The path (in)
relativePath - The relativePath (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaps

public IStringArray getMaps()
                     throws java.io.IOException,
                            AutomationException
Method returns a String Array containing the catalog paths to all the maps in the msd.

Specified by:
getMaps in interface IMSDHelper
Returns:
A reference to a com.esri.arcgis.system.IStringArray
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isActiveMap

public boolean isActiveMap(java.lang.String mapPath)
                    throws java.io.IOException,
                           AutomationException
Given the map's catalog path, returns a boolean inidicating if it is the active map.

Specified by:
isActiveMap in interface IMSDHelper
Parameters:
mapPath - The mapPath (in)
Returns:
The activeMap
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapDisplayName

public java.lang.String getMapDisplayName(java.lang.String mapPath)
                                   throws java.io.IOException,
                                          AutomationException
Given the map's catalog path returns the map's TOC display name.

Specified by:
getMapDisplayName in interface IMSDHelper
Parameters:
mapPath - The mapPath (in)
Returns:
The mapDisplayName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceAll

public void replaceAll(java.lang.String mapPath,
                       java.lang.String oldWorkspaceConnectionString,
                       java.lang.String newWorkspaceConnectionString,
                       boolean validate)
                throws java.io.IOException,
                       AutomationException
Replaces the workspace connection string for all layers in the given map.

Specified by:
replaceAll in interface IMSDHelper
Parameters:
mapPath - The mapPath (in)
oldWorkspaceConnectionString - The oldWorkspaceConnectionString (in)
newWorkspaceConnectionString - The newWorkspaceConnectionString (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayers

public IStringArray getLayers(java.lang.String mapPath)
                       throws java.io.IOException,
                              AutomationException
Given the map's catalog path, returns the catalog path for all layers in the map.

Specified by:
getLayers in interface IMSDHelper
Parameters:
mapPath - The mapPath (in)
Returns:
A reference to a com.esri.arcgis.system.IStringArray
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLayerValid

public boolean isLayerValid(java.lang.String layerPath)
                     throws java.io.IOException,
                            AutomationException
Given the layer's catalog path, returns a boolean indicating if it is valid.

Specified by:
isLayerValid in interface IMSDHelper
Parameters:
layerPath - The layerPath (in)
Returns:
The layerValid
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerType

public java.lang.String getLayerType(java.lang.String layerPath)
                              throws java.io.IOException,
                                     AutomationException
Given the layer's catalog path, returns the layer type.

Specified by:
getLayerType in interface IMSDHelper
Parameters:
layerPath - The layerPath (in)
Returns:
The layerType
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSubLayers

public IStringArray getSubLayers(java.lang.String layerPath)
                          throws java.io.IOException,
                                 AutomationException
Given the layer's catalog path, returns the catalog path to its sub layers, if it has any.

Specified by:
getSubLayers in interface IMSDHelper
Parameters:
layerPath - The layerPath (in)
Returns:
A reference to a com.esri.arcgis.system.IStringArray
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataset

public java.lang.String getDataset(java.lang.String layerPath)
                            throws java.io.IOException,
                                   AutomationException
Given the layer's catalog path, returns the dataset name.

Specified by:
getDataset in interface IMSDHelper
Parameters:
layerPath - The layerPath (in)
Returns:
The datasetName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspaceFactoryType

public java.lang.String getWorkspaceFactoryType(java.lang.String layerPath)
                                         throws java.io.IOException,
                                                AutomationException
Given the layer's catalog path, returns the workspace type.

Specified by:
getWorkspaceFactoryType in interface IMSDHelper
Parameters:
layerPath - The layerPath (in)
Returns:
The workspaceFactoryType
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspaceConnectionStringFromLayer

public java.lang.String getWorkspaceConnectionStringFromLayer(java.lang.String layerPath)
                                                       throws java.io.IOException,
                                                              AutomationException
Given the layer's catalog path, returns the workspace connection string.

Specified by:
getWorkspaceConnectionStringFromLayer in interface IMSDHelper
Parameters:
layerPath - The layerPath (in)
Returns:
The workspaceConnectionString
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

putWorkspaceConnectionStringInLayer

public void putWorkspaceConnectionStringInLayer(java.lang.String layerPath,
                                                java.lang.String workspaceConnectionString,
                                                boolean validate)
                                         throws java.io.IOException,
                                                AutomationException
Given the layer's catalog path, updates its workspace connection string.

Specified by:
putWorkspaceConnectionStringInLayer in interface IMSDHelper
Parameters:
layerPath - The layerPath (in)
workspaceConnectionString - The workspaceConnectionString (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerDisplayName

public java.lang.String getLayerDisplayName(java.lang.String layerPath)
                                     throws java.io.IOException,
                                            AutomationException
Given the layer's catalog path, returns its TOC display name.

Specified by:
getLayerDisplayName in interface IMSDHelper
Parameters:
layerPath - The layerPath (in)
Returns:
The layerDisplayName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

relativePaths

public boolean relativePaths()
                      throws java.io.IOException,
                             AutomationException
relativePaths

Specified by:
relativePaths in interface IMSDHelper2
Returns:
The vbRelativePaths
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDataLayer

public boolean isDataLayer(java.lang.String layerPath)
                    throws java.io.IOException,
                           AutomationException
isDataLayer

Specified by:
isDataLayer in interface IMSDHelper2
Parameters:
layerPath - The layerPath (in)
Returns:
The vbCanRepair
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTables

public int getTables(java.lang.String mapPath)
              throws java.io.IOException,
                     AutomationException
getTables

Specified by:
getTables in interface IMSDHelper2
Parameters:
mapPath - The mapPath (in)
Returns:
The tableCount
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isTableValid

public boolean isTableValid(java.lang.String mapPath,
                            int tableIndex)
                     throws java.io.IOException,
                            AutomationException
isTableValid

Specified by:
isTableValid in interface IMSDHelper2
Parameters:
mapPath - The mapPath (in)
tableIndex - The tableIndex (in)
Returns:
The tableValid
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDatasetFromTable

public java.lang.String getDatasetFromTable(java.lang.String mapPath,
                                            int tableIndex)
                                     throws java.io.IOException,
                                            AutomationException
getDatasetFromTable

Specified by:
getDatasetFromTable in interface IMSDHelper2
Parameters:
mapPath - The mapPath (in)
tableIndex - The tableIndex (in)
Returns:
The datasetName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspaceFactoryTypeFromTable

public java.lang.String getWorkspaceFactoryTypeFromTable(java.lang.String mapPath,
                                                         int tableIndex)
                                                  throws java.io.IOException,
                                                         AutomationException
getWorkspaceFactoryTypeFromTable

Specified by:
getWorkspaceFactoryTypeFromTable in interface IMSDHelper2
Parameters:
mapPath - The mapPath (in)
tableIndex - The tableIndex (in)
Returns:
The workspaceFactoryType
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspaceConnectionStringFromTable

public java.lang.String getWorkspaceConnectionStringFromTable(java.lang.String mapPath,
                                                              int tableIndex)
                                                       throws java.io.IOException,
                                                              AutomationException
getWorkspaceConnectionStringFromTable

Specified by:
getWorkspaceConnectionStringFromTable in interface IMSDHelper2
Parameters:
mapPath - The mapPath (in)
tableIndex - The tableIndex (in)
Returns:
The workspaceConnectionString
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

putWorkspaceConnectionStringInTable

public void putWorkspaceConnectionStringInTable(java.lang.String mapPath,
                                                int tableIndex,
                                                java.lang.String newWorkspaceConnection,
                                                boolean validate)
                                         throws java.io.IOException,
                                                AutomationException
putWorkspaceConnectionStringInTable

Specified by:
putWorkspaceConnectionStringInTable in interface IMSDHelper2
Parameters:
mapPath - The mapPath (in)
tableIndex - The tableIndex (in)
newWorkspaceConnection - The newWorkspaceConnection (in)
validate - The validate (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTableDisplayName

public java.lang.String getTableDisplayName(java.lang.String mapPath,
                                            int tableIndex)
                                     throws java.io.IOException,
                                            AutomationException
getTableDisplayName

Specified by:
getTableDisplayName in interface IMSDHelper2
Parameters:
mapPath - The mapPath (in)
tableIndex - The tableIndex (in)
Returns:
The tableDisplayName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.