How can I use Traversal of Tinkerpop v3 instead of Frames of v2?

174 views Asked by At

How can I write the following code unsing Tinkerpop v3?

 public interface Cat {
    @Relation(label="enemy")
    public void addEnemy(Mouse mouse);

    @Relation(label="enemy")
    public Collection getEnemies();
 }

 FramesManager manager = new FramesManager(graph);
 Cat tom = manager.frame(graph.getVertex(1), Cat.class);
 Mouse jerry = manager.frame(graph.getVertex(2), Mouse.class);
 tom.addEnemy(jerry);

I tried to find some example but I had no luck.

Thanks, Celso

0

There are 0 answers