|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.controls.ArcReaderSearchDef
public class ArcReaderSearchDef
ArcReaderSearchDef is used to specify spatial and attribute queries.
The IARLayer::SearchARFeatures, IARLayer::QueryARFeatures, IARMap::SearchARFeatures , IARMap::QueryARFeatures, IARGlobe::SearchARFeatures and IARGlobe::QueryARFeatures methods allow ARLayer, ARMap and ARGlobe objects to be searched based upon specified constraints, to return a subset of features. The search can be based upon either an attribute constraint, a spatial constraint or both an attribute and spatial constraint. For example, you may wish to select features overlapping a search area, or find features within a specified distance of a feature or find features with a particular value greater than 10.
A spatial constraint will specify a geometry or shape against which the ARFeature objects will be tested. There are many types of spatial constraint, such as 'touches', 'contains', 'overlaps' and 'intersects'. An attribute constraint will specify an SQL ‘where clause’. These constraints are managed by the ArcReaderSearchDef object. Use the resulting ARFeatureCursor and ARFeatureSet objects to iterate over the subset of features that are returned.
Constructor Summary | |
---|---|
ArcReaderSearchDef()
Constructs a ArcReaderSearchDef using ArcGIS Engine. |
|
ArcReaderSearchDef(Object obj)
Construct a ArcReaderSearchDef using a reference to such an object returned from ArcGIS Engine or Server. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Compare this object with another |
static String |
getClsid()
getClsid. |
int |
getSpatialRelationship()
The spatial relationship between the search and target shapes. |
String |
getWhereClause()
A SQL where clause for the search. |
int |
hashCode()
the hashcode for this object |
void |
setARFeatureShape(IARFeature pARFeature,
double bufferDistance)
Set the search shape to the shape of a feature. |
void |
setEnvelopeShape(double xMin,
double yMin,
double xMax,
double yMax,
double bufferDistance)
Set the search shape to an envelope. |
void |
setPointShape(double xCoord,
double yCoord,
double bufferDistance)
Set the search shape to a point. |
void |
setSpatialRelationship(int spatialRel)
The spatial relationship between the search and target shapes. |
void |
setWhereClause(String sWhereClause)
A SQL where clause for the search. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public ArcReaderSearchDef() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic ArcReaderSearchDef(Object obj) throws IOException
obj
to ArcReaderSearchDef
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
ArcReaderSearchDef theArcReaderSearchDef = (ArcReaderSearchDef) obj;
Method Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void setPointShape(double xCoord, double yCoord, double bufferDistance) throws IOException, AutomationException
Sets the search geometry of the ArcReaderSearchDef to an point specfied by the xCoord and yCoord coordinates given in IARMap::MapUnits. To buffer the search geometry specify a buffer distance in IARMap::MapUnits. By default the buffer distance is 0.0.
The method specifies the shape against which the ARFeature objects will be tested. Use the SpatialRelationship property to define the relationship between the shape you have specified and the shape of each ARFeature object.
setPointShape
in interface IARSearchDef
xCoord
- The xCoord (in)yCoord
- The yCoord (in)bufferDistance
- The bufferDistance (in, optional, pass 0 if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARSearchDef#setARFeatureShape(com.esri.arcgis.controls.IARFeature, double)
,
com.esri.arcgis.publishercontrols.IARSearchDef#setEnvelopeShape(double, double, double, double, double)
public void setEnvelopeShape(double xMin, double yMin, double xMax, double yMax, double bufferDistance) throws IOException, AutomationException
Sets the search geometry of the ArcReaderSearchDef to an envelope specfied by the xMin, yMin, xMax, yMax coordinates given in IARMap::MapUnits. To buffer the search geometry specify a buffer distance in IARMap::MapUnits. By default the buffer distance is 0.0.
The method specifies the shape against which the ARFeature objects will be tested. Use the SpatialRelationship property to define the relationship between the shape you have specified and the shape of each ARFeature object.
setEnvelopeShape
in interface IARSearchDef
xMin
- The xMin (in)yMin
- The yMin (in)xMax
- The xMax (in)yMax
- The yMax (in)bufferDistance
- The bufferDistance (in, optional, pass 0 if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARSearchDef#setARFeatureShape(com.esri.arcgis.controls.IARFeature, double)
,
com.esri.arcgis.publishercontrols.IARSearchDef#setPointShape(double, double, double)
public void setARFeatureShape(IARFeature pARFeature, double bufferDistance) throws IOException, AutomationException
Sets the search geometry of the ArcReaderSearchDef to the shape of the specified ARFeature. To buffer the search geometry specify a buffer distance in IARMap::MapUnits. By default the buffer distance is 0.0.
The method specifies the shape against which the ARFeature objects will be tested. Use the SpatialRelationship property to define the relationship between the shape you have specified and the shape of each ARFeature object.
setARFeatureShape
in interface IARSearchDef
pARFeature
- A reference to a com.esri.arcgis.controls.IARFeature (in)bufferDistance
- The bufferDistance (in, optional, pass 0 if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARSearchDef#setEnvelopeShape(double, double, double, double, double)
,
com.esri.arcgis.publishercontrols.IARSearchDef#setPointShape(double, double, double)
public void setSpatialRelationship(int spatialRel) throws IOException, AutomationException
setSpatialRelationship
in interface IARSearchDef
spatialRel
- A com.esri.arcgis.controls.esriARSpatialRelationship constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSpatialRelationship() throws IOException, AutomationException
The SpatialRelationship the ArcReaderSearchDef is based upon. By default this is an Intersects relationship.
getSpatialRelationship
in interface IARSearchDef
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setWhereClause(String sWhereClause) throws IOException, AutomationException
setWhereClause
in interface IARSearchDef
sWhereClause
- The sWhereClause (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getWhereClause() throws IOException, AutomationException
To search for a subset of ARFeature objects based upon a particular attribute you need to set the WhereClause property.The WhereClause represents an SQL ‘Where’ clause; the syntax used to specify the WhereClause needs to be the same as that of the underlying database holding the data.
All ARFeature objects within an ARLayer share the same set of attribute schema; that is they have the same set of fields. The SQL string defining the attribute query is based upon one or more fields belonging to an ARFeature and consists of an IARFeature::FieldName, an operator and an IARFeature::Value. Note that these are are case sensitive.
A field that returns an IARFeature::FieldType equal to the esriARFieldTypeGeometry constant cannot be used within the WhereClause, as this field stores the geometry or shape of the ARFeature object.
getWhereClause
in interface IARSearchDef
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 |