|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy
public class NonTopLevelOrdinalPolicy
Filter out any "top level" category ordinals.
shouldAdd(int)
.
Constructor Summary | |
---|---|
NonTopLevelOrdinalPolicy()
Constructs a new non-top-level-ordinal-filter. |
Method Summary | |
---|---|
void |
init(TaxonomyWriter taxonomyWriter)
Initialize the policy with a TaxonomyWriter. |
boolean |
shouldAdd(int ordinal)
Filters out ordinal which are ROOT or who's parent is ROOT. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NonTopLevelOrdinalPolicy()
Method Detail |
---|
public void init(TaxonomyWriter taxonomyWriter)
OrdinalPolicy
init
in interface OrdinalPolicy
taxonomyWriter
- A relevant taxonomyWriter object, with which ordinals sent to
shouldAdd(int)
are examined.public boolean shouldAdd(int ordinal)
TaxonomyWriter.getParent(int)
.
shouldAdd
in interface OrdinalPolicy
ordinal
- A given category ordinal which is to be tested for stream
addition.
true
if the category should be added.
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |