Dear Graphsters (or is it Graphists/Graphistas ?),

I'm currently thinking about the API of a possible Neo4jTemplate and am not 
making so much progress. Perhaps those of you that have been to Spring-land 
have some good ideas on how to continue.

My main problem is that the typical Spring template API is very procedural 
(mimicking jdbc), does resource-(connection)-handling, exposes primitives of 
the underlying datastore and does exception translation and perhaps offers 
means for
data conversion (i.e. RowMapper) and some convenience methods.

Our API is rather OO with GraphDatabaseService being the means of being 
connected to the graph (so no further Connection, whatever is necessary).


So I came only up with API methods like:

interface PathMapper<T> {
        T map(Path path;
}


eachPath(long nodeId, {rel-type, rel-direction?}, PathMapper<T>);
eachPath(long nodeId, TraversalDescription, PathMapper<T>);

With Path being the "ResultSet" equivalent.

I would also want to convert single node and relationship-results into paths so 
that people have a uniform access object (NodePath, RelationshipPath).

What is really missing right now from our API are explicit subgraphs and 
methods that handle those.

Any more ideas on what kind of methods / API you would expect from a 
Neo4jTemplate.

I will add the usual suspects, like getting nodes and relationships, index 
access.

Cheers

Michael
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to