com.esri.core.internal.value
Class ColorRamp

java.lang.Object
  extended by com.esri.core.internal.value.ColorRamp
Direct Known Subclasses:
AlgorithmicColorRamp, MultipartColorRamp

public abstract class ColorRamp
extends Object

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


Constructor Summary
  ColorRamp(org.codehaus.jackson.JsonNode node)
          Instantiates a new color ramp from the given JsonNode.
protected ColorRamp(String type)
          Instantiates a new color ramp.
 
Method Summary
 String toJson()
          Convert this instance to a JSON string to allow it to be passed to a dynamic map service REST endpoint.
protected  void toJson(org.codehaus.jackson.JsonGenerator node)
          This method is used by toJson() to turn this instance into a JSON string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorRamp

public ColorRamp(org.codehaus.jackson.JsonNode node)
Instantiates a new color ramp from the given JsonNode.

Parameters:
node - the node defining a color ramp

ColorRamp

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 - the type
Method Detail

toJson

public String toJson()
              throws Exception
Convert this instance to a JSON string to allow it to be passed to a dynamic map service REST endpoint.

Returns:
the string
Throws:
Exception - the exception

toJson

protected void toJson(org.codehaus.jackson.JsonGenerator node)
               throws IOException,
                      org.codehaus.jackson.JsonGenerationException,
                      Exception
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 - the node
Throws:
IOException - Signals that an I/O exception has occurred.
org.codehaus.jackson.JsonGenerationException - the json generation exception
Exception - the exception


Copyright © 2012. All Rights Reserved.