TinkerPop3 compatibility with Frames?

194 views Asked by At

I have following below 2 queries related to TinkerPop 3:

1) Which Frames version is compatible with tinkerpop3?

2) TinkerPop3 official documentation states that the Frames feature has merged into "Traversal" but I could not found any information on that. So, please help me on this how we will implement it using Java.

1

There are 1 answers

0
Mohamed Taher Alrefaie On

Frames is no longer supported for TP3 unfortunately. But that shouldn't make you upset, there is an alternative.

Have you checked Peapod? It does what Frames do but for Tinkerpop3.

@Vertex
public abstract class Person {
  public abstract String getName();
  public abstract void setName(String name);

  public abstract List<Knows> getKnows();
  public abstract Knows getKnows(Person person);
  public abstract Knows addKnows(Person person);
  public abstract Knows removeKnows(Person person);
}

@Edge
public abstract class Knows {
  public abstract void setYears(int years);
  public abstract int getYears();
}

and then you could easily use it like this

Graph g = //define your graph heere
FramedGraph graph = new FramedGraph(g, Person.class.getPackage());
Person marko = graph.v(1, Person.class);

For more information, have a look here.

Disclaimer: I'm a contributor to Peapod.