This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
magik-demo:developer:class:core:tcstatement [2013/07/19 10:52] alex created |
magik-demo:developer:class:core:tcstatement [2017/07/06 15:24] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== TC - statement ====== | ====== TC - statement ====== | ||
+ | ''**public class TCStatement**'' \\ | ||
+ | ''**implements Serializable**'' | ||
+ | |||
+ | Table Completeness (TC) statement describes a table completeness statement as it is defined by Razniewski&Nutt(VLDB2011). | ||
+ | |||
+ | {{ :magik-demo:developer:schema2.png?nolink&600 |}} | ||
+ | |||
+ | 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). | ||
+ | |||
+ | ===== Class Attributes ===== | ||
+ | |||
+ | <code java> | ||
+ | private long id | ||
+ | private java.lang.String name | ||
+ | private java.util.ArrayList<Term> headSimpleTerm | ||
+ | private java.util.ArrayList<Atom> conditionG | ||
+ | private java.lang.String description | ||
+ | </code> | ||
+ | |||
+ | ===== Class Constructors ===== | ||
+ | ==== TCStatement ==== | ||
+ | <code java> | ||
+ | public TCStatement () | ||
+ | </code> | ||
+ | |||
+ | Default constructor | ||
+ | |||
+ | ---- | ||
+ | ==== TCStatement ==== | ||
+ | <code java> | ||
+ | public TCStatement (Relation relation, | ||
+ | java.util.ArrayList<Term> headSimpleTerms, | ||
+ | java.util.ArrayList<Atom> conditionG, | ||
+ | java.lang.String description, | ||
+ | java.lang.String name) </code> | ||
+ | | ||
+ | Constructor for creating a tc-stmt filled.\\ | ||
+ | |||
+ | //Called by:// | ||
+ | * it.unibz.inf.magik.web.SessionControl | ||
+ | * it.unibz.inf.magik.core.TCSuggestions | ||
+ | * it.unibz.inf.magik.additional.InvolvedVariablesDetector | ||
+ | * it.unibz.inf.magik.test.TestFK | ||
+ | * it.unibz.inf.magik.test.TestHardCaseFDCandFK | ||
+ | * it.unibz.inf.magik.test.TestSimpleComparison | ||
+ | * it.unibz.inf.magik.test.TestTCQCReasonerBlackWhiteExample | ||
+ | * it.unibz.inf.magik.test.TestTCQCReasonerPlainCompanyEx | ||
+ | * it.unibz.inf.magik.test.TestValQueryProblem | ||
+ | * it.unibz.inf.magik.test.TestTCQCReasonerUnderFDC | ||
+ | * it.unibz.inf.magik.test.TestFK | ||
+ | * it.unibz.inf.magik.test.TestFK2 | ||
+ | * it.unibz.inf.magik.test.TestTCQCReasonerPlainSchoolEx | ||
+ | * it.unibz.inf.magik.test.TestQueryGeneralization | ||
+ | * it.unibz.inf.magik.test.TestTCQCReasonerFKandFD | ||
+ | * it.unibz.inf.magik.test.TestQueryClass | ||
+ | |||
+ | **Parameters:** | ||
+ | * relation | ||
+ | * headSimpleTerms | ||
+ | * conditionG | ||
+ | * description | ||
+ | * name | ||
+ | |||
+ | |||
+ | ===== Class Methods ===== | ||
+ | |||
+ | |||
+ | ==== applyCondition ==== | ||
+ | <code java> | ||
+ | private void applyCondition (java.lang.String termOld, | ||
+ | java.lang.String termNew, | ||
+ | java.util.HashMap<java.lang.String, java.lang.String> termEquality) | ||
+ | throws ParseSQLQueryException | ||
+ | </code> | ||
+ | Apply one or more conditions to a query | ||
+ | |||
+ | **Parameters:** | ||
+ | * termOld - original term | ||
+ | * termNew - new term | ||
+ | * termEquality - map for knowing which term are equal | ||
+ | **Throws:** | ||
+ | * ParseSQLQueryException | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== 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]] |