Thanks Peter, All reification is done lazily, so no associated nodes are created, unless this is asked for. All associated nodes created to make reification possible are initially disconnected from the main graph. So only when users decide to create relationships from elements in the main graph to reified elements, will associated nodes become part of the main graph. In those cases the user wants to access those associated nodes to retrieve information. Every Element that is created (or looked up) will have a more concrete type than just Element. It is impossible to create just an Element; it will always be a Node, Relationship, RelationshipType, RelationshipRole, PropertyType or Property, which can be dispatched upon. Once I have the HyperRelationships working (still need to do some implementation), I will look into Traversers. Those need to be adjusted to support HyperRelationships anyway. One of the things I would like to do is make Traversers composable, so a traversal can take a traversal as input. This requires every Element to extends Iterable<Path>, where the Element returns one Path (itself) containing only one Element (itself). This makes it possible to traverse from an element, using a composition of Traverers to eventually return the paths requested. I think it is a good idea too, to generalize PropertyType and RelationshipType so we can treat them on equal footing, making it possible to traverse to a Property using the same mechanisms we would use to traverse to another Node. Still work to be done. Creating a couple of good examples is indeed something on my todo list. Niels
> From: [email protected] > Date: Mon, 25 Jul 2011 06:44:17 -0700 > To: [email protected] > Subject: Re: [Neo4j] Enhanced API and HyperRelationships > > Nils, > this looks very cool and generic, great job in writing this down! The > main part I have problems to grasp is how to query a data structure of > PropertyContainers that can be arbitrarily reified without being too > generic and loose track of your data structure. Do you imaging any > query mecainism for this in order to manage these structures? Do you > have an example for that? > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/ - Ă–resund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Sun, Jul 24, 2011 at 5:03 PM, Niels Hoogeveen > <[email protected]> wrote: > > > > Today I wrote a piece about the Enhanced API and about HyperRelationships, > > I have been working on over the last couple of days. > > > > See: https://github.com/peterneubauer/graph-collections/wiki/Enhanced-API > > > > The API as presented in the graph-collections repo on Git is not feature > > complete yet with respect to HyperRelationships. > > The interfaces are there, but the implementation only works for binary > > relationships at present. Need one more day for the implementation. > > > > I posted the Wiki page and the source code to open the discussion about > > these new features. > > > > Niels > > _______________________________________________ > > Neo4j mailing list > > [email protected] > > https://lists.neo4j.org/mailman/listinfo/user > > > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

