de.tudarmstadt.ukp.jwktl.parser.util
Interface IBlockHandler

All Known Implementing Classes:
BlockHandler, CategoryHandler, DEBlockHandler, DECollocationsHandler, DEEntryLinkHandler, DEEtymologyHandler, DEPartOfSpeechHandler, DEPronunciationHandler, DEReferenceHandler, DERelationHandler, DESenseDefinitionHandler, DESenseExampleHandler, DESenseIndexedBlockHandler, DETranslationHandler, DEWordFormHandler, DEWordLanguageHandler, ENBlockHandler, ENEtymologyHandler, ENPronunciationHandler, ENQuotationHandler, ENReferenceHandler, ENRelationHandler, ENSenseHandler, ENSenseIndexedBlockHandler, ENTranslationHandler, ENWordLanguageHandler, InterwikiLinkHandler

public interface IBlockHandler

A handler encapsulated the extraction of the information items encoded in a certain article constituent. There might be, for example, a handler for extracting pronunciation information.

Author:
Christian M. Meyer, Lizhen Qu

Method Summary
 boolean canHandle(String blockHeader)
          Return true if the handler requests to process the article constituent starting at the given line of text.
 void fillContent(ParsingContext context)
          This hotspot is invoked if the parser releases this handler.
 boolean processBody(String line, ParsingContext context)
          If the handler requested to process the body of this constituent, this hotspot will be called for processing each line of the constituent's body.
 boolean processHead(String line, ParsingContext context)
          If the handler requested to process this constituent, this hotspot will be called for processing the section header of this article constituent.
 

Method Detail

canHandle

boolean canHandle(String blockHeader)
Return true if the handler requests to process the article constituent starting at the given line of text.


processHead

boolean processHead(String line,
                    ParsingContext context)
If the handler requested to process this constituent, this hotspot will be called for processing the section header of this article constituent. Return true if the handler requests to handle also the body of this constituent.


processBody

boolean processBody(String line,
                    ParsingContext context)
If the handler requested to process the body of this constituent, this hotspot will be called for processing each line of the constituent's body. Return true if the handler requests to handle also the next line using this handler.


fillContent

void fillContent(ParsingContext context)
This hotspot is invoked if the parser releases this handler. It can be used to store the extracted information to the Wiktionary data objects stored in the parsing context.



Copyright © 2011-2013 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.