Index: modules/dnet-collector-plugins/trunk/src/main/java/eu/dnetlib/data/collector/plugins/rest/RestIterator.java
===================================================================
--- modules/dnet-collector-plugins/trunk/src/main/java/eu/dnetlib/data/collector/plugins/rest/RestIterator.java (revision 58382)
+++ modules/dnet-collector-plugins/trunk/src/main/java/eu/dnetlib/data/collector/plugins/rest/RestIterator.java (revision 58383)
@@ -203,6 +203,8 @@
URL qUrl = new URL(query);
if (this.authMethod == "bearer") {
+ log.trace("authMethode before inputStream: " + resultXml);
+
HttpURLConnection conn = (HttpURLConnection) qUrl.openConnection();
conn.setRequestProperty("Authorization","Bearer "+authToken);
conn.setRequestProperty("Content-Type","application/json");
@@ -345,10 +347,14 @@
jsonInput = jsonInput.replaceAll("\"([^\"]*)[)]([^\"]*)\":", "\"$1$2\":");
}
- // replace startNumbers in JSON Keynames with 'n_'
+ // add prefix of startNumbers in JSON Keynames with 'n_'
while (jsonInput.matches(".*\"([^\"][0-9])([^\"]*)\":.*")) {
jsonInput = jsonInput.replaceAll("\"([^\"][0-9])([^\"]*)\":", "\"n_$1$2\":");
}
+ // add prefix of only numbers in JSON Keynames with 'm_'
+ while (jsonInput.matches(".*\"([0-9]+)\":.*")) {
+ jsonInput = jsonInput.replaceAll("\"([0-9]+)\":", "\"m_$1\":");
+ }
// replace ':' between number like '2018-08-28T11:05:00Z' in JSON keynames with ''
while (jsonInput.matches(".*\"([^\"]*[0-9]):([0-9][^\"]*)\":.*")) {
Index: modules/dnet-collector-plugins/trunk/pom.xml
===================================================================
--- modules/dnet-collector-plugins/trunk/pom.xml (revision 58382)
+++ modules/dnet-collector-plugins/trunk/pom.xml (revision 58383)
@@ -7,7 +7,7 @@
eu.dnetlib
dnet-collector-plugins
- 1.3.32-SNAPSHOT
+ 1.3.33-SNAPSHOT
scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet45/modules/dnet-collector-plugins/trunk