[
https://issues.apache.org/jira/browse/TINKERPOP3-477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stephen mallette closed TINKERPOP3-477.
---------------------------------------
Resolution: Won't Fix
Fix Version/s: 3.0.0.GA
One might say that this issue has been fixed by the replacement of
{{GraphStrategy}} as a whole in favor of {{TraversalStrategy}}. All strategies
will be developed within the context of a {{Traversal}} which simplifies the
boilerplate even beyond what {{GraphStrategy}} did for TP2 "wrapppers". The
limitation of course is that {{TraversalStrategy}} only applies to `Traversal`
objects so you can't really add functionality at the `Graph` level. If someone
needs to to do that they will need to build custom wrappers (which tends to get
complicated, at least insofar as trying to provide a generalized approach to
them....maybe easier to do in a specific domain, but i'm not completely clear
on that).
> Simplify the GraphStrategy interface
> ------------------------------------
>
> Key: TINKERPOP3-477
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-477
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: structure
> Reporter: Bryn Cooke
> Fix For: 3.0.0.GA
>
>
> Currently GraphStrategy feels too complicated.
> It's because it looks like the formal parameters that should be on the method
> have been shifted on to the return type.
> {code}
> public UnaryOperator<BiFunction<Direction, String[], Iterator<Vertex>>>
> getVertexIteratorsVerticesStrategy(
> Context<StrategyWrappedVertex> ctx) {
> return lambda crazyness;
> }
> {code}
> vs
> {code}
> public Iterator<Vertex> getVertexIteratorsVertices(
> Context<StrategyWrappedVertex> ctx, Direction
> direction, String[] params) {
> return an iterator;
> }
> {code}
> The first example is difficult to document using javadocs and IDEs won't give
> much assistance to the user. The second example @param can be used for
> documentation.
> If the default implementation must be dynamic then the result could be
> retained within the context:
> {code}
> public void onVertexIteratorsVertices(
> Context<StrategyWrappedVertex, Iterator<Vertex>> ctx,
> Direction direction, String[] params) {
> ctx.setResult(iterator); //Setting the result indicates that this event has
> been handled an default processing should not take place.
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)