|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cloud9.collection.trec.TrecForwardIndex
public class TrecForwardIndex
A document forward index for TREC collections.
| Constructor Summary | |
|---|---|
TrecForwardIndex()
|
|
| Method Summary | |
|---|---|
String |
getCollectionPath()
Returns the base path of the collection. |
String |
getDocid(int docno)
Returns the docid, given the docno. |
int |
getDocno(String docid)
Returns the docno, given the docid. |
TrecDocument |
getDocument(int docno)
Fetches the document for a given docno. |
TrecDocument |
getDocument(String docid)
Fetches the document for a given docid. |
int |
getFirstDocno()
Returns the first docno in the collection. |
int |
getLastDocno()
Returns the last docno in the collection. |
void |
loadIndex(Path index,
Path mapping,
FileSystem fs)
Loads the index. |
static void |
main(String[] args)
Simple program the provides access to the document contents. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TrecForwardIndex()
| Method Detail |
|---|
public int getDocno(String docid)
DocumentForwardIndex
getDocno in interface DocumentForwardIndex<TrecDocument>public String getDocid(int docno)
DocumentForwardIndex
getDocid in interface DocumentForwardIndex<TrecDocument>public int getLastDocno()
DocumentForwardIndex
getLastDocno in interface DocumentForwardIndex<TrecDocument>public int getFirstDocno()
DocumentForwardIndex
getFirstDocno in interface DocumentForwardIndex<TrecDocument>public String getCollectionPath()
DocumentForwardIndex
getCollectionPath in interface DocumentForwardIndex<TrecDocument>public TrecDocument getDocument(String docid)
DocumentForwardIndex
getDocument in interface DocumentForwardIndex<TrecDocument>public TrecDocument getDocument(int docno)
DocumentForwardIndex
getDocument in interface DocumentForwardIndex<TrecDocument>
public void loadIndex(Path index,
Path mapping,
FileSystem fs)
throws IOException
DocumentForwardIndex
loadIndex in interface DocumentForwardIndex<TrecDocument>index - path of the index datamapping - path of the docno/docid mapping datafs - reference to the FileSystem
IOException
public static void main(String[] args)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||