-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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.1 – 2.3.0 – 2.2.0 – 2.1.0 – 2.0.0 – 0.7 – 0.6 – 0.5 – 0.4 – 0.3 – 0.2 – 0.1
Frames WikiDoc: 2.3.1 – 2.3.0 – 2.2.0 – 2.1.0 – 2.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.