Skip to content
Snippets Groups Projects
Commit 60b6f0b9 authored by Robert Butora's avatar Robert Butora
Browse files

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

parent d6ab2839
No related branches found
No related tags found
No related merge requests found
......@@ -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());
......
......@@ -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)
......
......@@ -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" ),
......
......@@ -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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment