| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| StructuredIndexPartReader |
|
| 0.0;0 |
| 1 | // BSD License (http://www.galagosearch.org/license) | |
| 2 | ||
| 3 | package org.galagosearch.core.index; | |
| 4 | ||
| 5 | import java.io.IOException; | |
| 6 | import java.util.Map; | |
| 7 | import org.galagosearch.core.retrieval.query.Node; | |
| 8 | import org.galagosearch.core.retrieval.query.NodeType; | |
| 9 | import org.galagosearch.core.retrieval.structured.IndexIterator; | |
| 10 | ||
| 11 | /** | |
| 12 | * A StructuredIndexPart is an object that can create StructuredIterators that | |
| 13 | * can be used in query processing. StructuredIndex creates many StructuredIndexPartReaders | |
| 14 | * and uses them to supply iterators to StructuredRetrieval. | |
| 15 | * | |
| 16 | * Usually a StructuredIndexPartReader uses an IndexReader to retrieve data from disk, | |
| 17 | * then adds its own special logic to decode that data. | |
| 18 | * | |
| 19 | * @author trevor | |
| 20 | */ | |
| 21 | public interface StructuredIndexPartReader { | |
| 22 | /// Closes any underlying files used by this index part. | |
| 23 | public void close() throws IOException; | |
| 24 | /// Returns a list of node types that this index can provide. | |
| 25 | public Map<String, NodeType> getNodeTypes(); | |
| 26 | /// Returns an iterator over the whole index. | |
| 27 | public IndexIterator getIterator() throws IOException; | |
| 28 | /// Returns an iterator corresponding to a query node from a StructuredQuery. | |
| 29 | public IndexIterator getIterator(Node node) throws IOException; | |
| 30 | } |