org.gephi.graph.api.Edge.getId()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(174)

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

Edge.getId介绍

暂无

代码示例

代码示例来源:origin: org.gephi/preview-plugin

Text labelTextOutline = target.createTextNode(label);
  Element outlineElem = target.createElement("text");
  outlineElem.setAttribute("class", SVGUtils.idAsClassAttribute(edge.getId()));
  outlineElem.setAttribute("x", String.valueOf(x));
  outlineElem.setAttribute("y", String.valueOf(y));
labelElem.setAttribute("class", SVGUtils.idAsClassAttribute(edge.getId()));
labelElem.setAttribute("x", x + "");
labelElem.setAttribute("y", y + "");

代码示例来源:origin: org.gephi/graphstore

private EdgeImpl verifyEdge(Edge edge) {
  EdgeImpl edgeImpl = (EdgeImpl) edge;
  verifyElement(edgeImpl);
  EdgeImpl existingEdge = store.getEdge(edge.getId());
  if (existingEdge != null && (!existingEdge.getSource().getId().equals(edge.getSource().getId()) || !existingEdge
      .getTarget().getId().equals(edge.getTarget().getId()))) {
    throw new RuntimeException("An edge with a similar id '" + edge.getId() + "' already exists");
  }
  return edgeImpl;
}

代码示例来源:origin: gephi/graphstore

private EdgeImpl verifyEdge(Edge edge) {
  EdgeImpl edgeImpl = (EdgeImpl) edge;
  verifyElement(edgeImpl);
  EdgeImpl existingEdge = store.getEdge(edge.getId());
  if (existingEdge != null && (!existingEdge.getSource().getId().equals(edge.getSource().getId()) || !existingEdge
      .getTarget().getId().equals(edge.getTarget().getId()))) {
    throw new RuntimeException("An edge with a similar id '" + edge.getId() + "' already exists");
  }
  return edgeImpl;
}

代码示例来源:origin: org.gephi/datalab-plugin

private void refreshRows() {
  rows = columnsAndRowChooser.getRows();
  Object sourceRow = columnsAndRowChooser.getRow();
  Node node;
  Edge edge;
  //Prepare combo box with nodes/edges data:
  for (int i = 0; i < rows.length; i++) {
    if (rows[i] instanceof Node) {
      node = (Node) rows[i];
      rowComboBox.addItem(node.getId() + " - " + node.getLabel());
    } else {
      edge = (Edge) rows[i];
      rowComboBox.addItem(edge.getId() + " - " + edge.getLabel());
    }
    if (rows[i] == sourceRow) {
      rowComboBox.setSelectedIndex(i);
    }
  }
}

代码示例来源:origin: org.gephi/visualization

List<Edge> edgesToRemove = new ArrayList<>();
for (Edge edge : targetGraph.getEdges()) {
  if (!visibleCurrentGraph.hasEdge(edge.getId())) {
    edgesToRemove.add(edge);

代码示例来源:origin: gephi/graphstore

checkIdDoesntExist(e.getId());
checkSourceTargets(edge);
checkUndirectedNotExist(edge);

代码示例来源:origin: org.gephi/graphstore

checkIdDoesntExist(e.getId());
checkSourceTargets(edge);
checkUndirectedNotExist(edge);

相关文章