com.tinkerpop.blueprints.Graph.removeEdge()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(103)

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

Graph.removeEdge介绍

[英]Remove the provided edge from the graph.
[中]从图形中删除提供的边。

代码示例

代码示例来源:origin: com.tinkerpop.blueprints/blueprints-core

@Override
public void removeEdge(final Edge edge) {
  graph.removeEdge(edge);
}

代码示例来源:origin: com.tinkerpop.blueprints/blueprints-graph-jung

public boolean removeEdge(final Edge edge) {
  this.graph.removeEdge(edge);
  return true;
}

代码示例来源:origin: org.jboss.windup.graph.frames/windup-frames

public void removeEdge(final Edge edge) {
  config.getConfiguredGraph().removeEdge(edge);
}

代码示例来源:origin: com.tinkerpop.blueprints/blueprints-core

public void removeEdge(final Edge edge) {
  this.baseGraph.removeEdge(((WrappedEdge) edge).getBaseEdge());
}

代码示例来源:origin: com.tinkerpop/frames

public void removeEdge(final Edge edge) {
  config.getConfiguredGraph().removeEdge(edge);
}

代码示例来源:origin: com.tinkerpop.blueprints/blueprints-core

public void removeEdge(final Edge edge) {
  this.baseGraph.removeEdge(((PartitionEdge) edge).getBaseEdge());
}

代码示例来源:origin: SciGraph/SciGraph

boolean removeEdge(Relationship relationship) {
 Edge edge = graph.getEdge(relationship.getId());
 if (null != edge) {
  graph.removeEdge(edge);
  return true;
 } else {
  return false;
 }
}

代码示例来源:origin: com.tinkerpop.blueprints/blueprints-core

/**
 * Raises an edgeRemoved event.
 */
public void removeEdge(final Edge edge) {
  Edge edgeToRemove = edge;
  if (edge instanceof EventEdge) {
    edgeToRemove = ((EventEdge) edge).getBaseEdge();
  }
  Map<String, Object> props = ElementHelper.getProperties(edge);
  this.baseGraph.removeEdge(edgeToRemove);
  this.onEdgeRemoved(edge, props);
}

代码示例来源:origin: com.tinkerpop.blueprints/blueprints-core

/**
 * Edges are relabeled by creating new edges with the same properties, but new label.
 * Note that for each edge is deleted and an edge is added.
 *
 * @param graph    the graph to add the new edge to
 * @param oldEdges the existing edges to "relabel"
 * @param newLabel the label of the new edge
 */
public static void relabelEdges(final Graph graph, final Iterable<Edge> oldEdges, final String newLabel) {
  for (final Edge oldEdge : oldEdges) {
    final Vertex outVertex = oldEdge.getVertex(Direction.OUT);
    final Vertex inVertex = oldEdge.getVertex(Direction.IN);
    final Edge newEdge = graph.addEdge(null, outVertex, inVertex, newLabel);
    ElementHelper.copyProperties(oldEdge, newEdge);
    graph.removeEdge(oldEdge);
  }
}

代码示例来源:origin: com.tinkerpop.blueprints/blueprints-core

/**
 * An edge is relabeled by creating a new edge with the same properties, but new label.
 * Note that an edge is deleted and an edge is added.
 *
 * @param graph    the graph to add the new edge to
 * @param oldEdge  the existing edge to "relabel"
 * @param newId    the id of the new edge
 * @param newLabel the label of the new edge
 * @return the newly created edge
 */
public static Edge relabelEdge(final Graph graph, final Edge oldEdge, final Object newId, final String newLabel) {
  final Vertex outVertex = oldEdge.getVertex(Direction.OUT);
  final Vertex inVertex = oldEdge.getVertex(Direction.IN);
  final Edge newEdge = graph.addEdge(newId, outVertex, inVertex, newLabel);
  ElementHelper.copyProperties(oldEdge, newEdge);
  graph.removeEdge(oldEdge);
  return newEdge;
}

相关文章