firethorn

changeset 4298:2840ac7384f9 2.1.35-stv-issue-1182

Changes to use of VAR_ARRAY_SIZE and NON_ARRAY_SIZE in VOTable Controller
author Stelios <stv@roe.ac.uk>
date Fri Mar 13 18:34:53 2020 +0200 (11 months ago)
parents 1cca1fc1f694
children beb31dffa5e2
files firethorn-core/src/main/java/uk/ac/roe/wfau/firethorn/meta/base/BaseColumn.java firethorn-webapp/src/main/java/uk/ac/roe/wfau/firethorn/webapp/votable/BaseTableVOTableController.java
line diff
     1.1 --- a/firethorn-core/src/main/java/uk/ac/roe/wfau/firethorn/meta/base/BaseColumn.java	Thu Mar 12 22:49:32 2020 +0200
     1.2 +++ b/firethorn-core/src/main/java/uk/ac/roe/wfau/firethorn/meta/base/BaseColumn.java	Fri Mar 13 18:34:53 2020 +0200
     1.3 @@ -38,13 +38,13 @@
     1.4       * The special value for size to indicate a non-array field, {@value}.
     1.5       *
     1.6       */
     1.7 -    public static final Integer NON_ARRAY_SIZE = new Integer(0);
     1.8 +    public static final int NON_ARRAY_SIZE = 0;
     1.9  
    1.10      /**
    1.11       * The special value for size to indicate a variable size array, {@value}.
    1.12       *
    1.13       */
    1.14 -    public static final Integer VAR_ARRAY_SIZE = new Integer(-1);
    1.15 +    public static final int VAR_ARRAY_SIZE = -1;
    1.16  
    1.17      /**
    1.18       * {@link Entity.AliasFactory} interface.
     2.1 --- a/firethorn-webapp/src/main/java/uk/ac/roe/wfau/firethorn/webapp/votable/BaseTableVOTableController.java	Thu Mar 12 22:49:32 2020 +0200
     2.2 +++ b/firethorn-webapp/src/main/java/uk/ac/roe/wfau/firethorn/webapp/votable/BaseTableVOTableController.java	Fri Mar 13 18:34:53 2020 +0200
     2.3 @@ -331,11 +331,10 @@
     2.4              if (column.meta().adql().arraysize() != null)
     2.5                  {
     2.6              	
     2.7 -            	// Changed AdqlColumn.NON_ARRAY_SIZE and AdqlColumn.VAR_ARRAY_SIZE to 0 and 1, comparison was not working correctly
     2.8 -                if (column.meta().adql().arraysize()==0)
     2.9 +                if (column.meta().adql().arraysize()==AdqlColumn.NON_ARRAY_SIZE)
    2.10                      {
    2.11                      }
    2.12 -                else if (column.meta().adql().arraysize()==-1)
    2.13 +                else if (column.meta().adql().arraysize()==AdqlColumn.VAR_ARRAY_SIZE)
    2.14                      {
    2.15                      writer.append(" arraysize='*'");
    2.16                      }