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

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

public class XmlAnalyzerMappingBuilder
extends Object

A builder allowing to construct a resource analyzer property mapping. XML analyzer property mapping allows to dynamically define the analyzer that will be used to analyzer the xml 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:
XSEM.analyzer(String, String)

Field Summary
(package private)  XmlPropertyAnalyzerController mapping
           
 
Constructor Summary
XmlAnalyzerMappingBuilder(String name, String xpath)
          Constructs a new XML analyzer property using the provided name and xpath.
 
Method Summary
 XmlAnalyzerMappingBuilder mappingConverter(Converter converter)
          Sets an actual converter that will be used to convert this property value.
 XmlAnalyzerMappingBuilder mappingConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the value of the property.
 XmlAnalyzerMappingBuilder nullAnalyzer(String nullAnalyzer)
          The name of the analyzer that will be used if the property has the null value.
 XmlAnalyzerMappingBuilder valueConverter(Converter converter)
          Sets the actual converter that will be used to convert the actual value of the XML property.
 XmlAnalyzerMappingBuilder valueConverter(ResourcePropertyConverter converter)
          Sets the actual converter that will be used to convert the actual value of the XML property.
 XmlAnalyzerMappingBuilder 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 XmlPropertyAnalyzerController mapping
Constructor Detail

XmlAnalyzerMappingBuilder

public XmlAnalyzerMappingBuilder(String name,
                                 String xpath)
Constructs a new XML analyzer property using the provided name and xpath.

Method Detail

nullAnalyzer

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


mappingConverter

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


mappingConverter

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


valueConverter

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