User Tools

Site Tools


magik-demo:developer:class:core:querygeneralization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
magik-demo:developer:class:core:querygeneralization [2013/07/22 15:22]
alex [getQueryGeneralization]
magik-demo:developer:class:core:querygeneralization [2017/07/06 15:24] (current)
Line 4: Line 4:
  
 This class is used for calculate the generalized version of a query. This class is used for calculate the generalized version of a query.
 +
 +===== Class Attributes =====
 +
 +<code java>
 +public static long executionTime
 +</​code>​
 +===== Class Constructor =====
 +
 +No constructor for this class
 ===== Class Methods ===== ===== Class Methods =====
  
Line 37: Line 46:
  
 ---- ----
-==== getQueryGeneralization ​====+==== getQueryGeneralizationWithoutUnfolding ​====
  
 <code java> <code java>
Line 49: Line 58:
 </​code>​ </​code>​
  
-This method executes the generalization algorithm for queries that has no finite domain selected in the schema related to the query.+This method executes the generalization algorithm for queries that has **no** finite domain ​constraints ​selected in the schema related to the query.
  
 **Parameters:​** **Parameters:​**
Line 65: Line 74:
 ---- ----
  
-==== getQueryGeneralization ​====+==== getQueryGeneralizationWithUnfolding ​====
  
 <code java> <code java>
-public static Query getQueryGeneralization ​(Query query, ​+public static Query getQueryGeneralizationWithUnfolding ​(Query query, ​
                                             java.util.ArrayList<​TCStatement>​ tcStatements, ​                                             java.util.ArrayList<​TCStatement>​ tcStatements, ​
                                             Schema schema) ​                                             Schema schema) ​
Line 77: Line 86:
 </​code>​ </​code>​
  
-Method used for calling ​the Query Generalization ​algorithm ​(that is a private method).+This method executes ​the generalization ​algorithm ​for queries ​that **has** finite domain selected in the schema related to the query.
  
-//Called by:// 
-  * it.unibz.inf.magik.core.TCQCReasoner 
-  * it.unibz.inf.magik.test.TestQueryGeneralization 
 **Parameters:​** **Parameters:​**
   * Query - query that we want to find its generalized version   * Query - query that we want to find its generalized version
Line 93: Line 99:
   * CycleException   * CycleException
   * PrimaryKeyViolationException   * PrimaryKeyViolationException
 +
 +
 +----
 +
 +==== getCompleteAtoms ====
 +<code java>
 +private static java.util.ArrayList<​Atom>​ getCompleteAtoms (java.util.ArrayList<​Atom>​ currentQueryAtoms, ​
 +                                                           ​java.util.ArrayList<​Model>​ counterModels, ​
 +                                                           ​Schema schema)
 +</​code>​
 +
 +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:​**
 +  * currentQueryAtoms - list of all the atoms that are inside the query
 +  * counterModels - all the counter models found for the current query
 +  * schema - database schema
 +
 +**Returns:​**
 +  * list of atoms that are in all the counter models  ​
 +
 +[[magik-demo:​developer:​class:​core:​querygeneralization|Back to Top]] | [[magik-demo:​start|Back to Home Page]]
magik-demo/developer/class/core/querygeneralization.1374499353.txt.gz ยท Last modified: 2017/07/06 15:24 (external edit)