Commit 26f67e95 authored by Robert Butora's avatar Robert Butora
Browse files

output: make obxcore table column info static final (and remove end-line from xml-tag write)

parent bf52330e
Loading
Loading
Loading
Loading
+73 −75
Original line number Diff line number Diff line
@@ -39,23 +39,19 @@ public final class XmlSerializer
      BufferedWriter out = new BufferedWriter( writer );

      out.write("<?xml-stylesheet type='text/xsl' href='VOTable2XHTML.xsl'?>");
      out.write( "<VOTABLE version='1.1'>\n" );
      out.write( "<RESOURCE>\n" );
      out.write( "<DESCRIPTION> " + searchOutputData.versionString + " </DESCRIPTION>\n" );
      out.write( "<VOTABLE version='1.1'>" );
      out.write( "<RESOURCE>" );
      out.write( "<DESCRIPTION> " + searchOutputData.versionString + " </DESCRIPTION>" );
      for ( int i = 0; i < tables.length; i++ )
      {
         VOSerializer.makeSerializer( DataFormat.TABLEDATA, tables[ i ] ).writeInlineTableElement( out );
      }
      out.write( "</RESOURCE>\n" );
      out.write( "</VOTABLE>\n" );
      out.write( "</RESOURCE>" );
      out.write( "</VOTABLE>" );
      out.flush();
   }


   private static StarTable makeSearchResultsTable(Subsurvey[] ssurv)
   {
      // FIXME make static final
      ColumnInfo[] colInfos =
   static final ColumnInfo[] OBSCORE_COLINFO =
   {
      new ColumnInfo( "dataproduct_type",  String.class,  "Dataproduct Type (image|cube)" ),
      new ColumnInfo( "calib_level",       Integer.class, "Calibration level" ),
@@ -123,7 +119,9 @@ public final class XmlSerializer
      new ColumnInfo( "description",   String.class, "Descritpion" )
   };

      RowListStarTable astro = new RowListStarTable( colInfos );
   private static StarTable makeSearchResultsTable(Subsurvey[] ssurv)
   {
      RowListStarTable astro = new RowListStarTable( OBSCORE_COLINFO );

      for(Subsurvey subsurvey : ssurv)
      {