Package dev.roanh.gmark.util
Class EdgeGraphData
java.lang.Object
dev.roanh.gmark.util.EdgeGraphData
- Direct Known Subclasses:
EdgeGraphData.EndpointData
,EdgeGraphData.IdentityData
,EdgeGraphData.IntersectionData
,EdgeGraphData.PredicateData
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
Represents metadata for the edge graph source and target nodes.protected static class
Data representing identity.protected static class
Metadata representing the intersection of two paths.private static class
Represents data for a normal graph node constructed from a schema graph edge. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Selectivity
The selectivity of the source node for the CPQ in this data object.abstract Type
The type of the source node for the CPQ in this data object.abstract Selectivity
The selectivity of the target node for the CPQ in this data object.abstract Type
The type of the source node for the CPQ in this data object.static EdgeGraphData.IdentityData
Constructs a new piece of data for the intersection with identity of between two nodes of the given type.of
(EdgeGraphData source, EdgeGraphData target, Deque<EdgeGraphData> first) Constructs a new piece of data for the intersection of the given path with identity.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.static EdgeGraphData.PredicateData
Constructs a new edge graph data object for the given schema graph edge.static EdgeGraphData.EndpointData
of
(String name, SelectivityType type) Constructs a new unique piece of edge graph data with a string as its descriptor.abstract int
size()
Gets the length of the shortest path through the CPQ represented by this edge graph data object.abstract CPQ
toCPQ()
Converts this edge graph data object to an actual CPQ representing it.
-
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
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
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
The type of the source node for the CPQ in this data object.- Returns:
- The target type for this object.
-
getTargetType
The type of the source node for the CPQ in this data object.- Returns:
- The source type for this object.
-
getSourceSelectivity
The selectivity of the source node for the CPQ in this data object.- Returns:
- The source selectivity for this object.
-
getTargetSelectivity
The selectivity of the target node for the CPQ in this data object.- Returns:
- The source selectivity for this object.
-
toCPQ
Converts this edge graph data object to an actual CPQ representing it.- Returns:
- A CPQ for this edge graph data object.
- See Also:
-