edu.isi.karma.modeling.alignment.Alignment.setGraph()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中edu.isi.karma.modeling.alignment.Alignment.setGraph()方法的一些代码示例,展示了Alignment.setGraph()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Alignment.setGraph()方法的具体详情如下:
包路径:edu.isi.karma.modeling.alignment.Alignment
类名称:Alignment
方法名:setGraph

Alignment.setGraph介绍

暂无

代码示例

代码示例来源:origin: usc-isi-i2/Web-Karma

@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);
}

代码示例来源:origin: usc-isi-i2/Web-Karma

@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);
}

代码示例来源:origin: usc-isi-i2/Web-Karma

@Override
public UpdateContainer undoIt(Workspace workspace) {
  // Revert to the old alignment
  AlignmentManager.Instance()
      .addAlignmentToMap(alignmentId, oldAlignment);
  oldAlignment.setGraph(oldGraph);
  return this.computeAlignmentAndSemanticTypesAndCreateUpdates(workspace);
}

代码示例来源:origin: usc-isi-i2/Web-Karma

@Override
public UpdateContainer undoIt(Workspace workspace) {
  // Revert to the old alignment
  AlignmentManager.Instance()
      .addAlignmentToMap(alignmentId, oldAlignment);
  oldAlignment.setGraph(oldGraph);
  return this.computeAlignmentAndSemanticTypesAndCreateUpdates(workspace);
}

代码示例来源:origin: usc-isi-i2/Web-Karma

@Override
public UpdateContainer undoIt(Workspace workspace) {
  // Revert to the old alignment
  AlignmentManager.Instance()
      .addAlignmentToMap(alignmentId, oldAlignment);
  oldAlignment.setGraph(oldGraph);
  return this.computeAlignmentAndSemanticTypesAndCreateUpdates(workspace);
}

代码示例来源:origin: usc-isi-i2/Web-Karma

@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);
}

代码示例来源:origin: usc-isi-i2/Web-Karma

@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);
}

代码示例来源:origin: usc-isi-i2/Web-Karma

@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;
}

代码示例来源:origin: usc-isi-i2/Web-Karma

@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;
}

代码示例来源:origin: usc-isi-i2/Web-Karma

@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;
}

代码示例来源:origin: usc-isi-i2/Web-Karma

alignment.setGraph(initialGraph);
if(!this.isExecutedInBatch())
  alignment.align();

代码示例来源:origin: usc-isi-i2/Web-Karma

alignment.setGraph(initialGraph);
if(!this.isExecutedInBatch())
  alignment.align();

代码示例来源:origin: usc-isi-i2/Web-Karma

alignment.setGraph(initialGraph);
if(!this.isExecutedInBatch())
  alignment.align();

相关文章