Commit Graph

48 Commits

Author SHA1 Message Date
Giancarlo Panichi 43a5c6fb4f Updated to Git and Jenkins
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@183298 82a268e6-3cf1-43bd-a215-b396298e98cf
2019-11-27 15:58:52 +00:00
Gianpaolo Coro ecd5ae7812 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@131255 82a268e6-3cf1-43bd-a215-b396298e98cf 2016-09-08 16:49:02 +00:00
Loredana Liccardo 9bed06ad26 symm.key file removed in package src/main/resources
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@102058 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-12-15 11:41:12 +00:00
Loredana Liccardo 3786920a6c - total number rows returned as output for the result of the submit Query operation:class DatabaseManagement modified
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101938 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-12-05 15:01:07 +00:00
Loredana Liccardo 167f0c1715 - writeSubmitResultIntoFile method modified removing special characters using regular expressions in order to write data in a file correctly.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101895 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-12-04 16:30:22 +00:00
Loredana Liccardo 885a219fe1 Samplings and SubmitQuery changed in order to return as a result a map with column values truncated to 255 characters and a file with the whole columns values in order to manage so to manage big data properly and the conversion of a geometry data type in a multipolygon representation applying the function st_astext() for a database postgres.
Sampler and DatabaseManagement classes changed. The file is stored on the statistical manager side and recovered through an ulr.
pom file changed in 1.3.0

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101766 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-11-28 11:54:54 +00:00
Loredana Liccardo 72b8e87e81 - method submitQuery modified in class DatabaseManagement in order to return a file and a map as output. The map is truncated to 1000 rows if the result has more than 1000 rows.
method writeTableIntoFile reintroduced that performs the file writing and the map generation. 
- Version in pom file changed in 1.3.0
- method submitQuery modified in class DatabaseManagement adding the UUID string to the submitQuery result file QueryResult file.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101653 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-11-19 14:38:18 +00:00
Loredana Liccardo 4e18e1cd99 - bug fixed in class Analyzing the query for keyword delete and update. space removed.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101545 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-11-10 15:50:26 +00:00
Loredana Liccardo 0410564abd - bug fixed in class parseRegularExpressions. Change applied to parseRegularExpressions method replacing the \n character with a space.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101542 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-11-10 14:22:34 +00:00
Loredana Liccardo 630d4beadc bug fixed for adb Postgres and related the explain function in order to compute the estimated rows of a table. Added a treshold with value 100000. If the rows computed with the explain function is < 100000 the counter function is used otherwise the explain result. DatabaseOperations class modified.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101427 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-11-04 13:25:13 +00:00
Loredana Liccardo 8a06b5373b bug fixed for the submitQuery and sampling operation and related to column value truncated to 255 characters. If the final quote has been truncated the parsecvsstring method in the servlet does not work fine. Bug fixed adding the final quote. convertToJavaType method in DatabaseManagement class modified.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101170 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-10-29 16:10:02 +00:00
Loredana Liccardo 17dfef9f1e - bug fixed in Sampler class in computeSmartSampleWithThreshold method. table name formatted as schema."table" in order to recover the rows
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101088 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-10-28 16:07:36 +00:00
Loredana Liccardo 530a00d536 - bug fixed in class ConnectionManager for the submitquery operation modified in order to manage the data geometry recovering the related value as a sequence of hexadecimal characters and not as a parsed multipolygon value. executeQueryJDBC method modified.
- bug fixed in class DatabaseManagement for the submitquery operation in order to truncate column values of the result to 255 character in convertToJavaType method

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101053 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-10-28 10:00:50 +00:00
Loredana Liccardo b7eba1b58f - for show create table statement column names returned with uppercase names. PostgresTableStructure class modified in order to remove toLowerCase() function applied on the column name.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101048 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-10-27 16:29:04 +00:00
Loredana Liccardo 850c0072b9 - bug fixed and related to samplings operation to manage column uppercase names with a postgres database. Sampler class modified adding "" for a column for database postgres.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101046 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-10-27 16:13:43 +00:00
Loredana Liccardo cba62f48f0 - method closeconnection in class DatabaseManager modified in order to close the SessionFactory.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@100987 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-10-24 16:44:30 +00:00
Loredana Liccardo 71cafbc5df some files updated in previous operations committed
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@100743 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-10-16 09:09:52 +00:00
Loredana Liccardo 2f313cbbea - bug fixed and founded with the TabularData Database resource that has 2 access points with the same endpoint, username and password values.
getAccessPoints method in DBResource class modified and equals method defined in AccessPoint class. DBResource, Normalizer, Decider e Guesser classes modified in order manage the exception generated in equals method. Exceptio managed also in algorithms (except ListNames) in database-rm-algorithms components.

- tag version changed in pom file from 1.1.0 to 1.2.0


git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@100742 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-10-16 09:06:28 +00:00
Loredana Liccardo 2986079369 e.printStackTrace added for debug purpose statement for an exception in executeQuery method
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@100708 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-10-15 11:08:41 +00:00
Loredana Liccardo 6728db3c04 modification applied to the smartSampleOnTable method of class Sampler. If a table has o row return the exception with message "The table has 0 rows"
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99778 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-09-12 12:07:29 +00:00
Loredana Liccardo 77082fa4ad File DestinationDBHibernate.cfg.xml in "cfg" folder of the project renamed in DestinationDBHibernateDBManager.cfg.xml and correction in method initDBSession of the ConectionMannaager class in order to specify this file name.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99649 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-09-10 07:57:17 +00:00
Loredana Liccardo b72e647ea8 bug fixed for the smart smapling (with table col2oct2010-> scientific_names). Corrections in computeSmartSampleWithThreshold method.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99565 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-09-05 15:36:52 +00:00
Loredana Liccardo 5af78b2871 print result's size added in the executeQueryJDBC method in ConnectionManager class.
pom file version modified from 1.0.0 to 1.1.0(for deploy)

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99522 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-09-05 10:02:23 +00:00
Loredana Liccardo 5be390fde8 parameters updated in the SubmitQuery method of DatabaseManagement class.(parameter on path file removed because unusable)
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99410 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-09-03 08:11:42 +00:00
Loredana Liccardo 1e191ee9f3 hibernate bug fixed and related to a join tables that have some columns with identical name. Bug resolved using JDBC. ConnectionManager and DatabaseManagement classes modified adding the method "executeQueryJDBC" in ConnectionManager, used only for the submitquery operation
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99393 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-09-02 13:14:58 +00:00
Loredana Liccardo ecee3f5fdf timeout for hibernate database connection changed to value 5 seconds.(corrections in ConnectionManager class and printfs added and commented in DatabaseFactory and DatabaseManagement classes)
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99376 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-09-01 14:45:00 +00:00
Loredana Liccardo 10488ac084 some printf commented in computeSmartSample and computeSmartSampleWithThreshold for Sampler class
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99371 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-09-01 11:00:32 +00:00
Loredana Liccardo 5d77f12fc9 bug fixed in calculation of table's details for a database postgres through the GetTableDetails algorithm. The calculateElements method in DatabaseOperations class has been modified adding "" for a table name.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99349 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-08-29 12:37:42 +00:00
Loredana Liccardo 6942920792 bug fixed in sampling operations and resolved truncating each table'a attribute to 255 characters
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99348 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-08-29 11:51:09 +00:00
Loredana Liccardo 6ce1e4d44b bug fixed for sampling in class Sampler for a database mysql about an attribute of a table that could be a keyword.Quotes `` added for all attributes before submitting a query.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99335 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-08-28 15:36:38 +00:00
Loredana Liccardo fe5b1c211b bug fixed in smart e random sampling for a database mysql
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99333 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-08-28 13:57:57 +00:00
Loredana Liccardo a2ea87687d - exception management for SQLGrammarException adding a cause message
- method removeQueryExecution implemented and commented in class ConnectionManager

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99191 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-08-01 15:21:17 +00:00
Loredana Liccardo f790f715b7 bug fixed in Sampler and DatabaseOPerations classes to manage tables case sensitive for database Postgres
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99145 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-31 09:02:47 +00:00
Loredana Liccardo ab97ee8304 bug fixed in class DatabaseManagement: method writeSampleTableIntoFile replaced with method buildMapResult.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99060 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-29 10:09:49 +00:00
Loredana Liccardo 78e9c6e288 Methods writeSampleTableIntoFile, writeQueryResultIntoFile, isHexadecimal removed because being commented were not used.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99059 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-29 09:30:18 +00:00
Loredana Liccardo c202c94220 methods getFileQueryResult and getFileSampleTableResult commented.
Methods writeSampleTableIntoFile and writeQueryResultIntoFile removed because being commented were not used.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99055 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-29 09:26:38 +00:00
Loredana Liccardo 21d1bb5a27 class DatabaseManagement modified in order to not make available the result in a file csv for submitquery and samplings operations.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99051 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-29 08:30:42 +00:00
Loredana Liccardo 6769c97a2d - the connection timeout of about 30 seconds has been managed with a GenericJDBCException.
- exceptions managed in a different way in method executeQuery of Class ConnectionManager

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@98992 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-25 13:49:09 +00:00
Loredana Liccardo 5f795e85d0 added a timeout about 25-20 seconds.To add the timeout the following classes are been modified:
- class DatabaseFactory modified adding the initDBConnection method that overrides the properties contained in the hibernate.cfg.xml file.
- method initDBSession in class ConnectionManager modified in order to use the DatabaseFactory (in package utils) 

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@98967 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-25 08:13:25 +00:00
Loredana Liccardo 229f351f7d bugs fixed in showcreatetable and samplings operations. In these operation it is useful to insert the table name in a query as "schema.table" for postgres and "db.table" for mysql.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@98907 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-23 15:11:58 +00:00
Loredana Liccardo aa3fbea54b bug fixed (updated the output result displayed from the statistical) in DatabaseManagement class related to the bug fixed yesterday.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@98872 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-22 12:58:20 +00:00
Loredana Liccardo 83df040993 bug fixed to retrieve columns names in a correct order (defined in the database schema) for the sampling operations, for the getTableDetails. Updates in Sampler, DatabasesManager and PostgresTableStructure classes.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@98845 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-21 15:19:55 +00:00
Loredana Liccardo 7762f7a162 bug corrected in "showCreateTable" method of MySQLTableStructure class (result managed in a correct way using aliasToEntityOrderedMapResultTransformer class).
Bug fixed in "DatabaseManagement" class in "writeTableIntoFile" method to manage for SubmitQuery e sampling operations tables with one column.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@98835 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-07-21 10:57:49 +00:00
Loredana Liccardo 80435cf7e7 package org.gcube.dataanalysis.test removed
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@96727 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-06-05 09:20:45 +00:00
Loredana Liccardo ce0e91da4a package org.gcube.dataanalysis.test renamed in org.gcube.dataaccess.test in src/test/java
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@96726 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-06-05 09:16:28 +00:00
Loredana Liccardo fe61b11c54 some bug fixed in DatabasesResourcesManager class to recover a correct result from the submit query (in order to comply with AliasToEntityOrderedMapResultTransformer)
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@96724 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-06-05 09:03:12 +00:00
Loredana Liccardo b4ebf6e789 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@96616 82a268e6-3cf1-43bd-a215-b396298e98cf 2014-06-04 14:13:44 +00:00
Loredana Liccardo e5c13f4050 move the library from data-analysis to data-access
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@96611 82a268e6-3cf1-43bd-a215-b396298e98cf
2014-06-04 13:56:35 +00:00