@Override public UpdateContainer undoIt(Workspace workspace) { // Revert to the old alignment AlignmentManager.Instance() .addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); // Get the alignment update return WorksheetUpdateFactory.createSemanticTypesAndSVGAlignmentUpdates(worksheetId, workspace); }
@Override public UpdateContainer undoIt(Workspace workspace) { // Revert to the old alignment AlignmentManager.Instance() .addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); // Get the alignment update return WorksheetUpdateFactory.createSemanticTypesAndSVGAlignmentUpdates(worksheetId, workspace); }
@Override public UpdateContainer undoIt(Workspace workspace) { // Revert to the old alignment AlignmentManager.Instance() .addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); return this.computeAlignmentAndSemanticTypesAndCreateUpdates(workspace); }
@Override public UpdateContainer undoIt(Workspace workspace) { // Revert to the old alignment AlignmentManager.Instance() .addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); return this.computeAlignmentAndSemanticTypesAndCreateUpdates(workspace); }
@Override public UpdateContainer undoIt(Workspace workspace) { // Revert to the old alignment AlignmentManager.Instance() .addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); return this.computeAlignmentAndSemanticTypesAndCreateUpdates(workspace); }
@Override public UpdateContainer undoIt(Workspace workspace) { // Revert to the old alignment AlignmentManager.Instance() .addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); // Get the alignment update return WorksheetUpdateFactory.createSemanticTypesAndSVGAlignmentUpdates(worksheetId, workspace); }
@Override public UpdateContainer undoIt(Workspace workspace) { Worksheet worksheet = workspace.getWorksheet(worksheetId); // Revert to the old alignment AlignmentManager.Instance().addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); // Get the alignment update return getAlignmentUpdateContainer(worksheet, workspace); }
@Override public UpdateContainer undoIt(Workspace workspace) { Worksheet worksheet = workspace.getWorksheet(worksheetId); // Add the old SemanticType object if it is not null SemanticTypes types = worksheet.getSemanticTypes(); if (oldSemanticTypes != null) { types.setType(oldSemanticTypes); } // Update the container UpdateContainer c = new UpdateContainer(); // Update with old alignment String alignmentId = AlignmentManager.Instance().constructAlignmentId(workspace.getId(), worksheetId); AlignmentManager.Instance().addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); try { c.add(new SemanticTypesUpdate(worksheet, worksheetId)); c.add(new AlignmentSVGVisualizationUpdate(worksheetId)); } catch (Exception e) { logger.error("Error occured during undo of unassigning the semantic type!", e); return new UpdateContainer(new ErrorUpdate("Error occured during undo of unassigning the semantic type!")); } return c; }
@Override public UpdateContainer undoIt(Workspace workspace) { UpdateContainer c = new UpdateContainer(); Worksheet worksheet = workspace.getWorksheet(worksheetId); if (oldType == null) { worksheet.getSemanticTypes().unassignColumnSemanticType(hNodeId); } else { worksheet.getSemanticTypes().setType(oldType); worksheet.getSemanticTypes().addSynonymTypesForHNodeId(hNodeId, oldSynonymTypes); } // Replace the current alignment with the old alignment String alignmentId = AlignmentManager.Instance().constructAlignmentId(workspace.getId(), worksheetId); AlignmentManager.Instance().addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); // Get the alignment update if any try { c.append(computeAlignmentAndSemanticTypesAndCreateUpdates(workspace)); } catch (Exception e) { logger.error("Error occured while unsetting the semantic type!", e); return new UpdateContainer(new ErrorUpdate( "Error occured while unsetting the semantic type!")); } return c; }
@Override public UpdateContainer undoIt(Workspace workspace) { UpdateContainer c = new UpdateContainer(); Worksheet worksheet = workspace.getWorksheet(worksheetId); if (oldType == null) { worksheet.getSemanticTypes().unassignColumnSemanticType(hNodeId); } else { worksheet.getSemanticTypes().setType(oldType); worksheet.getSemanticTypes().addSynonymTypesForHNodeId( hNodeId, oldSynonymTypes); } // Replace the current alignment with the old alignment String alignmentId = AlignmentManager.Instance().constructAlignmentId( workspace.getId(), worksheetId); AlignmentManager.Instance() .addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); // Get the alignment update if any try { c.append(computeAlignmentAndSemanticTypesAndCreateUpdates(workspace)); } catch (Exception e) { logger.error("Error occured while unsetting the semantic type!", e); return new UpdateContainer(new ErrorUpdate( "Error occured while unsetting the semantic type!")); } return c; }
alignment.setGraph(initialGraph); if(!this.isExecutedInBatch()) alignment.align();
alignment.setGraph(initialGraph); if(!this.isExecutedInBatch()) alignment.align();
alignment.setGraph(initialGraph); if(!this.isExecutedInBatch()) alignment.align();