本文整理了Java中org.vertexium.Graph.doVerticesExist()
方法的一些代码示例,展示了Graph.doVerticesExist()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.doVerticesExist()
方法的具体详情如下:
包路径:org.vertexium.Graph
类名称:Graph
方法名:doVerticesExist
[英]Tests the existence of vertices with the given authorizations.
[中]使用给定的授权测试顶点的存在性。
代码示例来源:origin: org.vertexium/vertexium-blueprints
private Set<String> getVisibleVertexIds(List<org.vertexium.Edge> edges, Authorizations authorizations) {
Set<String> results = new HashSet<>();
for (org.vertexium.Edge edge : edges) {
results.add(edge.getVertexId(org.vertexium.Direction.IN));
results.add(edge.getVertexId(org.vertexium.Direction.OUT));
}
Map<String, Boolean> exists = getGraph().getGraph().doVerticesExist(results, authorizations);
for (Map.Entry<String, Boolean> exist : exists.entrySet()) {
if (!exist.getValue()) {
results.remove(exist.getKey());
}
}
return results;
}
代码示例来源:origin: org.visallo/visallo-web
@Handle
public ClientApiVerticesExistsResponse handle(
@Required(name = "vertexIds[]") String[] vertexIds,
VisalloResponse response,
Authorizations authorizations
) throws Exception {
Map<String, Boolean> graphVertices = graph.doVerticesExist(Lists.newArrayList(vertexIds), authorizations);
ClientApiVerticesExistsResponse result = new ClientApiVerticesExistsResponse();
result.getExists().putAll(graphVertices);
return result;
}
}
代码示例来源:origin: org.visallo/visallo-web-product-graph
.map(edge -> edge.getOtherVertexId(productVertex.getId()))
.collect(Collectors.toList());
Map<String, Boolean> othersById = graph.doVerticesExist(ids, authorizations);
代码示例来源:origin: org.vertexium/vertexium-test
vertexIdList.add("v2");
vertexIdList.add("bad"); // add "bad" to the end of the list to test ordering of results
Map<String, Boolean> verticesExist = graph.doVerticesExist(vertexIdList, AUTHORIZATIONS_A);
assertEquals(3, vertexIdList.size());
assertTrue("v1 exist", verticesExist.get("v1"));
代码示例来源:origin: visallo/vertexium
vertexIdList.add("v2");
vertexIdList.add("bad"); // add "bad" to the end of the list to test ordering of results
Map<String, Boolean> verticesExist = graph.doVerticesExist(vertexIdList, AUTHORIZATIONS_A);
assertEquals(3, vertexIdList.size());
assertTrue("v1 exist", verticesExist.get("v1"));
内容来源于网络,如有侵权,请联系作者删除!