Index for texts, attribute values and full-texts. @author BaseX Team, BSD License @author Christian Gruen
| 10 | * @author Christian Gruen |
| 11 | */ |
| 12 | public abstract class ValueIndex implements Index { |
| 13 | /** Index type. */ |
| 14 | protected final IndexType type; |
| 15 | /** Data instance. */ |
| 16 | protected final Data data; |
| 17 | |
| 18 | /** |
| 19 | * Constructor, initializing the index structure. |
| 20 | * @param data data reference |
| 21 | * @param type index type |
| 22 | */ |
| 23 | protected ValueIndex(final Data data, final IndexType type) { |
| 24 | this.data = data; |
| 25 | this.type = type; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Returns the number of index entries. |
| 30 | * @return number of index entries |
| 31 | */ |
| 32 | public abstract int size(); |
| 33 | |
| 34 | /** |
| 35 | * Deletes entries from the index. |
| 36 | * @param values value cache with [key, id-list] pairs |
| 37 | */ |
| 38 | public abstract void delete(ValueCache values); |
| 39 | |
| 40 | /** |
| 41 | * Add entries to the index. |
| 42 | * @param values value cache with [key, id-list] pairs |
| 43 | */ |
| 44 | public abstract void add(ValueCache values); |
| 45 | |
| 46 | /** |
| 47 | * Flushes the buffered data. |
| 48 | */ |
| 49 | public abstract void flush(); |
| 50 | } |
nothing calls this directly
no outgoing calls
no test coverage detected