本文整理了Java中org.securegraph.Vertex.getEdges()
方法的一些代码示例,展示了Vertex.getEdges()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.getEdges()
方法的具体详情如下:
包路径:org.securegraph.Vertex
类名称:Vertex
方法名:getEdges
[英]Gets all edges with the given label attached to this vertex.
[中]
代码示例来源:origin: org.securegraph/securegraph-blueprints
@Override
public Iterable<Edge> getEdges(Direction direction, final String... labels) {
final org.securegraph.Direction sgDirection = SecureGraphBlueprintsConvert.toSecureGraph(direction);
final Authorizations authorizations = getGraph().getAuthorizationsProvider().getAuthorizations();
return new ConvertingIterable<org.securegraph.Edge, Edge>(getSecureGraphElement().getEdges(sgDirection, labels, authorizations)) {
@Override
protected Edge convert(org.securegraph.Edge edge) {
return SecureGraphBlueprintsEdge.create(getGraph(), edge, authorizations);
}
};
}
代码示例来源:origin: lumifyio/securegraph
@Test
public void testGetEdge() {
Vertex v1 = graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A);
Vertex v2 = graph.addVertex("v2", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("e1to2label1", v1, v2, "label1", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("e1to2label2", v1, v2, "label2", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("e2to1", v2.getId(), v1.getId(), "label1", VISIBILITY_A, AUTHORIZATIONS_A);
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(3, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(2, count(v1.getEdges(Direction.OUT, AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(Direction.IN, AUTHORIZATIONS_A)));
assertEquals(3, count(v1.getEdges(v2, Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(2, count(v1.getEdges(v2, Direction.OUT, AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(v2, Direction.IN, AUTHORIZATIONS_A)));
assertEquals(2, count(v1.getEdges(v2, Direction.BOTH, "label1", AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(v2, Direction.OUT, "label1", AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(v2, Direction.IN, "label1", AUTHORIZATIONS_A)));
assertEquals(3, count(v1.getEdges(v2, Direction.BOTH, new String[]{"label1", "label2"}, AUTHORIZATIONS_A)));
assertEquals(2, count(v1.getEdges(v2, Direction.OUT, new String[]{"label1", "label2"}, AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(v2, Direction.IN, new String[]{"label1", "label2"}, AUTHORIZATIONS_A)));
assertArrayEquals(new String[]{"label1", "label2"}, toArray(v1.getEdgeLabels(Direction.OUT, AUTHORIZATIONS_A), String.class));
assertArrayEquals(new String[]{"label1"}, toArray(v1.getEdgeLabels(Direction.IN, AUTHORIZATIONS_A), String.class));
assertArrayEquals(new String[]{"label1", "label2"}, toArray(v1.getEdgeLabels(Direction.BOTH, AUTHORIZATIONS_A), String.class));
}
代码示例来源:origin: lumifyio/securegraph
@Test
public void testAddEdgeWithVisibility() {
Vertex v1 = graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A);
Vertex v2 = graph.addVertex("v2", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("e1", v1, v2, "edgeA", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("e2", v1, v2, "edgeB", VISIBILITY_B, AUTHORIZATIONS_B);
Iterable<Edge> aEdges = graph.getVertex("v1", AUTHORIZATIONS_A_AND_B).getEdges(Direction.BOTH, AUTHORIZATIONS_A);
assertEquals(1, count(aEdges));
Edge e1 = aEdges.iterator().next();
assertNotNull(e1);
assertEquals("edgeA", e1.getLabel());
Iterable<Edge> bEdges = graph.getVertex("v1", AUTHORIZATIONS_A_AND_B).getEdges(Direction.BOTH, AUTHORIZATIONS_B);
assertEquals(1, count(bEdges));
Edge e2 = bEdges.iterator().next();
assertNotNull(e2);
assertEquals("edgeB", e2.getLabel());
Iterable<Edge> allEdges = graph.getVertex("v1", AUTHORIZATIONS_A_AND_B).getEdges(Direction.BOTH, AUTHORIZATIONS_A_AND_B);
assertEquals(2, count(allEdges));
}
代码示例来源:origin: org.securegraph/securegraph-core
@Override
public Iterable<Edge> edges(EnumSet<FetchHint> fetchHints) {
Iterable<Edge> edges = getSourceVertex().getEdges(Direction.BOTH, fetchHints, getParameters().getAuthorizations());
return new DefaultGraphQueryIterable<Edge>(getParameters(), edges, true, true);
}
代码示例来源:origin: org.securegraph/securegraph-test
@Test
public void testGetEdge() {
Vertex v1 = graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A);
Vertex v2 = graph.addVertex("v2", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("e1to2label1", v1, v2, "label1", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("e1to2label2", v1, v2, "label2", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("e2to1", v2.getId(), v1.getId(), "label1", VISIBILITY_A, AUTHORIZATIONS_A);
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(3, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(2, count(v1.getEdges(Direction.OUT, AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(Direction.IN, AUTHORIZATIONS_A)));
assertEquals(3, count(v1.getEdges(v2, Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(2, count(v1.getEdges(v2, Direction.OUT, AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(v2, Direction.IN, AUTHORIZATIONS_A)));
assertEquals(2, count(v1.getEdges(v2, Direction.BOTH, "label1", AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(v2, Direction.OUT, "label1", AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(v2, Direction.IN, "label1", AUTHORIZATIONS_A)));
assertEquals(3, count(v1.getEdges(v2, Direction.BOTH, new String[]{"label1", "label2"}, AUTHORIZATIONS_A)));
assertEquals(2, count(v1.getEdges(v2, Direction.OUT, new String[]{"label1", "label2"}, AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(v2, Direction.IN, new String[]{"label1", "label2"}, AUTHORIZATIONS_A)));
assertArrayEquals(new String[]{"label1", "label2"}, toArray(v1.getEdgeLabels(Direction.OUT, AUTHORIZATIONS_A), String.class));
assertArrayEquals(new String[]{"label1"}, toArray(v1.getEdgeLabels(Direction.IN, AUTHORIZATIONS_A), String.class));
assertArrayEquals(new String[]{"label1", "label2"}, toArray(v1.getEdgeLabels(Direction.BOTH, AUTHORIZATIONS_A), String.class));
}
代码示例来源:origin: lumifyio/securegraph
@Override
public Iterable<Edge> edges(EnumSet<FetchHint> fetchHints) {
Iterable<Edge> edges = getSourceVertex().getEdges(Direction.BOTH, fetchHints, getParameters().getAuthorizations());
return new DefaultGraphQueryIterable<Edge>(getParameters(), edges, true, true);
}
代码示例来源:origin: lumifyio/securegraph
@Override
public Iterable<Edge> getEdges(Direction direction, final String... labels) {
final org.securegraph.Direction sgDirection = SecureGraphBlueprintsConvert.toSecureGraph(direction);
final Authorizations authorizations = getGraph().getAuthorizationsProvider().getAuthorizations();
return new ConvertingIterable<org.securegraph.Edge, Edge>(getSecureGraphElement().getEdges(sgDirection, labels, authorizations)) {
@Override
protected Edge convert(org.securegraph.Edge edge) {
return SecureGraphBlueprintsEdge.create(getGraph(), edge, authorizations);
}
};
}
代码示例来源:origin: org.securegraph/securegraph-test
@Test
public void testAddEdgeWithVisibility() {
Vertex v1 = graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A);
Vertex v2 = graph.addVertex("v2", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("e1", v1, v2, "edgeA", VISIBILITY_A, AUTHORIZATIONS_A);
graph.addEdge("e2", v1, v2, "edgeB", VISIBILITY_B, AUTHORIZATIONS_B);
Iterable<Edge> aEdges = graph.getVertex("v1", AUTHORIZATIONS_A_AND_B).getEdges(Direction.BOTH, AUTHORIZATIONS_A);
assertEquals(1, count(aEdges));
Edge e1 = aEdges.iterator().next();
assertNotNull(e1);
assertEquals("edgeA", e1.getLabel());
Iterable<Edge> bEdges = graph.getVertex("v1", AUTHORIZATIONS_A_AND_B).getEdges(Direction.BOTH, AUTHORIZATIONS_B);
assertEquals(1, count(bEdges));
Edge e2 = bEdges.iterator().next();
assertNotNull(e2);
assertEquals("edgeB", e2.getLabel());
Iterable<Edge> allEdges = graph.getVertex("v1", AUTHORIZATIONS_A_AND_B).getEdges(Direction.BOTH, AUTHORIZATIONS_A_AND_B);
assertEquals(2, count(allEdges));
}
代码示例来源:origin: lumifyio/securegraph
@Override
public void removeVertex(Vertex vertex, Authorizations authorizations) {
if (!((InMemoryVertex) vertex).canRead(authorizations)) {
return;
}
List<Edge> edgesToRemove = toList(vertex.getEdges(Direction.BOTH, authorizations));
for (Edge edgeToRemove : edgesToRemove) {
removeEdge(edgeToRemove, authorizations);
}
this.vertices.remove(vertex.getId());
getSearchIndex().removeElement(this, vertex, authorizations);
if (hasEventListeners()) {
fireGraphEvent(new RemoveVertexEvent(this, vertex));
}
}
代码示例来源:origin: lumifyio/securegraph
@Override
public void markVertexHidden(Vertex vertex, Visibility visibility, Authorizations authorizations) {
if (!((InMemoryVertex) vertex).canRead(authorizations)) {
return;
}
List<Edge> edgesToMarkHidden = toList(vertex.getEdges(Direction.BOTH, authorizations));
for (Edge edgeToRemove : edgesToMarkHidden) {
markEdgeHidden(edgeToRemove, visibility, authorizations);
}
this.vertices.get(vertex.getId()).addHiddenVisibility(visibility);
getSearchIndex().addElement(this, vertex, authorizations);
if (hasEventListeners()) {
fireGraphEvent(new MarkHiddenVertexEvent(this, vertex));
}
}
代码示例来源:origin: lumifyio/securegraph
@Override
public void markVertexVisible(Vertex vertex, Visibility visibility, Authorizations authorizations) {
if (!((InMemoryVertex) vertex).canRead(authorizations)) {
return;
}
List<Edge> edgesToMarkVisible = toList(vertex.getEdges(Direction.BOTH, FetchHint.ALL_INCLUDING_HIDDEN, authorizations));
for (Edge edgeToMarkVisible : edgesToMarkVisible) {
markEdgeVisible(edgeToMarkVisible, visibility, authorizations);
}
this.vertices.get(vertex.getId()).removeHiddenVisibility(visibility);
getSearchIndex().addElement(this, vertex, authorizations);
if (hasEventListeners()) {
fireGraphEvent(new MarkVisibleVertexEvent(this, vertex));
}
}
代码示例来源:origin: lumifyio/securegraph
@Override
public void removeVertex(Vertex vertex, Authorizations authorizations) {
if (vertex == null) {
throw new IllegalArgumentException("vertex cannot be null");
}
getSearchIndex().removeElement(this, vertex, authorizations);
// Remove all edges that this vertex participates.
for (Edge edge : vertex.getEdges(Direction.BOTH, authorizations)) {
removeEdge(edge, authorizations);
}
addMutations(getVerticesWriter(), getDeleteRowMutation(AccumuloConstants.VERTEX_ROW_KEY_PREFIX + vertex.getId()));
if (hasEventListeners()) {
queueEvent(new RemoveVertexEvent(this, vertex));
}
}
代码示例来源:origin: lumifyio/securegraph
assertEquals(0, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_B)));
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(1, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_B)));
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(0, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_B)));
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(0, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
代码示例来源:origin: org.securegraph/securegraph-test
assertEquals(0, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_B)));
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(1, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_B)));
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(0, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(1, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_B)));
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(0, count(v1.getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
代码示例来源:origin: lumifyio/securegraph
@Override
public void markVertexHidden(Vertex vertex, Visibility visibility, Authorizations authorizations) {
checkNotNull(vertex, "vertex cannot be null");
ColumnVisibility columnVisibility = visibilityToAccumuloVisibility(visibility);
// Remove all edges that this vertex participates.
for (Edge edge : vertex.getEdges(Direction.BOTH, authorizations)) {
markEdgeHidden(edge, visibility, authorizations);
}
addMutations(getVerticesWriter(), getMarkHiddenRowMutation(AccumuloConstants.VERTEX_ROW_KEY_PREFIX + vertex.getId(), columnVisibility));
if (hasEventListeners()) {
queueEvent(new MarkHiddenVertexEvent(this, vertex));
}
}
代码示例来源:origin: lumifyio/securegraph
@Override
public void markVertexVisible(Vertex vertex, Visibility visibility, Authorizations authorizations) {
checkNotNull(vertex, "vertex cannot be null");
ColumnVisibility columnVisibility = visibilityToAccumuloVisibility(visibility);
// Remove all edges that this vertex participates.
for (Edge edge : vertex.getEdges(Direction.BOTH, FetchHint.ALL_INCLUDING_HIDDEN, authorizations)) {
markEdgeVisible(edge, visibility, authorizations);
}
addMutations(getVerticesWriter(), getMarkVisibleRowMutation(AccumuloConstants.VERTEX_ROW_KEY_PREFIX + vertex.getId(), columnVisibility));
if (hasEventListeners()) {
queueEvent(new MarkVisibleVertexEvent(this, vertex));
}
}
代码示例来源:origin: lumifyio/securegraph
assertEquals(1, count(e.getProperties()));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
assertEquals(1, count(v1.getEdges(Direction.OUT, AUTHORIZATIONS_A)));
assertEquals("label1", single(v1.getEdgeLabels(Direction.OUT, AUTHORIZATIONS_A)));
assertEquals(1, count(v2.getEdges(Direction.IN, AUTHORIZATIONS_A)));
assertEquals("label1", single(v2.getEdgeLabels(Direction.IN, AUTHORIZATIONS_A)));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(1, count(v1.getEdges(Direction.OUT, AUTHORIZATIONS_A)));
assertEquals("label2", single(v1.getEdgeLabels(Direction.OUT, AUTHORIZATIONS_A)));
v2 = graph.getVertex("v2", AUTHORIZATIONS_A);
assertEquals(1, count(v2.getEdges(Direction.IN, AUTHORIZATIONS_A)));
assertEquals("label2", single(v2.getEdgeLabels(Direction.IN, AUTHORIZATIONS_A)));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(1, count(v1.getEdges(Direction.OUT, AUTHORIZATIONS_A)));
assertEquals("label3", single(v1.getEdgeLabels(Direction.OUT, AUTHORIZATIONS_A)));
v2 = graph.getVertex("v2", AUTHORIZATIONS_A);
assertEquals(1, count(v2.getEdges(Direction.IN, AUTHORIZATIONS_A)));
assertEquals("label3", single(v2.getEdgeLabels(Direction.IN, AUTHORIZATIONS_A)));
代码示例来源:origin: org.securegraph/securegraph-test
assertEquals(1, count(e.getProperties()));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
assertEquals(1, count(v1.getEdges(Direction.OUT, AUTHORIZATIONS_A)));
assertEquals("label1", single(v1.getEdgeLabels(Direction.OUT, AUTHORIZATIONS_A)));
assertEquals(1, count(v2.getEdges(Direction.IN, AUTHORIZATIONS_A)));
assertEquals("label1", single(v2.getEdgeLabels(Direction.IN, AUTHORIZATIONS_A)));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(1, count(v1.getEdges(Direction.OUT, AUTHORIZATIONS_A)));
assertEquals("label2", single(v1.getEdgeLabels(Direction.OUT, AUTHORIZATIONS_A)));
v2 = graph.getVertex("v2", AUTHORIZATIONS_A);
assertEquals(1, count(v2.getEdges(Direction.IN, AUTHORIZATIONS_A)));
assertEquals("label2", single(v2.getEdgeLabels(Direction.IN, AUTHORIZATIONS_A)));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
assertEquals(1, count(v1.getEdges(Direction.OUT, AUTHORIZATIONS_A)));
assertEquals("label3", single(v1.getEdgeLabels(Direction.OUT, AUTHORIZATIONS_A)));
v2 = graph.getVertex("v2", AUTHORIZATIONS_A);
assertEquals(1, count(v2.getEdges(Direction.IN, AUTHORIZATIONS_A)));
assertEquals("label3", single(v2.getEdgeLabels(Direction.IN, AUTHORIZATIONS_A)));
代码示例来源:origin: lumifyio/securegraph
assertEquals(3, count(graph.getVertices(AUTHORIZATIONS_A)));
assertEquals(2, count(graph.getEdges(AUTHORIZATIONS_A)));
assertEquals(1, count(graph.getVertex("v1", AUTHORIZATIONS_A).getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(1, count(graph.findPaths("v1", "v3", 2, AUTHORIZATIONS_A_AND_B)));
assertEquals(1, count(graph.findPaths("v1", "v3", 10, AUTHORIZATIONS_A_AND_B)));
assertEquals(0, count(graph.getEdges(AUTHORIZATIONS_B)));
assertEquals(1, count(graph.getEdges(AUTHORIZATIONS_A_AND_B)));
assertEquals(1, count(graph.getVertex("v1", AUTHORIZATIONS_A).getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(0, count(graph.getVertex("v1", AUTHORIZATIONS_A_AND_B).getEdges(Direction.BOTH, AUTHORIZATIONS_A_AND_B)));
assertEquals(1, count(graph.getVertex("v1", FetchHint.ALL_INCLUDING_HIDDEN, AUTHORIZATIONS_A_AND_B).getEdges(Direction.BOTH, FetchHint.ALL_INCLUDING_HIDDEN, AUTHORIZATIONS_A_AND_B)));
assertEquals(0, count(graph.findPaths("v1", "v3", 2, AUTHORIZATIONS_A_AND_B)));
assertEquals(0, count(graph.findPaths("v1", "v3", 10, AUTHORIZATIONS_A_AND_B)));
assertEquals(3, count(graph.getVertices(AUTHORIZATIONS_A)));
assertEquals(2, count(graph.getEdges(AUTHORIZATIONS_A)));
assertEquals(1, count(graph.getVertex("v1", AUTHORIZATIONS_A).getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(1, count(graph.findPaths("v1", "v3", 2, AUTHORIZATIONS_A_AND_B)));
assertEquals(1, count(graph.findPaths("v1", "v3", 10, AUTHORIZATIONS_A_AND_B)));
代码示例来源:origin: org.securegraph/securegraph-test
assertEquals(3, count(graph.getVertices(AUTHORIZATIONS_A)));
assertEquals(2, count(graph.getEdges(AUTHORIZATIONS_A)));
assertEquals(1, count(graph.getVertex("v1", AUTHORIZATIONS_A).getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(1, count(graph.findPaths("v1", "v3", 2, AUTHORIZATIONS_A_AND_B)));
assertEquals(1, count(graph.findPaths("v1", "v3", 10, AUTHORIZATIONS_A_AND_B)));
assertEquals(0, count(graph.getEdges(AUTHORIZATIONS_B)));
assertEquals(1, count(graph.getEdges(AUTHORIZATIONS_A_AND_B)));
assertEquals(1, count(graph.getVertex("v1", AUTHORIZATIONS_A).getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(0, count(graph.getVertex("v1", AUTHORIZATIONS_A_AND_B).getEdges(Direction.BOTH, AUTHORIZATIONS_A_AND_B)));
assertEquals(1, count(graph.getVertex("v1", FetchHint.ALL_INCLUDING_HIDDEN, AUTHORIZATIONS_A_AND_B).getEdges(Direction.BOTH, FetchHint.ALL_INCLUDING_HIDDEN, AUTHORIZATIONS_A_AND_B)));
assertEquals(0, count(graph.findPaths("v1", "v3", 2, AUTHORIZATIONS_A_AND_B)));
assertEquals(0, count(graph.findPaths("v1", "v3", 10, AUTHORIZATIONS_A_AND_B)));
assertEquals(3, count(graph.getVertices(AUTHORIZATIONS_A)));
assertEquals(2, count(graph.getEdges(AUTHORIZATIONS_A)));
assertEquals(1, count(graph.getVertex("v1", AUTHORIZATIONS_A).getEdges(Direction.BOTH, AUTHORIZATIONS_A)));
assertEquals(1, count(graph.findPaths("v1", "v3", 2, AUTHORIZATIONS_A_AND_B)));
assertEquals(1, count(graph.findPaths("v1", "v3", 10, AUTHORIZATIONS_A_AND_B)));
内容来源于网络,如有侵权,请联系作者删除!