Class UnionFOQuery

java.lang.Object
fr.inria.rules.dlgpemodel.HasItemInfoImpl
fr.inria.rules.dlgpemodel.SentenceImpl
fr.inria.rules.integraal.model.query.impl.UnionFOQuery
All Implemented Interfaces:
fr.inria.rules.dlgpemodel.api.sentences.HasItemInfo, fr.inria.rules.dlgpemodel.api.sentences.IPrintable, fr.inria.rules.dlgpemodel.api.sentences.IQuery, fr.inria.rules.dlgpemodel.api.sentences.ISentence, Labeled, Printable, Sentence, Query

public class UnionFOQuery extends fr.inria.rules.dlgpemodel.SentenceImpl implements Query, Labeled, Printable, fr.inria.rules.dlgpemodel.api.sentences.IQuery
The UnionFOQuery represents a union of queries. Each query in the union is independent of the others ; except for the answer variable's tuple that must be exactly the same.
This constraint is ensured during the object creation and an assertion error is thrown iff this constraint is not respected.
An empty union can be created and the answer variables will be an empty list. The result of the evaluation of an empty union should always be false.
  • Field Summary

    Fields inherited from interface fr.inria.rules.dlgpemodel.api.sentences.HasItemInfo

    IDENT

    Fields inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable

    WRITER

    Fields inherited from interface Labeled

    NOLABEL
  • Constructor Summary

    Constructors
    Constructor
    Description
    UnionFOQuery(String label, Collection<FOQuery<? extends FOFormula>> queries)
    Deprecated.
    Creates a union of first-order queries sharing the same answer variables.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Returns the ordered answer variables of this query.
    fr.inria.rules.dlgpemodel.api.formulas.IFormula
     
    Deprecated.
    Returns the queries that compose this union.
    int
     
    void
    Deprecated.
    Renders this object in DLGP form.
     

    Methods inherited from class fr.inria.rules.dlgpemodel.SentenceImpl

    getPatterns, setPatterns

    Methods inherited from class fr.inria.rules.dlgpemodel.HasItemInfoImpl

    getItemInfo, setItemInfo

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.HasItemInfo

    getIdentifier, getInfo, getItemInfo, setIdentifier, setInfo, setItemInfo

    Methods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable

    toDLGPE

    Methods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.ISentence

    setPatterns

    Methods inherited from interface Sentence

    getPatterns
  • Constructor Details

  • Method Details

    • getQueries

      public Collection<FOQuery<? extends FOFormula>> getQueries()
      Returns the queries that compose this union.
      Returns:
      the member queries
    • getBody

      public fr.inria.rules.dlgpemodel.api.formulas.IFormula getBody()
      Specified by:
      getBody in interface fr.inria.rules.dlgpemodel.api.sentences.IQuery
    • getAnswerVariables

      public Collection<Variable> getAnswerVariables()
      Description copied from interface: Query
      Returns the ordered answer variables of this query.
      Specified by:
      getAnswerVariables in interface fr.inria.rules.dlgpemodel.api.sentences.IQuery
      Specified by:
      getAnswerVariables in interface Query
      Returns:
      an ordered collection of variable representing the variables of this query that are used as answers.
    • getLabel

      @Deprecated public String getLabel()
      Deprecated.
      Description copied from interface: Labeled
      Returns the current label.
      Specified by:
      getLabel in interface Labeled
      Specified by:
      getLabel in interface Sentence
      Returns:
      the label of this object
    • setLabel

      @Deprecated public void setLabel(String label)
      Deprecated.
      Description copied from interface: Labeled
      Updates the current label.
      Specified by:
      setLabel in interface Labeled
      Specified by:
      setLabel in interface Sentence
      Parameters:
      label - the new label
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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

      public String toDLGP()
      Description copied from interface: Printable
      Renders this object in DLGP form.
      Specified by:
      toDLGP in interface Printable
      Returns:
      the DLGP serialization