protected void applyHistoryToWorksheet(Workspace workspace, Worksheet worksheet, KR2RMLMapping mapping) throws JSONException { WorksheetCommandHistoryExecutor wchr = new WorksheetCommandHistoryExecutor(worksheet.getId(), workspace); try { List<CommandTag> tags = new ArrayList<>(); tags.add(CommandTag.Selection); tags.add(CommandTag.Transformation); List<CommandTag> ignoreTags = new ArrayList<>(); ignoreTags.add(CommandTag.IgnoreInBatch); wchr.executeCommandsByTags(tags, ignoreTags, new JSONArray(mapping.getWorksheetHistoryString())); } catch (CommandException | KarmaException e) { logger.error("Unable to execute column transformations", e); } }