import org.apache.tinkerpop.gremlin.structure.*;

import java.util.Iterator;
import java.util.Set;

/**
 * Created by ashishn on 8/4/15.
 */
public class RocksEdge extends RocksElement implements Edge {

    protected final Vertex inVertex;
    protected final Vertex outVertex;

    public RocksEdge(Object id, String label, Vertex inVertex, Vertex outVertex) {
        super(id, label);
        this.inVertex = inVertex;
        this.outVertex = outVertex;
    }

    @Override
    public Iterator<Vertex> vertices(Direction direction) {
        return null;
    }

    @Override
    public Set<String> keys() {
        return null;
    }

    @Override
    public Graph graph() {
        return null;
    }

    @Override
    public <V> Property<V> property(String s, V v) {
        return null;
    }

    @Override
    public void remove() {

    }

    @Override
    public <V> Iterator<Property<V>> properties(String... strings) {
        return null;
    }
}

@@ -41,16 +41,81 @@
 cture.*;
+%0Aimport org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 %0A%0Aimport
@@ -602,36 +602,303 @@
 ) %7B%0A        
-return null;
+switch (direction) %7B%0A            case OUT:%0A                return IteratorUtils.of(this.outVertex);%0A            case IN:%0A                return IteratorUtils.of(this.inVertex);%0A            default:%0A                return IteratorUtils.of(this.outVertex, this.inVertex);%0A        %7D
 %0A    %7D%0A%0A    
@@ -1015,36 +1015,53 @@
 %0A        return 
-null
+this.inVertex.graph()
 ;%0A    %7D%0A%0A    @Ov

add edge