Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-778

Support GraphFactory location via annotation.

    Details

      Description

      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.

      Map config = new HashMap<>();
      config.put(Graph.GRAPH, MyGraph.class.getName()); //MyGraph is an interface
      MyGraph graph = GraphFactory.open(config);
      

      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.

      @GraphFactory(MyGraphFactory.class) //Graph factory uses this to locate the graph factory class
      interface MyGraph extends Graph{
      }
      

        Attachments

          Activity

            People

            • Assignee:
              spmallette stephen mallette
              Reporter:
              bryncooke Bryn Cooke
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: