How can I use the type safety of Scala with Tinkerpop Frames' annotations?
This is the Java version example at https://github.com/tinkerpop/frames/wiki :
public interface Person {
@Property("name")
public String getName();
@Adjacency(label="knows")
public Iterable<Person> getKnowsPeople();
@Adjacency(label="knows")
public void addKnowsPerson(final Person person);
@GremlinGroovy("it.out('knows').out('knows').dedup") //Make sure you use the GremlinGroovy module! #1
public Iterable<Person> getFriendsOfAFriend()
}
The Property and Adjacency are simple enough.
But the traversal function is contained within a String so that Scala's type system cannot help.
I am using Gremlin-Scala (https://github.com/mpollmeier/gremlin-scala) to construct my traversals in Scala syntax. Maybe it can be used to further a solution.