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.
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
IDENTFields inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
WRITER -
Constructor Summary
ConstructorsConstructorDescriptionUnionFOQuery(String label, Collection<FOQuery<? extends FOFormula>> queries) Deprecated.UnionFOQuery(Collection<FOQuery<? extends FOFormula>> queries) Creates a union of first-order queries sharing the same answer variables. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the ordered answer variables of this query.fr.inria.rules.dlgpemodel.api.formulas.IFormulagetBody()getLabel()Deprecated.Collection<FOQuery<? extends FOFormula>> Returns the queries that compose this union.inthashCode()voidDeprecated.toDLGP()Renders this object in DLGP form.toString()Methods inherited from class fr.inria.rules.dlgpemodel.SentenceImpl
getPatterns, setPatternsMethods inherited from class fr.inria.rules.dlgpemodel.HasItemInfoImpl
getItemInfo, setItemInfoMethods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.HasItemInfo
getIdentifier, getInfo, getItemInfo, setIdentifier, setInfo, setItemInfoMethods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
toDLGPEMethods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.ISentence
setPatternsMethods inherited from interface Sentence
getPatterns
-
Constructor Details
-
UnionFOQuery
public UnionFOQuery(Collection<FOQuery<? extends FOFormula>> queries) throws IllegalArgumentException Creates a union of first-order queries sharing the same answer variables.- Parameters:
queries- the queries to union- Throws:
IllegalArgumentException- if the queries do not share the same answer variables
-
UnionFOQuery
@Deprecated public UnionFOQuery(String label, Collection<FOQuery<? extends FOFormula>> queries) throws IllegalArgumentException Deprecated.Creates a labeled union of first-order queries sharing the same answer variables.- Parameters:
label- the query labelqueries- the queries to union- Throws:
IllegalArgumentException- if the queries do not share the same answer variables
-
-
Method Details
-
getQueries
Returns the queries that compose this union.- Returns:
- the member queries
-
getBody
public fr.inria.rules.dlgpemodel.api.formulas.IFormula getBody()- Specified by:
getBodyin interfacefr.inria.rules.dlgpemodel.api.sentences.IQuery
-
getAnswerVariables
Description copied from interface:QueryReturns the ordered answer variables of this query.- Specified by:
getAnswerVariablesin interfacefr.inria.rules.dlgpemodel.api.sentences.IQuery- Specified by:
getAnswerVariablesin interfaceQuery- Returns:
- an ordered collection of variable representing the variables of this query that are used as answers.
-
getLabel
-
setLabel
-
equals
-
hashCode
-
toString
-
toDLGP
-