use of com.tyndalehouse.step.core.data.entities.impl.EntityIndexWriterImpl in project step by STEPBible.
the class Loader method loadRobinsonMorphology.
/**
* loads all hotspots
*
* @return number of records loaded
*/
// pt20201119 This code was never used so Patrick Tang commented it out on November 19, 2020. Search for the "November 19, 2020" string to find all the related changes in the Java code.
// pt20201119 int loadHotSpots() {
// pt20201119 this.addUpdate("install_timeline_periods");
// pt20201119
// pt20201119 LOGGER.debug("Loading hotspots");
// pt20201119
// pt20201119 final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("hotspot");
// pt20201119 new StreamingCsvModuleLoader(writer,
// pt20201119 this.coreProperties.getProperty("test.data.path.timeline.hotspots")).init(this);
// pt20201119 return writer.close();
// pt20201119 }
/**
* Loads all of robinson's morphological data
*
* @return the number of entries
*/
int loadRobinsonMorphology() {
this.addUpdate("install_grammar");
LOGGER.debug("Loading robinson morphology");
final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("morphology");
new StreamingCsvModuleLoader(writer, this.coreProperties.getProperty("test.data.path.morphology.robinson")).init(this);
final int total = writer.close();
LOGGER.debug("End of morphology");
this.addUpdate("install_grammar_complete", total);
return total;
}
use of com.tyndalehouse.step.core.data.entities.impl.EntityIndexWriterImpl in project step by STEPBible.
the class Loader method loadSpecificForms.
/**
* loads all lexical forms for all words found in the Bible
*
* @return the number of forms loaded, ~200,000
*/
int loadSpecificForms() {
LOGGER.debug("Loading lexical forms");
this.addUpdate("install_original_word_forms");
final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("specificForm");
new SpecificFormsLoader(writer, this.coreProperties.getProperty("test.data.path.lexicon.forms")).init(this);
final int close = writer.close();
this.addUpdate("install_original_word_forms_complete", close);
return close;
}
use of com.tyndalehouse.step.core.data.entities.impl.EntityIndexWriterImpl in project step by STEPBible.
the class Loader method loadAlternativeTranslations.
/**
* loads the alternative translation data.
*
* @return the number of entries that have been loaded
*/
int loadAlternativeTranslations() {
LOGGER.debug("Indexing Alternative versions");
this.addUpdate("install_alternative_meanings");
final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("alternativeTranslations");
final HeadwordLineBasedLoader loader = new HeadwordLineBasedLoader(writer, this.coreProperties.getProperty("test.data.path.alternatives.translations"));
loader.init(this);
LOGGER.debug("Writing Alternative Versions index");
final int close = writer.close();
LOGGER.debug("Writing Alternative Versions index");
this.addUpdate("install_alternative_meanings_complete", close);
return close;
}
use of com.tyndalehouse.step.core.data.entities.impl.EntityIndexWriterImpl in project step by STEPBible.
the class TestUtils method createEntities.
/**
* writes entities to the index
*
* @param entityName the name of the entity
* @param fields the fields in the entity
*/
public static void createEntities(final String entityName, final String... fields) {
final TestEntityManager manager = new TestEntityManager();
final EntityIndexWriterImpl newWriter = manager.getNewWriter(entityName);
for (int ii = 0; ii < fields.length; ii = ii + 2) {
newWriter.addFieldToCurrentDocument(fields[ii], fields[ii + 1]);
}
newWriter.save();
newWriter.close();
manager.close();
}
use of com.tyndalehouse.step.core.data.entities.impl.EntityIndexWriterImpl in project step by STEPBible.
the class Loader method loadVersionInformation.
/**
* Loads Tyndale's version information
*
* @return the number of records loaded
*/
int loadVersionInformation() {
this.addUpdate("install_descriptions");
LOGGER.debug("Loading version information");
final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("versionInfo");
new StreamingCsvModuleLoader(writer, this.coreProperties.getProperty("test.data.path.versions.info")).init(this);
final int close = writer.close();
this.addUpdate("install_descriptions_complete", close);
return close;
}
Aggregations