package com.metamx.druid.index.v1;

import com.google.common.base.Function;
import com.google.common.collect.Lists;

import java.util.List;

/**
 */
public class SpatialDimensionSchema
{
  private final String dimName;
  private final List<String> dims;

  public SpatialDimensionSchema(String dimName, List<String> dims)
  {
    this.dimName = dimName.toLowerCase();
    this.dims = Lists.transform(
        dims,
        new Function<String, String>()
        {
          @Override
          public String apply(String input)
          {
            return input.toLowerCase();
          }
        }
    );
  }

  public String getDimName()
  {
    return dimName;
  }

  public List<String> getDims()
  {
    return dims;
  }
}

@@ -29,16 +29,123 @@
 ex.v1;%0A%0A
+import com.fasterxml.jackson.annotation.JsonCreator;%0Aimport com.fasterxml.jackson.annotation.JsonProperty;%0A
 import c
@@ -176,16 +176,16 @@
 nction;%0A
-
 import c
@@ -355,16 +355,31 @@
  dims;%0A%0A
+  @JsonCreator%0A
   public
@@ -406,23 +406,83 @@
 ema(
-String dimName,
+%0A      @JsonProperty(%22dimName%22) String dimName,%0A      @JsonProperty(%22dims%22)
  Lis
@@ -495,16 +495,19 @@
 ng%3E dims
+%0A  
 )%0A  %7B%0A  
@@ -788,24 +788,40 @@
     );%0A  %7D%0A%0A
+  @JsonProperty%0A
   public Str
@@ -866,16 +866,32 @@
 e;%0A  %7D%0A%0A
+  @JsonProperty%0A
   public

add serde for spatial dim schemas