Class DefaultUnionOfConjunctiveQueries
java.lang.Object
fr.lirmm.graphik.integraal.core.DefaultUnionOfConjunctiveQueries
- All Implemented Interfaces:
Query, UnionOfConjunctiveQueries, CloseableIterable<EffectiveConjunctiveQuery>
This class represents query which is the union of conjunctive queries.
- Author:
- Clément Sipieter (INRIA) clement@6pi.fr
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultUnionOfConjunctiveQueries(List<Term> ans, ConjunctiveQuery... queries) Creates a union of conjunctive queries from a varargs list of queries.DefaultUnionOfConjunctiveQueries(List<Term> ans, CloseableIterator<EffectiveConjunctiveQuery> queries) Creates a union of conjunctive queries from an iterator of effective queries.DefaultUnionOfConjunctiveQueries(List<Term> ans, CloseableIteratorWithoutException<EffectiveConjunctiveQuery> queries) Creates a union of conjunctive queries from an iterator of effective queries.DefaultUnionOfConjunctiveQueries(List<Term> ans, Collection<ConjunctiveQuery> queries) Creates a union of conjunctive queries from a collection of queries. -
Method Summary
Modifier and TypeMethodDescriptionvoidGet the answer variablesReturns all conjunctive queries contained in this union.getLabel()The label (the name) of this query.booleanReturns whether the query expects a boolean answer.booleanisEmpty()Returns true if there is no queries in this union, false otherwise.iterator()Returns a closeable iterator over the elements of this iterable.voidUpdates the query label.intsize()Returns the number of queries.toString()
-
Constructor Details
-
DefaultUnionOfConjunctiveQueries
Creates a union of conjunctive queries from a collection of queries.- Parameters:
ans- the answer variablesqueries- the conjunctive queries to wrap
-
DefaultUnionOfConjunctiveQueries
public DefaultUnionOfConjunctiveQueries(List<Term> ans, CloseableIteratorWithoutException<EffectiveConjunctiveQuery> queries) Creates a union of conjunctive queries from an iterator of effective queries.- Parameters:
ans- the answer variablesqueries- the effective query iterator
-
DefaultUnionOfConjunctiveQueries
public DefaultUnionOfConjunctiveQueries(List<Term> ans, CloseableIterator<EffectiveConjunctiveQuery> queries) throws IteratorException Creates a union of conjunctive queries from an iterator of effective queries.- Parameters:
ans- the answer variablesqueries- the effective query iterator- Throws:
IteratorException- if the iterator cannot be consumed
-
DefaultUnionOfConjunctiveQueries
Creates a union of conjunctive queries from a varargs list of queries.- Parameters:
ans- the answer variablesqueries- the conjunctive queries to wrap
-
-
Method Details
-
getAnswerVariables
Description copied from interface:UnionOfConjunctiveQueriesGet the answer variables- Specified by:
getAnswerVariablesin interfaceUnionOfConjunctiveQueries- Returns:
- an Collection of Term representing the answer variables.
-
getConjunctiveQueries
Description copied from interface:UnionOfConjunctiveQueriesReturns all conjunctive queries contained in this union.- Specified by:
getConjunctiveQueriesin interfaceUnionOfConjunctiveQueries- Returns:
- All the conjunctive queries as a list.
-
iterator
Description copied from interface:CloseableIterableReturns a closeable iterator over the elements of this iterable.- Specified by:
iteratorin interfaceCloseableIterable<EffectiveConjunctiveQuery>- Specified by:
iteratorin interfaceUnionOfConjunctiveQueries- Returns:
- the iterator over the elements
-
isEmpty
public boolean isEmpty()Description copied from interface:UnionOfConjunctiveQueriesReturns true if there is no queries in this union, false otherwise.- Specified by:
isEmptyin interfaceUnionOfConjunctiveQueries- Returns:
- true if there is no queries in this union, false otherwise.
-
size
public int size()Description copied from interface:UnionOfConjunctiveQueriesReturns the number of queries.- Specified by:
sizein interfaceUnionOfConjunctiveQueries- Returns:
- the number of queries.
-
isBoolean
-
setLabel
-
getLabel
Description copied from interface:UnionOfConjunctiveQueriesThe label (the name) of this query.- Specified by:
getLabelin interfaceQuery- Specified by:
getLabelin interfaceUnionOfConjunctiveQueries- Returns:
- the label of this query
-
toString
-
appendTo
-