You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2015/07/21 11:55:05 UTC
[jira] [Updated] (TINKERPOP3-778) Support GraphFactory location via
annotation.
[ https://issues.apache.org/jira/browse/TINKERPOP3-778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stephen mallette updated TINKERPOP3-778:
----------------------------------------
Fix Version/s: 3.0.1-incubating
Sounds ok to me. As it is an additive and low-risk feature, I'd say it could be part of 3.0.1. It would go to this branch:
https://github.com/apache/incubator-tinkerpop/tree/tp30
can you offer a pull request for that?
> Support GraphFactory location via annotation.
> ---------------------------------------------
>
> Key: TINKERPOP3-778
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-778
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: structure
> Affects Versions: 3.0.0-incubating
> Reporter: Bryn Cooke
> Assignee: stephen mallette
> Priority: Minor
> Fix For: 3.0.1-incubating
>
>
> When using GraphFactory vendors have to use a concrete class with a static 'open' method on it.
> However, I would expect many vendors will want to expose an interface.
> {code:java}
> Map config = new HashMap<>();
> config.put(Graph.GRAPH, MyGraph.class.getName()); //MyGraph is an interface
> MyGraph graph = GraphFactory.open(config);
> {code}
> I realise that class name of the factory needn't match the class that is returned to the user, but it would be nice if it did.
> Adding an annotation to specify the factory class would fix this.
> {code:java}
> @GraphFactory(MyGraphFactory.class) //Graph factory uses this to locate the graph factory class
> interface MyGraph extends Graph{
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)