Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
doc/images
src
README.textile
pom.xml

README.textile

Frames exposes any Blueprints graph as a collection of interrelated domain objects. The Frames Extension for Rexster exposes a framed graph element through the REST API.

REST API

GET Operations

returns uri description
@Property “getters” of frame http://base/graphs/graph/vertices/1/tp/frames/{frame} maps vertex 1 to the specified frame
@Property “getters” of frame http://base/graphs/graph/edges/1/tp/frames/{frame} maps edge 1 to the specified frame with standard directionality
@Property “getters” of frame http://base/graphs/graph/edges/1/tp/frames/{frame}?direction=inverse maps edge 1 to the specified frame with inverse directionality

Configuration

The Frames Extension requires configuration within rexster.xml. The configuration tells the extension how to map the request URI to a framed element.

<graph>
  <graph-name>tinkergraph</graph-name>
  <graph-type>tinkergraph</graph-type>
  <graph-file>data/graph-example-1.xml</graph-file>
  <extensions>
    <allows>
      <allow>tp:frames</allow>
    </allows>
    <extension>
      <namespace>tp</namespace>
      <name>frames</name>
      <configuration>
        <person>com.tinkerpop.frames.domain.classes.Person</person>
        <project>com.tinkerpop.frames.domain.classes.Project</project>
      </configuration>
    </extension>
  </extensions>
</graph>

The configuration element defines a series of key/value pairs, where each keyed element (person and project in this example), represents a path on the request URI and the keyed elements value represents the framed graph element. Therefore, given the above configuration this URI:

http://localhost:8182/graphs/tinkergraph/vertices/1/tp/frames/person

would find the vertex with an identifier of “1”, wrap the returned vertex in a Person frame, and utilize the @Property Frames annotations to “get” a Person object as JSON. The JSON would look like this:

{
  "name":"marko",
  "age":29,
  "version":"0.3",
  "queryTime":24.40612
}