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

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

public class JsonArrayMappingBuilder
extends Object

A builder allowing to constrcut json array mapping definition.

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

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

Field Detail

mapping

final JsonArrayMapping mapping
Constructor Detail

JsonArrayMappingBuilder

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

Method Detail

indexName

public JsonArrayMappingBuilder indexName(String indexName)
The name of the resource property that will be stored in the index. Defaults to the element name.


dynamic

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


dynamicNaming

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


element

public JsonArrayMappingBuilder element(JsonPropertyMappingBuilder builder)
Sets the array json element to a json property mapping definition.

See Also:
JSEM.property()

element

public JsonArrayMappingBuilder element(JsonObjectMappingBuilder builder)
Sets the array json element to a json object mapping definition.

See Also:
JSEM.object()

element

public JsonArrayMappingBuilder element(JsonArrayMappingBuilder builder)
Sets the array json element to a json array mapping definition.

See Also:
JSEM.array()


Copyright (c) 2004-2009 The Compass Project.