Class Conjunct

java.lang.Object
dev.roanh.gmark.query.Conjunct
All Implemented Interfaces:
OutputXML
Direct Known Subclasses:
ConjunctCPQ

public abstract class Conjunct extends Object implements OutputXML
Abstract base class for query conjuncts.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Variable
    The source variable for this conjunct.
    private boolean
    True if this conjunct has a Kleene star above it.
    private Variable
    The target variable for this conjunct.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Conjunct(Variable source, Variable target, boolean star)
    Constructs a new conjunct with the given source variable, target variable and Kleene star status.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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
    Gets the workload type this conjunct belongs to.
    boolean
    Gets if this conjunct has a Kleene star above it.
    protected abstract String
    Gets the SQL representation of the inner part of this conjunct.
     
    protected abstract void
    Writes the XML representation of the inner part of this conjunct to the given writer.
    void
    Writes 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.output.OutputXML

    toXML
  • Field Details

    • source

      private Variable source
      The source variable for this conjunct.
    • target

      private Variable target
      The target variable for this conjunct.
    • star

      private boolean star
      True if this conjunct has a Kleene star above it.
  • Constructor Details

    • Conjunct

      protected Conjunct(Variable source, Variable target, boolean star)
      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

      public Variable getSource()
      Gets the source variable for this conjunct.
      Returns:
      The source variable for this conjunct.
    • getTarget

      public Variable getTarget()
      Gets the target variable for this conjunct.
      Returns:
      The target variable for this conjunct.
    • getInnerString

      protected abstract String getInnerString()
      Gets the string representation of the inner part of this conjunct.
      Returns:
      The inner string for this conjunct.
    • toPartialSQL

      protected abstract String toPartialSQL()
      Gets the SQL representation of the inner part of this conjunct.
      Returns:
      The SQL for the inner part of this conjunct.
    • writePartialXML

      protected abstract void writePartialXML(IndentWriter writer)
      Writes the XML representation of the inner part of this conjunct to the given writer.
      Parameters:
      writer - The writer to write to.
    • getType

      public abstract WorkloadType getType()
      Gets the workload type this conjunct belongs to.
      Returns:
      The workload type this conjunct belongs to.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • writeXML

      public void writeXML(IndentWriter writer)
      Description copied from interface: OutputXML
      Writes this object as XML to the given writer.
      Specified by:
      writeXML in interface OutputXML
      Parameters:
      writer - The writer to write to.