mirror of
https://github.com/JHUAPL/AccumuloGraph.git
synced 2026-01-09 12:47:56 -05:00
Refactor getEdges to use Vertex object
This commit is contained in:
@@ -28,7 +28,7 @@ public class AccumuloVertex extends AccumuloElement implements Vertex {
|
||||
|
||||
@Override
|
||||
public Iterable<Edge> getEdges(Direction direction, String... labels) {
|
||||
return globals.getVertexWrapper().getEdges(id, direction, labels);
|
||||
return globals.getVertexWrapper().getEdges(this, direction, labels);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -62,10 +62,10 @@ public class VertexTableWrapper extends ElementTableWrapper {
|
||||
Mutators.apply(getWriter(), new EdgeEndpointsMutator.Delete(edge));
|
||||
}
|
||||
|
||||
public Iterable<Edge> getEdges(String vertexId, Direction direction,
|
||||
public Iterable<Edge> getEdges(Vertex vertex, Direction direction,
|
||||
String... labels) {
|
||||
Scanner scan = getScanner();
|
||||
scan.setRange(new Range(vertexId));
|
||||
scan.setRange(new Range(vertex.getId().toString()));
|
||||
if (direction.equals(Direction.IN)) {
|
||||
scan.fetchColumnFamily(AccumuloGraph.TINEDGE);
|
||||
} else if (direction.equals(Direction.OUT)) {
|
||||
|
||||
Reference in New Issue
Block a user