org.compass.core.mapping.json.builder
Class JsonObjectMappingBuilder

java.lang.Object
  extended by org.compass.core.mapping.json.builder.JsonObjectMappingBuilder

public class JsonObjectMappingBuilder
extends Object

A builder allowing to constrcut json object mapping definition.

Author:
kimchy
See Also:
JSEM.object(String)

Field Summary
(package private)  PlainJsonObjectMapping mapping
           
 
Constructor Summary
JsonObjectMappingBuilder(String name)
          Constructs a new JSON object mapping with the given name.
 
Method Summary
 JsonObjectMappingBuilder add(JsonArrayMappingBuilder builder)
          Adds a json array mapping definition.
 JsonObjectMappingBuilder add(JsonObjectMappingBuilder builder)
          Adds a json object mapping definition.
 JsonObjectMappingBuilder add(JsonPropertyMappingBuilder builder)
          Adds a json property mapping definition.
 JsonObjectMappingBuilder dynamic(boolean dynamic)
          Should unmapped json elements be added to the search engine automatically (and recursively).
 JsonObjectMappingBuilder dynamicNaming(Naming dynamicNaming)
          Sets how dynamic objects, arrays and properties added through this object will have their respective property names named.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final PlainJsonObjectMapping mapping
Constructor Detail

JsonObjectMappingBuilder

public JsonObjectMappingBuilder(String name)
Constructs a new JSON object mapping with the given name. The name can be null when used with array mapping.

Method Detail

dynamic

public JsonObjectMappingBuilder dynamic(boolean dynamic)
Should unmapped json elements be added to the search engine automatically (and recursively). Defaults to false.


dynamicNaming

public JsonObjectMappingBuilder dynamicNaming(Naming dynamicNaming)
Sets how dynamic objects, arrays and properties added through this object will have their respective property names named.


add

public JsonObjectMappingBuilder add(JsonPropertyMappingBuilder builder)
Adds a json property mapping definition.


add

public JsonObjectMappingBuilder add(JsonObjectMappingBuilder builder)
Adds a json object mapping definition.


add

public JsonObjectMappingBuilder add(JsonArrayMappingBuilder builder)
Adds a json array mapping definition.



Copyright (c) 2004-2009 The Compass Project.