com.esri.arcgis.geodatabase
Class DataStatistics

java.lang.Object
  extended by com.esri.arcgis.geodatabase.DataStatistics
All Implemented Interfaces:
IDataStatistics, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class DataStatistics
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IDataStatistics

Esri Data Statistics object.

Remarks

The DataStatistics object allows for the retrieval of statistical and unique value information for a single field. After creating the DataStatistics object, the data used in the analysis is provided as an ICursor object through the IDataStatistics::Cursor property. Keep in mind that ICursor objects can only be traversed once. If you need to get statistical values and unique values, then you will need to recreate the cursor after executing the first request.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
DataStatistics()
          Constructs a DataStatistics using ArcGIS Engine.
DataStatistics(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
DataStatistics theDataStatistics = (DataStatistics) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 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.
 int hashCode()
          the hashcode for this object
 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.
 
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

DataStatistics

public DataStatistics()
               throws IOException,
                      UnknownHostException
Constructs a DataStatistics using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

DataStatistics

public DataStatistics(Object obj)
               throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
DataStatistics theDataStatistics = (DataStatistics) obj;

Construct a DataStatistics using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to DataStatistics.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

setField

public 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

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

getField

public 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

Specified by:
getField in interface IDataStatistics
Returns:
The field
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCursorByRef

public 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

Specified by:
setCursorByRef in interface IDataStatistics
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

public 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

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

getSampleRate

public 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

Specified by:
getSampleRate in interface IDataStatistics
Returns:
The maxRecords
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSimpleStats

public 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

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

isSimpleStats

public 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

Specified by:
isSimpleStats in interface IDataStatistics
Returns:
The simple
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStatistics

public 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

Specified by:
getStatistics in interface IDataStatistics
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

public 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

Specified by:
getUniqueValues in interface IDataStatistics
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

public 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

Specified by:
getUniqueValueCount in interface IDataStatistics
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isContinue

public 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

Specified by:
isContinue in interface IDataStatistics
Returns:
The canContinue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCancelled

public 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

Specified by:
isCancelled in interface IDataStatistics
Returns:
The cancelled
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.