public class

ClassificationDefinition

extends Object
java.lang.Object
   ↳ com.esri.core.renderer.ClassificationDefinition
Known Direct Subclasses

Class Overview

This is the base class for classification definition classes used when requesting renderers from dynamic map services. This class provides a means of setting base symbols and color ramps to use in the requested renderer. Note that both the color ramp and base symbol are optional.

Classes based on this one should be used with the GenerateRendererTask.execute or GenerateRendererTask#executeAsync methods.

Summary

Fields
protected String _type
Public Constructors
ClassificationDefinition()
Instantiates a new classification definition.
ClassificationDefinition(JsonNode node)
Instantiates a new classification definition from the given JsonNode.
Public Methods
Symbol getBaseSymbol()
Gets the base symbol that the requested renderer will base its symbols on.
ColorRamp getColorRamp()
Gets the color ramp that the requested renderer will use to set the symbol colors.
void setBaseSymbol(Symbol baseSymbol)
Sets the base symbol that the requested renderer will base its symbols on.
void setColorRamp(ColorRamp colorRamp)
Sets the color ramp that the requested renderer will use to set the symbol colors.
String toJson()
Convert this instance to a json string to allow it to be passed to a dynamic map service generateDataClasses REST endpoint.
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 java.lang.Object

Fields

protected String _type

Public Constructors

public ClassificationDefinition ()

Instantiates a new classification definition.

public ClassificationDefinition (JsonNode node)

Instantiates a new classification definition from the given JsonNode.

Parameters
node JsonNode: the node defining a classification definition

Public Methods

public Symbol getBaseSymbol ()

Gets the base symbol that the requested renderer will base its symbols on.

Returns
Symbol the base symbol

public ColorRamp getColorRamp ()

Gets the color ramp that the requested renderer will use to set the symbol colors.

Returns
ColorRamp the color ramp

public void setBaseSymbol (Symbol baseSymbol)

Sets the base symbol that the requested renderer will base its symbols on.

Parameters
baseSymbol Symbol: the base symbol to set

public void setColorRamp (ColorRamp colorRamp)

Sets the color ramp that the requested renderer will use to set the symbol colors.

Parameters
colorRamp ColorRamp: the color ramp to set

public String toJson ()

Convert this instance to a json string to allow it to be passed to a dynamic map service generateDataClasses REST endpoint.

Returns
String the JSON string
Throws
Exception the exception

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 Signals that an I/O exception has occurred.
JsonGenerationException the json generation exception
Exception the exception