本文整理了Java中org.vertexium.Graph.getEdgesInRange()
方法的一些代码示例,展示了Graph.getEdgesInRange()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getEdgesInRange()
方法的具体详情如下:
包路径:org.vertexium.Graph
类名称:Graph
方法名:getEdgesInRange
[英]Gets edges from the graph in the given range.
[中]从图形中获取给定范围内的边。
代码示例来源:origin: org.visallo/visallo-core
public void reindexEdges(Range range, int batchSize, Authorizations authorizations) {
Iterable<Edge> edges = graph.getEdgesInRange(range, FETCH_HINTS, authorizations);
reindexElements(edges, batchSize, authorizations);
}
代码示例来源:origin: visallo/vertexium
@Test
public void testGetEdgesInRange() {
graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addVertex("v2", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("a", "v1", "v2", LABEL_LABEL1, VISIBILITY_EMPTY, AUTHORIZATIONS_ALL);
graph.addEdge("aa", "v1", "v2", LABEL_LABEL1, VISIBILITY_EMPTY, AUTHORIZATIONS_ALL);
graph.addEdge("az", "v1", "v2", LABEL_LABEL1, VISIBILITY_EMPTY, AUTHORIZATIONS_ALL);
graph.addEdge("b", "v1", "v2", LABEL_LABEL1, VISIBILITY_EMPTY, AUTHORIZATIONS_ALL);
graph.flush();
List<Edge> edges = toList(graph.getEdgesInRange(new Range(null, "a"), AUTHORIZATIONS_ALL));
assertEdgeIds(edges);
edges = toList(graph.getEdgesInRange(new Range(null, "b"), AUTHORIZATIONS_ALL));
assertEdgeIds(edges, "a", "aa", "az");
edges = toList(graph.getEdgesInRange(new Range(null, "bb"), AUTHORIZATIONS_ALL));
assertEdgeIds(edges, "a", "aa", "az", "b");
edges = toList(graph.getEdgesInRange(new Range(null, null), AUTHORIZATIONS_ALL));
assertEdgeIds(edges, "a", "aa", "az", "b");
}
代码示例来源:origin: org.vertexium/vertexium-test
@Test
public void testGetEdgesInRange() {
graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addVertex("v2", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("a", "v1", "v2", LABEL_LABEL1, VISIBILITY_EMPTY, AUTHORIZATIONS_ALL);
graph.addEdge("aa", "v1", "v2", LABEL_LABEL1, VISIBILITY_EMPTY, AUTHORIZATIONS_ALL);
graph.addEdge("az", "v1", "v2", LABEL_LABEL1, VISIBILITY_EMPTY, AUTHORIZATIONS_ALL);
graph.addEdge("b", "v1", "v2", LABEL_LABEL1, VISIBILITY_EMPTY, AUTHORIZATIONS_ALL);
graph.flush();
List<Edge> edges = toList(graph.getEdgesInRange(new Range(null, "a"), AUTHORIZATIONS_ALL));
assertEdgeIds(edges);
edges = toList(graph.getEdgesInRange(new Range(null, "b"), AUTHORIZATIONS_ALL));
assertEdgeIds(edges, "a", "aa", "az");
edges = toList(graph.getEdgesInRange(new Range(null, "bb"), AUTHORIZATIONS_ALL));
assertEdgeIds(edges, "a", "aa", "az", "b");
edges = toList(graph.getEdgesInRange(new Range(null, null), AUTHORIZATIONS_ALL));
assertEdgeIds(edges, "a", "aa", "az", "b");
}
内容来源于网络,如有侵权,请联系作者删除!