com.esri.adf.web.ags.data.query
Class AGSQueryFunctionality

java.lang.Object
  extended by com.esri.adf.web.data.query.QueryFunctionality
      extended by com.esri.adf.web.ags.data.query.AGSQueryFunctionality
All Implemented Interfaces:
GISFunctionality, Serializable

public class AGSQueryFunctionality
extends QueryFunctionality

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.esri.adf.web.data.query.QueryFunctionality
FUNCTIONALITY_NAME, handlers
 
Constructor Summary
AGSQueryFunctionality()
           
 
Method Summary
 void destroyFunctionality()
           The cleanup chores (such as releasing held resources) for the functionality must be performed in this method.
 Map<String,String> getFieldNamesAndAliases(int layerId)
          Returns the names and aliases for all fields of the given layer.
 com.esri.arcgisws.Field[] getFields(int layerId)
          Returns the fields of the specified layer.
protected  String getFieldValue(com.esri.arcgisws.PropertySetProperty[] props, String fieldName)
          Returns the field value from the property set based on the specified field name.
protected  WebLayerInfo getLayer(int layerId)
          Returns a WebLayerInfo object representing the given layer.
 AGSMapFunctionality getMapFunctionality()
           
 com.esri.arcgisws.Field getObjectIdField(int layerId)
          Returns the OBJECTID field of the given layer.
 List<WebLayerInfo> getQueryLayers()
           Returns the query-able layers as a List of WebLayerInfo objects.
 GISResource getResource()
           Returns the GISResource associated with this functionality.
 com.esri.arcgisws.Field getShapeField(int layerId)
          Returns the SHAPE field of the given layer.
 void initFunctionality(GISResource resource)
           The initialization chores for the functionality must be performed in this method.
 boolean isGroupLayer(WebLayerInfo wlayerInfo)
          Returns whether the given layer is a a group layer
 boolean isStandaloneTable(WebLayerInfo layerInfo)
          Returns whether the given layer is a only a table (i.e it has no geometry information)
protected  void setDetails(com.esri.arcgisws.PropertySetProperty[] props, QueryResult result)
           
protected  void setHighlightGeometryAndExtent(com.esri.arcgisws.Geometry geom, QueryResult result)
           
protected  void setHighlightGeometryAndExtent(com.esri.arcgisws.Geometry geom, QueryResult result, com.esri.arcgisws.SpatialReference sr)
           
 
Methods inherited from class com.esri.adf.web.data.query.QueryFunctionality
addFindCriteriaHandler, find, getFindCriteriaHandlers, removeFindCriteriaHandler, setFindCriteriaHandlers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AGSQueryFunctionality

public AGSQueryFunctionality()
Method Detail

initFunctionality

public void initFunctionality(GISResource resource)
Description copied from interface: GISFunctionality

The initialization chores for the functionality must be performed in this method. This method is called by the resource when the functionality needs to be initialized. This happens either when the resource itself is being initialized or if users add this functionality to the resource using the GISResource.addFunctionality(String, GISFunctionality) method after the resource has already been initialized.

Classes which implement this method should maintain the resource as a class instance variable and return the same in the GISFunctionality.getResource() method. The functionality is ready for use only after this method has been called.

Parameters:
resource - the GISResource that this functionality supports
See Also:
GISResource.init(WebContext)

destroyFunctionality

public void destroyFunctionality()
Description copied from interface: GISFunctionality

The cleanup chores (such as releasing held resources) for the functionality must be performed in this method. This method is called by the GISResource when the resource itself is being destroyed.

The functionality is no longer usable after this method has been called.

See Also:
GISResource.destroy()

getQueryLayers

public List<WebLayerInfo> getQueryLayers()
Description copied from class: QueryFunctionality

Returns the query-able layers as a List of WebLayerInfo objects.

Specified by:
getQueryLayers in class QueryFunctionality
Returns:
the query-able layers as a List of WebLayerInfo objects

getResource

public GISResource getResource()
Description copied from interface: GISFunctionality

Returns the GISResource associated with this functionality.

The resource passed to GISFunctionality.initFunctionality(GISResource) is maintained as a class variable and is accessible through this method.

Returns:
the GISResource associated with this functionality

getMapFunctionality

public AGSMapFunctionality getMapFunctionality()

setHighlightGeometryAndExtent

protected void setHighlightGeometryAndExtent(com.esri.arcgisws.Geometry geom,
                                             QueryResult result)

setHighlightGeometryAndExtent

protected void setHighlightGeometryAndExtent(com.esri.arcgisws.Geometry geom,
                                             QueryResult result,
                                             com.esri.arcgisws.SpatialReference sr)

setDetails

protected void setDetails(com.esri.arcgisws.PropertySetProperty[] props,
                          QueryResult result)

getFieldValue

protected String getFieldValue(com.esri.arcgisws.PropertySetProperty[] props,
                               String fieldName)
Returns the field value from the property set based on the specified field name.

Parameters:
props - the property set which has the fields and values
fieldName - the field name for which the value should be retrieved
Returns:
the field value if exist otherwise null

getLayer

protected WebLayerInfo getLayer(int layerId)
Returns a WebLayerInfo object representing the given layer.

Parameters:
layerId - the layer id
Returns:
the web layer info object representing the given layer

getFields

public com.esri.arcgisws.Field[] getFields(int layerId)
Returns the fields of the specified layer.

Parameters:
layerId - the layer id for which the fields to be returned
Returns:
the fields of the specified layer

getShapeField

public com.esri.arcgisws.Field getShapeField(int layerId)
Returns the SHAPE field of the given layer.

Parameters:
layerId - the layer id for which the SHAPE field to be returned.
Returns:
the shape field

getObjectIdField

public com.esri.arcgisws.Field getObjectIdField(int layerId)
Returns the OBJECTID field of the given layer.

Parameters:
layerId - the layer id for which the OBJECTID field to be returned.
Returns:
the object field

isStandaloneTable

public boolean isStandaloneTable(WebLayerInfo layerInfo)
Returns whether the given layer is a only a table (i.e it has no geometry information)

Parameters:
layerInfo - the layer to check
Returns:
true, if the specified layer is a table

isGroupLayer

public boolean isGroupLayer(WebLayerInfo wlayerInfo)
Returns whether the given layer is a a group layer

Parameters:
layerInfo - the layer to check
Returns:
true, if the specified layer is a group layer

getFieldNamesAndAliases

public Map<String,String> getFieldNamesAndAliases(int layerId)
Returns the names and aliases for all fields of the given layer. The names are keys in the returned Map, and the aliases are values.

Parameters:
layerId - the layer for which the field names and aliases to be returned.
Returns:
the field names and aliases