tinkerpop/frames — pull request #57 by gjdev (2013-06-07 11:34:05+00:00)
Title: Drop direction from the FramedGraph.frameEdge methods

See also
https://groups.google.com/forum/?fromgroups#!topic/gremlin-users/PDFkieldxFo

The FramedGraph.frameEdge methods have a Direction parameter to
define which side of the frame is the domain (source) and which side
the range (target) of the framed-edge. This is confusing, because
an edge already has a direction that defines source and target of the
frame.

Moreover, it seems of little use to be able to change the direction
of a framed edge at runtime: The framed type has a natural
direction (e.g. Knows vs. IsKnownBy, or Created vs. IsCreatedBy).
This is most apparent when both sides of the edge are of different type
(e.g. Person - Created - Project, vs. Project - CreatedBy - Person).
Passing the wrong direction at runtime will just result in a
ClassCastException.

The direction parameter also makes it hard to generalize the framing of
elements, because for edges you need additional parameters. E.g. it
will be very easy to implement edge-support for GremlinGroovy
annotations (currently GremlinGroovy only supports vertices as input and
output), once the direction parameter is gone.

The direction parameter is only used by the @Domain and @Range
annotations. This commit change the behavior of these annotations to
use the direction of the edge itself, instead of what's passed at
runtime.