Skip to content
Snippets Groups Projects
Commit 8d0a3a51 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

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

parent f96c84ff
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -39,6 +39,9 @@ To do this: download the jar files listed in the following ...@@ -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` credits section and run a couple of `mvn install:install-file`
commands based upond the dependencies description in the _TASMAN-webapp_ _pom.xml_ 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 ## Developers info
For debugging TASMAN-embedded: For debugging TASMAN-embedded:
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<groupId>it.inaf.ia2.tsm</groupId> <groupId>it.inaf.ia2.tsm</groupId>
<artifactId>tasman-bom</artifactId> <artifactId>tasman-bom</artifactId>
<version>1.3.2</version> <version>1.3.3</version>
<packaging>pom</packaging> <packaging>pom</packaging>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<groupId>it.inaf.ia2.tsm</groupId> <groupId>it.inaf.ia2.tsm</groupId>
<artifactId>tasman-bom</artifactId> <artifactId>tasman-bom</artifactId>
<version>1.3.2</version> <version>1.3.3</version>
</parent> </parent>
<artifactId>tasman-core</artifactId> <artifactId>tasman-core</artifactId>
......
...@@ -65,12 +65,20 @@ public class TapSchemaLoader { ...@@ -65,12 +65,20 @@ public class TapSchemaLoader {
consistencyChecks = new ConsistencyChecks(); 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(); loadAndCheckSchemata();
loadAndCheckTables(); loadAndCheckTables();
loadAndCheckColumns(); loadAndCheckColumns();
loadAndCheckKeys(); 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()); checkModel(tapSchema.getTapSchemaModel());
checkObscore(); checkObscore();
return consistencyChecks; return consistencyChecks;
...@@ -91,6 +99,13 @@ public class TapSchemaLoader { ...@@ -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) { private void checkModel(SchemaModel schemaModel) {
String schemaName = schemaModel.getName(); String schemaName = schemaModel.getName();
......
...@@ -72,6 +72,7 @@ public class TapSchemaMender { ...@@ -72,6 +72,7 @@ public class TapSchemaMender {
if (tapSchema.isHasObscore()) { if (tapSchema.isHasObscore()) {
if (consistencyChecks.isMissingObscore()) { if (consistencyChecks.isMissingObscore()) {
tapSchema.createAndAddIvoaSchema(); tapSchema.createAndAddIvoaSchema();
return;
} }
if (consistencyChecks.isMissingObscore() if (consistencyChecks.isMissingObscore()
|| consistencyChecks.isObscoreToAdd()) { || consistencyChecks.isObscoreToAdd()) {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<groupId>it.inaf.ia2.tsm</groupId> <groupId>it.inaf.ia2.tsm</groupId>
<artifactId>tasman-bom</artifactId> <artifactId>tasman-bom</artifactId>
<version>1.3.2</version> <version>1.3.3</version>
</parent> </parent>
<artifactId>tasman-embedded</artifactId> <artifactId>tasman-embedded</artifactId>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<groupId>it.inaf.ia2.tsm</groupId> <groupId>it.inaf.ia2.tsm</groupId>
<artifactId>tasman-bom</artifactId> <artifactId>tasman-bom</artifactId>
<version>1.3.2</version> <version>1.3.3</version>
</parent> </parent>
<artifactId>tasman-webapp</artifactId> <artifactId>tasman-webapp</artifactId>
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<dependency> <dependency>
<groupId>ari.ucidy</groupId> <groupId>ari.ucidy</groupId>
<artifactId>ucidy</artifactId> <artifactId>ucidy</artifactId>
<version>1.0</version> <version>1.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax</groupId> <groupId>javax</groupId>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment