Packagecom.esri.bacore.thematicmapping
Classpublic class TMQueryTask
InheritanceTMQueryTask Inheritance Object
Implements IQueryTask

The TMQueryTask class implements the IQueryTask facade for an ArcGIS query task executing a thematic mapping query.

See also

IQueryTask


Public Properties
 PropertyDefined By
  disableClientCaching : Boolean
If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from being loaded from the browser's cache.
TMQueryTask
  proxyURL : String
The URL to proxy the request through.
TMQueryTask
  requestTimeout : Number
The request timeout in seconds.
TMQueryTask
  token : String
Token for accessing a secure HTTP client.
TMQueryTask
  tokenProvider : ITokenProvider
Provider responsible for updating the security token if the last one expires.
TMQueryTask
  useAMF : Boolean
Use AMF for execute().
TMQueryTask
Public Methods
 MethodDefined By
  
Creates a new instance of the TMQueryTask class.
TMQueryTask
  
createGeographyLayerInfo(url:String, name:String, generalizationLevel:int, scale:Number, idField:String, nameField:String):IGeographyLayerInfo
Creates a new geography layer info object owned by this task.
TMQueryTask
  
execute(layerInfo:IGeographyLayerInfo, query:Query, responder:IResponder):Boolean
Executes a query for the given layer if the layer is owned by this task.
TMQueryTask
  
initialize(responder:IResponder):void
Initializes the query task.
TMQueryTask
  
initializeGeographyLevels(geographyLevels:Array):void
Initializes the list of geography levels from array.
TMQueryTask
  
initializeGeographyLevelsFromXML(geographyLevels:XML):void
Initializes the list of geography levels from XML.
TMQueryTask
Property Detail
disableClientCachingproperty
disableClientCaching:Boolean

If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from being loaded from the browser's cache.

The default value is false.


Implementation
    public function get disableClientCaching():Boolean
    public function set disableClientCaching(value:Boolean):void
proxyURLproperty 
proxyURL:String

The URL to proxy the request through.


Implementation
    public function get proxyURL():String
    public function set proxyURL(value:String):void
requestTimeoutproperty 
requestTimeout:Number

The request timeout in seconds. A value less than or equal to zero prevents request timeout.

The default value is -1.


Implementation
    public function get requestTimeout():Number
    public function set requestTimeout(value:Number):void
tokenproperty 
token:String

Token for accessing a secure HTTP client.


Implementation
    public function get token():String
    public function set token(value:String):void
tokenProviderproperty 
tokenProvider:ITokenProvider

Provider responsible for updating the security token if the last one expires.


Implementation
    public function get tokenProvider():ITokenProvider
    public function set tokenProvider(value:ITokenProvider):void
useAMFproperty 
useAMF:Boolean

Use AMF for execute(). Set to false if not using ArcGIS Server 10.0 or above. When useAMF is true, the requestTimeout property is ignored.

The default value is false.


Implementation
    public function get useAMF():Boolean
    public function set useAMF(value:Boolean):void
Constructor Detail
TMQueryTask()Constructor
public function TMQueryTask()

Creates a new instance of the TMQueryTask class.

Method Detail
createGeographyLayerInfo()method
public function createGeographyLayerInfo(url:String, name:String, generalizationLevel:int, scale:Number, idField:String, nameField:String):IGeographyLayerInfo

Creates a new geography layer info object owned by this task.

Parameters

url:String — URL to web resource.
 
name:String — Display name of this layer.
 
generalizationLevel:int — Generalization of a standard geography level to find geography features in.
 
scale:Number — Maximum scale value the layer supports.
 
idField:String — Name of field representing a feature ID.
 
nameField:String — Name of field representing a feature name.

Returns
IGeographyLayerInfo — A new geography layer info object.
execute()method 
public function execute(layerInfo:IGeographyLayerInfo, query:Query, responder:IResponder):Boolean

Executes a query for the given layer if the layer is owned by this task.

This task is an owner of layers that were returned by the initialize method in geography levels and it also owns layers created with the createGeographyLayerInfo method and copies of layers created with the IGeographyLayerInfo.createCopy method.

Before executing the query, the method tests that this task owns the given geography layer. If not, the query task doesn't executed.

Parameters

layerInfo:IGeographyLayerInfo — A geography layer to execute query on.
 
query:Query — A query to execute.
 
responder:IResponder — A responder to handle query results.

Returns
Boolean — True if the query task is started.
initialize()method 
public function initialize(responder:IResponder):void

Initializes the query task.

Geography levels associated with this task should be already initialized. This task synchronously executes the responder methods. The responder.fault method receives a parameter of the FaultEvent type and responder.result method receives a parameter of the BATaskCompletedEvent type whose result property contains an array of GeographyLevelInfo type items.

Parameters

responder:IResponder — A responder to handle initialization results.

initializeGeographyLevels()method 
public function initializeGeographyLevels(geographyLevels:Array):void

Initializes the list of geography levels from array.

Geography levels of this task can be initialized only once using the initializeGeographyLevels or initializeGeographyLevelsFromXML method. Geography levels should be initialized before using the initialize and execute methods. Every GeographyLevelInfo item in the input array must be populated with items created with the createGeographyLayerInfo method of this task.

Parameters

geographyLevels:Array — An array of GeographyLevelInfo items.

See also

initializeGeographyLevelsFromXML()method 
public function initializeGeographyLevelsFromXML(geographyLevels:XML):void

Initializes the list of geography levels from XML.

Geography levels of this task can be initialized only once using the initializeGeographyLevels or initializeGeographyLevelsFromXML method. Geography levels should be initialized before using the initialize and execute methods.

Parameters

geographyLevels:XML — An XML containing geography levels.


Example

The example below shows the structure of XML parsed by this method.

         <GeographyLevels>
           <GeographyLevel name="Some Name" alias="Some Alias">    
             <GeographyLayer
               url="Some URL 1";
               name="Some name";
               scale="25000000"
               generalizationLevel="1";
               nameField="some nameField";
               idField="some idField";
             />    
             <GeographyLayer
               url="Some URL 2";
               name="Some name";
               scale="150000000"
               generalizationLevel="2";
               nameField="some nameField";
               idField="some idField";
             />    
           </GeographyLevel> 
           <GeographyLevel name="Another Name" alias="Another Alias">    
             <GeographyLayer
               url="Another URL 1";
               name="Another name";
               scale="25000000"
               generalizationLevel="1";
               nameField="some nameField";
               idField="some idField";
             />    
             <GeographyLayer
               url="Another URL 2";
               name="Another name";
               scale="150000000"
               generalizationLevel="2";
               nameField="some nameField";
               idField="some idField";
             />    
           </GeographyLevel> 
         </GeographyLevels>