Class SchemaGraph

public class SchemaGraph extends UniqueGraph<SelectivityType,Predicate>
The schema graph is a graph that has selectivity types as its nodes. These nodes represent the combination of some node type and some selectivity class. There are directed labelled edges present between these selectivity type nodes. These edges indicate that it is possible to extend a path query with an edge with a certain label to end up at the target selectivity type.
See Also:
  • Field Details

  • Constructor Details

    • SchemaGraph

      public SchemaGraph(Schema schema)
      Constructs a new schema graph from the given schema.
      schema - The graph schema to build the schema graph from.
  • Method Details

    • resolve

      Resolves the given selectivity type presented as a type and selectivity class to the associated graph node adding a new node if required.
      type - The type of the selectivity type.
      sel - The selectivity of the selectivity type.
      The graph node associated with the given selectivity type.
    • removeUnreachable

      public void removeUnreachable()
      Removes all nodes (and associated edges) from the schema graph that are not reachable when drawing paths. All valid paths should start at a node with a selectivity class of SelectivityClass.ONE_ONE or SelectivityClass.EQUALS. Any node that is not reachable from a node with one of these selectivity classes is removed together with all the edges connected to it.
    • printNodes

      public void printNodes()
      Prints all the nodes in the schema graph to the standard output.
    • printEdges

      public void printEdges()
      Prints all the edges in the schema graph to the standard output.