use of org.molgenis.data.meta.model.Package.PACKAGE_SEPARATOR in project molgenis by molgenis.
the class EmxImportServiceIT method createUpdateData.
private static Object[] createUpdateData(String fileName, String updateFileName, List<String> packageTokens, Map<String, Integer> entityCountMap, Set<String> entityTypeNames, Runnable entityValidationMethod) {
File addFile = getFile("/xls/" + fileName);
File updateFile = getFile("/xls/" + updateFileName);
String packageName = String.join(PACKAGE_SEPARATOR, packageTokens);
Map<String, Object> entityTypeCountMap = entityCountMap.entrySet().stream().collect(Collectors.toMap(entry -> packageName + PACKAGE_SEPARATOR + entry.getKey(), Map.Entry::getValue));
Set<String> entityTypeFullyQualifiedNames = entityTypeNames.stream().map(entityName -> packageName + PACKAGE_SEPARATOR + entityName).collect(toSet());
return new Object[] { addFile, updateFile, entityTypeCountMap, entityTypeFullyQualifiedNames, entityValidationMethod };
}
use of org.molgenis.data.meta.model.Package.PACKAGE_SEPARATOR in project molgenis by molgenis.
the class EmxImportServiceIT method createAddData.
private static Object[] createAddData(String fileName, List<String> packageTokens, Map<String, Integer> entityCountMap, Set<String> entityTypeNames, Runnable entityValidationMethod) {
File file = getFile("/xls/" + fileName);
String packageName = String.join(PACKAGE_SEPARATOR, packageTokens);
Map<String, Object> entityTypeCountMap = entityCountMap.entrySet().stream().collect(Collectors.toMap(entry -> packageName + PACKAGE_SEPARATOR + entry.getKey(), Map.Entry::getValue));
Set<String> entityTypeFullyQualifiedNames = entityTypeNames.stream().map(entityName -> packageName + PACKAGE_SEPARATOR + entityName).collect(toSet());
return new Object[] { file, entityTypeCountMap, entityTypeFullyQualifiedNames, entityValidationMethod };
}
Aggregations