|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMapTableDescription
Provides access to the available properties of a table description object.
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 |
---|
int getID() throws IOException, AutomationException
An identifier that uniquely identifies a layer or a table within a map
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setID(int tableID) throws IOException, AutomationException
tableID
- The tableID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getDefinitionExpression() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDefinitionExpression(String expression) throws IOException, AutomationException
expression
- The expression (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getSourceID() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSourceID(String srcID) throws IOException, AutomationException
srcID
- The srcID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |