|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.adf.web.data.query.LayerDefinition
public class LayerDefinition
The LayerDefinition class is used to customize the query result. The LayerDefinition can be used to
set field aliases, filter return fields, set symbols, etc. These customizations are used to represent the results of
queries performed using the WebQuery object. The LayerDefinition set in the WebQuery object can be overriden
by the LayerDefinition set in the IdentifyCriteria, PredefinedQueryCriteria and TextCriteria
objects.
WebQuery.setLayerDefinitions(List),
IdentifyCriteria.setLayerDefinitions(List),
PredefinedQueryCriteria.setLayerDefinitions(List),
TextCriteria.setLayerDefinitions(List),
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_TEMPLATE
|
| Constructor Summary | |
|---|---|
LayerDefinition()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getCalloutTemplate()
Returns the callout template. |
java.lang.String |
getDisplayFieldName()
Returns which field’s value should be used to display the query’s results.This value is used as the title in the map tip’s callout window. |
java.util.Map<java.lang.String,java.lang.String> |
getFieldAliases()
Returns the field aliases. |
WebRenderer |
getHighlightRenderer()
Return the highlight renderer for callout. |
int |
getLayerId()
Returns the layer id. |
int |
getMaxRecordCount()
Returns the number of records that will be returned for the query operation. |
WebRenderer |
getRenderer()
Return the default renderer for callout. |
java.lang.String |
getResourceId()
Returns the resource id. |
java.lang.String |
getResultTemplate()
Returns the template used for formatting result attributes. |
java.util.List<java.lang.String> |
getReturnFields()
Specifies which fields should be included in the query results. |
java.util.List<java.lang.String> |
getSearchFields()
Returns which fields to perform the query on. |
boolean |
isFetchResultDetails()
Specifies whether to retrieve detailed results for the query. |
boolean |
isReturnGeometry()
Returns true if the Shape field should always be included in the query results. |
void |
setCalloutTemplate(java.lang.String calloutTemplate)
Sets the template used for displaying the callout. |
void |
setDisplayFieldName(java.lang.String displayFieldName)
Specifies which field’s value should be used to display the query’s results. |
void |
setFetchResultDetails(boolean fetchResultDetails)
Specifies whether to retrieve detailed results for the query. |
void |
setFieldAliases(java.util.Map<java.lang.String,java.lang.String> fields)
Sets the field aliases name for the feature attributes. |
void |
setHighlightRenderer(WebRenderer highlightRenderer)
Sets the highlight renderer for callout. |
void |
setLayerId(int layerId)
Sets the layer id. |
void |
setMaxRecordCount(int count)
Sets the number of records to be returned for the query operation. |
void |
setRenderer(WebRenderer renderer)
Sets the default renderer for callout. |
void |
setResourceId(java.lang.String resourceId)
Sets the resource id of this layer definition. |
void |
setResultTemplate(java.lang.String resultTemplate)
Sets the template used for formatting result attributes. |
void |
setReturnFields(java.util.List<java.lang.String> returnFields)
Specifies which fields should be included in the query results. |
void |
setReturnGeometry(boolean returnGeometry)
Specifies whether the Shape field should always be included in the query results. |
void |
setSearchFields(java.util.List<java.lang.String> searchFields)
Specifies which fields to perform the query on. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_TEMPLATE
| Constructor Detail |
|---|
public LayerDefinition()
| Method Detail |
|---|
public void setResourceId(java.lang.String resourceId)
WebContext.
resourceId - the resource id of which this layer definition belongsWebContext.addResource(String, com.esri.adf.web.data.GISResource)public java.lang.String getResourceId()
public void setLayerId(int layerId)
layerId - the layer idpublic int getLayerId()
public void setDisplayFieldName(java.lang.String displayFieldName)
displayFieldName - the name of the query resultpublic java.lang.String getDisplayFieldName()
public void setFetchResultDetails(boolean fetchResultDetails)
getReturnFields() are retrieved. If the getReturnFields() does not include the Shape field, it
may also be retrieved depending upon the value of isReturnGeometry(). When false, only the field specified
in setDisplayFieldName(String) is retrieved. The Shape field may also be retrieved depending upon the
value of isReturnGeometry().
fetchResultDetails - if true the feature attributes will be returned in query resultpublic boolean isFetchResultDetails()
getReturnFields() are retrieved. If the getReturnFields() does not include the Shape field, it
may also be retrieved depending upon the value of isReturnGeometry(). When false, only the field specified
in setDisplayFieldName(String) is retrieved. The Shape field may also be retrieved depending upon the
value of isReturnGeometry().
public void setReturnGeometry(boolean returnGeometry)
setFetchResultDetails(boolean) for further information. Only applicable for queries based on
AGSPredefinedQueryCriteriaHandler.
returnGeometry - if true the feature geometry will be returned in query resultpublic boolean isReturnGeometry()
setFetchResultDetails(boolean) for further information. Only applicable for queries based on
AGSPredefinedQueryCriteriaHandler.
public void setFieldAliases(java.util.Map<java.lang.String,java.lang.String> fields)
fields - the field aliases name for the feature attributespublic java.util.Map<java.lang.String,java.lang.String> getFieldAliases()
public void setSearchFields(java.util.List<java.lang.String> searchFields)
TextCriteria.
searchFields - the list of search field namespublic java.util.List<java.lang.String> getSearchFields()
TextCriteria.
public void setReturnFields(java.util.List<java.lang.String> returnFields)
setFetchResultDetails(boolean) for further information.
returnFields - the list of return field namespublic java.util.List<java.lang.String> getReturnFields()
setFetchResultDetails(boolean) for further information.
public void setMaxRecordCount(int count)
PredefinedQueryCriteria.getMaxRecordCount() will take precedence over this value.
count - the record limitpublic int getMaxRecordCount()
public void setRenderer(WebRenderer renderer)
renderer - the default renderer for calloutpublic WebRenderer getRenderer()
public void setHighlightRenderer(WebRenderer highlightRenderer)
highlightRenderer - the highlight renderer for calloutpublic WebRenderer getHighlightRenderer()
public void setCalloutTemplate(java.lang.String calloutTemplate)
DEFAULT_TEMPLATE for default formatting.
calloutTemplate - the template used for displaying calloutpublic java.lang.String getCalloutTemplate()
public void setResultTemplate(java.lang.String resultTemplate)
DEFAULT_TEMPLATE for default
formatting.
resultTemplate - the template for formatting result attributespublic java.lang.String getResultTemplate()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||