edu.isi.karma.rep.Worksheet.getSuperSelectionManager()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(123)

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

Worksheet.getSuperSelectionManager介绍

暂无

代码示例

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

public SuperSelection getSuperSelection(Worksheet worksheet) {
  if (selectionId == null || selectionId.trim().isEmpty())
    return SuperSelectionManager.DEFAULT_SELECTION;
  return worksheet.getSuperSelectionManager().getSuperSelection(selectionId);
}

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

public SuperSelection getSuperSelection(Workspace workspace) {
  if (selectionId == null || selectionId.trim().isEmpty())
    return SuperSelectionManager.DEFAULT_SELECTION;
  return workspace.getWorksheet(worksheetId).getSuperSelectionManager().getSuperSelection(selectionId);
}

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

@Override
public void generateJson(String prefix, PrintWriter pw,
    VWorkspace vWorkspace) {
  Workspace workspace = vWorkspace.getWorkspace();
  Worksheet worksheet = workspace.getWorksheet(worksheetId);
  JSONObject outputObject = new JSONObject();
  JSONArray array = new JSONArray();
  for (SuperSelection sel : worksheet.getSuperSelectionManager().getAllDefinedSelection()) {
    JSONObject obj = new JSONObject();
    obj.put("name", sel.getName());
    obj.put("status", sel.refreshStatus().name());
    array.put(obj);
  }
  outputObject.put(JsonKeys.updateType.name(),
      "WorksheetSuperSelectionListUpdate");		
  outputObject.put(JsonKeys.worksheetId.name(),
      worksheetId);
  outputObject.put(JsonKeys.selectionList.name(),
      array.toString());
  pw.println(outputObject.toString());
}

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

private void generateRDFFromWorksheet(Worksheet wk, 
    Workspace workspace, KR2RMLMapping mapping, List<KR2RMLRDFWriter> writers, String baseURI) 
        throws IOException, JSONException, KarmaException {
  // Generate RDF for the remaining rows
  // Gets all the errors generated during the RDF generation
  ErrorReport errorReport = new ErrorReport();
  
  this.applyHistoryToWorksheet(workspace, wk, mapping);
  SuperSelection selection = SuperSelectionManager.DEFAULT_SELECTION;
  if (selectionName != null && !selectionName.trim().isEmpty())
    selection = wk.getSuperSelectionManager().getSuperSelection(selectionName);
  if (selection == null)
    return;
  // RDF generation object initialization
  KR2RMLWorksheetRDFGenerator rdfGen = new KR2RMLWorksheetRDFGenerator(wk,
      workspace, writers, false,
      mapping, errorReport, selection);
  // Generate the rdf
  rdfGen.generateRDF(false);
}

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

SuperSelection selection = SuperSelectionManager.DEFAULT_SELECTION;
if (selectionName != null && !selectionName.trim().isEmpty())
  selection = worksheet.getSuperSelectionManager().getSuperSelection(selectionName);
if (selection == null)
  return;

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

public static boolean hasSelectedRows(Table nestedTable, RepFactory factory, String selectionName) {
  Worksheet worksheet = factory.getWorksheet(nestedTable.getWorksheetId());
  SuperSelection sel = worksheet.getSuperSelectionManager().getSuperSelection(selectionName);
  for (Row r : nestedTable.getRows(0, nestedTable.getNumRows(), SuperSelectionManager.DEFAULT_SELECTION)) {
    if (sel.isSelected(r))
      return true;
  }
  return false;
}

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

protected void normalizeSelectionId(String worksheetId, JSONArray inputJson, Workspace workspace) {
    Worksheet worksheet = workspace.getWorksheet(worksheetId);
    String selectionName = CommandInputJSONUtil.getStringValue(Arguments.selectionName.name(), inputJson);
    if (worksheet == null)
      return;
    SuperSelection sel = worksheet.getSuperSelectionManager().getSuperSelection(selectionName);
    JSONObject obj = CommandInputJSONUtil.getJSONObjectWithName(selectionName, inputJson);
    if (obj != null)
      obj.put("value", sel.getName());
    else
      CommandInputJSONUtil.createJsonObject(Arguments.selectionName.name(), sel.getName(), ParameterType.other);
  }
}

相关文章