Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
c38b112
[autocommit] bumping build number
rob-ouser-bi Aug 3, 2022
806ccd7
Merge pull request #201 from Breeding-Insight/feature/BI-1198-2
HMS17 Aug 8, 2022
0da2077
[autocommit] bumping build number
rob-ouser-bi Aug 8, 2022
04156d0
Update version.properties
timparsons Aug 22, 2022
e205dd7
[autocommit] bumping build number
rob-ouser-bi Aug 22, 2022
80246f8
[BI-1555] - Converted ProgramCache to use Redis instead of Guava cache.
timparsons Aug 5, 2022
5762506
[BI-1555] - Additional changes for cache to work properly
timparsons Aug 5, 2022
3800527
[BI-1555] - removing embedded micronaut dependencies
timparsons Aug 18, 2022
8a5de9b
[BI-1555] - Converting Redis library to Redisson.
timparsons Aug 18, 2022
f000245
[BI-1555] - Configuring redis container for integration tests
timparsons Aug 18, 2022
4331f42
[BI-1555] - Updating ProgramCacheUnitTest
timparsons Aug 18, 2022
6176d84
[BI-1555] - Stopping redis container on integration tests
timparsons Aug 18, 2022
4c34b71
[BI-1555] - Adding docker network config to tests
timparsons Aug 19, 2022
b1c7b7f
[BI-1555] - adding robustness to the caching processor queue
timparsons Sep 7, 2022
74f7880
[BI-1555] - removing redundant injected constructor from ProgramService
timparsons Sep 7, 2022
8afd892
[BI-1555] - Refactoring TraitDAO and ProgramDAO to follow the interfa…
timparsons Sep 7, 2022
99281b6
[BI-1555] - Fixing unit tests
timparsons Sep 7, 2022
fb96326
[BI-1555] Cleanup
timparsons Sep 7, 2022
34f0b08
[BI-1555] - Fixing unit tests
timparsons Sep 8, 2022
2a61f14
[BI-1555] - bumping heap size for unit tests
timparsons Sep 8, 2022
3693c4a
[BI-1555] - bumping surefire plugin version
timparsons Sep 8, 2022
bb5883d
Update pom.xml
timparsons Sep 8, 2022
0113e01
[BI-1555] - removing unnecessary surefire dependencies
timparsons Sep 8, 2022
cf95ad1
[BI-1555] - Refactoring how containers are created and managed
timparsons Sep 8, 2022
f726923
[BI-1555] - fixing compilation error
timparsons Sep 8, 2022
ac6437e
[BI-1555] - Fixing failed tests
timparsons Sep 8, 2022
c3a0051
Added migration to include fileFieldName for ObsUnitID
nickpalladino Sep 12, 2022
1ab4ddd
Removed unused acting user variable
nickpalladino Sep 13, 2022
dce8e9d
Added parsed data to import mapping
nickpalladino Sep 13, 2022
76fe609
Added utility method for getting dynamic file column data
nickpalladino Sep 13, 2022
fcc6967
Updated processor interface to include raw file data
nickpalladino Sep 13, 2022
4e282a6
[BI-1555] - Updating cache post method to put values in the cache to …
timparsons Sep 15, 2022
d818f8f
[autocommit] bumping build number
rob-ouser-bi Aug 3, 2022
2fe0043
Merge pull request #201 from Breeding-Insight/feature/BI-1198-2
HMS17 Aug 8, 2022
09295d0
[autocommit] bumping build number
rob-ouser-bi Aug 8, 2022
7c07794
Update version.properties
timparsons Aug 22, 2022
5368247
[autocommit] bumping build number
rob-ouser-bi Aug 22, 2022
a6f5a75
[autocommit] bumping build number
rob-ouser-bi Sep 15, 2022
8ae5ef3
[BI-1555] - fixing unit test failure
timparsons Sep 19, 2022
fb1cb43
demo code
nickpalladino Sep 23, 2022
e78ec15
Fixed check for duplicate columns
nickpalladino Sep 26, 2022
9290dd6
[BI-1555] - removing commented out code
timparsons Sep 27, 2022
4633f39
Merge pull request #206 from Breeding-Insight/feature/BI-1555
timparsons Sep 27, 2022
f1aaa22
[autocommit] bumping build number
rob-ouser-bi Sep 27, 2022
ef9db1e
Merge branch 'future/1.0' of https://github.com/Breeding-Insight/bi-a…
nickpalladino Sep 28, 2022
d9a3c18
Merge branch 'future/1.0' into feature/BI-1183
nickpalladino Sep 28, 2022
e0b01d6
[BI-1555] - Converted ProgramCache to use Redis instead of Guava cache.
timparsons Aug 5, 2022
95011a1
[BI-1555] - Additional changes for cache to work properly
timparsons Aug 5, 2022
c253f4c
[BI-1555] - removing embedded micronaut dependencies
timparsons Aug 18, 2022
c5c8435
[BI-1555] - Converting Redis library to Redisson.
timparsons Aug 18, 2022
c28ec81
[BI-1555] - Configuring redis container for integration tests
timparsons Aug 18, 2022
a24ba6b
[BI-1555] - Updating ProgramCacheUnitTest
timparsons Aug 18, 2022
1c3c9d7
[BI-1555] - Stopping redis container on integration tests
timparsons Aug 18, 2022
f0d7fd5
[BI-1555] - Adding docker network config to tests
timparsons Aug 19, 2022
52eb59b
[BI-1555] - adding robustness to the caching processor queue
timparsons Sep 7, 2022
d8e5b2b
[BI-1555] - removing redundant injected constructor from ProgramService
timparsons Sep 7, 2022
74ad811
[BI-1555] - Refactoring TraitDAO and ProgramDAO to follow the interfa…
timparsons Sep 7, 2022
b9e31b2
[BI-1555] - Fixing unit tests
timparsons Sep 7, 2022
b6dd975
[BI-1555] Cleanup
timparsons Sep 7, 2022
a239ade
[BI-1555] - Fixing unit tests
timparsons Sep 8, 2022
5531e7d
[BI-1555] - bumping heap size for unit tests
timparsons Sep 8, 2022
7dd891f
[BI-1555] - bumping surefire plugin version
timparsons Sep 8, 2022
e788c50
Update pom.xml
timparsons Sep 8, 2022
b3ddbd0
[BI-1555] - removing unnecessary surefire dependencies
timparsons Sep 8, 2022
916821d
[BI-1555] - Refactoring how containers are created and managed
timparsons Sep 8, 2022
f216fb1
[BI-1555] - fixing compilation error
timparsons Sep 8, 2022
dae55ca
[BI-1555] - Fixing failed tests
timparsons Sep 8, 2022
5999fa3
[BI-1555] - Updating cache post method to put values in the cache to …
timparsons Sep 15, 2022
1b929e1
[BI-1555] - fixing unit test failure
timparsons Sep 19, 2022
1280d18
[BI-1555] - removing commented out code
timparsons Sep 27, 2022
4dcc83c
[autocommit] bumping build number
rob-ouser-bi Aug 3, 2022
75f53a2
Merge pull request #201 from Breeding-Insight/feature/BI-1198-2
HMS17 Aug 8, 2022
ca1c630
[autocommit] bumping build number
rob-ouser-bi Aug 8, 2022
e5189a2
Update version.properties
timparsons Aug 22, 2022
a54e29e
[autocommit] bumping build number
rob-ouser-bi Aug 22, 2022
3041363
[autocommit] bumping build number
rob-ouser-bi Sep 15, 2022
16d6a92
Merge pull request #206 from Breeding-Insight/feature/BI-1555
timparsons Sep 27, 2022
211c7d2
[autocommit] bumping build number
rob-ouser-bi Sep 27, 2022
00aaca2
Switched to using ontology service for variable lookup
nickpalladino Sep 29, 2022
d60da41
[autocommit] bumping build number
rob-ouser-bi Sep 29, 2022
11e7b2d
Updates for request scope brapi client provider
nickpalladino Sep 30, 2022
d3aac2f
Merge branch 'future/1.0' of https://github.com/Breeding-Insight/bi-a…
nickpalladino Sep 30, 2022
aacb4ab
Merge branch 'future/1.0' into feature/BI-1183
nickpalladino Sep 30, 2022
4d0cfe9
Fixed migration version conflict
nickpalladino Sep 30, 2022
dbea925
Fix failing test
nickpalladino Oct 4, 2022
7cbca14
Updated Table data parameter names to be consistent
nickpalladino Oct 6, 2022
dda592b
Added constant for experiment template
nickpalladino Oct 7, 2022
55bc2ba
Changed search method names and reused search method
nickpalladino Oct 7, 2022
1d5cb81
Merge branch 'future/1.0' into feature/BI-1183
nickpalladino Oct 11, 2022
41d4d78
Renamed for version conflict
nickpalladino Oct 11, 2022
a790c69
Fix program cache issues
nickpalladino Oct 13, 2022
7b27a45
Fix for empty numeric values
nickpalladino Oct 14, 2022
1639863
Merge branch 'develop' into feature/BI-1183
nickpalladino Oct 14, 2022
45f38f1
[BI-1183] - Only validating imported observations if there is data in…
timparsons Oct 15, 2022
25b4279
Code review logging change
nickpalladino Oct 20, 2022
825d7ca
Updated date format error message for clarity
nickpalladino Oct 20, 2022
e809b8a
Updated valid numeric range to account for missing min or max
nickpalladino Oct 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public HttpResponse<Response<DataResponse<ImportMapping>>> getSystemMappings(@Nu
if (StringUtils.isBlank(importName)){
result = fileImportService.getAllSystemMappings(actingUser);
} else {
result = fileImportService.getSystemMappingByName(actingUser, importName);
result = fileImportService.getSystemMappingByName(importName);
}

List<Status> metadataStatus = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public List<ImportMapping> getAllProgramMappings(UUID programId, Boolean draft)

List<ImportMapping> mappings = new ArrayList<>();
for (Record record: records) {
mappings.add(ImportMapping.parseSQLRecord(record));
mappings.add(parseBrAPIImportMapping(ImportMapping.parseSQLRecord(record)));
}
return mappings;
}
Expand All @@ -87,7 +87,7 @@ public List<ImportMapping> getProgramMappingsByName(UUID programId, String name)

List<ImportMapping> mappings = new ArrayList<>();
for (Record record: records) {
mappings.add(ImportMapping.parseSQLRecord(record));
mappings.add(parseBrAPIImportMapping(ImportMapping.parseSQLRecord(record)));
}
return mappings;
}
Expand All @@ -102,7 +102,7 @@ public List<ImportMapping> getAllSystemMappings() {

List<ImportMapping> mappings = new ArrayList<>();
for (Record record: records) {
mappings.add(ImportMapping.parseSQLRecord(record));
mappings.add(parseBrAPIImportMapping(ImportMapping.parseSQLRecord(record)));
}
return mappings;
}
Expand All @@ -119,7 +119,7 @@ public List<ImportMapping> getSystemMappingByName(String name) {

List<ImportMapping> mappings = new ArrayList<>();
for (Record record: records) {
mappings.add(ImportMapping.parseSQLRecord(record));
mappings.add(parseBrAPIImportMapping(ImportMapping.parseSQLRecord(record)));
}
return mappings;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public ImportPreviewResponse process(List<BrAPIImport> brAPIImports, Table data,

ImportPreviewResponse response = null;
List<Processor> processors = List.of(experimentProcessorProvider.get());
response = processorManagerProvider.get().process(brAPIImports, processors, program, upload, user, commit);
response = processorManagerProvider.get().process(brAPIImports, processors, data, program, upload, user, commit);
return response;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public ImportPreviewResponse process(List<BrAPIImport> brAPIImports, Table data,

ImportPreviewResponse response = null;
List<Processor> processors = List.of(germplasmProcessorProvider.get());
response = processorManagerProvider.get().process(brAPIImports, processors, program, upload, user, commit);
response = processorManagerProvider.get().process(brAPIImports, processors, data, program, upload, user, commit);
return response;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public List<ImportConfigResponse> getAllImportTypeConfigs() {
Saves the file for the mapping record
*/
public ImportMapping createMapping(UUID programId, AuthenticatedUser actingUser, CompletedFileUpload file) throws
DoesNotExistException, AuthorizationException, UnsupportedTypeException {
DoesNotExistException, AuthorizationException, UnsupportedTypeException, HttpStatusException {

Program program = validateRequest(programId, actingUser);

Expand Down Expand Up @@ -530,7 +530,7 @@ public List<ImportMapping> getAllSystemMappings(AuthenticatedUser actingUser) {
return importMappings;
}

public List<ImportMapping> getSystemMappingByName(AuthenticatedUser actingUser, String name) {
public List<ImportMapping> getSystemMappingByName(String name) {
List<ImportMapping> importMappings = importMappingDAO.getSystemMappingByName(name);
return importMappings;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,38 @@

package org.breedinginsight.brapps.importer.services;

import io.micronaut.http.server.exceptions.InternalServerException;
import org.apache.commons.lang3.tuple.MutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.breedinginsight.brapi.v2.dao.BrAPIGermplasmDAO;
import org.breedinginsight.brapps.importer.daos.*;
import org.breedinginsight.brapps.importer.model.config.MappedImportRelation;
import org.breedinginsight.brapps.importer.model.mapping.ImportMapping;
import org.breedinginsight.brapps.importer.model.mapping.MappingField;
import org.jooq.DSLContext;
import tech.tablesaw.api.Row;
import tech.tablesaw.api.Table;
import tech.tablesaw.columns.Column;

import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@Singleton
public class FileMappingUtil {

public static final String EXPERIMENT_TEMPLATE_NAME = "ExperimentsTemplateMap";
private FileImportService fileImportService;

@Inject
public FileMappingUtil(FileImportService fileImportService) {
this.fileImportService = fileImportService;
}

// Returns a list of integers to identify the target row of the relationship. -1 if no relationship was found
public List<Pair<Integer, String>> findFileRelationships(Table data, List<MappedImportRelation> importRelations) {

Expand Down Expand Up @@ -63,4 +80,27 @@ public List<Pair<Integer, String>> findFileRelationships(Table data, List<Mapped

return targetIndexList;
}
public List<Column<?>> getDynamicColumns(Table data, String templateName) {
List<ImportMapping> result = fileImportService.getSystemMappingByName(templateName);

if (result.isEmpty()) {
throw new InternalServerException("System mapping does not exist");
}

ImportMapping mapping = result.get(0);
List<MappingField> config = mapping.getMappingConfig();
List<String> columnNames = new ArrayList<>();

for (MappingField field : config) {
if (field.getValue() != null) {
columnNames.add(field.getValue().getFileFieldName());
}
}

List<String> differences = data.columnNames().stream()
.filter(col -> !columnNames.contains(col))
.collect(Collectors.toList());

return data.columns(differences.toArray(String[]::new));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,33 @@
import org.breedinginsight.brapps.importer.model.response.ImportPreviewStatistics;
import org.breedinginsight.brapps.importer.model.response.PendingImportObject;
import org.breedinginsight.brapps.importer.services.ExternalReferenceSource;
import org.breedinginsight.brapps.importer.services.FileMappingUtil;
import org.breedinginsight.dao.db.tables.pojos.TraitEntity;
import org.breedinginsight.model.Program;
import org.breedinginsight.model.Scale;
import org.breedinginsight.model.Trait;
import org.breedinginsight.model.User;
import org.breedinginsight.services.OntologyService;
import org.breedinginsight.services.exceptions.DoesNotExistException;
import org.breedinginsight.services.exceptions.MissingRequiredInfoException;
import org.breedinginsight.services.exceptions.ValidatorException;
import org.breedinginsight.utilities.Utilities;
import org.jooq.DSLContext;
import tech.tablesaw.api.Table;
import tech.tablesaw.columns.Column;

import javax.inject.Inject;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.*;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;

import static org.breedinginsight.brapps.importer.services.FileMappingUtil.EXPERIMENT_TEMPLATE_NAME;

@Slf4j
@Prototype
public class ExperimentProcessor implements Processor {
Expand All @@ -70,14 +84,15 @@ public class ExperimentProcessor implements Processor {
@Property(name = "brapi.server.reference-source")
private String BRAPI_REFERENCE_SOURCE;


private final DSLContext dsl;
private final BrAPITrialDAO brapiTrialDAO;
private final BrAPILocationDAO brAPILocationDAO;
private final BrAPIStudyDAO brAPIStudyDAO;
private final BrAPIObservationUnitDAO brAPIObservationUnitDAO;
private final BrAPISeasonDAO brAPISeasonDAO;
private final BrAPIGermplasmDAO brAPIGermplasmDAO;
private DSLContext dsl;
private BrAPITrialDAO brapiTrialDAO;
private BrAPILocationDAO brAPILocationDAO;
private BrAPIStudyDAO brAPIStudyDAO;
private BrAPIObservationUnitDAO brAPIObservationUnitDAO;
private BrAPISeasonDAO brAPISeasonDAO;
private BrAPIGermplasmDAO brAPIGermplasmDAO;
private OntologyService ontologyService;
private FileMappingUtil fileMappingUtil;

// used to make the yearsToSeasonDbId() function more efficient
private final Map<String, String > yearToSeasonDbIdCache = new HashMap<>();
Expand All @@ -102,14 +117,18 @@ public ExperimentProcessor(DSLContext dsl,
BrAPIStudyDAO brAPIStudyDAO,
BrAPIObservationUnitDAO brAPIObservationUnitDAO,
BrAPISeasonDAO brAPISeasonDAO,
BrAPIGermplasmDAO brAPIGermplasmDAO) {
BrAPIGermplasmDAO brAPIGermplasmDAO,
OntologyService ontologyService,
FileMappingUtil fileMappingUtil) {
this.dsl = dsl;
this.brapiTrialDAO = brapiTrialDAO;
this.brAPILocationDAO = brAPILocationDAO;
this.brAPIStudyDAO = brAPIStudyDAO;
this.brAPIObservationUnitDAO = brAPIObservationUnitDAO;
this.brAPISeasonDAO = brAPISeasonDAO;
this.brAPIGermplasmDAO = brAPIGermplasmDAO;
this.ontologyService = ontologyService;
this.fileMappingUtil = fileMappingUtil;
}

/**
Expand Down Expand Up @@ -146,12 +165,54 @@ public void getExistingBrapiData(List<BrAPIImport> importRows, Program program)
public Map<String, ImportPreviewStatistics> process(
List<BrAPIImport> importRows,
Map<Integer, PendingImport> mappedBrAPIImport,
Table data,
Program program,
User user,
boolean commit) throws ValidatorException, MissingRequiredInfoException {

ValidationErrors validationErrors = new ValidationErrors();

// Get dynamic phenotype columns for processing
List<Column<?>> phenotypeCols = fileMappingUtil.getDynamicColumns(data, EXPERIMENT_TEMPLATE_NAME);
List<String> varNames = phenotypeCols.stream().map(Column::name).collect(Collectors.toList());

// Lookup all traits in system for program, maybe eventually add a variable search in ontology service
List<Trait> traits = null;
try {
traits = ontologyService.getTraitsByProgramId(program.getId(), true);
} catch (DoesNotExistException e) {
log.error(e.getMessage(), e);
throw new InternalServerException(e.toString(), e);
}

// filter out just traits specified in file
List<Trait> filteredTraits = traits.stream()
.filter(e -> varNames.contains(e.getObservationVariableName()))
.collect(Collectors.toList());

// check that all specified ontology terms were found
if (filteredTraits.size() != varNames.size()) {
List<String> returnedVarNames = filteredTraits.stream().map(TraitEntity::getObservationVariableName)
.collect(Collectors.toList());
List<String> differences = varNames.stream()
.filter(var -> !returnedVarNames.contains(var))
.collect(Collectors.toList());
throw new HttpStatusException(HttpStatus.UNPROCESSABLE_ENTITY,
"Ontology term(s) not found: " + String.join(", ", differences));
}

// Perform ontology validations on each observation value in phenotype column
Map<String, Trait> colVarMap = filteredTraits.stream()
.collect(Collectors.toMap(Trait::getObservationVariableName, Function.identity()));

for (Column<?> column : phenotypeCols) {
for (int i=0; i < column.size(); i++) {
String value = column.getString(i);
String colName = column.name();
validateObservationValue(colVarMap.get(colName), value, colName, validationErrors, i);
}
}

// add "New" pending data to the BrapiData objects
getNewBrapiData(importRows, program, commit);

Expand Down Expand Up @@ -708,6 +769,74 @@ private String simpleStudyName(String scopedName){
return scopedName.replaceFirst(" \\[.*\\]", "");
}

private void validateObservationValue(Trait variable, String value,
String columnHeader, ValidationErrors validationErrors, int row) {
if(StringUtils.isBlank(value)) {
log.debug(String.format("skipping validation of observation because there is no value.\n\tvariable: %s\n\trow: %d", variable.getObservationVariableName(), row));
return;
}

switch(variable.getScale().getDataType()) {
case NUMERICAL:
Optional<BigDecimal> number = validNumericValue(value);
if (number.isEmpty()) {
addRowError(columnHeader, "Non-numeric text detected detected", validationErrors, row);
}
else if (!validNumericRange(number.get(), variable.getScale())) {
addRowError(columnHeader, "Value outside of min/max range detected", validationErrors, row);
}
break;
case DATE:
if (!validDateValue(value)) {
addRowError(columnHeader, "Incorrect date format detected. Expected YYYY-MM-DD", validationErrors, row);
}
break;
case ORDINAL:
if (!validCategory(variable.getScale().getCategories(), value)) {
addRowError(columnHeader, "Undefined ordinal category detected", validationErrors, row);
}
break;
case NOMINAL:
if (!validCategory(variable.getScale().getCategories(), value)) {
addRowError(columnHeader, "Undefined nominal category detected", validationErrors, row);
}
break;
default:
break;
}

}
private Optional<BigDecimal> validNumericValue(String value) {
BigDecimal number;
try {
number = new BigDecimal(value);
} catch (NumberFormatException e) {
return Optional.empty();
}
return Optional.of(number);
}

private boolean validNumericRange(BigDecimal value, Scale validValues) {
// account for empty min or max in valid determination
return (validValues.getValidValueMin() == null || value.compareTo(BigDecimal.valueOf(validValues.getValidValueMin())) >= 0) &&
(validValues.getValidValueMax() == null || value.compareTo(BigDecimal.valueOf(validValues.getValidValueMax())) <= 0);
}

private boolean validDateValue(String value) {
DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE;
try {
formatter.parse(value);
} catch (DateTimeParseException e) {
return false;
}
return true;
}

private boolean validCategory(List<BrAPIScaleValidValuesCategories> categories, String value) {
Set<String> categoryValues = categories.stream().map(category -> category.getValue().toLowerCase()).collect(Collectors.toSet());
return categoryValues.contains(value.toLowerCase());
}

/**
* Converts year String to SeasonDbId
* <br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.breedinginsight.model.User;
import org.breedinginsight.services.exceptions.ValidatorException;
import org.jooq.DSLContext;
import tech.tablesaw.api.Table;

import javax.inject.Inject;
import java.math.BigInteger;
Expand Down Expand Up @@ -205,7 +206,8 @@ public void getExistingBrapiData(List<BrAPIImport> importRows, Program program)

@Override
public Map<String, ImportPreviewStatistics> process(List<BrAPIImport> importRows,
Map<Integer, PendingImport> mappedBrAPIImport, Program program, User user, boolean commit) throws ValidatorException {
Map<Integer, PendingImport> mappedBrAPIImport, Table data,
Program program, User user, boolean commit) throws ValidatorException {

// Method for generating accession number
String germplasmSequenceName = program.getGermplasmSequence();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.breedinginsight.model.Program;
import org.breedinginsight.model.User;
import org.breedinginsight.services.exceptions.ValidatorException;
import tech.tablesaw.api.Table;

import javax.inject.Inject;
import java.util.ArrayList;
Expand Down Expand Up @@ -74,7 +75,8 @@ public void getExistingBrapiData(List<BrAPIImport> importRows, Program program)

@Override
public Map<String, ImportPreviewStatistics> process(List<BrAPIImport> importRows,
Map<Integer, PendingImport> mappedBrAPIImport, Program program, User user, boolean commit) throws ValidatorException {
Map<Integer, PendingImport> mappedBrAPIImport, Table data,
Program program, User user, boolean commit) throws ValidatorException {

for (int i = 0; i < importRows.size(); i++) {
BrAPIImport brapiImport = importRows.get(i);
Expand Down
Loading