@Override
 public BinaryEdge createEdge(Vertex startVertex, Vertex endVertex) {
   return new BinaryEdgeImpl(
       db,
       startVertex
           .getNode()
           .createRelationshipTo(endVertex.getNode(), this.getRelationshipType())
           .getId());
 }
 @Override
 public BinaryEdge getSingleBinaryEdge(Vertex vertex, Direction dir) {
   Relationship rel = vertex.getNode().getSingleRelationship(getRelationshipType(), dir);
   if (rel == null) {
     return null;
   } else {
     return new BinaryEdgeImpl(db, rel.getId());
   }
 }
 @Override
 public boolean hasEdge(Vertex vertex) {
   return vertex.getNode().hasRelationship(getRelationshipType());
 }
 @Override
 public boolean hasEdge(Vertex vertex, Direction dir) {
   return vertex.getNode().hasRelationship(getRelationshipType(), dir);
 }
 @Override
 public Iterable<BinaryEdge> getEdges(Vertex vertex, Direction dir) {
   return new RelationshipIterable(
       vertex.getNode().getRelationships(this.getRelationshipType(), dir));
 }