Search in sources :

Example 1 with CSVFileOptions

use of org.openforis.collect.io.parsing.CSVFileOptions in project collect by openforis.

the class SpeciesImportProcessIntegrationTest method importCSVFile.

public SpeciesImportProcess importCSVFile(String fileName) throws Exception {
    File file = getTestFile(fileName);
    CollectTaxonomy taxonomy = new CollectTaxonomy();
    taxonomy.setSurvey(survey);
    taxonomy.setName(TEST_TAXONOMY_NAME);
    speciesManager.save(taxonomy);
    SpeciesImportProcess process = new SpeciesImportProcess(surveyManager, speciesManager, survey, taxonomy.getId(), file, new CSVFileOptions(), true);
    process.call();
    return process;
}
Also used : SpeciesImportProcess(org.openforis.collect.manager.speciesimport.SpeciesImportProcess) CollectTaxonomy(org.openforis.collect.model.CollectTaxonomy) File(java.io.File) CSVFileOptions(org.openforis.collect.io.parsing.CSVFileOptions)

Aggregations

File (java.io.File)1 CSVFileOptions (org.openforis.collect.io.parsing.CSVFileOptions)1 SpeciesImportProcess (org.openforis.collect.manager.speciesimport.SpeciesImportProcess)1 CollectTaxonomy (org.openforis.collect.model.CollectTaxonomy)1