|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--dragon.onlinedb.AbstractQuery
Abstract class for querying articles from a data source
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Field Summary | |
protected int |
articleNum
|
protected Article |
curArticle
|
protected int |
curArticleNo
|
protected int |
curPageNo
|
protected int |
curPageWidth
|
protected int |
pageNum
|
protected int |
pageWidth
|
protected ArticleParser |
parser
|
| Constructor Summary | |
AbstractQuery(int pageWidth)
|
|
| Method Summary | |
void |
close()
Closes the collection reader and releases all occupied resources. |
Article |
getArticle()
read out the article the current pointer points to. |
protected abstract Article |
getArticle(int articleNo)
|
java.lang.String |
getArticleKey()
In some cases, retrieval of an article is very expensive. |
ArticleParser |
getArticleParser()
Gets the article parser of the collection reader |
int |
getCurPageNo()
|
int |
getCurPageWidth()
|
Article |
getNextArticle()
Collection readers only support forward-only read mode. |
int |
getPageNum()
|
int |
getPageWidth()
|
int |
getTotalArticleNum()
|
boolean |
loadCollection(java.lang.String collectionPath,
java.lang.String collectionName)
|
boolean |
moveToArticle(int paperNo)
Move the pointer to the give position of the current page. |
boolean |
moveToNextArticle()
The pointer will be set on the next article. |
boolean |
moveToNextPage()
Move to the next page and the pointer is set on the first article of the page. |
void |
restart()
The collection reader supports forward-only read mode. |
void |
setArticleParser(ArticleParser parser)
Sets the article parse for the collection reader |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface dragon.onlinedb.ArticleQuery |
initQuery, moveToPage, setSearchTerm |
| Methods inherited from interface dragon.onlinedb.CollectionReader |
getArticleByKey, supportArticleKeyRetrieval |
| Field Detail |
protected int curPageNo
protected int curArticleNo
protected int pageNum
protected int articleNum
protected int pageWidth
protected int curPageWidth
protected Article curArticle
protected ArticleParser parser
| Constructor Detail |
public AbstractQuery(int pageWidth)
| Method Detail |
protected abstract Article getArticle(int articleNo)
public int getCurPageNo()
getCurPageNo in interface ArticleQuerypublic boolean moveToNextPage()
ArticleQuery
moveToNextPage in interface ArticleQuerypublic int getTotalArticleNum()
getTotalArticleNum in interface ArticleQuerypublic int getPageNum()
getPageNum in interface ArticleQuerypublic int getPageWidth()
getPageWidth in interface ArticleQuerypublic int getCurPageWidth()
getCurPageWidth in interface ArticleQuerypublic boolean moveToNextArticle()
ArticleQuery
moveToNextArticle in interface ArticleQuerypublic boolean moveToArticle(int paperNo)
ArticleQuery
moveToArticle in interface ArticleQuerypaperNo - the position of the article in the current page.
public Article getArticle()
ArticleQuery
getArticle in interface ArticleQuerypublic java.lang.String getArticleKey()
ArticleQuery
getArticleKey in interface ArticleQuery
public boolean loadCollection(java.lang.String collectionPath,
java.lang.String collectionName)
public ArticleParser getArticleParser()
CollectionReader
getArticleParser in interface CollectionReaderpublic void setArticleParser(ArticleParser parser)
CollectionReader
setArticleParser in interface CollectionReaderparser - the article parserpublic Article getNextArticle()
CollectionReader
getNextArticle in interface CollectionReaderpublic void close()
CollectionReader
close 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 | |||||||||