CPQ modelling a single label traversal.
Method SummaryModifier and TypeMethodDescription
intReturns the diameter of this CPQ.
getLabel()Gets the label (symbol) for this edge.
isLoop()Tests if this CPQ is a loop, meaning its source and target are the same.Computes and returns the query graph for this CPQ using the given source and target vertices for the computation.
toSQL()Converts this object to an SQL query.
voidWrites this object as XML to the given writer.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.roanh.gmark.conjunct.cpq.CPQ
computeCore, isHomomorphicTo, toQueryGraph
symbolprivate Predicate symbolThe label traversed by this CPQ.
(Predicate symbol)Constructs a new edge CPQ with the given label to traverse.
symbol- The label to traverse.
getLabelpublic Predicate getLabel()Gets the label (symbol) for this edge.
- The label for this edge.
toStringpublic String toString()
toSQLpublic String toSQL()Description copied from interface:
OutputSQLConverts this object to an SQL query.
writeXMLpublic void writeXML
(IndentWriter writer)Description copied from interface:
OutputXMLWrites this object as XML to the given writer.
toQueryGraphComputes and returns the query graph for this CPQ using the given source and target vertices for the computation. Usually using
CPQ.toQueryGraph()instead should be sufficient for most use cases, using this version instead can lead to unexpected results.
getDiameterpublic int getDiameter()Returns the diameter of this CPQ. The diameter of a CPQ is the largest number of labels to which the join operation is applied. A simpler way to think of this concept is the length of the largest path through the CPQ from source to target.
isLooppublic boolean isLoop()Tests if this CPQ is a loop, meaning its source and target are the same. When visualised as a query graph this means that the source and target node are the same node. In its grammar form this means that there is an intersection with identity at the highest level in the CPQ.