Graph Reader

The GraphReader class provides functionalities to read data from a graph data structure in the library.

Overview

Unlike the GraphLoader that deals with subgraphs, GraphReader focuses on individual graph elements such as Nodes, Edges, or their Attributes.

Methods

  • read: Traverses the graph from a given starting element (node or edge), specified by startElementId, fetching the graph elements as per the provided PositiveGraphDescription. The contextualGraph parameter indicates which graph structure is to be traversed.

  • readFromUncertainFirstElement: Similar to read, but used when the starting element (node or edge) specified by startElementId might not meet the criteria specified in the PositiveGraphDescription.

  • readValues and readValuesFromUncertainFirstElement: These methods enable reading attribute values from nodes or edges, based on the provided PositiveGraphDescription.

  • GraphDescriptionReadResolver: This strategy interface helps resolve how to read elements of the graph described by a GraphDescription.

GraphDescriptionReadResolver

The library uses the GraphDescriptionReadResolver interface, which acts as a strategy to define how to read the elements of the graph based on the provided GraphDescription.

In the context of graph theory, these methods align with common operations such as traversal, attribute fetching, and conditional navigation based on node and edge properties.

For more detailed explanations and examples, please refer to the dedicated pages for each concept.