public class QueryGeneralization
This class is used for calculate the generalized version of a query.
public static long executionTime
No constructor for this class
public static Query getQueryGeneralization (Query query, java.util.ArrayList<TCStatement> tcStatements, Schema schema) throws DLVInvocationException, IOException, CycleException, PrimaryKeyViolationException
Method used for calling the Query Generalization algorithm (that is a private method).
Called by:
Parameters:
Returns:
Throws:
private static Query getQueryGeneralizationWithoutUnfolding (Query query, java.util.ArrayList<TCStatement> tcStatements, Schema schema) throws DLVInvocationException, IOException, CycleException, PrimaryKeyViolationException
This method executes the generalization algorithm for queries that has no finite domain constraints selected in the schema related to the query.
Parameters:
Returns:
Throws:
public static Query getQueryGeneralizationWithUnfolding (Query query, java.util.ArrayList<TCStatement> tcStatements, Schema schema) throws DLVInvocationException, IOException, CycleException, PrimaryKeyViolationException
This method executes the generalization algorithm for queries that has finite domain selected in the schema related to the query.
Parameters:
Returns:
Throws:
private static java.util.ArrayList<Atom> getCompleteAtoms (java.util.ArrayList<Atom> currentQueryAtoms, java.util.ArrayList<Model> counterModels, Schema schema)
This method is used to investigate if each atom of the query is in all the counter models, because if it is not, it has to be removed from the query atoms.
Parameters:
Returns: