@Test public void testLexiconDefinitions() { getLoader("test.data.path.lexicon.definitions.greek", "lexicon_sample.txt").loadLexiconDefinitions(); assertLoaded(1, "definition", "strongNumber", "G0002"); assertLoaded(1, "definition", "strongNumber", "H0006"); assertEquals("H0175, G1223, G0939,", getEntities(1, "definition", "strongNumber", "G0002")[0].get("relatedNumbers")); }
int loadLexiconDefinitions() { this.addUpdate("install_hebrew_definitions"); LOGGER.debug("Indexing lexicon"); final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("definition"); LOGGER.debug("-Indexing greek"); this.addUpdate("install_greek_definitions"); HeadwordLineBasedLoader lexiconLoader = new HeadwordLineBasedLoader(writer, this.coreProperties.getProperty("test.data.path.lexicon.definitions.greek")); lexiconLoader.init(this); LOGGER.debug("-Indexing hebrew"); this.addUpdate("install_hebrew_definitions"); final String hebrewLexicon = this.coreProperties .getProperty("test.data.path.lexicon.definitions.hebrew"); if (hebrewLexicon != null) { lexiconLoader = new HeadwordLineBasedLoader(writer, hebrewLexicon); } lexiconLoader.init(this); this.addUpdate("install_optimizing_definitions"); LOGGER.debug("-Writing index"); final int close = writer.close(); LOGGER.debug("End lexicon"); this.addUpdate("install_definitions_finished", close); return close; }
Loader { int loadLexiconDefinitions() { this.addUpdate("install_hebrew_definitions"); LOGGER.debug("Indexing lexicon"); final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("definition"); LOGGER.debug("-Indexing greek"); this.addUpdate("install_greek_definitions"); HeadwordLineBasedLoader lexiconLoader = new HeadwordLineBasedLoader(writer, this.coreProperties.getProperty("test.data.path.lexicon.definitions.greek")); lexiconLoader.init(this); LOGGER.debug("-Indexing hebrew"); this.addUpdate("install_hebrew_definitions"); final String hebrewLexicon = this.coreProperties .getProperty("test.data.path.lexicon.definitions.hebrew"); if (hebrewLexicon != null) { lexiconLoader = new HeadwordLineBasedLoader(writer, hebrewLexicon); } lexiconLoader.init(this); this.addUpdate("install_optimizing_definitions"); LOGGER.debug("-Writing index"); final int close = writer.close(); LOGGER.debug("End lexicon"); this.addUpdate("install_definitions_finished", close); return close; } }
Loader { int loadLexiconDefinitions() { this.addUpdate("install_hebrew_definitions"); LOGGER.debug("Indexing lexicon"); final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("definition"); LOGGER.debug("-Indexing greek"); this.addUpdate("install_greek_definitions"); HeadwordLineBasedLoader lexiconLoader = new HeadwordLineBasedLoader(writer, this.coreProperties.getProperty("test.data.path.lexicon.definitions.greek")); lexiconLoader.init(this); LOGGER.debug("-Indexing hebrew"); this.addUpdate("install_hebrew_definitions"); final String hebrewLexicon = this.coreProperties .getProperty("test.data.path.lexicon.definitions.hebrew"); if (hebrewLexicon != null) { lexiconLoader = new HeadwordLineBasedLoader(writer, hebrewLexicon); } lexiconLoader.init(this); this.addUpdate("install_optimizing_definitions"); LOGGER.debug("-Writing index"); final int close = writer.close(); LOGGER.debug("End lexicon"); this.addUpdate("install_definitions_finished", close); return close; } @Inject  Loader(final JSwordPassageService jsword, final JSwordModuleService jswordModule,
                  @Named("StepCoreProperties") final Properties coreProperties, final EntityManager entityManager,
                  final Provider<ClientSession> clientSessionProvider,
                  AppManagerService appManager
    ); }
Loader { int loadLexiconDefinitions() { this.addUpdate("install_hebrew_definitions"); LOGGER.debug("Indexing lexicon"); final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("definition"); LOGGER.debug("-Indexing greek"); this.addUpdate("install_greek_definitions"); HeadwordLineBasedLoader lexiconLoader = new HeadwordLineBasedLoader(writer, this.coreProperties.getProperty("test.data.path.lexicon.definitions.greek")); lexiconLoader.init(this); LOGGER.debug("-Indexing hebrew"); this.addUpdate("install_hebrew_definitions"); final String hebrewLexicon = this.coreProperties .getProperty("test.data.path.lexicon.definitions.hebrew"); if (hebrewLexicon != null) { lexiconLoader = new HeadwordLineBasedLoader(writer, hebrewLexicon); } lexiconLoader.init(this); this.addUpdate("install_optimizing_definitions"); LOGGER.debug("-Writing index"); final int close = writer.close(); LOGGER.debug("End lexicon"); this.addUpdate("install_definitions_finished", close); return close; } @Inject  Loader(final JSwordPassageService jsword, final JSwordModuleService jswordModule,
                  @Named("StepCoreProperties") final Properties coreProperties, final EntityManager entityManager,
                  final Provider<ClientSession> clientSessionProvider,
                  AppManagerService appManager
    ); void init(); List<String> readOnceProgress(); int getTotalProgress(); boolean isComplete(); }
Loader { int loadLexiconDefinitions() { this.addUpdate("install_hebrew_definitions"); LOGGER.debug("Indexing lexicon"); final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("definition"); LOGGER.debug("-Indexing greek"); this.addUpdate("install_greek_definitions"); HeadwordLineBasedLoader lexiconLoader = new HeadwordLineBasedLoader(writer, this.coreProperties.getProperty("test.data.path.lexicon.definitions.greek")); lexiconLoader.init(this); LOGGER.debug("-Indexing hebrew"); this.addUpdate("install_hebrew_definitions"); final String hebrewLexicon = this.coreProperties .getProperty("test.data.path.lexicon.definitions.hebrew"); if (hebrewLexicon != null) { lexiconLoader = new HeadwordLineBasedLoader(writer, hebrewLexicon); } lexiconLoader.init(this); this.addUpdate("install_optimizing_definitions"); LOGGER.debug("-Writing index"); final int close = writer.close(); LOGGER.debug("End lexicon"); this.addUpdate("install_definitions_finished", close); return close; } @Inject  Loader(final JSwordPassageService jsword, final JSwordModuleService jswordModule,
                  @Named("StepCoreProperties") final Properties coreProperties, final EntityManager entityManager,
                  final Provider<ClientSession> clientSessionProvider,
                  AppManagerService appManager
    ); void init(); List<String> readOnceProgress(); int getTotalProgress(); boolean isComplete();  }