org.compass.core.mapping.osem.builder
Class SearchableAnalyzerMappingBuilder

java.lang.Object
  extended by org.compass.core.mapping.osem.builder.SearchableAnalyzerMappingBuilder

public class SearchableAnalyzerMappingBuilder
extends Object

A builder allowing to construct a class analyzer property mapping. Class analyzer property mapping allows to dynamically define the analyzer that will be used to analyzer the class (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:
OSEM.analyzer(String), SearchableMappingBuilder.add(SearchableAnalyzerMappingBuilder)

Field Summary
(package private)  ClassPropertyAnalyzerController mapping
           
 
Constructor Summary
SearchableAnalyzerMappingBuilder(String name)
          Constructs a new Class analyzer property using the provided name.
 
Method Summary
 SearchableAnalyzerMappingBuilder accessor(Accessor accessor)
          Sets the acessor the will be used for the class property.
 SearchableAnalyzerMappingBuilder accessor(String accessor)
          Sets the acessor the will be used for the class property.
 SearchableAnalyzerMappingBuilder nullAnalyzer(String nullAnalyzer)
          The name of the analyzer that will be used if the property has the null value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final ClassPropertyAnalyzerController mapping
Constructor Detail

SearchableAnalyzerMappingBuilder

public SearchableAnalyzerMappingBuilder(String name)
Constructs a new Class analyzer property using the provided name.

Method Detail

nullAnalyzer

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


accessor

public SearchableAnalyzerMappingBuilder accessor(Accessor accessor)
Sets the acessor the will be used for the class property. Defaults to property (getter and optionally setter).


accessor

public SearchableAnalyzerMappingBuilder accessor(String accessor)
Sets the acessor the will be used for the class property. Defaults to property (getter and optionally setter). Note, this is the lookup name of a PropertyAccessor registered with Compass, with two default ones (custom ones can be easily added) named field and property.



Copyright (c) 2004-2009 The Compass Project.