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

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

public class XmlBoostMappingBuilder
extends Object

Allows to dynamically define the boost value of the resource based on a XML property value.

Author:
kimchy
See Also:
XSEM.boost(String, String)

Field Summary
(package private)  XmlBoostPropertyMapping mapping
           
 
Constructor Summary
XmlBoostMappingBuilder(String name, String xpath)
          Constructs a new boost JSON property mapping.
 
Method Summary
 XmlBoostMappingBuilder defaultBoost(float defaultBoost)
          The default boost value that will be used of the JSON property to be used has null value.
 XmlBoostMappingBuilder mappingConverter(Converter converter)
          Sets an actual converter that will be used to convert this property value.
 XmlBoostMappingBuilder mappingConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the value of the property.
 XmlBoostMappingBuilder valueConverter(Converter converter)
          Sets the actual converter that will be used to convert the actual value of the XML property.
 XmlBoostMappingBuilder valueConverter(ResourcePropertyConverter converter)
          Sets the actual converter that will be used to convert the actual value of the XML property.
 XmlBoostMappingBuilder 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 XmlBoostPropertyMapping mapping
Constructor Detail

XmlBoostMappingBuilder

public XmlBoostMappingBuilder(String name,
                              String xpath)
Constructs a new boost JSON property mapping.

Method Detail

defaultBoost

public XmlBoostMappingBuilder defaultBoost(float defaultBoost)
The default boost value that will be used of the JSON property to be used has null value. Defaults to 1.0f.


mappingConverter

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


mappingConverter

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


valueConverter

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



Copyright (c) 2004-2009 The Compass Project.