|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
public abstract class LabelToOrdinal
Abstract class for storing Label->Ordinal mappings in a taxonomy.
Field Summary | |
---|---|
protected int |
counter
|
static int |
InvalidOrdinal
|
Constructor Summary | |
---|---|
LabelToOrdinal()
|
Method Summary | |
---|---|
abstract void |
addLabel(CategoryPath label,
int ordinal)
Adds a new label if its not yet in the table. |
abstract void |
addLabel(CategoryPath label,
int prefixLen,
int ordinal)
Adds a new label if its not yet in the table. |
int |
getMaxOrdinal()
return the maximal Ordinal assigned so far |
int |
getNextOrdinal()
Returns the next unassigned ordinal. |
abstract int |
getOrdinal(CategoryPath label)
|
abstract int |
getOrdinal(CategoryPath label,
int prefixLen)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int counter
public static final int InvalidOrdinal
Constructor Detail |
---|
public LabelToOrdinal()
Method Detail |
---|
public int getMaxOrdinal()
public int getNextOrdinal()
public abstract void addLabel(CategoryPath label, int ordinal)
IllegalArgumentException
if the same label with
a different ordinal was previoulsy added to this table.
public abstract void addLabel(CategoryPath label, int prefixLen, int ordinal)
IllegalArgumentException
if the same label with
a different ordinal was previoulsy added to this table.
public abstract int getOrdinal(CategoryPath label)
InvalidOrdinal
if the label cannot be found in this table.public abstract int getOrdinal(CategoryPath label, int prefixLen)
InvalidOrdinal
if the label cannot be found in this table.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |