I'm trying to come up with an algorithm for computing a filesystem-esque hierarchy from a graph database. I need to put it in terms of a traverser for Neo4j. The structure starts with the graph database service's "reference node":
Every traversal in Neo4j begins at a node. There are two ways to enter an existing graph: lookup by identifier or the reference node which is defined immutably for each database.
My current project is simply to traverse a filesystem and mirror that structure in the database. I have a driver to walk the filesystem, parse XML, and save to the database.
From the reference node, there are a set of forward links in a property graph to the document location. For example:
Multiple paths are added discretely:
As opposed to:
For this graph, a "list traversal", takes a string and regex as input and traverses the graph according to the matches.
The final set of nodes must be either all separators or all identifiers. If it is all separators, then the return list is a conjunction of the child