Package dev.roanh.gmark.query
Class Conjunct
java.lang.Object
dev.roanh.gmark.query.Conjunct
- All Implemented Interfaces:
OutputXML
- Direct Known Subclasses:
ConjunctCPQ
Abstract base class for query conjuncts.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Gets the string representation of the inner part of this conjunct.Gets the source variable for this conjunct.Gets the target variable for this conjunct.abstract WorkloadType
getType()
Gets the workload type this conjunct belongs to.boolean
hasStar()
Gets if this conjunct has a Kleene star above it.toString()
protected abstract void
writePartialSQL
(IndentWriter writer) Writes the SQL representation of the inner part of this conjunct to the given writer.protected abstract void
writePartialXML
(IndentWriter writer) Writes the XML representation of the inner part of this conjunct to the given writer.protected void
writeSQL
(IndentWriter writer, String conjunctBaseName) Writes the SQL form of this conjunct clause to the given writer.void
writeXML
(IndentWriter writer) Writes this object as XML to the given writer.
-
Field Details
-
source
The source variable for this conjunct. -
target
The target variable for this conjunct. -
star
private boolean starTrue if this conjunct has a Kleene star above it.
-
-
Constructor Details
-
Conjunct
Constructs a new conjunct with the given source variable, target variable and Kleene star status.- Parameters:
source
- The conjunct source variable.target
- The conjunct target variable.star
- True if the conjunct has a Kleene star above it.
-
-
Method Details
-
hasStar
public boolean hasStar()Gets if this conjunct has a Kleene star above it.- Returns:
- True if this conjunct has a Kleene star above it.
-
getSource
Gets the source variable for this conjunct.- Returns:
- The source variable for this conjunct.
-
getTarget
Gets the target variable for this conjunct.- Returns:
- The target variable for this conjunct.
-
getInnerString
Gets the string representation of the inner part of this conjunct.- Returns:
- The inner string for this conjunct.
-
writePartialSQL
Writes the SQL representation of the inner part of this conjunct to the given writer.- Parameters:
writer
- The writer to write to.
-
writePartialXML
Writes the XML representation of the inner part of this conjunct to the given writer.- Parameters:
writer
- The writer to write to.
-
getType
Gets the workload type this conjunct belongs to.- Returns:
- The workload type this conjunct belongs to.
-
writeSQL
Writes the SQL form of this conjunct clause to the given writer.- Parameters:
writer
- The writer to write to.conjunctBaseName
- The base name of the conjunct clause, optionally a second clause will be written that has a name suffixed with 'tc' if this conjunct has a Kleene star.- See Also:
-
toString
-
writeXML
Description copied from interface:OutputXML
Writes this object as XML to the given writer.
-