diff --git a/data-discovery/src/main/java/vlkb/webapi/SearchServlet.java b/data-discovery/src/main/java/vlkb/webapi/SearchServlet.java index 7a5e5f609abeadce37f91e996c4cc831509c7d12..7e0433682c468363a9cb2020418e6a772e2abd27 100644 --- a/data-discovery/src/main/java/vlkb/webapi/SearchServlet.java +++ b/data-discovery/src/main/java/vlkb/webapi/SearchServlet.java @@ -28,7 +28,6 @@ public class SearchServlet extends javax.servlet.http.HttpServlet { super.init(); - LOGGER.info("URLs : " + settings.serviceUrls.toString()); LOGGER.info("DB : " + settings.dbConn.toString()); } diff --git a/data-discovery/src/main/java/vlkb/webapi/SearchSettings.java b/data-discovery/src/main/java/vlkb/webapi/SearchSettings.java index 5d9db4379a8a971433f6b2bfde1966f6bfec874f..8e85f24f0adf6fa4fe35057e77c719ff8600d19a 100644 --- a/data-discovery/src/main/java/vlkb/webapi/SearchSettings.java +++ b/data-discovery/src/main/java/vlkb/webapi/SearchSettings.java @@ -30,31 +30,7 @@ class SearchSettings } } - - public static class ServiceUrls - { - private String cutoutUrl; - private String mergeUrl; - private String surveysAbsPathname; - - public boolean cutoutUrlIsSet() { return (cutoutUrl != null) && cutoutUrl.trim().isEmpty(); } - public boolean mergeUrlIsSet() { return (mergeUrl != null) && mergeUrl.trim().isEmpty(); } - public boolean surveysAbsPathnameIsSet() - { return (surveysAbsPathname != null) && surveysAbsPathname.trim().isEmpty(); } - - public String cutoutUrl() {return cutoutUrl;} - public String mergeUrl() {return mergeUrl;} - public String surveysAbsPathname() {return surveysAbsPathname;} - - public String toString() - { - return cutoutUrl + " " + mergeUrl + " " + surveysAbsPathname; - } - } - - public DBConn dbConn; - public ServiceUrls serviceUrls; // will not start without config-file; no reasonable code-defaults can be invented @@ -70,9 +46,8 @@ class SearchSettings properties.load(ins); DBConn dbConn = loadDBConn(properties); - ServiceUrls serviceUrls = loadServiceUrls(properties); - return new SearchSettings(dbConn, serviceUrls); + return new SearchSettings(dbConn/*, serviceUrls*/); } else { @@ -89,10 +64,9 @@ class SearchSettings - private SearchSettings(DBConn dbConn, ServiceUrls serviceUrls) + private SearchSettings(DBConn dbConn) { this.dbConn = dbConn; - this.serviceUrls = serviceUrls; } @@ -107,16 +81,5 @@ class SearchSettings return dbConn; } - - private static ServiceUrls loadServiceUrls(Properties properties) - { - ServiceUrls serviceUrls = new ServiceUrls(); - serviceUrls.cutoutUrl = properties.getProperty("cutout_url","").strip(); - serviceUrls.mergeUrl = properties.getProperty("merge_url","").strip(); - serviceUrls.surveysAbsPathname = properties.getProperty("surveys_metadata_abs_pathname","/srv/surveys/surveys_metadata.csv").strip(); - return serviceUrls; - } - - } diff --git a/data-discovery/src/main/resources/discovery.properties b/data-discovery/src/main/resources/discovery.properties index 0f01bd5616e5651e8e9810e6ea99ed22a93e0418..eb3b59d791acaf9f28f0fd6d8be3966c23940eb8 100644 --- a/data-discovery/src/main/resources/discovery.properties +++ b/data-discovery/src/main/resources/discovery.properties @@ -1,7 +1,7 @@ # database with 'obscore' table -db_uri=jdbc:postgresql://localhost:5432/vialactea -db_schema=datasets +# db_uri=jdbc:postgresql://localhost:5432/vialactea +# db_schema=datasets db_user_name= db_password= diff --git a/data-discovery/src/main/resources/formatresponsefilter.properties b/data-discovery/src/main/resources/formatresponsefilter.properties index b5d903d4bd7b2d58da2643baa33db2c73ebc0471..a2fd398bb82299c02bf802346a26c3c1b9e90321 100644 --- a/data-discovery/src/main/resources/formatresponsefilter.properties +++ b/data-discovery/src/main/resources/formatresponsefilter.properties @@ -1,10 +1,11 @@ -# database with 'surveys' table of metadata used to write VLKB-legacy response.xml +# database with 'obscore' table #db_uri=jdbc:postgresql://localhost:5432/vialactea #db_schema=datasets -#db_user_name= -#db_password= -# FIXME above disabled; now read metadata from a file +db_user_name= +db_password= + +# VLKB-legacy: surveys metadata in csv file surveys_abs_pathname= # these URL's are used in response.xml so client can access those services