|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--dragon.onlinedb.BasicCollectionReader
Basic collection reader (supporting class for indexing)
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Field Summary | |
protected java.io.BufferedReader |
br
|
protected java.lang.String |
collectionFile
|
protected java.lang.String |
indexFile
|
protected BasicArticleIndex |
indexList
|
protected ArticleParser |
parser
|
protected java.io.RandomAccessFile |
raf
|
| Constructor Summary | |
BasicCollectionReader()
|
|
BasicCollectionReader(java.lang.String collectionFile)
|
|
BasicCollectionReader(java.lang.String collectionFile,
java.lang.String indexFile)
|
|
BasicCollectionReader(java.lang.String collectionFile,
java.lang.String indexFile,
ArticleParser parser)
|
|
| Method Summary | |
void |
close()
Closes the collection reader and releases all occupied resources. |
Article |
getArticleByKey(java.lang.String key)
Reads out the article according to its key |
ArticleParser |
getArticleParser()
Gets the article parser of the collection reader |
Article |
getNextArticle()
Collection readers only support forward-only read mode. |
boolean |
loadCollection(java.lang.String collectionFile,
java.lang.String indexFile)
|
void |
restart()
The collection reader supports forward-only read mode. |
void |
setArticleParser(ArticleParser parser)
Sets the article parse for the collection reader |
boolean |
supportArticleKeyRetrieval()
if the query supports this retrieval mode, one can get articles by calling getArticleByKey method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ArticleParser parser
protected java.io.BufferedReader br
protected BasicArticleIndex indexList
protected java.io.RandomAccessFile raf
protected java.lang.String collectionFile
protected java.lang.String indexFile
| Constructor Detail |
public BasicCollectionReader()
public BasicCollectionReader(java.lang.String collectionFile)
public BasicCollectionReader(java.lang.String collectionFile,
java.lang.String indexFile)
public BasicCollectionReader(java.lang.String collectionFile,
java.lang.String indexFile,
ArticleParser parser)
| Method Detail |
public boolean loadCollection(java.lang.String collectionFile,
java.lang.String indexFile)
public ArticleParser getArticleParser()
CollectionReader
getArticleParser in interface CollectionReaderpublic void setArticleParser(ArticleParser parser)
CollectionReader
setArticleParser in interface CollectionReaderparser - the article parserpublic Article getArticleByKey(java.lang.String key)
CollectionReader
getArticleByKey in interface CollectionReaderkey - the unique entry number of the article
public Article getNextArticle()
CollectionReader
getNextArticle in interface CollectionReaderpublic void close()
CollectionReader
close in interface CollectionReaderpublic boolean supportArticleKeyRetrieval()
CollectionReader
supportArticleKeyRetrieval in interface CollectionReaderpublic void restart()
CollectionReader
restart in interface CollectionReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||