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

java.lang.Object
  extended by org.compass.core.mapping.xsem.builder.XmlContractMappingBuilder
All Implemented Interfaces:
ContractMappingProvider

public class XmlContractMappingBuilder
extends Object
implements ContractMappingProvider

A builder allowing to constrcut xml contract mapping definition. Contract mappings allow to share common mapping definitions.

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

Constructor Summary
XmlContractMappingBuilder(String alias)
          Constructs a new Xml mapping based on the specified alias.
 
Method Summary
 XmlContractMappingBuilder add(XmlAnalyzerMappingBuilder builder)
          Adds an xml analyzer property mapping definition.
 XmlContractMappingBuilder add(XmlBoostMappingBuilder builder)
          Adds an xml boost property mapping definition.
 XmlContractMappingBuilder add(XmlContentMappingBuilder builder)
          Adds an XML content mapping definition.
 XmlContractMappingBuilder add(XmlIdMappingBuilder builder)
          Adds an xml id mapping definition.
 XmlContractMappingBuilder add(XmlPropertyMappingBuilder builder)
          Adds an xml property mapping definition.
 XmlContractMappingBuilder analyzer(String analyzer)
          The name of the analyzer that will be used to analyze ANALYZED properties.
 XmlContractMappingBuilder extendsAliases(String... extendedAliases)
          Sets the list of other xml mappings that this mapping will extend and inherit internal mappings from.
 ContractMapping getMapping()
          Returns the contract mappings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlContractMappingBuilder

public XmlContractMappingBuilder(String alias)
Constructs a new Xml mapping based on the specified alias.

Method Detail

getMapping

public ContractMapping getMapping()
Returns the contract mappings.

Specified by:
getMapping in interface ContractMappingProvider

extendsAliases

public XmlContractMappingBuilder extendsAliases(String... extendedAliases)
Sets the list of other xml mappings that this mapping will extend and inherit internal mappings from.


analyzer

public XmlContractMappingBuilder analyzer(String analyzer)
The name of the analyzer that will be used to analyze ANALYZED properties. Defaults to the default analyzer which is one of the internal analyzers that comes with Compass. If not set, will use the default analyzer.

Note, that when using the xml-analyzer mapping (a child mapping of xml mapping) (for an xml property value that controls the analyzer), the analyzer attribute will have no effects.


add

public XmlContractMappingBuilder add(XmlIdMappingBuilder builder)
Adds an xml id mapping definition.


add

public XmlContractMappingBuilder add(XmlPropertyMappingBuilder builder)
Adds an xml property mapping definition.


add

public XmlContractMappingBuilder add(XmlAnalyzerMappingBuilder builder)
Adds an xml analyzer property mapping definition.


add

public XmlContractMappingBuilder add(XmlBoostMappingBuilder builder)
Adds an xml boost property mapping definition.


add

public XmlContractMappingBuilder add(XmlContentMappingBuilder builder)
Adds an XML content mapping definition.



Copyright (c) 2004-2009 The Compass Project.