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
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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:
+1 −1
Original line number Diff line number Diff line
@@ -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>
    
+1 −1
Original line number Diff line number Diff line
@@ -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>
+15 −0
Original line number Diff line number Diff line
@@ -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();
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ public class TapSchemaMender {
        if (tapSchema.isHasObscore()) {
            if (consistencyChecks.isMissingObscore()) {
                tapSchema.createAndAddIvoaSchema();
                return;
            }
            if (consistencyChecks.isMissingObscore()
                    || consistencyChecks.isObscoreToAdd()) {
Loading