public static interface DirectoryTaxonomyWriter.OrdinalMap
addToTaxonomies() merges one or more taxonomies into the given taxonomy (this). An OrdinalMap is filled for each of the added taxonomies, containing the new ordinal (in the merged taxonomy) of each of the categories in the old taxonomy.
There exist two implementations of OrdinalMap: MemoryOrdinalMap and DiskOrdinalMap. As their names suggest, the former keeps the map in memory and the latter in a temporary disk file. Because these maps will later be needed one by one (to remap the counting lists), not all at the same time, it is recommended to put the first taxonomy's map in memory, and all the rest on disk (later to be automatically read into memory one by one, when needed).
Modifier and Type | Method and Description |
---|---|
void |
addDone()
Call addDone() to say that all addMapping() have been done.
|
void |
addMapping(int origOrdinal,
int newOrdinal) |
int[] |
getMap()
Return the map from the taxonomy's original (consecutive) ordinals
to the new taxonomy's ordinals.
|
void |
setSize(int size)
Set the size of the map.
|
void setSize(int size) throws IOException
IOException
void addMapping(int origOrdinal, int newOrdinal) throws IOException
IOException
void addDone() throws IOException
IOException
int[] getMap() throws IOException
IOException