JSONArray history = CommandHistory.getHistorySaver(workspace.getId()).loadHistory(historyFile);
JSONArray history = CommandHistory.getHistorySaver(workspace.getId()).loadHistory(historyFile);
public JSONArray readCommandsByTag(List<CommandTag> tag) { JSONArray filteredHistoryJson = new JSONArray(); try { String filename = CommandHistory.getHistorySaver(workspace.getId()).getHistoryFilepath(worksheetId); JSONArray historyJson = CommandHistory.getHistorySaver(workspace.getId()).loadHistory(filename); filteredHistoryJson = HistoryJsonUtil.filterCommandsByTag(tag, historyJson); } catch (JSONException e) { logger.error("Error occured while working with JSON!", e); } catch(Exception e) { logger.error("Error reading from history file!", e); } return filteredHistoryJson; }
JSONArray history = CommandHistory.getHistorySaver(workspace.getId()).loadHistory(historyFile);
JSONArray history = CommandHistory.getHistorySaver(workspace.getId()).loadHistory(historyFile);
private void addWorksheetHistory(JSONArray history) { if(history != null) { r2rmlMapping.setWorksheetHistory(history); } else { String filename = CommandHistory.getHistorySaver(workspace.getId()).getHistoryFilepath(worksheet.getId()); if(!HistoryJsonUtil.historyExists(workspace.getId(), worksheet.getId())) { logger.error("Worksheet history file not found! Can't write worksheet history " + "into R2RML model. Path:" + filename); return; } try { JSONArray historyArr = CommandHistory.getHistorySaver(workspace.getId()).loadHistory(filename); r2rmlMapping.setWorksheetHistory(historyArr); } catch(Exception e) { logger.error("Unable to read worksheet history from file: " + filename); } } }