org.compass.core.mapping.rsem.builder
Class ResourceContractMappingBuilder

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

public class ResourceContractMappingBuilder
extends Object
implements ContractMappingProvider

A builder for resource contract mapping allowing to define abstract mappings (not bounded to a specific resource) which can then be extended by actual resource or other contract mappings.

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

Constructor Summary
ResourceContractMappingBuilder(String alias)
          Constructs a new resource contract mapping builder.
 
Method Summary
 ResourceContractMappingBuilder add(ResourceAnalyzerMappingBuilder builder)
          Adds a resource analyzer property mapping definition.
 ResourceContractMappingBuilder add(ResourceBoostMappingBuilder builder)
          Adds a resource boost property mapping definition.
 ResourceContractMappingBuilder add(ResourceIdMappingBuilder builder)
          Adds a resource id mapping definition.
 ResourceContractMappingBuilder add(ResourcePropertyMappingBuilder builder)
          Adds a resource property mapping definition.
 ResourceContractMappingBuilder analyzer(String analyzer)
          The name of the analyzer that will be used to analyze ANALYZED properties.
 ResourceContractMappingBuilder extendsAliases(String... extendedAliases)
          Sets the list of other resource/contract mappings that this mapping will extend and inherit internal mappings from.
 ContractMapping getMapping()
          Returns the contract mapping built.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceContractMappingBuilder

public ResourceContractMappingBuilder(String alias)
Constructs a new resource contract mapping builder.

Method Detail

getMapping

public ContractMapping getMapping()
Returns the contract mapping built.

Specified by:
getMapping in interface ContractMappingProvider

extendsAliases

public ResourceContractMappingBuilder extendsAliases(String... extendedAliases)
Sets the list of other resource/contract mappings that this mapping will extend and inherit internal mappings from.


analyzer

public ResourceContractMappingBuilder 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 resource-analyzer mapping (a child mapping of resource mapping) (for a resource property value that controls the analyzer), the analyzer attribute will have no effects.


add

public ResourceContractMappingBuilder add(ResourceIdMappingBuilder builder)
Adds a resource id mapping definition.


add

public ResourceContractMappingBuilder add(ResourcePropertyMappingBuilder builder)
Adds a resource property mapping definition.


add

public ResourceContractMappingBuilder add(ResourceAnalyzerMappingBuilder builder)
Adds a resource analyzer property mapping definition.


add

public ResourceContractMappingBuilder add(ResourceBoostMappingBuilder builder)
Adds a resource boost property mapping definition.



Copyright (c) 2004-2009 The Compass Project.