org.terrier.structures
Class FSADocumentIndex
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<V>
org.terrier.structures.collections.FSArrayFile<DocumentIndexEntry>
org.terrier.structures.FSADocumentIndex
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Iterable<DocumentIndexEntry>, java.util.Collection<DocumentIndexEntry>, java.util.List<DocumentIndexEntry>, DocumentIndex
- Direct Known Subclasses:
- FSAFieldDocumentIndex
public class FSADocumentIndex
- extends FSArrayFile<DocumentIndexEntry>
- implements DocumentIndex
Document Index saved as a fixed size array
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary |
|
FSADocumentIndex(Index index,
java.lang.String structureName)
Construct an instance of the class with |
protected |
FSADocumentIndex(Index index,
java.lang.String structureName,
boolean initialise)
|
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
Methods inherited from class java.util.AbstractCollection |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
logger
protected static final org.apache.log4j.Logger logger
lastDocid
protected int lastDocid
lastEntry
protected DocumentIndexEntry lastEntry
docLengths
protected int[] docLengths
FSADocumentIndex
public FSADocumentIndex(Index index,
java.lang.String structureName)
throws java.io.IOException
- Construct an instance of the class with
- Parameters:
index
- structureName
-
- Throws:
java.io.IOException
FSADocumentIndex
protected FSADocumentIndex(Index index,
java.lang.String structureName,
boolean initialise)
throws java.io.IOException
- Throws:
java.io.IOException
initialise
protected void initialise(Index index,
java.lang.String structureName)
throws java.io.IOException
- Throws:
java.io.IOException
getDocumentLength
public final int getDocumentLength(int docid)
throws java.io.IOException
- Get the length of the document
- Specified by:
getDocumentLength
in interface DocumentIndex
- Throws:
java.io.IOException
getDocumentEntry
public final DocumentIndexEntry getDocumentEntry(int docid)
throws java.io.IOException
- Get the document index entry based on its docid
- Specified by:
getDocumentEntry
in interface DocumentIndex
- Throws:
java.io.IOException
getNumberOfDocuments
public int getNumberOfDocuments()
- Get the number of documents
- Specified by:
getNumberOfDocuments
in interface DocumentIndex
Terrier 3.5. Copyright © 2004-2011 University of Glasgow