Commit 60b6f0b9 authored by Robert Butora's avatar Robert Butora
Browse files

bugfix (db-table-rows were not copied to VoTable)

parent d6ab2839
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -143,8 +143,7 @@ public class DbObstap

      List<String> pubdidList = new ArrayList<>();

      LOGGER.fine("Connecting to: " + dbConnArgs.uri()
            + " with optional user/pwd: " + dbConnArgs.userName() +" / "+ dbConnArgs.password() );
      LOGGER.fine("Connecting to: " + dbConnArgs.uri() + " with user: " + dbConnArgs.userName() );

      try( 
            Connection conn = DriverManager.getConnection(dbConnArgs.uri(), dbConnArgs.userName(), dbConnArgs.password());
+3 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ public class FormatResponseFilter implements Filter
   public void init(FilterConfig filterConfig) throws ServletException
   {
      LOGGER.config("Default charset: " + Charset.defaultCharset());
      LOGGER.config("cutout_url: " + settings.serviceUrls.cutoutUrl());
   }

   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
@@ -65,6 +66,7 @@ public class FormatResponseFilter implements Filter
            Band band = Band.parseBand(params, DEFAULT_SPEC_SYSTEM);

            DbObstap.Obstap[] obstapArr = queryObstap(responseWrapper.getDbConnArgs(), pubdidArr, pos, band);
            LOGGER.info("collected metadata for " + obstapArr.length + " datasets");

            String respFormat;
            String respFormatReq[] = params.get("RESPONSEFORMAT");
@@ -153,8 +155,7 @@ public class FormatResponseFilter implements Filter
   private DbObstap.Obstap[] queryObstap(DbConnArgs dbConnArgs, String[] pubdidArr, Pos pos, Band band)
         throws Exception
      {

         LOGGER.fine("trace");
         LOGGER.fine("trace " + dbConnArgs.toString());

         DbObstap dbObstap;
         synchronized(DbObstap.class)
+7 −1
Original line number Diff line number Diff line
@@ -26,7 +26,13 @@ final class XmlSerializer
         String cutoutUrl,
         boolean showDuration, long startTime_msec) throws IOException
   {
      StarTable dstable = new RowListStarTable( VoTableObstap.OBSTAP_VLKB_COLINFO );
      RowListStarTable dstable = new RowListStarTable( VoTableObstap.OBSTAP_VLKB_COLINFO );

      for(DbObstap.Obstap obstap : obstapArr)
      {
         dstable.addRow( VoTableObstap.obstapVlkbRow(obstap) );
      }


      dstable.setParameter(new DescribedValue(
               new DefaultValueInfo("datacubeCount", Integer.class, "Count of all datacubes from VLKB-search" ),
+3 −2
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = java.ut


# vlkb-siav2
SearchServlet.level = CONFIG
FormatResponseFilter.level = CONFIG
SearchServlet.level = FINEST
FormatResponseFilter.level = FINEST
DbObstap.level = FINEST
+0 −5
Original line number Diff line number Diff line
@@ -24,11 +24,6 @@ echo "<Context docBase=\"$WEBAPP_DIR\"/>" > $CATALINA_BASE/conf/Catalina/localho

# configure response format
{
   echo "db_uri=$DB_URI"
   echo "db_schema=$DB_SCHEMA"
   echo "db_user_name=$DB_USERNAME"
   echo "db_password=$DB_PASSWORD"

   echo "cutout_url=$CUTOUT_SERVICE_URL"
} > $WEBAPP_DIR/WEB-INF/classes/formatresponsefilter.properties

+1 −1

File changed.

Contains only whitespace changes.

Loading