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

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

public class XmlPropertyMappingBuilder
extends Object

A builder allowing to constrcut XML property mapping definition.

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

Field Summary
(package private)  XmlPropertyMapping mapping
           
 
Constructor Summary
XmlPropertyMappingBuilder(String xpath)
          Constructs a new xml property mapping builder for the specified xpath expression.
 
Method Summary
 XmlPropertyMappingBuilder analyzer(String analyzer)
          Sets the analyzer logical name that will be used to analyzer the property value.
 XmlPropertyMappingBuilder boost(float boost)
          Sets the boost value for the property mapping.
 XmlPropertyMappingBuilder excludeFromAll(ExcludeFromAll excludeFromAll)
          Controls if the property will be excluded from all or not.
 XmlPropertyMappingBuilder format(String format)
          Sets the format that will be used for formattable capable converters (such as numbers and dates).
 XmlPropertyMappingBuilder index(Property.Index index)
          Specifies whether and how a property should be indexed.
 XmlPropertyMappingBuilder indexName(String indexName)
          The name of the resource property that will be stored in the index.
 XmlPropertyMappingBuilder mappingConverter(Converter converter)
          Sets the actual converter that will be used to convert the XML property.
 XmlPropertyMappingBuilder mappingConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the XML property.
 XmlPropertyMappingBuilder nullValue(String nullValue)
          Sets the null value of the property.
 XmlPropertyMappingBuilder omitNorms(boolean omitNorms)
          If set, omit normalization factors associated with this indexed field.
 XmlPropertyMappingBuilder omitTf(boolean omitTf)
          If set, omit tf from postings of this indexed property.
 XmlPropertyMappingBuilder spellCheck(SpellCheck spellCheck)
          Sets the spell check specific setting for the mapping.
 XmlPropertyMappingBuilder store(Property.Store store)
          Specifies whether and how a property will be stored.
 XmlPropertyMappingBuilder termVector(Property.TermVector termVector)
          Specifies whether and how a property should have term vectors.
 XmlPropertyMappingBuilder valueConverter(Converter converter)
          Sets the actual converter that will be used to convert the actual value of the XML property.
 XmlPropertyMappingBuilder valueConverter(ResourcePropertyConverter converter)
          Sets the actual converter that will be used to convert the actual value of the XML property.
 XmlPropertyMappingBuilder 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 XmlPropertyMapping mapping
Constructor Detail

XmlPropertyMappingBuilder

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

Note, the xpath expression used to identify the xml-property. Can return no xml objects, one xml object, or many xml objects.

Method Detail

indexName

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


store

public XmlPropertyMappingBuilder store(Property.Store store)
Specifies whether and how a property will be stored. Deftauls to Property.Store.YES.


index

public XmlPropertyMappingBuilder index(Property.Index index)
Specifies whether and how a property should be indexed. Defaults to Property.Index.ANALYZED.


termVector

public XmlPropertyMappingBuilder termVector(Property.TermVector termVector)
Specifies whether and how a property should have term vectors. Defaults to Property.TermVector.NO.


omitNorms

public XmlPropertyMappingBuilder omitNorms(boolean omitNorms)
If set, omit normalization factors associated with this indexed field. This effectively disables indexing boosts and length normalization for this field. Defaults to false.


omitTf

public XmlPropertyMappingBuilder omitTf(boolean omitTf)
If set, omit tf from postings of this indexed property. Defaults to false.


boost

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


format

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


mappingConverter

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


mappingConverter

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


valueConverter

public XmlPropertyMappingBuilder 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 XmlPropertyMappingBuilder 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 XmlPropertyMappingBuilder valueConverter(ResourcePropertyConverter converter)
Sets the actual converter that will be used to convert the actual value of the XML property. Detaults to SimpleXmlValueConverter.


analyzer

public XmlPropertyMappingBuilder 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.


excludeFromAll

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


nullValue

public XmlPropertyMappingBuilder nullValue(String nullValue)
Sets the null value of the property. If the property value is null, will store in the index the provided value.


spellCheck

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



Copyright (c) 2004-2009 The Compass Project.