public abstract class AbstractQuery extends Object implements ArticleQuery
Abstract class for querying articles from a data source
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
AbstractQuery(int pageWidth) |
| Modifier and Type | Method and Description |
|---|---|
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) |
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(String collectionPath,
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
|
int |
size()
The size of the collection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitQuery, moveToPage, setSearchTermgetArticleByKey, supportArticleKeyRetrievalprotected int curPageNo
protected int curArticleNo
protected int pageNum
protected int articleNum
protected int pageWidth
protected int curPageWidth
protected Article curArticle
protected ArticleParser parser
protected abstract Article getArticle(int articleNo)
public int getCurPageNo()
getCurPageNo in interface ArticleQuerypublic boolean moveToNextPage()
ArticleQuerymoveToNextPage in interface ArticleQuerypublic int getTotalArticleNum()
public int getPageNum()
getPageNum in interface ArticleQuerypublic int getPageWidth()
getPageWidth in interface ArticleQuerypublic int getCurPageWidth()
getCurPageWidth in interface ArticleQuerypublic boolean moveToNextArticle()
ArticleQuerymoveToNextArticle in interface ArticleQuerypublic boolean moveToArticle(int paperNo)
ArticleQuerymoveToArticle in interface ArticleQuerypaperNo - the position of the article in the current page.public Article getArticle()
ArticleQuerygetArticle in interface ArticleQuerypublic String getArticleKey()
ArticleQuerygetArticleKey in interface ArticleQuerypublic ArticleParser getArticleParser()
CollectionReadergetArticleParser in interface CollectionReaderpublic void setArticleParser(ArticleParser parser)
CollectionReadersetArticleParser in interface CollectionReaderparser - the article parserpublic Article getNextArticle()
CollectionReadergetNextArticle in interface CollectionReaderpublic void close()
CollectionReaderclose in interface CollectionReaderpublic void restart()
CollectionReaderrestart in interface CollectionReaderpublic int size()
CollectionReadersize in interface CollectionReaderCopyright © 2018 JULIE Lab, Germany. All rights reserved.