de.tudarmstadt.ukp.jwktl.parser
Interface IWritableWiktionaryEdition

All Superinterfaces:
IWiktionary, IWiktionaryEdition
All Known Implementing Classes:
WritableBerkeleyDBWiktionaryEdition

public interface IWritableWiktionaryEdition
extends IWiktionaryEdition

Generic interface for writable Wiktionary language editions used by the parsers to store the extracted entries and information types. Implementations of this class may provide a database or file system connection to persistently store the extracted information.

Author:
Christian M. Meyer

Method Summary
 void commit()
          Force a database commit of the pages saved so far.
 WiktionaryPage getPageForId(long id)
          Returns the page with the given unique id.
 WiktionaryPage getPageForWord(String word)
          Returns the page with the given title.
 void savePage(WiktionaryPage page)
          Adds the given page to the Wiktionary edition (e.g., storing it in a database).
 void saveProperties(IDumpInfo dumpInfo)
          Hotspot called after parsing has finished to save the metadata of the dump file and the basic parsing statistics.
 void setEntryIndexByTitle(boolean entryIndexByTitle)
          Sorts the entries by word form before assigning an ID to them.
 void setLanguage(ILanguage language)
          Assigns the given language to the Wiktionary edition.
 
Methods inherited from interface de.tudarmstadt.ukp.jwktl.api.IWiktionaryEdition
getDBPath, getEntryForId, getEntryForId, getEntryForWord, getLanguage, getSenseForId, getSenseForId, getSenseForKey, getSensesForWord, getSensesForWord
 
Methods inherited from interface de.tudarmstadt.ukp.jwktl.api.IWiktionary
close, getAllEntries, getAllEntries, getAllEntries, getAllEntries, getAllEntries, getAllEntries, getAllPages, getAllPages, getAllPages, getAllPages, getAllPages, getAllPages, getAllSenses, getAllSenses, getAllSenses, getAllSenses, getAllSenses, getAllSenses, getEntriesForWord, getEntriesForWord, getEntriesForWord, getEntriesForWord, getPagesForWord, getPagesForWord, getSensesForWord, getSensesForWord, getSensesForWord, getSensesForWord, isClosed
 

Method Detail

getPageForId

WiktionaryPage getPageForId(long id)
Description copied from interface: IWiktionaryEdition
Returns the page with the given unique id.

Specified by:
getPageForId in interface IWiktionaryEdition

getPageForWord

WiktionaryPage getPageForWord(String word)
Description copied from interface: IWiktionaryEdition
Returns the page with the given title. The method only returns the page if its title matches exactly. Use IWiktionary.getPagesForWord(String, boolean) for case insensitive and string-normalized matching.

Specified by:
getPageForWord in interface IWiktionaryEdition

saveProperties

void saveProperties(IDumpInfo dumpInfo)
                    throws WiktionaryException
Hotspot called after parsing has finished to save the metadata of the dump file and the basic parsing statistics.

Throws:
WiktionaryException

savePage

void savePage(WiktionaryPage page)
Adds the given page to the Wiktionary edition (e.g., storing it in a database).


commit

void commit()
Force a database commit of the pages saved so far.


setLanguage

void setLanguage(ILanguage language)
Assigns the given language to the Wiktionary edition.


setEntryIndexByTitle

void setEntryIndexByTitle(boolean entryIndexByTitle)
Sorts the entries by word form before assigning an ID to them. THIS METHOD IS KEPT FOR COMPATIBILITY. YOU SHOULD NOT USE THIS METHOD.



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