This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
magik-demo:developer:class:core:tcstatement [2013/07/19 11:05] alex [Class Constructor] |
magik-demo:developer:class:core:tcstatement [2017/07/06 15:24] (current) |
||
---|---|---|---|
Line 6: | Line 6: | ||
Table Completeness (TC) statement describes a table completeness statement as it is defined by Razniewski&Nutt(VLDB2011). | Table Completeness (TC) statement describes a table completeness statement as it is defined by Razniewski&Nutt(VLDB2011). | ||
- | Namely, Compl(R(x);G) is a table completeness statement for the relation R, and under the condition G. \\ | + | {{ :magik-demo:developer:schema2.png?nolink&600 |}} |
- | Condition G is a conjunction of atoms and x is a vector of arity R. \\ | + | |
+ | Namely, Compl(R(x);G) is a table completeness statement for the relation R, and under the condition G. | ||
+ | |||
+ | Condition G is a conjunction of atoms and x is a vector of arity R. | ||
A TC statement is satisfied with a partial db D=(Di,Da) if R(x)(Di) {{:magik-demo:developer:class:core:subset_of_or_equal_to_icon_256x256.png?nolink&11|}} (R(x),G)(Da). | A TC statement is satisfied with a partial db D=(Di,Da) if R(x)(Di) {{:magik-demo:developer:class:core:subset_of_or_equal_to_icon_256x256.png?nolink&11|}} (R(x),G)(Da). | ||
Line 20: | Line 24: | ||
</code> | </code> | ||
- | ===== Class Constructor ===== | + | ===== Class Constructors ===== |
==== TCStatement ==== | ==== TCStatement ==== | ||
<code java> | <code java> | ||
Line 31: | Line 35: | ||
==== TCStatement ==== | ==== TCStatement ==== | ||
<code java> | <code java> | ||
- | public Query (java.lang.String name, | + | public TCStatement (Relation relation, |
- | java.util.ArrayList<Atom> atoms, | + | java.util.ArrayList<Term> headSimpleTerms, |
- | java.util.ArrayList<Term> outputVariables, | + | java.util.ArrayList<Atom> conditionG, |
- | java.lang.String description) </code> | + | java.lang.String description, |
+ | java.lang.String name) </code> | ||
| | ||
- | Constructor for creating a query with the most important fields not empty.\\ | + | Constructor for creating a tc-stmt filled.\\ |
//Called by:// | //Called by:// | ||
+ | * it.unibz.inf.magik.web.SessionControl | ||
+ | * it.unibz.inf.magik.core.TCSuggestions | ||
* it.unibz.inf.magik.additional.InvolvedVariablesDetector | * it.unibz.inf.magik.additional.InvolvedVariablesDetector | ||
- | * it.unibz.inf.magik.core.QueryMinimizer | ||
- | * it.unibz.inf.magik.core.PreProcessor | ||
- | * it.unibz.inf.magik.test.TestFK | ||
* it.unibz.inf.magik.test.TestFK | * it.unibz.inf.magik.test.TestFK | ||
- | * it.unibz.inf.magik.test.TestFK2 | ||
* it.unibz.inf.magik.test.TestHardCaseFDCandFK | * it.unibz.inf.magik.test.TestHardCaseFDCandFK | ||
- | * it.unibz.inf.magik.test.TestPrimaryVioation | ||
- | * it.unibz.inf.magik.test.TestQueryClass | ||
- | * it.unibz.inf.magik.test.TestQueryGeneralization | ||
- | * it.unibz.inf.magik.test.TestQueryToSQL | ||
* it.unibz.inf.magik.test.TestSimpleComparison | * it.unibz.inf.magik.test.TestSimpleComparison | ||
* it.unibz.inf.magik.test.TestTCQCReasonerBlackWhiteExample | * it.unibz.inf.magik.test.TestTCQCReasonerBlackWhiteExample | ||
- | * it.unibz.inf.magik.test.TestTCQCReasonerFKandFD | ||
* it.unibz.inf.magik.test.TestTCQCReasonerPlainCompanyEx | * it.unibz.inf.magik.test.TestTCQCReasonerPlainCompanyEx | ||
- | * it.unibz.inf.magik.test.TestTCQCReasonerPlainSchoolEx | ||
- | * it.unibz.inf.magik.test.TestTCQCReasonerTCSuggestions | ||
- | * it.unibz.inf.magik.test.TestTCQCReasonerUnderFDC | ||
* it.unibz.inf.magik.test.TestValQueryProblem | * it.unibz.inf.magik.test.TestValQueryProblem | ||
- | * it.unibz.inf.magik.test.UnificationTest | + | * it.unibz.inf.magik.test.TestTCQCReasonerUnderFDC |
- | **Parameters:** | + | * it.unibz.inf.magik.test.TestFK |
- | * name - name of query | + | * it.unibz.inf.magik.test.TestFK2 |
- | * atoms - atoms of the query | + | * it.unibz.inf.magik.test.TestTCQCReasonerPlainSchoolEx |
- | * outputVariables - terms that we want to see in output of the query | + | * it.unibz.inf.magik.test.TestQueryGeneralization |
- | * description - description of what query does | + | * it.unibz.inf.magik.test.TestTCQCReasonerFKandFD |
- | + | ||
- | + | ||
- | ---- | + | |
- | ==== Atom ==== | + | |
- | <code java> | + | |
- | public Query (java.lang.String name, | + | |
- | java.lang.String SQLString, | + | |
- | java.lang.String description, | + | |
- | Schema schema) | + | |
- | throws ParseSQLQueryException, | + | |
- | ContextException | + | |
- | </code> | + | |
- | Constructor for creating a query by parsing SQL string.\\ | + | |
- | + | ||
- | //Called by:// | + | |
- | * it.unibz.inf.magik.web.SessionControl | + | |
* it.unibz.inf.magik.test.TestQueryClass | * it.unibz.inf.magik.test.TestQueryClass | ||
- | * it.unibz.inf.magik.test.TestQueryToSQL | ||
**Parameters:** | **Parameters:** | ||
- | * name - name of query | + | * relation |
- | * SQLString - string that contains Query in SQL code | + | * headSimpleTerms |
- | * outputVariables - terms that we want to see in output of the query | + | * conditionG |
- | * description - description of what query does | + | * description |
- | **Throws:** | + | * name |
- | * ParseSQLQueryException | + | |
- | * ContextException | + | |
===== Class Methods ===== | ===== Class Methods ===== | ||
Line 113: | Line 90: | ||
---- | ---- | ||
+ | |||
+ | ==== clone ==== | ||
+ | <code java> | ||
+ | @Override | ||
+ | public Object clone () | ||
+ | </code> | ||
+ | |||
+ | **Returns:** | ||
+ | * cloned object (TCStatement type) | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== equals ==== | ||
+ | <code java> | ||
+ | @Override | ||
+ | public boolean equals (Object o) | ||
+ | </code> | ||
+ | |||
+ | Implementation for checking the equality for TCStatement | ||
+ | |||
+ | **Returns:** | ||
+ | * //true// if equal, //false// otherwise | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== toString ==== | ||
+ | <code java> | ||
+ | @Override | ||
+ | public String toString () | ||
+ | </code> | ||
+ | |||
+ | Implementation for converting in String format TCStatements. | ||
+ | |||
+ | Format: **''Compl(table[term1,term2,term3])''** | ||
+ | |||
+ | |||
+ | **Returns:** | ||
+ | * String version of the TC - statement | ||
+ | |||
+ | |||
+ | ---- | ||
+ | ==== getter and setter methods ==== | ||
+ | <code java> | ||
+ | public Relation getRelation() | ||
+ | public void setRelation(Relation r) | ||
+ | |||
+ | public java.util.ArrayList<Term> getHeadSimpleTerms() | ||
+ | public void setHeadSimpleTerms(java.util.ArrayList<Term> headSimpleTerms) | ||
+ | |||
+ | public java.util.ArrayList<Atom> getConditionG() | ||
+ | public void setConditionG(java.util.ArrayList<Atom> conditionG) | ||
+ | |||
+ | public long getId() | ||
+ | public void setId(long id) | ||
+ | |||
+ | public String getDescription() | ||
+ | public void setDescription(java.lang.String description) | ||
+ | |||
+ | public String getName() | ||
+ | public void setName(java.lang.String name) | ||
+ | </code> | ||
+ | |||
+ | [[magik-demo:developer:class:core:tcstatement|Back to Top]] | [[magik-demo:start|Back to Home Page]] |