1 package eu.ehri.project.acl.wrapper;
2
3 import com.tinkerpop.blueprints.Direction;
4 import com.tinkerpop.blueprints.Edge;
5 import com.tinkerpop.blueprints.Vertex;
6
7
8 public class AclEdge extends AclElement implements Edge {
9
10 protected AclEdge(Edge baseEdge, AclGraph<?> aclGraph) {
11 super(baseEdge, aclGraph);
12 }
13
14 @Override
15 public Vertex getVertex(Direction direction) throws IllegalArgumentException {
16 Vertex vertex = ((Edge) baseElement).getVertex(direction);
17 return aclGraph.evaluateVertex(vertex) ? new AclVertex(((Edge) baseElement).getVertex(direction),
18 aclGraph) : null;
19 }
20
21 @Override
22 public String getLabel() {
23 return ((Edge) this.baseElement).getLabel();
24 }
25
26 public Edge getBaseEdge() {
27 return (Edge) this.baseElement;
28 }
29 }