org.modeshape.search.lucene
Class IndexRules

java.lang.Object
  extended by org.modeshape.search.lucene.IndexRules

@Immutable
public class IndexRules
extends Object

The set of rules that dictate how properties should be indexed.


Nested Class Summary
static class IndexRules.Builder
          A builder of immutable IndexRules objects.
static interface IndexRules.Factory
           
static class IndexRules.FieldType
           
static class IndexRules.FixedFactory
          A simple IndexRules.Factory that always returns the same IndexRules.
static interface IndexRules.NumericRule<T>
           
protected static class IndexRules.NumericTypedRule<T>
           
static interface IndexRules.Rule
          A single rule that dictates how a single property should be indexed.
protected static class IndexRules.SkipRule
           
protected static class IndexRules.TypedRule
           
 
Field Summary
static IndexRules.Rule SKIP
           
 
Constructor Summary
protected IndexRules(Map<Name,IndexRules.Rule> rulesByName, IndexRules.Rule defaultRule)
           
 
Method Summary
static IndexRules.Builder createBuilder()
          Return a new builder that can be used to create IndexRules objects.
static IndexRules.Builder createBuilder(IndexRules initialRules)
          Return a new builder that can be used to create IndexRules objects.
 IndexRules.Rule getRule(Name name)
          Get the rule associated with the given property name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SKIP

public static final IndexRules.Rule SKIP
Constructor Detail

IndexRules

protected IndexRules(Map<Name,IndexRules.Rule> rulesByName,
                     IndexRules.Rule defaultRule)
Method Detail

getRule

public IndexRules.Rule getRule(Name name)
Get the rule associated with the given property name.

Parameters:
name - the property name, or null if the default rule is to be returned
Returns:
the rule; never null

createBuilder

public static IndexRules.Builder createBuilder()
Return a new builder that can be used to create IndexRules objects.

Returns:
a builder; never null

createBuilder

public static IndexRules.Builder createBuilder(IndexRules initialRules)
Return a new builder that can be used to create IndexRules objects.

Parameters:
initialRules - the rules that the builder should start with
Returns:
a builder; never null
Throws:
IllegalArgumentException - if the initial rules reference is null


Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.