Skip to content
Bryn Cooke edited this page Jun 10, 2013 · 82 revisions

Frames exposes any Blueprints graph as a collection of interrelated domain objects. Frames makes heavy use of InvocationHandler, Proxy classes, and Annotations to allow a developer to frame a graph element (vertex or edge) in terms of a particular Java interface. With Frames, its easy to ensure that data within a graph is respective of a schema represented as a collection of annotated Java interfaces.

Please join the Gremlin users group at http://groups.google.com/group/gremlin-users for all TinkerPop related discussions.

Frames JavaDoc: 2.3.12.3.02.2.02.1.02.0.00.70.60.50.40.30.20.1
Frames WikiDoc: 2.3.12.3.02.2.02.1.02.0.0

WARNING: Please use Frames 2.3.1 as 2.3.0 has a severe bug that has since been ameliorated in 2.3.1. Note that the WikiDocs and JavaDocs are identical for the two versions.

<dependency>
  <groupId>com.tinkerpop</groupId>
  <artifactId>frames</artifactId>
  <version>2.4.0-SNAPSHOT</version>
</dependency>

Non-Maven users can get the raw jars from Apache’s Central Repository.
public interface Person {
  @Property("name")
  public String getName();
  @Adjacency(label="knows")
  public Iterable<Person> getKnowsPeople();
  @Adjacency(label="knows")
  public void addKnowsPerson(final Person person);
  @GremlinGroovy("it.out('knows').out('knows').dedup")
  public Iterable<Person> getFriendsOfAFriend()
}

public class Frames {
  public Frames() {
   FramedGraph<OrientGraph> graph = new FramedGraphFactory(
           new GremlinGroovyModule()
       ).create(new OrientGraph("local:/tmp/orientdb"));

   Person person = graph.getVertex(1, Person.class);
   person.getName(); // equals "marko"
  }
}

Frames can be used with Rexster through the Rexster Kibbles Frames extension.
Clone this wiki locally