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

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

本文整理了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

  1. Text labelTextOutline = target.createTextNode(label);
  2. Element outlineElem = target.createElement("text");
  3. outlineElem.setAttribute("class", SVGUtils.idAsClassAttribute(edge.getId()));
  4. outlineElem.setAttribute("x", String.valueOf(x));
  5. outlineElem.setAttribute("y", String.valueOf(y));
  6. labelElem.setAttribute("class", SVGUtils.idAsClassAttribute(edge.getId()));
  7. labelElem.setAttribute("x", x + "");
  8. labelElem.setAttribute("y", y + "");

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

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

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

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

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

  1. private void refreshRows() {
  2. rows = columnsAndRowChooser.getRows();
  3. Object sourceRow = columnsAndRowChooser.getRow();
  4. Node node;
  5. Edge edge;
  6. //Prepare combo box with nodes/edges data:
  7. for (int i = 0; i < rows.length; i++) {
  8. if (rows[i] instanceof Node) {
  9. node = (Node) rows[i];
  10. rowComboBox.addItem(node.getId() + " - " + node.getLabel());
  11. } else {
  12. edge = (Edge) rows[i];
  13. rowComboBox.addItem(edge.getId() + " - " + edge.getLabel());
  14. }
  15. if (rows[i] == sourceRow) {
  16. rowComboBox.setSelectedIndex(i);
  17. }
  18. }
  19. }

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

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

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

  1. checkIdDoesntExist(e.getId());
  2. checkSourceTargets(edge);
  3. checkUndirectedNotExist(edge);

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

  1. checkIdDoesntExist(e.getId());
  2. checkSourceTargets(edge);
  3. checkUndirectedNotExist(edge);

相关文章