PageType - The type of page to create, usually
WiktionaryPage.public abstract class WiktionaryPageParser<PageType extends WiktionaryPage> extends Object implements IWiktionaryPageParser
IWiktionaryPageParser interface. The class manages the dump info
and the current namespace, as well as the creation of a
WiktionaryPage.| Modifier and Type | Field and Description |
|---|---|
protected String |
currentNamespace |
protected IDumpInfo |
dumpInfo |
protected PageType |
page |
| Constructor and Description |
|---|
WiktionaryPageParser() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract PageType |
createPage() |
void |
onClose(IDumpInfo dumpInfo)
Hotspot that is invoked after the parser has finished its work.
|
void |
onPageEnd()
Hotspot that is invoked upon finishing the current article page.
|
void |
onPageStart()
Hotspot that is invoked upon starting a new article page.
|
void |
onParserEnd(IDumpInfo dumpInfo)
Hotspot that is invoked when the parser is about to end.
|
void |
onParserStart(IDumpInfo dumpInfo)
Hotspot that is invoked upon starting the parser.
|
void |
onSiteInfoComplete(IDumpInfo dumpInfo)
Hotspot that is invoked after the siteinfo header has been read.
|
void |
setAuthor(String author)
Hotspot that is invoked after the current page's author is read.
|
void |
setPageId(long pageId)
Hotspot that is invoked after the current page's id is read.
|
void |
setRevision(long revisionId)
Hotspot that is invoked after the current page's revision id is read.
|
abstract void |
setText(String text)
Hotspot that is invoked after the current page's text is read.
|
void |
setTimestamp(Date timestamp)
Hotspot that is invoked after the current page's timestamp is read.
|
void |
setTitle(String title,
String namespace)
Hotspot that is invoked after the current page's title is read.
|
protected PageType extends WiktionaryPage page
protected IDumpInfo dumpInfo
protected String currentNamespace
public void onParserStart(IDumpInfo dumpInfo)
IWiktionaryPageParseronParserStart in interface IWiktionaryPageParserpublic void onSiteInfoComplete(IDumpInfo dumpInfo)
IWiktionaryPageParseronSiteInfoComplete in interface IWiktionaryPageParserpublic void onParserEnd(IDumpInfo dumpInfo)
IWiktionaryPageParserIWiktionaryPageParser.onClose(IDumpInfo) hotspot.onParserEnd in interface IWiktionaryPageParserpublic void onClose(IDumpInfo dumpInfo)
IWiktionaryPageParserIWiktionaryPageParser.onParserEnd(IDumpInfo) calls have been handled.onClose in interface IWiktionaryPageParserpublic void onPageStart()
IWiktionaryPageParseronPageStart in interface IWiktionaryPageParserpublic void onPageEnd()
IWiktionaryPageParseronPageEnd in interface IWiktionaryPageParserprotected abstract PageType createPage()
public void setPageId(long pageId)
IWiktionaryPageParsersetPageId in interface IWiktionaryPageParserpublic void setTitle(String title, String namespace)
IWiktionaryPageParsersetTitle in interface IWiktionaryPageParserpublic void setAuthor(String author)
IWiktionaryPageParsersetAuthor in interface IWiktionaryPageParserpublic void setRevision(long revisionId)
IWiktionaryPageParsersetRevision in interface IWiktionaryPageParserpublic void setTimestamp(Date timestamp)
IWiktionaryPageParsersetTimestamp in interface IWiktionaryPageParserpublic abstract void setText(String text)
IWiktionaryPageParsersetText in interface IWiktionaryPageParserCopyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.