public abstract class

ColorRamp

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

Class Overview

This class defines a color ramp that should be used by a server when generating a renderer from either UniqueValueDefinition or ClassBreaksDefinition.

Summary

Public Constructors
ColorRamp(JsonNode node)
Instantiates a new color ramp from the given JsonNode.
Protected Constructors
ColorRamp(String type)
Instantiates a new color ramp.
Public Methods
String toJson()
Convert this instance to a JSON string to allow it to be passed to a dynamic map service 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

Public Constructors

public ColorRamp (JsonNode node)

Instantiates a new color ramp from the given JsonNode.

Parameters
node JsonNode: the node defining a color ramp

Protected Constructors

protected ColorRamp (String type)

Instantiates a new color ramp. This constructor should be used by subclasses to set the ramp type when being written to a JSON string.

Parameters
type String: the type

Public Methods

public String toJson ()

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

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