de.tudarmstadt.ukp.jwktl.parser.util
Class ParsingContext

java.lang.Object
  extended by de.tudarmstadt.ukp.jwktl.parser.util.ParsingContext

public class ParsingContext
extends Object

Data object for information on the IWiktionaryEntryParser. This entry parser creates and maintains an instance of this type to share information on the dump file with all its registed IBlockHandlers.

Author:
Christian M. Meyer

Field Summary
protected  EntryFactory entryFactory
           
protected  IWikiString etymology
           
protected  String header
           
protected  ILanguage language
           
protected  WiktionaryPage page
           
protected  PartOfSpeech partOfSpeech
           
protected  List<IPronunciation> pronunciations
           
 
Constructor Summary
ParsingContext(WiktionaryPage page)
          Create a new parsing context for the given Wiktionary page.
ParsingContext(WiktionaryPage page, EntryFactory entryFactory)
          Create a new parsing context for the given Wiktionary page and use the specified entry factory to construct lexical entries.
 
Method Summary
 WiktionaryEntry findEntry()
          Returns the WiktionaryEntry that is currently being parsed.
 IWikiString getEtymology()
          Returns the etymology of the current IWiktionaryEntry.
 String getHeader()
          Returns the header of the currentIWiktionaryEntry.
 ILanguage getLanguage()
          Returns the ILanguage of the current IWiktionaryEntry.
 WiktionaryPage getPage()
          Returns the current WiktionaryPage that is being parsed.
 PartOfSpeech getPartOfSpeech()
          Returns the PartOfSpeech of the current IWiktionaryEntry.
 List<IPronunciation> getPronunciations()
          Returns the pronunciations of the current IWiktionaryEntry.
 void setEtymology(IWikiString etymology)
          Save the specified etymology in the context object.
 void setHeader(String header)
          Save the specified header in the context object.
 void setLanguage(ILanguage language)
          Save the specified language in the context object.
 void setPartOfSpeech(PartOfSpeech partOfSpeech)
          Save the specified part of speech in the context object.
 void setPronunciations(List<IPronunciation> pronunciations)
          Save the specified pronunciations in the context object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

page

protected WiktionaryPage page

entryFactory

protected EntryFactory entryFactory

language

protected ILanguage language

partOfSpeech

protected PartOfSpeech partOfSpeech

header

protected String header

etymology

protected IWikiString etymology

pronunciations

protected List<IPronunciation> pronunciations
Constructor Detail

ParsingContext

public ParsingContext(WiktionaryPage page)
Create a new parsing context for the given Wiktionary page.


ParsingContext

public ParsingContext(WiktionaryPage page,
                      EntryFactory entryFactory)
Create a new parsing context for the given Wiktionary page and use the specified entry factory to construct lexical entries.

Method Detail

getPage

public WiktionaryPage getPage()
Returns the current WiktionaryPage that is being parsed.


findEntry

public WiktionaryEntry findEntry()
Returns the WiktionaryEntry that is currently being parsed.


getLanguage

public ILanguage getLanguage()
Returns the ILanguage of the current IWiktionaryEntry.


setLanguage

public void setLanguage(ILanguage language)
Save the specified language in the context object. If the language changes, the header, part of speech tag, etymology, and pronunciations are reset to null.


getHeader

public String getHeader()
Returns the header of the currentIWiktionaryEntry. The header usually corresponds to the lemma of the dictionary article.


setHeader

public void setHeader(String header)
Save the specified header in the context object.


getPartOfSpeech

public PartOfSpeech getPartOfSpeech()
Returns the PartOfSpeech of the current IWiktionaryEntry.


setPartOfSpeech

public void setPartOfSpeech(PartOfSpeech partOfSpeech)
Save the specified part of speech in the context object.


getEtymology

public IWikiString getEtymology()
Returns the etymology of the current IWiktionaryEntry.


setEtymology

public void setEtymology(IWikiString etymology)
Save the specified etymology in the context object.


getPronunciations

public List<IPronunciation> getPronunciations()
Returns the pronunciations of the current IWiktionaryEntry.


setPronunciations

public void setPronunciations(List<IPronunciation> pronunciations)
Save the specified pronunciations in the context object.



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