Commit a54f190b authored by Robert Butora's avatar Robert Butora
Browse files

output: separates one vlkb-extended ObsCore row creation from Dataset & Subsurvey

parent 3d15d844
Loading
Loading
Loading
Loading
+56 −52
Original line number Diff line number Diff line
@@ -119,17 +119,9 @@ public final class XmlSerializer
      new ColumnInfo( "description",   String.class, "Descritpion" )
   };

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

      for(Subsurvey subsurvey : ssurv)
      {
         for(Dataset dataset : subsurvey.datasetArr)
   private static Object[] obscoreRow( Dataset dataset, Subsurvey subsurvey ) 
   {
            if(dataset.obsCore == null) continue; // skip mergeable datasets

            astro.addRow( new Object[] 
      return new Object[]
      {
         // ObsCore
         dataset.obsCore.dataproduct_type,//dataset.dataType, 
@@ -167,7 +159,6 @@ public final class XmlSerializer
            dataset.obsCore.facility_name,
            dataset.obsCore.instrument_name,


            // VLKB extensions
            Integer.valueOf( dataset.overlapCode ),
            Integer.valueOf( dataset.overlapCodeSky ),
@@ -187,7 +178,20 @@ public final class XmlSerializer
            subsurvey.species,
            subsurvey.transition,
            subsurvey.description
                  });
      };
   }

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

      for(Subsurvey subsurvey : ssurv)
      {
         for(Dataset dataset : subsurvey.datasetArr)
         {
            if(dataset.obsCore == null) continue; // skip mergeable datasets

            astro.addRow( obscoreRow(dataset, subsurvey) );
         }
      }