Loading data-discovery/config/Makefile +5 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ DBMS ?= localhost # localhost | pasquale | pasquale-devel AUTH ?= # ia2token | garrtoken | <empty> ################################################################ all: authpolicy.properties web.xml discovery.properties all: formatresponsefilter.properties authpolicy.properties web.xml discovery.properties web.xml: cd web-xml && cat web.xml-begining web.xml-format-filter web.xml-$(AUTH)-filter web.xml-authorization-filter web.xml-servlets web.xml-ending > ../web.xml Loading @@ -11,9 +11,12 @@ web.xml: discovery.properties: discovery.properties.in cat dbms.conf-$(DBMS) discovery.properties.in > $@ formatresponsefilter.properties: formatresponsefilter.properties.in cat dbms.conf-$(DBMS) formatresponsefilter.properties.in > $@ authpolicy.properties: dbms.conf-$(DBMS) cp dbms.conf-$(DBMS) $@ .PHONY: clean: -rm -f authpolicy.properties discovery.properties web.xml -rm -f formatresponsefilter.properties authpolicy.properties discovery.properties web.xml data-discovery/config/formatresponsefilter.properties→data-discovery/config/formatresponsefilter.properties.in +0 −0 File moved. View file data-discovery/src/main/java/vlkb/search/DbPSearch.java +8 −2 Original line number Diff line number Diff line Loading @@ -23,9 +23,15 @@ import java.lang.ClassNotFoundException; public class DbPSearch { private static final Logger LOGGER = Logger.getLogger(DbPSearch.class.getName()); private static final SearchSettings.DBConn dbConn = SearchSettings.getInstance("discovery.properties").dbConn; //private static final SearchSettings.DBConn dbConn = SearchSettings.getInstance("discovery.properties").dbConn; private DBConn dbConn; private static final String DB_DRIVER = "org.postgresql.Driver"; //private static final String DB_DRIVER = "org.postgresql.Driver"; DbPSearch(DBConn dbConn) { this.dbConn = dbConn; } public String[] queryOverlapingPubdid(Coord coord, SubsurveyId subsurveyId) { Loading data-discovery/src/main/java/vlkb/webapi/DBConn.java 0 → 100644 +19 −0 Original line number Diff line number Diff line class DBConn { public String uri; public String schema; public String user_name; public String password; public String uri() {return uri;} public String schema() {return schema;} public String userName() {return user_name;} public String password() {return password;} public String toString() { return uri + " schema[" + schema + "] " + user_name + " / " + password; } } data-discovery/src/main/java/vlkb/webapi/FormatResponseFilter.java +2 −1 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ public class FormatResponseFilter implements Filter dbSubsurveyArr = Subsurvey.loadSubsurveys(surveysAbsPathname); LOGGER.info("Surveys: loaded metadata for " + dbSubsurveyArr.length + " known surveys"); LOGGER.info("Default charset: " + Charset.defaultCharset()); LOGGER.info("DB: " + settings.dbConn.toString()); } Loading Loading @@ -224,7 +225,7 @@ public class FormatResponseFilter implements Filter DbPSearch dbps; synchronized(DbPSearch.class) { dbps = new DbPSearch(); dbps = new DbPSearch(settings.dbConn); } return dbps.queryOutputData(pubdidArr, coord); Loading Loading
data-discovery/config/Makefile +5 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ DBMS ?= localhost # localhost | pasquale | pasquale-devel AUTH ?= # ia2token | garrtoken | <empty> ################################################################ all: authpolicy.properties web.xml discovery.properties all: formatresponsefilter.properties authpolicy.properties web.xml discovery.properties web.xml: cd web-xml && cat web.xml-begining web.xml-format-filter web.xml-$(AUTH)-filter web.xml-authorization-filter web.xml-servlets web.xml-ending > ../web.xml Loading @@ -11,9 +11,12 @@ web.xml: discovery.properties: discovery.properties.in cat dbms.conf-$(DBMS) discovery.properties.in > $@ formatresponsefilter.properties: formatresponsefilter.properties.in cat dbms.conf-$(DBMS) formatresponsefilter.properties.in > $@ authpolicy.properties: dbms.conf-$(DBMS) cp dbms.conf-$(DBMS) $@ .PHONY: clean: -rm -f authpolicy.properties discovery.properties web.xml -rm -f formatresponsefilter.properties authpolicy.properties discovery.properties web.xml
data-discovery/config/formatresponsefilter.properties→data-discovery/config/formatresponsefilter.properties.in +0 −0 File moved. View file
data-discovery/src/main/java/vlkb/search/DbPSearch.java +8 −2 Original line number Diff line number Diff line Loading @@ -23,9 +23,15 @@ import java.lang.ClassNotFoundException; public class DbPSearch { private static final Logger LOGGER = Logger.getLogger(DbPSearch.class.getName()); private static final SearchSettings.DBConn dbConn = SearchSettings.getInstance("discovery.properties").dbConn; //private static final SearchSettings.DBConn dbConn = SearchSettings.getInstance("discovery.properties").dbConn; private DBConn dbConn; private static final String DB_DRIVER = "org.postgresql.Driver"; //private static final String DB_DRIVER = "org.postgresql.Driver"; DbPSearch(DBConn dbConn) { this.dbConn = dbConn; } public String[] queryOverlapingPubdid(Coord coord, SubsurveyId subsurveyId) { Loading
data-discovery/src/main/java/vlkb/webapi/DBConn.java 0 → 100644 +19 −0 Original line number Diff line number Diff line class DBConn { public String uri; public String schema; public String user_name; public String password; public String uri() {return uri;} public String schema() {return schema;} public String userName() {return user_name;} public String password() {return password;} public String toString() { return uri + " schema[" + schema + "] " + user_name + " / " + password; } }
data-discovery/src/main/java/vlkb/webapi/FormatResponseFilter.java +2 −1 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ public class FormatResponseFilter implements Filter dbSubsurveyArr = Subsurvey.loadSubsurveys(surveysAbsPathname); LOGGER.info("Surveys: loaded metadata for " + dbSubsurveyArr.length + " known surveys"); LOGGER.info("Default charset: " + Charset.defaultCharset()); LOGGER.info("DB: " + settings.dbConn.toString()); } Loading Loading @@ -224,7 +225,7 @@ public class FormatResponseFilter implements Filter DbPSearch dbps; synchronized(DbPSearch.class) { dbps = new DbPSearch(); dbps = new DbPSearch(settings.dbConn); } return dbps.queryOutputData(pubdidArr, coord); Loading