org.compass.core.mapping.osem.builder
Class OSEM

java.lang.Object
  extended by org.compass.core.mapping.osem.builder.OSEM

public abstract class OSEM
extends Object

Static builder allowing to construct OSEM (Object to Search Engine Mapping) definitions.

Here is an exmaple how it can be used:

 import static org.compass.core.mapping.osem.builder.OSEM.*;


 conf.addMapping(
          searchable(Author.class).alias("author")
              .add(id("id"))
              .add(property("name").add(metadata("name"))
              .add(property("age").add(metadata("age").format("000")))
 );
 

Author:
kimchy

Method Summary
static SearchableAllMappingBuilder all()
          Constructs a new searchable all mapping builder.
static SearchableAnalyzerMappingBuilder analyzer(String name)
          Constructs a new searchable analyzer property mapping builder.
static SearchableBoostMappingBuilder boost(String name)
          Constructs a new searchable boost mapping builder.
static SearchableCascadeMappingBuilder cascade(String name)
          Constructs a new searchable cascade mapping builder.
static SearchableComponentMappingBuilder component(String name)
          Constructs a new searchable component mapping builder.
static SearchableConstantMappingBuilder constant(String name)
          Constructs a new searchable constant mapping builder.
static SearchableDynamicMetaDataMappingBuilder dynamicMetadata(String name, String converter, String expression)
          Constructs a new searchable dynamic meta data mapping builder based on the name, the converter (jexl, velocity, groovy, ...) and the dynamic expression to use.
static SearchableDynamicPropertyMappingBuilder dynamicProperty(String name)
          Constructs a new searchable dynamic property mapping builder.
static SearchableIdMappingBuilder id(String name)
          Constructs a new searchdble id mapping builder.
static SearchableIdComponentMappingBuilder idComponent(String name)
          Constructs a new searchable id component mapping builder.
static SearchableMetaDataMappingBuilder metadata(String name)
          Constructs a new searchable metadata mapping builder.
static SearchableParentMappingBuilder parent(String name)
          Constructs a new searchable parent mapping builder.
static SearchablePropertyMappingBuilder property(String name)
          Constructs a new searchable property mapping builder.
static SearchableReferenceMappingBuilder reference(String name)
          Constructs a new searchable referennce mapping builder.
static SearchableMappingBuilder searchable(Class clazz)
          Constructs a new searchable class mapping builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

searchable

public static SearchableMappingBuilder searchable(Class clazz)
Constructs a new searchable class mapping builder.


id

public static SearchableIdMappingBuilder id(String name)
Constructs a new searchdble id mapping builder.

See Also:
SearchableMappingBuilder.add(SearchableIdMappingBuilder)

idComponent

public static SearchableIdComponentMappingBuilder idComponent(String name)
Constructs a new searchable id component mapping builder.

See Also:
SearchableMappingBuilder.add(SearchableIdComponentMappingBuilder)

component

public static SearchableComponentMappingBuilder component(String name)
Constructs a new searchable component mapping builder.

See Also:
SearchableMappingBuilder.add(SearchableComponentMappingBuilder)

reference

public static SearchableReferenceMappingBuilder reference(String name)
Constructs a new searchable referennce mapping builder.

See Also:
SearchableMappingBuilder.add(SearchableReferenceMappingBuilder)

constant

public static SearchableConstantMappingBuilder constant(String name)
Constructs a new searchable constant mapping builder.

See Also:
SearchableMappingBuilder.add(SearchableConstantMappingBuilder)

dynamicMetadata

public static SearchableDynamicMetaDataMappingBuilder dynamicMetadata(String name,
                                                                      String converter,
                                                                      String expression)
Constructs a new searchable dynamic meta data mapping builder based on the name, the converter (jexl, velocity, groovy, ...) and the dynamic expression to use.

See Also:
SearchableMappingBuilder.add(SearchableDynamicMetaDataMappingBuilder)

property

public static SearchablePropertyMappingBuilder property(String name)
Constructs a new searchable property mapping builder.

See Also:
SearchableMappingBuilder.add(SearchablePropertyMappingBuilder)

dynamicProperty

public static SearchableDynamicPropertyMappingBuilder dynamicProperty(String name)
Constructs a new searchable dynamic property mapping builder.

See Also:
SearchableMappingBuilder.add(SearchableDynamicPropertyMappingBuilder)

metadata

public static SearchableMetaDataMappingBuilder metadata(String name)
Constructs a new searchable metadata mapping builder.

See Also:
SearchablePropertyMappingBuilder.add(SearchableMetaDataMappingBuilder), SearchableIdMappingBuilder.add(SearchableMetaDataMappingBuilder)

analyzer

public static SearchableAnalyzerMappingBuilder analyzer(String name)
Constructs a new searchable analyzer property mapping builder.

See Also:
SearchableMappingBuilder.add(SearchableAnalyzerMappingBuilder)

cascade

public static SearchableCascadeMappingBuilder cascade(String name)
Constructs a new searchable cascade mapping builder.

See Also:
SearchableMappingBuilder.add(SearchableCascadeMappingBuilder)

parent

public static SearchableParentMappingBuilder parent(String name)
Constructs a new searchable parent mapping builder.

See Also:
SearchableMappingBuilder.add(SearchableParentMappingBuilder)

boost

public static SearchableBoostMappingBuilder boost(String name)
Constructs a new searchable boost mapping builder.

See Also:
SearchableMappingBuilder.add(SearchableBoostMappingBuilder)

all

public static SearchableAllMappingBuilder all()
Constructs a new searchable all mapping builder.

See Also:
SearchableMappingBuilder.all(SearchableAllMappingBuilder)


Copyright (c) 2004-2009 The Compass Project.