User Tools

Site Tools


Writing /home/academic/ogsavkovic/public_html/wiki/data/cache/7/758d39e061b8c642cc4bf2ca22b73939.metadata failed
magik-demo:developer:class:core:schema

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== Schema ====== ''**public class Schema**'' \\ ''**implements Serializable**'' Schema describes an SQL schema determined with s set of relations over which attributes finite domain and foreign key constraints can be defined. ===== Class Attributes ===== <code java> private long id; private boolean localSchema; private java.lang.String name; private java.util.ArrayList<Relation> relations; private java.util.ArrayList<ForeignKey> foreignKeys; private java.util.ArrayList<FiniteDomainConstraint> finiteDomainConstraints; private java.util.ArrayList<Query> conjuctiveQueries; private java.util.ArrayList<TCStatement> tcStatements; private java.lang.String dbUrl; private java.lang.String dbUser; private java.lang.String dbPassword; </code> ===== Class Constructor ===== ==== Schema ==== <code java> public Schema () </code> Default constructor ---- ==== Schema ==== <code java> public Schema (String name, java.util.ArrayList<Relation> relations, java.util.ArrayList<ForeignKey> foreignKeys, java.util.ArrayList<FiniteDomainConstraint> finiteDomainConstraints, java.util.ArrayList<Query> conjuctiveQueries, java.util.ArrayList<TCStatement> tcStatements) </code> Constructor for creating a a database schema.\\ //Called by:// * it.unibz.inf.magik.test.TestQueryClass * it.unibz.inf.magik.test.TestQueryToSQL * it.unibz.inf.magik.test.TestFK * it.unibz.inf.magik.test.TestFK2 * it.unibz.inf.magik.test.TestTCQCReasonerBlackWhiteExample * it.unibz.inf.magik.test.TestTCQCReasonerPlainCompanyEx * it.unibz.inf.magik.test.TestQueryGeneralization * it.unibz.inf.magik.test.TestTCQCReasonerFKandFD * it.unibz.inf.magik.test.TestTCQCReasonerTCSuggestions * it.unibz.inf.magik.test.TestTCQCReasonerUnderFDC * it.unibz.inf.magik.test.TestQueryGeneralization * it.unibz.inf.magik.test.TestTCQCReasonerPlainSchoolEx * it.unibz.inf.magik.test.TestDatabaseConnectorClass **Parameters:** * relation - list of relation that are in the schema * foreignKeys - list of foreign keys related to the relations inside the schema * finiteDomainConstraints - list of finite domain constraints defined for the schema * conjuctiveQueries - list of the queries defined for the schema * tcStatements - list of table completeness statements defined for the schema ---- ==== Schema ==== <code java> public Schema (String name, java.util.ArrayList<Relation> relations, java.util.ArrayList<ForeignKey> foreignKeys, java.util.ArrayList<FiniteDomainConstraint> finiteDomainConstraints) </code> Constructor for creating a database schema with only relations, foreign keys and finite domain constraints defined.\\ //Called by:// * it.unibz.inf.magik.test.TestHardCaseFDCandFK * it.unibz.inf.magik.test.TestSimpleComparison * it.unibz.inf.magik.test.TestValQueryProblem * it.unibz.inf.magik.test.TestTCQCReasonerUnderFDC * it.unibz.inf.magik.test.TestPrimaryKeyViolation **Parameters:** * relation - list of relation that are in the schema * foreignKeys - list of foreign keys related to the relations inside the schema * finiteDomainConstraints - list of finite domain constraints defined for the schema ---- ==== Schema ==== <code java> public Schema (java.lang.String name, boolean localschema, java.util.ArrayList<Relation> relations, java.util.ArrayList<ForeignKey> foreignKeys, java.util.ArrayList<FiniteDomainConstraint> finiteDomainConstraints, java.util.ArrayList<Query> conjuctiveQueries, java.util.ArrayList<TCStatement> tcStatements) </code> Constructor that instantiates all the parts of the schema //Called by:// * it.unibz.inf.magik.web.SessionControl * it.unibz.inf.magik.web.SessionSchema **Parameters:** * name - name of the schema * localschema - //true// if the schema is local, //false// otherwise * relation - list of relation that are in the schema * foreignKeys - list of foreign keys related to the relations inside the schema * finiteDomainConstraints - list of finite domain constraints defined for the schema * conjunctiveQueries - list of the query defined for the schema * tcStatements - list of the table completeness statements for the schema ===== 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 ----

magik-demo/developer/class/core/schema.1374238380.txt.gz · Last modified: 2017/07/06 15:24 (external edit)