org.apache.lucene.facet.index.categorypolicy
Class NonTopLevelPathPolicy

java.lang.Object
  extended by org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy
All Implemented Interfaces:
Serializable, PathPolicy

public class NonTopLevelPathPolicy
extends Object
implements PathPolicy

This class filters our the ROOT category, and it's direct descendants. For more information see PathPolicy.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
 int DEFAULT_MINIMAL_SUBPATH_LENGTH
          The shortest path length delivered is two components (root + one child).
 
Constructor Summary
NonTopLevelPathPolicy()
           
 
Method Summary
 boolean shouldAdd(CategoryPath categoryPath)
          Filters out (returns false) CategoryPaths equal or less than TaxonomyReader.ROOT_ORDINAL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MINIMAL_SUBPATH_LENGTH

public final int DEFAULT_MINIMAL_SUBPATH_LENGTH
The shortest path length delivered is two components (root + one child).

See Also:
Constant Field Values
Constructor Detail

NonTopLevelPathPolicy

public NonTopLevelPathPolicy()
Method Detail

shouldAdd

public boolean shouldAdd(CategoryPath categoryPath)
Filters out (returns false) CategoryPaths equal or less than TaxonomyReader.ROOT_ORDINAL. true otherwise.

Specified by:
shouldAdd in interface PathPolicy
Parameters:
categoryPath - A given category path which is to be tested for stream addition.
Returns:
true if the category path should be added. false otherwise.