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

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

public class JsonAnalyzerMappingBuilder
extends Object

A builder allowing to construct a resource analyzer property mapping. JSON analyzer property mapping allows to dynamically define the analyzer that will be used to analyzer the json resource (properties that are specificed as analyzed). The value of the analyzer property will be used to lookup a registered analyzer within Compass. If no analyzer is found, the nullAnalyzer(String) will be used (if specified).

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

Field Summary
(package private)  JsonPropertyAnalyzerController mapping
           
 
Constructor Summary
JsonAnalyzerMappingBuilder(String name)
          Constructs a new JSON analyzer property using the provided name.
 
Method Summary
 JsonAnalyzerMappingBuilder mappingConverter(Converter converter)
          Sets an actual converter that will be used to convert this property value.
 JsonAnalyzerMappingBuilder mappingConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the value of the property.
 JsonAnalyzerMappingBuilder nullAnalyzer(String nullAnalyzer)
          The name of the analyzer that will be used if the property has the null value.
 JsonAnalyzerMappingBuilder valueConverter(Converter converter)
          Sets the actual converter that will be used to convert the actual value of the json property.
 JsonAnalyzerMappingBuilder valueConverter(ResourcePropertyConverter converter)
          Sets the actual converter that will be used to convert the actual value of the json property.
 JsonAnalyzerMappingBuilder valueConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the actual value of the json property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final JsonPropertyAnalyzerController mapping
Constructor Detail

JsonAnalyzerMappingBuilder

public JsonAnalyzerMappingBuilder(String name)
Constructs a new JSON analyzer property using the provided name.

Method Detail

nullAnalyzer

public JsonAnalyzerMappingBuilder nullAnalyzer(String nullAnalyzer)
The name of the analyzer that will be used if the property has the null value.


mappingConverter

public JsonAnalyzerMappingBuilder mappingConverter(String converterName)
Sets the lookup converter name (registered with Compass) that will be used to convert the value of the property.


mappingConverter

public JsonAnalyzerMappingBuilder mappingConverter(Converter converter)
Sets an actual converter that will be used to convert this property value.


valueConverter

public JsonAnalyzerMappingBuilder valueConverter(String converterName)
Sets the lookup converter name (registered with Compass) that will be used to convert the actual value of the json property. Detaults to SimpleJsonValueConverter.


valueConverter

public JsonAnalyzerMappingBuilder valueConverter(Converter converter)
Sets the actual converter that will be used to convert the actual value of the json property. Detaults to SimpleJsonValueConverter.


valueConverter

public JsonAnalyzerMappingBuilder valueConverter(ResourcePropertyConverter converter)
Sets the actual converter that will be used to convert the actual value of the json property. Detaults to SimpleJsonValueConverter.



Copyright (c) 2004-2009 The Compass Project.