|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.adf.web.data.query.QueryResult
public class QueryResult
The QueryResult
class represents an individual result resulting from a query operation.
This class has methods that return the display text for the result, return the result details (as a
java.util.Map
of name-value pairs) and methods that perform actions on the result such as
zoom()
, highlight()
and clearGraphic()
.
QueryResult
works in conjunction with the WebQuery
and WebGraphics
objects to display
this result as a graphic on the map control. Note that the WebQuery
is responsible for creating the
QueryResult
as well.
Field Summary | |
---|---|
protected Map<String,Object> |
details
The result details (as a java.util.Map of name-value pairs) |
protected WebExtent |
extent
The extent of this result |
protected WebGeometry |
highlightGeometry
The geometry that should be displayed as a graphic when this result is highlighted. |
protected WebLayerInfo |
mWebLayerInfo
The layer associated with this result. |
protected WebQuery |
mWebQuery
The WebQuery object that was used to get this result. |
protected String |
name
The display text for this result. |
protected static double |
ZOOMTO_POINT_FACTOR
The default factor to zoom by for point features. |
protected double |
zoomToFactor
The factor to zoom by for point features. |
Constructor Summary | |
---|---|
QueryResult()
Creates a QueryResult with no initial values. |
|
QueryResult(WebLayerInfo layer,
String name,
WebQuery webQuery,
Map<String,Object> details,
WebExtent extent,
WebGeometry highlightGeometry)
Creates a QueryResult with initial values as provided by the caller. |
Method Summary | |
---|---|
void |
clearGraphic()
If this result is currently highlighted, remove the graphic from the graphics layer. |
Map<String,Object> |
getDetails()
Returns the result details (as a java.util.Map of name-value pairs) |
WebExtent |
getExtent()
Returns the extent of this result |
WebGeometry |
getHighlightGeometry()
Returns the geometry that should be displayed as a graphic when this result is highlighted |
WebLayerInfo |
getLayer()
Returns the layer associated with this result |
LayerDefinition |
getLayerDefinition()
Returns the LayerDefinition of this result. |
String |
getName()
Returns the display text for this result |
double |
getPointZoomToFactor()
Returns the amount by which the map's full extent should be contracted to zoom into results returned by the query. |
QueryCriteria |
getQueryCriteria()
This method is not intended to be used by clients. |
List<? extends QueryResult> |
getRelatedResults()
Get the list of results that this object is related to. |
WebQuery |
getWebQuery()
Returns the WebQuery object that was used to get this result. |
void |
highlight()
Displays this result as a graphic in the graphics layer. |
boolean |
isHighlightable()
Returns true if this result can be highlighted. |
boolean |
isZoomable()
Returns true if this result can be zoomed into. |
void |
setDetails(Map<String,?> details)
Sets the result details (as a java.util.Map of name-value pairs) |
void |
setExtent(WebExtent extent)
Sets the extent of this result |
void |
setHighlightGeometry(WebGeometry highlightGeometry)
Sets the geometry that should be displayed as a graphic when this result is highlighted |
void |
setLayer(WebLayerInfo layer)
Sets the layer associated with this result |
void |
setLayerDefinition(LayerDefinition layerDefinition)
Sets the LayerDefinition of this result. |
void |
setName(String name)
Sets the display text for this result |
void |
setPointZoomToFactor(double factor)
Specifies the amount by which the map's full extent should be contracted to zoom into results returned by the query. |
void |
setQueryCriteria(QueryCriteria criteria)
This method is not intended to be used by clients. |
void |
setRelatedResults(List<? extends QueryResult> results)
Sets the list of results that this result object is related to. |
void |
setWebQuery(WebQuery webQuery)
Sets the WebQuery object that was used to get this result. |
void |
zoom()
Zoom the map control to the area represented by this result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final double ZOOMTO_POINT_FACTOR
protected WebQuery mWebQuery
WebQuery
object that was used to get this result. The WebQuery
is also used to display the
results as graphics on the map control.
protected WebLayerInfo mWebLayerInfo
protected WebGeometry highlightGeometry
protected WebExtent extent
protected Map<String,Object> details
java.util.Map
of name-value pairs)
protected String name
protected double zoomToFactor
ZOOMTO_POINT_FACTOR
.
Constructor Detail |
---|
public QueryResult()
QueryResult
with no initial values.
public QueryResult(WebLayerInfo layer, String name, WebQuery webQuery, Map<String,Object> details, WebExtent extent, WebGeometry highlightGeometry)
QueryResult
with initial values as provided by the caller.
layer
- the layer associated with this result.name
- the display text for this resultwebQuery
- the WebQuery
object that was used to get this result. The WebQuery
is also used by
QueryResult
s to display the results as graphics on the map control.details
- the result details (as a java.util.Map
of name-value pairs)extent
- the extent of this resulthighlightGeometry
- the geometry that should be displayed as a graphic when this result is highlightedMethod Detail |
---|
public boolean isHighlightable()
true
if this result can be highlighted. A result can be highlighted if there is a
highlightGeometry
associated with it.
true
if this result can be highlightedpublic boolean isZoomable()
true
if this result can be zoomed into. A result can be zoomed into if there is a
highlightGeometry
or an extent
associated with it.
true
if this result can be zoomed intopublic void highlight()
Displays this result as a graphic in the graphics layer.
The result will be highlighted only is isHighlightable()
returns true
.
public void clearGraphic()
WebQuery.clearGraphic(WebGeometry)
public void zoom()
Zoom the map control to the area represented by this result.
For non-point results, the map is zoomed to the getExtent()
of the result. For point features, it is zoomed
based on the getPointZoomToFactor()
.
setExtent(WebExtent)
,
setPointZoomToFactor(double)
public WebQuery getWebQuery()
WebQuery
object that was used to get this result. The WebQuery
is also used to display
the results as graphics on the map control.
WebQuery
object that was used to get this resultpublic void setWebQuery(WebQuery webQuery)
WebQuery
object that was used to get this result. The WebQuery
is also used to display the
results as graphics on the map control.
webQuery
- the WebQuery
object that was used to get this resultpublic WebLayerInfo getLayer()
public void setLayer(WebLayerInfo layer)
layer
- the layer associated with this resultpublic String getName()
public void setName(String name)
name
- the display text for this resultpublic Map<String,Object> getDetails()
java.util.Map
of name-value pairs)
java.util.Map
of name-value pairs)public void setDetails(Map<String,?> details)
java.util.Map
of name-value pairs)
details
- the result details (as a java.util.Map
of name-value pairs)public WebExtent getExtent()
public void setExtent(WebExtent extent)
extent
- the extent of this resultpublic double getPointZoomToFactor()
public void setPointZoomToFactor(double factor)
factor
- the amount to zoom by for point featuresLayerDefinition.setPointZoomToFactor(double)
public WebGeometry getHighlightGeometry()
public void setHighlightGeometry(WebGeometry highlightGeometry)
highlightGeometry
- the geometry that should be displayed as a graphic when this result is highlightedpublic void setLayerDefinition(LayerDefinition layerDefinition)
LayerDefinition
of this result.
layerDefinition
- the layer definition of this resultpublic LayerDefinition getLayerDefinition()
LayerDefinition
of this result.
public void setRelatedResults(List<? extends QueryResult> results)
public List<? extends QueryResult> getRelatedResults()
public void setQueryCriteria(QueryCriteria criteria)
public QueryCriteria getQueryCriteria()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |