You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bryn Cooke edited this page Nov 4, 2013
·
11 revisions
When you develop a Frames-annotation Java interface, you provide it “life” by binding it to the underlying Blueprints graph. To make this binding, the FramedGraph is used. In FramedGraph there are a collection of helpful methods which are demonstrated using the toy graph diagrammed below and the example Java code.
Graphgraph = ... // get a reference to the graphFramedGraphFactoryfactory = newFramedGraphFactory(); // make sure you reuse the factory when creating new framed graphs.FramedGraph<Graph> framedGraph = factory.create(graph); // wrap the base graphPersonmarko = framedGraph.getVertex(1, Person.class);
Personpeter = framedGraph.getVertex(6, Person.class);
Iterable<Project> javaProjects = framedGraph.getVertices("lang","java", Project.class);
KnowsmarkoKnowsVadas = framedGraph.getEdge(7, Knows.class);
KnowsmarkoKnowsJosh = framedGraph.getEdge(8, Knows.class);