com.esri.core.internal.value
Class UniqueValueDefinition

java.lang.Object
  extended by com.esri.core.internal.value.ClassificationDef
      extended by com.esri.core.internal.value.UniqueValueDefinition

public class UniqueValueDefinition
extends ClassificationDef

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

A unique value renderer is defined by up to three fields that when taken together define a unique value for a given feature. The user can specify an optional base symbol and color ramp to be used by the renderer. A field delimiter can also be defined, this defaults to ','. This delimiter is used to separate the values when more than one field is used to define a unique value.


Field Summary
 
Fields inherited from class com.esri.core.internal.value.ClassificationDef
_type
 
Constructor Summary
UniqueValueDefinition(org.codehaus.jackson.JsonNode node)
          Instantiates a new unique value definition from the given JSON node.
UniqueValueDefinition(List<String> uniqueValueFields)
          Instantiates a new unique value definition.
 
Method Summary
 char getFieldDelimiter()
          Gets the field delimiter.
 ArrayList<String> getUniqueValueFields()
          Gets the unique value fields.
 void setFieldDelimiter(char fieldDelimiter)
          Sets the field delimiter.
protected  void toJson(org.codehaus.jackson.JsonGenerator node)
          This method is used by ClassificationDef.toJson() to turn this instance into a JSON string.
 
Methods inherited from class com.esri.core.internal.value.ClassificationDef
getBaseSymbol, getColorRamp, setBaseSymbol, setColorRamp, toJson
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueValueDefinition

public UniqueValueDefinition(List<String> uniqueValueFields)
Instantiates a new unique value definition.

Parameters:
uniqueValueFields - the unique value fields

UniqueValueDefinition

public UniqueValueDefinition(org.codehaus.jackson.JsonNode node)
Instantiates a new unique value definition from the given JSON node.

Parameters:
node - the node defining a unique value definition
Method Detail

getUniqueValueFields

public ArrayList<String> getUniqueValueFields()
Gets the unique value fields.

Returns:
the unique value fields

setFieldDelimiter

public void setFieldDelimiter(char fieldDelimiter)
Sets the field delimiter.

Parameters:
fieldDelimiter - the new field delimiter

getFieldDelimiter

public char getFieldDelimiter()
Gets the field delimiter.

Returns:
the field delimiter

toJson

protected void toJson(org.codehaus.jackson.JsonGenerator node)
               throws IOException,
                      org.codehaus.jackson.JsonGenerationException,
                      Exception
Description copied from class: ClassificationDef
This method is used by ClassificationDef.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.

Overrides:
toJson in class ClassificationDef
Parameters:
node - the node to add fields to
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.