org.compass.core.mapping.xsem.builder
Class XmlIdMappingBuilder

java.lang.Object
  extended by org.compass.core.mapping.xsem.builder.XmlIdMappingBuilder

public class XmlIdMappingBuilder
extends Object

A builder allowing to constrcut xml id mapping definition.

Author:
kimchy
See Also:
XSEM.id(String)

Field Summary
(package private)  XmlIdMapping mapping
           
 
Constructor Summary
XmlIdMappingBuilder(String xpath)
          Constructs a new xml id mapping builder for the specified xpath expression.
 
Method Summary
 XmlIdMappingBuilder analyzer(String analyzer)
          Sets the analyzer logical name that will be used to analyzer the property value.
 XmlIdMappingBuilder boost(float boost)
          Sets the boost value for the id property mapping.
 XmlIdMappingBuilder excludeFromAll(ExcludeFromAll excludeFromAll)
          Controls if the id property will be excluded from all or not.
 XmlIdMappingBuilder format(String format)
          Sets the format that will be used for formattable capable converters (such as numbers and dates).
 XmlIdMappingBuilder indexName(String name)
          Sets the index name of the property that will be created.
 XmlIdMappingBuilder mappingConverter(Converter converter)
          Sets the actual converter that will be used to convert the XML property.
 XmlIdMappingBuilder mappingConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the XML property.
 XmlIdMappingBuilder omitNorms(boolean omitNorms)
          If set, omit normalization factors associated with this indexed field.
 XmlIdMappingBuilder omitTf(boolean omitTf)
          If set, omit tf from postings of this indexed property.
 XmlIdMappingBuilder spellCheck(SpellCheck spellCheck)
          Sets the spell check specific setting for the mapping.
 XmlIdMappingBuilder valueConverter(Converter converter)
          Sets the actual converter that will be used to convert the actual value of the XML property.
 XmlIdMappingBuilder valueConverter(ResourcePropertyConverter converter)
          Sets the actual converter that will be used to convert the actual value of the XML property.
 XmlIdMappingBuilder valueConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the actual value of the XML property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final XmlIdMapping mapping
Constructor Detail

XmlIdMappingBuilder

public XmlIdMappingBuilder(String xpath)
Constructs a new xml id mapping builder for the specified xpath expression.

Note, the xpath expression used to identify the xml-id. Must return a single xml element.

Method Detail

indexName

public XmlIdMappingBuilder indexName(String name)
Sets the index name of the property that will be created. If not set, will use the xml object name (the result of the xpath expression).


analyzer

public XmlIdMappingBuilder analyzer(String analyzer)
Sets the analyzer logical name that will be used to analyzer the property value. The name is a lookup name for an Analyzer that is registered with Compass.


omitNorms

public XmlIdMappingBuilder omitNorms(boolean omitNorms)
If set, omit normalization factors associated with this indexed field. This effectively disables indexing boosts and length normalization for this field. By default, it is set for id mapping.


omitTf

public XmlIdMappingBuilder omitTf(boolean omitTf)
If set, omit tf from postings of this indexed property. By default, it is set for id mapping.


boost

public XmlIdMappingBuilder boost(float boost)
Sets the boost value for the id property mapping. Defaults to 1.0f.


format

public XmlIdMappingBuilder format(String format)
Sets the format that will be used for formattable capable converters (such as numbers and dates).


mappingConverter

public XmlIdMappingBuilder mappingConverter(String converterName)
Sets the lookup converter name (registered with Compass) that will be used to convert the XML property. Defaults to XmlIdMappingConverter.


mappingConverter

public XmlIdMappingBuilder mappingConverter(Converter converter)
Sets the actual converter that will be used to convert the XML property. Defaults to XmlIdMappingConverter.


valueConverter

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


valueConverter

public XmlIdMappingBuilder valueConverter(Converter converter)
Sets the actual converter that will be used to convert the actual value of the XML property. Detaults to SimpleXmlValueConverter.


valueConverter

public XmlIdMappingBuilder valueConverter(ResourcePropertyConverter converter)
Sets the actual converter that will be used to convert the actual value of the XML property. Detaults to SimpleXmlValueConverter.


excludeFromAll

public XmlIdMappingBuilder excludeFromAll(ExcludeFromAll excludeFromAll)
Controls if the id property will be excluded from all or not.


spellCheck

public XmlIdMappingBuilder spellCheck(SpellCheck spellCheck)
Sets the spell check specific setting for the mapping.



Copyright (c) 2004-2009 The Compass Project.