com.esri.arcgis.carto
Interface IMapServerDataAccess

All Superinterfaces:
Serializable
All Known Implementing Classes:
MapServer

public interface IMapServerDataAccess
extends Serializable

Provides access to the data source behind the MapServer.

Product Availability

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


Method Summary
 Object getDataSource(String mapName, int layerID)
          Get Data Source
 Object getDisplayDataSource(String mapName, int layerOrTableID)
          Get Display Data Source
 

Method Detail

getDataSource

Object getDataSource(String mapName,
                     int layerID)
                     throws IOException,
                            AutomationException
Get Data Source

Remarks

This function allows fine-grained object access to a FeatureLayer, a RasterLayer or a StandaloneTable by returning IFeatureClass, IRaster or ITable respectively. If the layer or standalone table has any joins, the returned object will not contain the joined portion. In addition any field visibility or field alias set to the layer in the source map document will be ignored as it returns the underlying data source.

Product Availability

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

Parameters:
mapName - The mapName (in)
layerID - The layerID (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDisplayDataSource

Object getDisplayDataSource(String mapName,
                            int layerOrTableID)
                            throws IOException,
                                   AutomationException
Get Display Data Source

Remarks

This function allows fine-grained object access to a FeatureLayer, a RasterLayer or a StandaloneTable by returning IFeatureClass, IRaster or ITable respectively, or IRelQueryTable when it is joined. In addition any field visibility or field alias set to the layer in the source map document will be ignored as it returns the underlying data source.

The main difference between GetDisplayDataSource and GetDataSouce functions is that the former one honors joins and returns IRelQueryTable when join exists. This IRelQueryTable interface gives you access to the source or destination table, or the relationship class. When the layer or standalone table is not participating in any join, the behavior of GetDisplayDataSource and GetDataSouce functions are identical.

Product Availability

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

Parameters:
mapName - The mapName (in)
layerOrTableID - The layerOrTableID (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.