Commit 8d0a3a51 authored by Sonia Zorba's avatar Sonia Zorba

Fixed bug in consistency checking of missing ObsCore. Updated version to 1.3.3

parent f96c84ff
Pipeline #138 passed with stage
in 7 seconds
......@@ -39,6 +39,9 @@ To do this: download the jar files listed in the following
credits section and run a couple of `mvn install:install-file`
commands based upond the dependencies description in the _TASMAN-webapp_ _pom.xml_ file.
mvn install:install-file -Dfile=ucidy-1.1.jar -DgroupId=ari.ucidy -DartifactId=ucidy -Dversion=1.1 -Dpackaging=jar
mvn install:install-file -Dfile=unity-1.0.jar -DgroupId=uk.me.nxg -DartifactId=unity -Dversion=1.0 -Dpackaging=jar
## Developers info
For debugging TASMAN-embedded:
......
......@@ -4,7 +4,7 @@
<groupId>it.inaf.ia2.tsm</groupId>
<artifactId>tasman-bom</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
<packaging>pom</packaging>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>it.inaf.ia2.tsm</groupId>
<artifactId>tasman-bom</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
</parent>
<artifactId>tasman-core</artifactId>
......
......@@ -65,12 +65,20 @@ public class TapSchemaLoader {
consistencyChecks = new ConsistencyChecks();
// If a TAP_SCHEMA schema misses some columns or tables, following
// loadAndCheck* methods will throw an exception. To avoid this, here a
// new method could be added. The method should execute some custom SQL
// calls in order to check the TAP_SCHEMA structure before loading it.
loadAndCheckSchemata();
loadAndCheckTables();
loadAndCheckColumns();
loadAndCheckKeys();
// Here the checkModel method called on the TAP_SCHEMA schema can check
// only wrong datatypes. If a table misses some columns, an exception
// would have been thrown in previous steps.
checkModel(tapSchema.getTapSchemaModel());
checkObscore();
return consistencyChecks;
......@@ -91,6 +99,13 @@ public class TapSchemaLoader {
}
}
/**
* Checks if a schema generated by TASMAN has the right structure according
* to the SchemaModel. This method must be called after TAP_SCHEMA has been
* loaded. For this reason it has some limitations about the checking of the
* TAP_SCHEMA schema itself (it can check datatypes but the structure has to
* be already correct).
*/
private void checkModel(SchemaModel schemaModel) {
String schemaName = schemaModel.getName();
......
......@@ -72,6 +72,7 @@ public class TapSchemaMender {
if (tapSchema.isHasObscore()) {
if (consistencyChecks.isMissingObscore()) {
tapSchema.createAndAddIvoaSchema();
return;
}
if (consistencyChecks.isMissingObscore()
|| consistencyChecks.isObscoreToAdd()) {
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>it.inaf.ia2.tsm</groupId>
<artifactId>tasman-bom</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
</parent>
<artifactId>tasman-embedded</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>it.inaf.ia2.tsm</groupId>
<artifactId>tasman-bom</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
</parent>
<artifactId>tasman-webapp</artifactId>
......@@ -139,7 +139,7 @@
<dependency>
<groupId>ari.ucidy</groupId>
<artifactId>ucidy</artifactId>
<version>1.0</version>
<version>1.1</version>
</dependency>
<dependency>
<groupId>javax</groupId>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment