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

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

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

Edge.getId介绍

暂无

代码示例

代码示例来源:origin: com.puresoltechnologies.extended-objects/titan

@Override
public Object getRelationId(Edge edge) {
return edge.getId();
}

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

public void edgePropertyRemoved(final Edge edge, final String s, final Object o) {
  edgePropertyRemovedEvent.incrementAndGet();
  order.add("e-property-removed-" + edge.getId() + "-" + s + ":" + o);
}

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

public void edgeRemoved(final Edge edge, final Map<String, Object> props) {
  edgeRemovedEvent.incrementAndGet();
  order.add("e-removed-" + edge.getId());
}

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

public void edgeAdded(final Edge edge) {
  addEdgeEvent.incrementAndGet();
  order.add("e-added-" + edge.getId());
}

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

public void edgePropertyChanged(final Edge edge, final String s, final Object o, final Object n) {
  edgePropertyChangedEvent.incrementAndGet();
  order.add("e-property-changed-" + edge.getId() + "-" + s + ":" + o + "->" + n);
}

代码示例来源:origin: stackoverflow.com

for (Edge edge : common) {
    Node node1 = edge.getNode0();
    Node node2 = edge.getNode1();
    graph.addEdge(edge.getId(), node1, node2, false);   <--- Replace it with
    graph.addEdge(edge.getId(), node_1, node_2, false);
    changeEdge.add(graph.getEdge(edge.getId()));
}

代码示例来源:origin: joshsh/ripple

@Override
  public void print(Edge instance, RipplePrintStream p, ModelConnection mc) throws RippleException {
    p.print("[edge " + instance.getId() + "]");
  }
}

代码示例来源:origin: joshsh/ripple

@Override
public int compare(Edge o1, Edge o2, ModelConnection mc) {
  String otherLabel = o2.getLabel();
  int cmp = o1.getLabel().compareTo(otherLabel);
  if (0 == cmp) {
    return ((Integer) o1.getId().hashCode()).compareTo(o2.hashCode());
  } else {
    return cmp;
  }
}

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

public boolean addEdge(final Edge edge, final Vertex outVertex, final Vertex inVertex) {
  this.graph.addEdge(edge.getId(), outVertex, inVertex, edge.getLabel());
  return true;
}

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

public void removeEdge(final Edge edge) {
  RestHelper.delete(this.graphURI + RexsterTokens.SLASH_EDGES_SLASH + RestHelper.encode(edge.getId()));
}

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

private void writeGraphEdges(OutputStream os) throws IOException {
  IOUtils.write(GexfConstants.EDGES_OPEN, os);
  
  
  
  for(Edge edge : graph.getEdges()) {
    String id = ""+edge.getId().hashCode();
    String source = ""+edge.getVertex(Direction.IN).getId().hashCode();
    String target = ""+edge.getVertex(Direction.OUT).getId().hashCode();
    writeGraphEdge(id, source, target, os);
  }
  
  IOUtils.write(GexfConstants.EDGES_CLOSE, os);
}

代码示例来源:origin: org.jboss.windup.legacy.application/grapher

private void writeGraphEdges(OutputStream os) throws IOException {
  IOUtils.write(GexfConstants.EDGES_OPEN, os);
  
  
  
  for(Edge edge : graph.getEdges()) {
    String id = ""+edge.getId().hashCode();
    String source = ""+edge.getVertex(Direction.IN).getId().hashCode();
    String target = ""+edge.getVertex(Direction.OUT).getId().hashCode();
    writeGraphEdge(id, source, target, os);
  }
  
  IOUtils.write(GexfConstants.EDGES_CLOSE, os);
}

代码示例来源:origin: edu.jhuapl.tinkerpop/blueprints-accumulo-graph

public BaseEdgeMutator(Edge edge) {
 this(edge.getId().toString(),
   edge.getVertex(Direction.OUT).getId().toString(),
   edge.getVertex(Direction.IN).getId().toString(),
   edge.getLabel());
}
public BaseEdgeMutator(String id, String outVertexId, String inVertexId, String label) {

代码示例来源:origin: JHUAPL/AccumuloGraph

public BaseEdgeMutator(Edge edge) {
 this(edge.getId().toString(),
   edge.getVertex(Direction.OUT).getId().toString(),
   edge.getVertex(Direction.IN).getId().toString(),
   edge.getLabel());
}
public BaseEdgeMutator(String id, String outVertexId, String inVertexId, String label) {

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

@Override
public void removeEdge(final Edge edge) {
  assert edge instanceof SparkseeEdge;
  
  autoStartTransaction(true);
  getRawGraph().drop((Long) edge.getId());
}

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

private void writeGraphEdges(OutputStream os) throws IOException {
  
  for(Edge edge : graph.getEdges()) {
    String id = ""+edge.getId().hashCode();
    String source = ""+edge.getVertex(Direction.IN).getId().hashCode();
    String target = ""+edge.getVertex(Direction.OUT).getId().hashCode();
    String label = ""+edge.getLabel();
    writeGraphEdge(id, source, target, label, os);
  }
  
}

代码示例来源:origin: org.jboss.windup.legacy.application/grapher

private void writeGraphEdges(OutputStream os) throws IOException {
  
  for(Edge edge : graph.getEdges()) {
    String id = ""+edge.getId().hashCode();
    String source = ""+edge.getVertex(Direction.IN).getId().hashCode();
    String target = ""+edge.getVertex(Direction.OUT).getId().hashCode();
    String label = ""+edge.getLabel();
    writeGraphEdge(id, source, target, label, os);
  }
  
}

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

private void writeEdgeProperties(final Writer writer, final Edge e) throws IOException {
  final Object blueprintsId = e.getId();
  if (!useId) {
    writeKey(writer, edgeIdKey);
    if (blueprintsId instanceof Number) {
      writeNumberProperty(writer, (Number) blueprintsId);
    } else {
      writeStringProperty(writer, blueprintsId);
    }
  }
  writeProperties(writer, e);
}

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

Edge addEdge(Edge edge) {
 Edge newEdge = graph.getEdge(edge.getId());
 if (null == newEdge) {
  Vertex outVertex = addNode(edge.getVertex(Direction.OUT));
  Vertex inVertex = addNode(edge.getVertex(Direction.IN));
  String label = edge.getLabel();
  newEdge = graph.addEdge(edge.getId(), outVertex, inVertex, label);
  copyProperties(edge, edge);
 }
 return newEdge;
}

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

public static void dumpRelationship(Edge relationship) {
 System.out.println(String.format("%s [%s->%s] (%s)", 
   relationship.getId(), relationship.getVertex(Direction.OUT).getId(),
   relationship.getVertex(Direction.IN).getId(),
   relationship.getLabel()));
 dumpProperties(relationship);
}

相关文章