Class EdgeGraphData

java.lang.Object
dev.roanh.gmark.util.EdgeGraphData
Direct Known Subclasses:
EdgeGraphData.EndpointData, EdgeGraphData.IdentityData, EdgeGraphData.IntersectionData, EdgeGraphData.PredicateData

public abstract class EdgeGraphData extends Object
Class to represent data stored in the edge graph. These data object can represent path intersections, identity intersections, normal edges and the edge graph source and target node. These data objects are closely linked to CPQ's.
See Also:
  • Constructor Details

    • EdgeGraphData

      public EdgeGraphData()
  • Method Details

    • of

      Constructs a new edge graph data object for the given schema graph edge.
      Parameters:
      edge - The schema graph edge.
      Returns:
      The constructed edge graph predicate data object.
    • of

      public static EdgeGraphData.EndpointData of(String name, SelectivityType type)
      Constructs a new unique piece of edge graph data with a string as its descriptor. This is only used for the edge graph source and target node.
      Parameters:
      name - The name of this data object.
      type - The selectivity type of this data object.
      Returns:
      The constructed edge graph endpoint data object.
    • of

      public static EdgeGraphData.IntersectionData of(EdgeGraphData source, EdgeGraphData target, Deque<EdgeGraphData> first, Deque<EdgeGraphData> second)
      Constructs a new piece of data for the intersection of the given two paths.
      Parameters:
      source - The shared source node (before paths).
      target - The shared target node (after paths).
      first - The first path.
      second - The second path.
      Returns:
      The constructed edge graph identity data object.
    • of

      public static EdgeGraphData.IntersectionData of(EdgeGraphData source, EdgeGraphData target, Deque<EdgeGraphData> first)
      Constructs a new piece of data for the intersection of the given path with identity.
      Parameters:
      source - The shared source node (before path).
      target - The shared target node (after path).
      first - The path to intersect with identity.
      Returns:
      The constructed edge graph identity data object.
    • of

      public static EdgeGraphData.IdentityData of(Type type)
      Constructs a new piece of data for the intersection with identity of between two nodes of the given type.
      Parameters:
      type - The node type.
      Returns:
      The constructed edge graph identity data object.
    • size

      public abstract int size()
      Gets the length of the shortest path through the CPQ represented by this edge graph data object.
      Returns:
      The length of the shortest path through this object.
    • getSourceType

      public abstract Type getSourceType()
      The type of the source node for the CPQ in this data object.
      Returns:
      The target type for this object.
    • getTargetType

      public abstract Type getTargetType()
      The type of the source node for the CPQ in this data object.
      Returns:
      The source type for this object.
    • getSourceSelectivity

      public abstract Selectivity getSourceSelectivity()
      The selectivity of the source node for the CPQ in this data object.
      Returns:
      The source selectivity for this object.
    • getTargetSelectivity

      public abstract Selectivity getTargetSelectivity()
      The selectivity of the target node for the CPQ in this data object.
      Returns:
      The source selectivity for this object.
    • toCPQ

      public abstract CPQ toCPQ()
      Converts this edge graph data object to an actual CPQ representing it.
      Returns:
      A CPQ for this edge graph data object.
      See Also: