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

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

public class DefaultOrdinalPolicy
extends Object
implements OrdinalPolicy

This class filters our the ROOT category ID. For more information see OrdinalPolicy.

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

Constructor Summary
DefaultOrdinalPolicy()
           
 
Method Summary
 void init(TaxonomyWriter taxonomyWriter)
          Implemented as NO-OP as the default is not taxonomy dependent
 boolean shouldAdd(int ordinal)
          Filters out (returns false) ordinals 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
 

Constructor Detail

DefaultOrdinalPolicy

public DefaultOrdinalPolicy()
Method Detail

shouldAdd

public boolean shouldAdd(int ordinal)
Filters out (returns false) ordinals equal or less than TaxonomyReader.ROOT_ORDINAL. true otherwise.

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

init

public void init(TaxonomyWriter taxonomyWriter)
Implemented as NO-OP as the default is not taxonomy dependent

Specified by:
init in interface OrdinalPolicy
Parameters:
taxonomyWriter - A relevant taxonomyWriter object, with which ordinals sent to OrdinalPolicy.shouldAdd(int) are examined.


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.