com.esri.arcgis.carto
Class IQueryResultOptionsProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.carto.IQueryResultOptionsProxy
All Implemented Interfaces:
IQueryResultOptions, Externalizable, Serializable

public class IQueryResultOptionsProxy
extends com.esri.arcgis.interop.Dispatch
implements IQueryResultOptions, Serializable

Provides access to methods that control query results.

Remarks

IQueryResultOptions has a property used to select the output Format of a query result. The query result can be formatted into a RecordSet or KMZ format (either as a URL to the kmz file or a Mime object). Another property includes GeoTransformation . This property is used to specify any needed geographic transformation on the results.

FormatProperties is currently not in use.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, E
 
Constructor Summary
  IQueryResultOptionsProxy()
           
  IQueryResultOptionsProxy(Object obj)
           
protected IQueryResultOptionsProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 int getFormat()
          The query result format.
 IPropertySet getFormatProperties()
          Format properties specific to result format.
 IGeoTransformation getGeoTransformation()
          Geo transformation required to transform the geometry if the requested GCS is different from the source.
 void readExternal(ObjectInput in)
           
 void removeListener(String iidStr, Object theListener)
           
 void setFormat(int format)
          The query result format.
 void setFormatPropertiesByRef(IPropertySet ppOptions)
          Format properties specific to result format.
 void setGeoTransformationByRef(IGeoTransformation geotransform)
          Geo transformation required to transform the geometry if the requested GCS is different from the source.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, release, setNativeMode, setPropertyByName, toString, vtblInvoke
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IQueryResultOptionsProxy

public IQueryResultOptionsProxy()

IQueryResultOptionsProxy

public IQueryResultOptionsProxy(Object obj)
                         throws IOException
Throws:
IOException

IQueryResultOptionsProxy

protected IQueryResultOptionsProxy(Object obj,
                                   String iid)
                            throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getFormat

public int getFormat()
              throws IOException,
                     AutomationException
The query result format.

Remarks

The query result can be formatted into a RecordSet or KMZ format (either as a URL to the kmz file or a Mime object).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getFormat in interface IQueryResultOptions
Returns:
A com.esri.arcgis.carto.esriQueryResultFormat constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFormat

public void setFormat(int format)
               throws IOException,
                      AutomationException
The query result format.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setFormat in interface IQueryResultOptions
Parameters:
format - A com.esri.arcgis.carto.esriQueryResultFormat constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFormatProperties

public IPropertySet getFormatProperties()
                                 throws IOException,
                                        AutomationException
Format properties specific to result format.

Remarks

FormatProperties is currently not in use.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getFormatProperties in interface IQueryResultOptions
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFormatPropertiesByRef

public void setFormatPropertiesByRef(IPropertySet ppOptions)
                              throws IOException,
                                     AutomationException
Format properties specific to result format.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setFormatPropertiesByRef in interface IQueryResultOptions
Parameters:
ppOptions - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGeoTransformation

public IGeoTransformation getGeoTransformation()
                                        throws IOException,
                                               AutomationException
Geo transformation required to transform the geometry if the requested GCS is different from the source.

Remarks

In some instances the QueryResult may require a GeoTransformation . For example, a given map service may be using a spatial reference system based on GCS_WGS_1984, found in the DefaultMapDescription. A client wants to display QueryFeatureData2 results based on this map service in a different spatial reference, GCS_European_1950. The results will use the spatial reference of the DefaultMapDescription, GCS_WGS_1984, and display these results, incorrectly in GCS_European_1950. Features may not "line up" correctly. In order to correctly display these results a GeoTransformation is needed. Applying the correct GeoTransformation ensures the spatial correctness of the result.

Another instance where a GeoTransformation may be need to be specified in the QueryResultsOption is if the queried layer is projected on the fly within the map service, that is coordinate system of the layer's source is different than the DefaultMapDescription coordinate system, and no appropriate transformation has been set in the map document before serving. In this case, you can access the the coordinate system of a layer source by first getting the layer's MapLayerInfo, then get Fields from MapLayerInfo, then get a single Field from Fields, then get GeometryDef from Field, and finally, get the SpatialReference from GeometryDef.

A GeoTransformation is not needed if different projected coordinate systems share the same underlying geographic coordinate system. For best results it is optimal for data (layers within the map service), map service and MapServer output to be in the same coordinate system.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getGeoTransformation in interface IQueryResultOptions
Returns:
A reference to a com.esri.arcgis.geometry.IGeoTransformation
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGeoTransformationByRef

public void setGeoTransformationByRef(IGeoTransformation geotransform)
                               throws IOException,
                                      AutomationException
Geo transformation required to transform the geometry if the requested GCS is different from the source.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setGeoTransformationByRef in interface IQueryResultOptions
Parameters:
geotransform - A reference to a com.esri.arcgis.geometry.IGeoTransformation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class com.esri.arcgis.interop.Dispatch
Throws:
IOException
ClassNotFoundException