This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
magik-demo:developer:magik-architecture [2013/07/26 10:58] alex [Data Layer] |
magik-demo:developer:magik-architecture [2017/07/06 15:24] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{:magik-demo:magik-logo.jpg?900|}} | + | {{:magik-demo:magik_logo.png?nolink&500|}} |
====== MAGIK Architecture ====== | ====== MAGIK Architecture ====== | ||
Line 21: | Line 20: | ||
=== Reasoning === | === Reasoning === | ||
- | * **MAGIK business logic**: the //Controller// component that process users input, run the reasoner (DLV engine), read/write to/from data layer (database), and return an output to users. Related package: ''[[#it.unibz.inf.magik.web|it.unibz.inf.magik.web]]''. | + | * **MAGIK business logic**: the //Controller// component that process users input, run the reasoner (DLV engine), run the Prolog code using TuProlog, read/write to/from data layer (database), and return an output to users. Related package: ''[[#it.unibz.inf.magik.web|it.unibz.inf.magik.web]]''. |
- | * **Core**: module which contains all related classes to encode TC-QC Java objects that is needed by DLV engine, and analyzes the returned answer set program by DLV engine. Related packages: ''[[#it.unibz.inf.magik.core|it.unibz.inf.magik.core]]'', ''[[#it.unibz.inf.magik.additional|it.unibz.inf.magik.additional]]''. | + | * **Core**: module which contains all related classes to encode TC-QC Java objects that is needed by DLV engine, and analyzes the returned answer set program by DLV engine. Also contains all related classes to encode schema, query and TC-statements for generating input file for the Prolog code that return the possible specializations of the query. Related packages: ''[[#it.unibz.inf.magik.core|it.unibz.inf.magik.core]]'', ''[[#it.unibz.inf.magik.additional|it.unibz.inf.magik.additional]]''. |
=== Data === | === Data === | ||
Line 86: | Line 85: | ||
* Displaying information of query reasoning result : ''[[magik-demo:developer:class:web:sessioncontrol#encodingProgram|encodingProgram]]'', ''[[magik-demo:developer:class:web:sessioncontrol#printQueryResultHTML|printQueryResultHTML]]'', ''[[magik-demo:developer:class:web:sessioncontrol#isQueryComplete|isQueryComplete]]'', ''[[magik-demo:developer:class:web:sessioncontrol#approximateQuery|approximateQuery]]'' | * Displaying information of query reasoning result : ''[[magik-demo:developer:class:web:sessioncontrol#encodingProgram|encodingProgram]]'', ''[[magik-demo:developer:class:web:sessioncontrol#printQueryResultHTML|printQueryResultHTML]]'', ''[[magik-demo:developer:class:web:sessioncontrol#isQueryComplete|isQueryComplete]]'', ''[[magik-demo:developer:class:web:sessioncontrol#approximateQuery|approximateQuery]]'' | ||
* Import pre-defined sample schema : ''[[magik-demo:developer:class:web:sessioncontrol#importSampleSchema|importSampleSchema]]'' | * Import pre-defined sample schema : ''[[magik-demo:developer:class:web:sessioncontrol#importSampleSchema|importSampleSchema]]'' | ||
- | * ''[[magik-demo:developer:class:web:sessioncontrol|SessionSchema]]'' extends ''[[magik-demo:developer:class:core:schema|Schema]]'', with the information of selected foreign keys, finite domain constraints, and table completeness statements in the active session, also the information of database connection details (only for remote schema). | + | * ''[[magik-demo:developer:class:web:sessionschema|SessionSchema]]'' extends ''[[magik-demo:developer:class:core:schema|Schema]]'', with the information of selected foreign keys, finite domain constraints, and table completeness statements in the active session, also the information of database connection details (only for remote schema). |
== it.unibz.inf.magik.core == | == it.unibz.inf.magik.core == | ||
Line 113: | Line 112: | ||
== it.unibz.inf.magik.db == | == it.unibz.inf.magik.db == | ||
* ''[[magik-demo:developer:class:db:databaseconnector|DatabaseConnector]]'' → Class for database connection. Database connection is established with PostgreSQL JDBC Driver, a Java library that allows Java programs to connect to a PostgreSQL database. | * ''[[magik-demo:developer:class:db:databaseconnector|DatabaseConnector]]'' → Class for database connection. Database connection is established with PostgreSQL JDBC Driver, a Java library that allows Java programs to connect to a PostgreSQL database. | ||
- | * Read schemas relations, and foreign keys from database : ''[[magik-demo:developer:class:databaseconnector#getSchemaType|getSchemaType]]'', ''[[magik-demo:developer:class:databaseconnector#getSchemas|getSchemas]]'', ''[[magik-demo:developer:class:databaseconnector#getDbSchemas|getDbSchemas]]'', ''[[magik-demo:developer:class:databaseconnector#getSchema|getSchema]]'', ''[[magik-demo:developer:class:databaseconnector#readRelation|readRelation]]'', ''[[magik-demo:developer:class:databaseconnector#readForeignKeys|readForeignKeys]]'' | + | * Read schemas relations, and foreign keys from database : ''[[magik-demo:developer:class:db:databaseconnector#getSchemaType|getSchemaType]]'', ''[[magik-demo:developer:class:db:databaseconnector#getSchemas|getSchemas]]'', ''[[magik-demo:developer:class:db:databaseconnector#getDbSchemas|getDbSchemas]]'', ''[[magik-demo:developer:class:db:databaseconnector#getSchema|getSchema]]'', ''[[magik-demo:developer:class:db:databaseconnector#readRelation|readRelation]]'', ''[[magik-demo:developer:class:db:databaseconnector#readForeignKeys|readForeignKeys]]'' |
- | * Add/Edit/Delete schema (and relation) : ''[[magik-demo:developer:class:databaseconnector#addRelation|addRelation]]'', ''[[magik-demo:developer:class:databaseconnector#addSchema|addSchema]]'', ''[[magik-demo:developer:class:databaseconnector#deleteSchema|deleteSchema]]'', ''[[magik-demo:developer:class:databaseconnector#updateSchema|updateSchema]]'' | + | * Add/Edit/Delete schema (and relation) : ''[[magik-demo:developer:class:db:databaseconnector#addRelation|addRelation]]'', ''[[magik-demo:developer:class:db:databaseconnector#addSchema|addSchema]]'', ''[[magik-demo:developer:class:db:databaseconnector#deleteSchema|deleteSchema]]'', ''[[magik-demo:developer:class:db:databaseconnector#updateSchema|updateSchema]]'' |
- | * Get and add remote database connection information (only for remote database schema) : ''[[magik-demo:developer:class:databaseconnector#getDbUrl|getDbUrl]]'', ''[[magik-demo:developer:class:databaseconnector#getDbUser|getDbUser]]'', ''[[magik-demo:developer:class:databaseconnector#getDbPassword|getDbPassword]]'', ''[[magik-demo:developer:class:databaseconnector#addDbConnection|addDbConnection]]'' | + | * Get and add remote database connection information (only for remote database schema) : ''[[magik-demo:developer:class:db:databaseconnector#getDbUrl|getDbUrl]]'', ''[[magik-demo:developer:class:db:databaseconnector#getDbUser|getDbUser]]'', ''[[magik-demo:developer:class:db:databaseconnector#getDbPassword|getDbPassword]]'', ''[[magik-demo:developer:class:db:databaseconnector#addDbConnection|addDbConnection]]'' |
- | * Evaluate SQL query (only for remote database schema) : ''[[magik-demo:developer:class:databaseconnector#evaluateQuery|evaluateQuery]]'' | + | * Evaluate SQL query (only for remote database schema) : ''[[magik-demo:developer:class:db:databaseconnector#evaluateQuery|evaluateQuery]]'' |
- | * Validate and add user : ''[[magik-demo:developer:class:databaseconnector#validateUser|validateUser]]'', ''[[magik-demo:developer:class:databaseconnector#addUser|addUser]]'' | + | * Validate and add user : ''[[magik-demo:developer:class:db:databaseconnector#validateUser|validateUser]]'', ''[[magik-demo:developer:class:db:databaseconnector#addUser|addUser]]'' |
- | * Initialize required tables in installation process (for localhost application version) : ''[[magik-demo:developer:class:databaseconnector#installation|installation]]'' | + | * Initialize required tables in installation process (for localhost application version) : ''[[magik-demo:developer:class:db:databaseconnector#installation|installation]]'' |
== it.unibz.inf.magik.hibernate == | == it.unibz.inf.magik.hibernate == |