com.esri.arcgis.carto
Interface IDataLayer2

All Superinterfaces:
Serializable
All Known Implementing Classes:
BasemapSubLayer, CadAnnotationLayer, CadastralFabricLayer, CadastralFabricSubLayer, CadFeatureLayer, CadLayer, CoverageAnnotationLayer, DimensionLayer, FDOGraphicsLayer, FeatureLayer, GdbRasterCatalogLayer, IDataLayer2Proxy, ImageServerLayer, IMSMapLayer, KmlLayer, MosaicLayer, NALayer, NetworkLayer, RasterCatalogLayer, RasterLayer, SchematicLayer, StandaloneTable, TemporalFeatureLayer, TerrainLayer, TinLayer, TopologyLayer, WCSLayer, WMSMapLayer

public interface IDataLayer2
extends Serializable

Provides access to additional members that control the data source properties of a layer.

Remarks

This interface provides access to all of the methods and properties of IDataLayer and also two additional methods. Disconnect disconnects a layer from its data source. Given a workspace, InWorkspace returns a boolean indicating whether or not the layer's data source is in the workspace.

Product Availability

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


Method Summary
 boolean connect(IName pOptRepairName)
          Connects the layer to its data source.
 void disconnect()
          Disconnects the data from the layer.
 IName getDataSourceName()
          Name of the data object for the layer.
 String getRelativeBase()
          Base path used when storing relative path names.
 boolean inWorkspace(IWorkspace workspace)
          Returns TRUE if the layer is in the specified workspace.
 boolean isDataSourceSupported(IName name)
          Indicates if the specified data object name is supported by the layer.
 void setDataSourceName(IName name)
          Name of the data object for the layer.
 void setRelativeBase(String basePath)
          Base path used when storing relative path names.
 

Method Detail

getDataSourceName

IName getDataSourceName()
                        throws IOException,
                               AutomationException
Name of the data object for the layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setDataSourceName

void setDataSourceName(IName name)
                       throws IOException,
                              AutomationException
Name of the data object for the layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isDataSourceSupported

boolean isDataSourceSupported(IName name)
                              throws IOException,
                                     AutomationException
Indicates if the specified data object name is supported by the layer.

Product Availability

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

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

connect

boolean connect(IName pOptRepairName)
                throws IOException,
                       AutomationException
Connects the layer to its data source. An optional name object can be specified to aid in repairing a lost connection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getRelativeBase

String getRelativeBase()
                       throws IOException,
                              AutomationException
Base path used when storing relative path names.

Remarks

The RelativeBase property is used internally when persisting and loading documents with a relative path. When a document has been fully loaded the path is realized to a complete path.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setRelativeBase

void setRelativeBase(String basePath)
                     throws IOException,
                            AutomationException
Base path used when storing relative path names.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

disconnect

void disconnect()
                throws IOException,
                       AutomationException
Disconnects the data from the layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

inWorkspace

boolean inWorkspace(IWorkspace workspace)
                    throws IOException,
                           AutomationException
Returns TRUE if the layer is in the specified workspace.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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