Skip to content
Snippets Groups Projects
Commit e75740ee authored by tpylak's avatar tpylak
Browse files

SE-155 YeastX mzXML: minor: allow conversion field to be empty

SVN: 13016
parent b438f5ee
No related branches found
No related tags found
No related merge requests found
......@@ -229,23 +229,18 @@ class DatasetMappingResolver
return false;
}
boolean conversionRequired = isConversionRequired(mapping);
if (conversion == MLConversionType.NONE && conversionRequired)
{
log.datasetMappingError(mapping, "conversion column cannot be empty "
+ "for this type of file.");
return false;
}
if (conversion != MLConversionType.NONE && conversionRequired == false)
boolean conversionAllowed = isConversionAllowed(mapping);
if (conversion != MLConversionType.NONE && conversionAllowed == false)
{
log.datasetMappingError(mapping, "conversion column must be empty "
+ "for this type of file.");
return false;
}
return true;
}
private static boolean isConversionRequired(final DataSetMappingInformation dataset)
private static boolean isConversionAllowed(final DataSetMappingInformation dataset)
{
String extension = FilenameUtils.getExtension(dataset.getFileName());
boolean conversionRequired = extension.equalsIgnoreCase(ConstantsYeastX.MZXML_EXT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment