Java and REST APIs for working with time-representing tree in Neo4j