com.esri.arcgis.geodatabase
Interface IDataStatistics

All Superinterfaces:
Serializable
All Known Implementing Classes:
DataStatistics

public interface IDataStatistics
extends Serializable

Provides access to members to generate statistics on a field.

Remarks

The IDataStatistics object is the lone interface on the DataStatistics object and provides access to statistical information and unique values for the specified field. The data to perform the analysis on is provided via an ICursor object attached to the DataStatistics object through the IDataStatistics::Cursor property.

Cursors can only be traversed once, which needs to be kept in mind when accessing statistical information and unique values. For instance, it is necessary to re-execute the original query and set the Cursor property to the new cursor between accessing the Statistics and UniqueValues properties.

The UniqueValueCount property will return zero until you have retrieved the set of unique values from the UniqueValues property.

When accessing the Statistics property, the Field property should be set to the name of a numeric field. Attempting to retrieve Statistics for a non-numeric field will raise an error.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
DataStatistics

Method Summary
 String getField()
          The field for which to gather statistics.
 int getSampleRate()
          The maximum number of records to sample at a time (-1 means pull all records).
 IStatisticsResults getStatistics()
          The statistics for the current field over the current cursor.
 int getUniqueValueCount()
          The number of unique values for the current sample.
 IEnumVARIANT getUniqueValues()
          The unique values for the current field over the current cursor.
 boolean isCancelled()
          Indicates if the operation has been cancelled.
 boolean isContinue()
          Indicates if the cursor contains more records than the current sample.
 boolean isSimpleStats()
          Indicates whether only simple statistics are generated.
 void setCursorByRef(ICursor rhs1)
          The cursor which will generate the statistics.
 void setField(String field)
          The field for which to gather statistics.
 void setSampleRate(int maxRecords)
          The maximum number of records to sample at a time (-1 means pull all records).
 void setSimpleStats(boolean simple)
          Indicates whether only simple statistics are generated.
 

Method Detail

setField

void setField(String field)
              throws IOException,
                     AutomationException
The field for which to gather statistics.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
field - The field (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getField

String getField()
                throws IOException,
                       AutomationException
The field for which to gather statistics.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The field
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCursorByRef

void setCursorByRef(ICursor rhs1)
                    throws IOException,
                           AutomationException
The cursor which will generate the statistics.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
rhs1 - A reference to a com.esri.arcgis.geodatabase.ICursor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSampleRate

void setSampleRate(int maxRecords)
                   throws IOException,
                          AutomationException
The maximum number of records to sample at a time (-1 means pull all records).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
maxRecords - The maxRecords (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSampleRate

int getSampleRate()
                  throws IOException,
                         AutomationException
The maximum number of records to sample at a time (-1 means pull all records).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The maxRecords
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSimpleStats

void setSimpleStats(boolean simple)
                    throws IOException,
                           AutomationException
Indicates whether only simple statistics are generated.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
simple - The simple (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSimpleStats

boolean isSimpleStats()
                      throws IOException,
                             AutomationException
Indicates whether only simple statistics are generated.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The simple
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStatistics

IStatisticsResults getStatistics()
                                 throws IOException,
                                        AutomationException
The statistics for the current field over the current cursor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.system.IStatisticsResults
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUniqueValues

IEnumVARIANT getUniqueValues()
                             throws IOException,
                                    AutomationException
The unique values for the current field over the current cursor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.support.ms.stdole.IEnumVARIANT
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUniqueValueCount

int getUniqueValueCount()
                        throws IOException,
                               AutomationException
The number of unique values for the current sample.

Remarks

The UniqueValues property must be accessed prior to getting this property (in order to calculate the count) for a correct value to be returned.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isContinue

boolean isContinue()
                   throws IOException,
                          AutomationException
Indicates if the cursor contains more records than the current sample.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The canContinue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCancelled

boolean isCancelled()
                    throws IOException,
                           AutomationException
Indicates if the operation has been cancelled.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The cancelled
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.