com.esri.arcgis.carto
Interface IMSDHelper

All Superinterfaces:
Serializable
All Known Implementing Classes:
MSDHelper

public interface IMSDHelper
extends Serializable

Provides methods to open, save, repair mapserver definition files.

Product Availability

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


Method Summary
 void close()
          Close the mapserver defintion file.
 String getDataset(String layerPath)
          Given the layer's catalog path, returns the dataset name.
 String getLayerDisplayName(String layerPath)
          Given the layer's catalog path, returns its TOC display name.
 IStringArray getLayers(String mapPath)
          Given the map's catalog path, returns the catalog path for all layers in the map.
 String getLayerType(String layerPath)
          Given the layer's catalog path, returns the layer type.
 String getMapDisplayName(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(String layerPath)
          Given the layer's catalog path, returns the catalog path to its sub layers, if it has any.
 String getWorkspaceConnectionStringFromLayer(String layerPath)
          Given the layer's catalog path, returns the workspace connection string.
 String getWorkspaceFactoryType(String layerPath)
          Given the layer's catalog path, returns the workspace type.
 boolean isActiveMap(String mapPath)
          Given the map's catalog path, returns a boolean inidicating if it is the active map.
 boolean isLayerValid(String layerPath)
          Given the layer's catalog path, returns a boolean indicating if it is valid.
 void open(String path)
          Open the mapserver definition file.
 void putWorkspaceConnectionStringInLayer(String layerPath, String workspaceConnectionString, boolean validate)
          Given the layer's catalog path, updates its workspace connection string.
 void replaceAll(String mapPath, String oldWorkspaceConnectionString, 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(String path, boolean relativePath)
          Save a copy of the open mapserver definition file at the specified location with the specified name.
 

Method Detail

open

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

Product Availability

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

Parameters:
path - The path (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

close

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

Product Availability

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

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

Product Availability

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

Parameters:
relativePath - The relativePath (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveAs

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

Product Availability

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

Parameters:
path - The path (in)
relativePath - The relativePath (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaps

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

Product Availability

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

Returns:
A reference to a com.esri.arcgis.system.IStringArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isActiveMap

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

Product Availability

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

Parameters:
mapPath - The mapPath (in)
Returns:
The activeMap
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapDisplayName

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

Product Availability

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

Parameters:
mapPath - The mapPath (in)
Returns:
The mapDisplayName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceAll

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

Product Availability

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

Parameters:
mapPath - The mapPath (in)
oldWorkspaceConnectionString - The oldWorkspaceConnectionString (in)
newWorkspaceConnectionString - The newWorkspaceConnectionString (in)
validate - The validate (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayers

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

Product Availability

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

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

isLayerValid

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

Product Availability

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

Parameters:
layerPath - The layerPath (in)
Returns:
The layerValid
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerType

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

Product Availability

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

Parameters:
layerPath - The layerPath (in)
Returns:
The layerType
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSubLayers

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

Product Availability

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

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

getDataset

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

Product Availability

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

Parameters:
layerPath - The layerPath (in)
Returns:
The datasetName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspaceFactoryType

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

Product Availability

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

Parameters:
layerPath - The layerPath (in)
Returns:
The workspaceFactoryType
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspaceConnectionStringFromLayer

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

Product Availability

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

Parameters:
layerPath - The layerPath (in)
Returns:
The workspaceConnectionString
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

putWorkspaceConnectionStringInLayer

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

Product Availability

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

Parameters:
layerPath - The layerPath (in)
workspaceConnectionString - The workspaceConnectionString (in)
validate - The validate (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerDisplayName

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

Product Availability

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

Parameters:
layerPath - The layerPath (in)
Returns:
The layerDisplayName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.