Class WiktionaryIndexMixin

java.lang.Object
org.getalp.dbnary.cli.mixins.WiktionaryIndexMixin
All Implemented Interfaces:
org.getalp.dbnary.api.WiktionaryPageSource

public class WiktionaryIndexMixin extends Object implements org.getalp.dbnary.api.WiktionaryPageSource
  • Field Details

    • wi

      protected org.getalp.wiktionary.WiktionaryIndex wi
    • dump

      protected Path dump
    • dumpFile

      protected File dumpFile
    • language

      protected String language
    • fillMissingPages

      protected boolean fillMissingPages
  • Constructor Details

    • WiktionaryIndexMixin

      public WiktionaryIndexMixin()
  • Method Details

    • setDumpFile

      protected void setDumpFile(Path dump)
    • setLanguage

      public void setLanguage(String language)
      Lets the owning command supply the language edition of the dump, needed to reach the corresponding wiktionary API when --fill-missing-pages is set. Must be called (if at all) before the first page lookup.
    • getDumpFile

      public File getDumpFile()
    • getTextOfPageWithRedirects

      public String getTextOfPageWithRedirects(String key)
      Specified by:
      getTextOfPageWithRedirects in interface org.getalp.dbnary.api.WiktionaryPageSource
    • getTextOfPage

      public String getTextOfPage(String key)
      Specified by:
      getTextOfPage in interface org.getalp.dbnary.api.WiktionaryPageSource
    • getFullXmlForPage

      public String getFullXmlForPage(String key)
      Specified by:
      getFullXmlForPage in interface org.getalp.dbnary.api.WiktionaryPageSource
    • close

      public void close()