com.esri.arcgis.carto
Interface IMapTableDescription

All Superinterfaces:
Serializable
All Known Subinterfaces:
IStandaloneTableDescription
All Known Implementing Classes:
LayerDescription, StandaloneTableDescription

public interface IMapTableDescription
extends Serializable

Provides access to the available properties of a table description object.

Product Availability

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


Method Summary
 String getDefinitionExpression()
          The definition expression for the table.
 int getID()
          The table ID.
 String getSourceID()
          The id of the data source to connect to.
 void setDefinitionExpression(String expression)
          The definition expression for the table.
 void setID(int tableID)
          The table ID.
 void setSourceID(String srcID)
          The id of the data source to connect to.
 

Method Detail

getID

int getID()
          throws IOException,
                 AutomationException
The table ID. This is a unique ID for the layer, and is used to identify the table in a number of method calls.

Remarks

An identifier that uniquely identifies a layer or a table within a map

Product Availability

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

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

setID

void setID(int tableID)
           throws IOException,
                  AutomationException
The table ID. This is a unique ID for the layer, and is used to identify the table in a number of method calls.

Product Availability

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

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

getDefinitionExpression

String getDefinitionExpression()
                               throws IOException,
                                      AutomationException
The definition expression for the table.

Remarks

A DefinitionExpression can be set on a layer or a table in order to limit layer features or rows available for display or query. This expression can be also be set in the source map document as a definition query. An expression set in the LayerDescription or StandaloneTableDescription will override one set for the layer in the source map. This only applies for the session state and does not replace the definition query set in the source map.

Let's look at some examples. You have a layer in your map that represents sales regions. The layer includes fields: REGIONS, SALES and MANAGER.

Example #1: In the source map the layer has a definition query, "REGION = North". No DefintionExpression is specified in LayerDescription. Only those features where REGION = North will be displayed in your map.

Example #2: In the source map the layer has a definition query, "REGION = ‘North’". You apply a DefinitionExpression in LayerDescription as "SALES > 1000". The LayerDescription DefinitionExpression overrides the definition query set in the source map. Only those features where SALES > 1000 will be displayed in your map.

If you wish to use the DefinitionExpression as a way of getting a subset of the features already filtered by the definition query in the map you will need to save the original expression and then add it to the new expression to form one compound expression, “REGION = ‘North’ AND SALES > 1000”. This will display map features that are belong to the North region and have sales over 1000.

Example #3: In the source map the layer has no definition query. You apply a DefinitionExpression in LayerDescription as "SALES > 1000". Only those features where SALES > 1000 will be displayed in your map.

The following MapServer methods will honor DefinitionExpression: Find, Identify, QueryData, QueryRowIDs, QueryRowCount, QueryFeatureCount2, QueryFeatureIds2, QueryFeatureData2 and QueryHyperlinks2.

Although the DefinitionExpression set in the LayerDescription will override any any definition query set in the source map, there are MapServer methods that only honor the expression set in the source document. Any expression set in DefinitionExpression in the LayerDescription will be ignored. These mothods include: QueryFeatureCount, QueryFeatureIds, and QueryFeatureData. MapDescription, which contains the LayerDescriptions, are not a parameter for these methods.

DefinitionExpression does not affect spatial extents.

Product Availability

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

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

setDefinitionExpression

void setDefinitionExpression(String expression)
                             throws IOException,
                                    AutomationException
The definition expression for the table.

Product Availability

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

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

getSourceID

String getSourceID()
                   throws IOException,
                          AutomationException
The id of the data source to connect to.

Remarks

SourceID is used for map service interaction with the GPServer. It is a unique job id assigned to a geoprocessing service each time it runs on the server. This property can be used to find out which geoprocessing job has created this layer.

It is important to note that LayerID, SourceID and the index of layers (see MapLayerInfos) in map document are not the same.

Please note that this is currently not implemented for StandaloneTable.

Product Availability

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

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

setSourceID

void setSourceID(String srcID)
                 throws IOException,
                        AutomationException
The id of the data source to connect to.

Product Availability

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

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