java.lang.Object
org.evomaster.client.java.controller.internal.db.neo4j.Neo4jGraphReader

public class Neo4jGraphReader extends Object
Reads the live Neo4j graph into an in-memory Neo4jGraph snapshot, used as G when scoring Cypher queries. The whole graph is read with two read-only Cypher queries that return only primitive projections (ids, label/type names, property maps).

All driver access goes through ReflectionBasedNeo4jClient, so this class holds no reflection of its own and is only about turning records into the graph model.

  • Constructor Details

    • Neo4jGraphReader

      public Neo4jGraphReader()
  • Method Details

    • read

      public Neo4jGraph read(Object driver)
      Reads all nodes and relationships from the database reachable through driver.
      Parameters:
      driver - the SUT's org.neo4j.driver.Driver, as an Object
      Returns:
      the in-memory graph snapshot
      Throws:
      RuntimeException - if the driver cannot be queried (wrapping the reflection failure)
    • read

      public Neo4jGraph read(ReflectionBasedNeo4jClient client)
      Reads the graph through an already-built client. Kept separate from read(Object) so a caller that holds a client (the handler, or the insertion runner) does not create a second one.