public class

ClassBreaksDefinition

extends ClassificationDefinition
java.lang.Object
   ↳ com.esri.core.renderer.ClassificationDefinition
     ↳ com.esri.core.renderer.ClassBreaksDefinition

Class Overview

This class defines a class breaks renderer when requesting a renderer from a dynamic map service's generateDataClasses REST endpoint.

A class breaks renderer is defined by a classification method and field and number of class breaks desired. Optionally a normalization type can also be set. The user can also specify an optional base symbol and color ramp to be used by the renderer.

If the StdDeviation classification method is used, a standard deviation interval can be set. If the ByField normalization type is used, the normalization field should also be specified.

Summary

Nested Classes
enum ClassBreaksDefinition.ClassificationMethod The ClassificationMethod to be used by the server when determining class breaks. 
Constants
float HALF Standard deviation interval of 0.5
float ONE Standard deviation interval of 1.0
float QUARTER Standard deviation interval of 0.25
float THIRD Standard deviation interval of 0.33
[Expand]
Inherited Fields
From class com.esri.core.renderer.ClassificationDefinition
Public Constructors
ClassBreaksDefinition(JsonNode node)
Instantiates a new class breaks definition from the given JSON node.
Protected Constructors
ClassBreaksDefinition(String classificationField, ClassBreaksDefinition.ClassificationMethod classificationMethod, int breakCount, float stdDeviationInterval, NormalizationType normalizationType, String normalizationField)
Instantiates a new class breaks definition.
Public Methods
static ClassBreaksDefinition createByClassificationMethod(String classificationField, ClassBreaksDefinition.ClassificationMethod classificationMethod, int breakCount)
Create a new ClassBreaksDefinition instance with the given classification field and method and desired number of breaks.
static ClassBreaksDefinition createByNormalizationMethod(String classificationField, ClassBreaksDefinition.ClassificationMethod classificationMethod, int breakCount, NormalizationType normalizationType)
Create a new ClassBreaksDefinition instance with the given classification field and method, desired number of breaks and normalization method.
static ClassBreaksDefinition createByStdDeviation(String classificationField, float stdDeviationInterval)
Create a new ClassBreaksDefinition instance with classification by standard deviation with the given classification field, desired number of breaks and standard deviation interval.
static ClassBreaksDefinition createWithNormalizeByField(String classificationField, ClassBreaksDefinition.ClassificationMethod classificationMethod, int breakCount, String normalizationField)
Create a new ClassBreaksDefinition instance with the given classification field and method, desired number of breaks and normalizing by a given field.
int getBreakCount()
Gets the break count.
String getClassificationField()
Gets the classification field.
ClassBreaksDefinition.ClassificationMethod getClassificationMethod()
Gets the classification method.
String getNormalizationField()
Gets the normalization field.
NormalizationType getNormalizationType()
Gets the normalization type.
float getStdDevInterval()
Gets the standard deviation interval.
void setBreakCount(int breakCount)
Sets the break count.
void setClassificationField(String classificationField)
Sets the classification field.
void setClassificationMethod(ClassBreaksDefinition.ClassificationMethod classificationMethod)
Sets the classification method.
void setNormalizationField(String normalizationField)
Sets the normalization field.
void setNormalizationType(NormalizationType normalizationType)
Sets the normalization type.
void setStdDevInterval(float stdDevInterval)
Sets the standard deviation interval.
String toString()
Protected Methods
void toJson(JsonGenerator node)
This method is used by toJson() to turn this instance into a JSON string.
[Expand]
Inherited Methods
From class com.esri.core.renderer.ClassificationDefinition
From class java.lang.Object

Constants

public static final float HALF

Standard deviation interval of 0.5

Constant Value: 0.5

public static final float ONE

Standard deviation interval of 1.0

Constant Value: 1.0

public static final float QUARTER

Standard deviation interval of 0.25

Constant Value: 0.25

public static final float THIRD

Standard deviation interval of 0.33

Constant Value: 0.33

Public Constructors

public ClassBreaksDefinition (JsonNode node)

Instantiates a new class breaks definition from the given JSON node.

Parameters
node JsonNode: the node defining a class breaks definition

Protected Constructors

protected ClassBreaksDefinition (String classificationField, ClassBreaksDefinition.ClassificationMethod classificationMethod, int breakCount, float stdDeviationInterval, NormalizationType normalizationType, String normalizationField)

Instantiates a new class breaks definition.

Parameters
classificationField String: the classification field
classificationMethod ClassBreaksDefinition.ClassificationMethod: the classification method
breakCount int: the break count
stdDeviationInterval float: the standard deviation interval
normalizationType NormalizationType: the normalization type
normalizationField String: the normalization field

Public Methods

public static ClassBreaksDefinition createByClassificationMethod (String classificationField, ClassBreaksDefinition.ClassificationMethod classificationMethod, int breakCount)

Create a new ClassBreaksDefinition instance with the given classification field and method and desired number of breaks. If you wish to classify by standard deviation, you will either need to set the standard deviation interval with the setStdDevInterval(float) method or use createByStdDeviation(String, float).

Parameters
classificationField String: the classification field
classificationMethod ClassBreaksDefinition.ClassificationMethod: the classification method
breakCount int: the break count
Returns
ClassBreaksDefinition the class breaks definition

public static ClassBreaksDefinition createByNormalizationMethod (String classificationField, ClassBreaksDefinition.ClassificationMethod classificationMethod, int breakCount, NormalizationType normalizationType)

Create a new ClassBreaksDefinition instance with the given classification field and method, desired number of breaks and normalization method. If you wish to normalize by a field value, either set the field name with the setNormalizationField(String) method or use createWithNormalizeByField(String, ClassificationMethod, int, String)

Parameters
classificationField String: the classification field
classificationMethod ClassBreaksDefinition.ClassificationMethod: the classification method
breakCount int: the break count
normalizationType NormalizationType: the normalization type
Returns
ClassBreaksDefinition a new ClassBreaksDefinition instance

public static ClassBreaksDefinition createByStdDeviation (String classificationField, float stdDeviationInterval)

Create a new ClassBreaksDefinition instance with classification by standard deviation with the given classification field, desired number of breaks and standard deviation interval.

Parameters
classificationField String: the classification field
stdDeviationInterval float: the standard deviation interval
Returns
ClassBreaksDefinition a new ClassBreaksDefinition instance

public static ClassBreaksDefinition createWithNormalizeByField (String classificationField, ClassBreaksDefinition.ClassificationMethod classificationMethod, int breakCount, String normalizationField)

Create a new ClassBreaksDefinition instance with the given classification field and method, desired number of breaks and normalizing by a given field.

Parameters
classificationField String: the classification field
classificationMethod ClassBreaksDefinition.ClassificationMethod: the classification method
breakCount int: the break count
normalizationField String: the normalization field
Returns
ClassBreaksDefinition a new ClassBreaksDefinition instance

public int getBreakCount ()

Gets the break count.

Returns
int the break count

public String getClassificationField ()

Gets the classification field.

Returns
String the classification field

public ClassBreaksDefinition.ClassificationMethod getClassificationMethod ()

Gets the classification method.

Returns
ClassBreaksDefinition.ClassificationMethod the classification method

public String getNormalizationField ()

Gets the normalization field.

Returns
String the normalization field

public NormalizationType getNormalizationType ()

Gets the normalization type.

Returns
NormalizationType the normalization type

public float getStdDevInterval ()

Gets the standard deviation interval.

Returns
float the standard deviation interval

public void setBreakCount (int breakCount)

Sets the break count.

Parameters
breakCount int: the new break count

public void setClassificationField (String classificationField)

Sets the classification field.

Parameters
classificationField String: the new classification field

public void setClassificationMethod (ClassBreaksDefinition.ClassificationMethod classificationMethod)

Sets the classification method.

Parameters
classificationMethod ClassBreaksDefinition.ClassificationMethod: the new classification method

public void setNormalizationField (String normalizationField)

Sets the normalization field.

Parameters
normalizationField String: the new normalization field

public void setNormalizationType (NormalizationType normalizationType)

Sets the normalization type.

Parameters
normalizationType NormalizationType: the new normalization type

See also:

public void setStdDevInterval (float stdDevInterval)

Sets the standard deviation interval.

Parameters
stdDevInterval float: the new standard deviation interval

public String toString ()

Returns
String

Protected Methods

protected void toJson (JsonGenerator node)

This method is used by toJson() to turn this instance into a JSON string.

This method should be overridden in subclasses to add their class data to the given JSON node. Note that this base class method should be called by the override.

Parameters
node JsonGenerator: the node to add fields to
Throws
IOException
JsonGenerationException
Exception