added error log

This commit is contained in:
Miriam Baglioni 2023-05-16 10:15:12 +02:00
parent 17c1ad7de1
commit 2279f3df31
3 changed files with 31 additions and 24 deletions

View File

@ -95,13 +95,19 @@ public class ISClientImpl implements ISClient {
if (Objects.isNull(type) || type.isEmpty()) {
return _processContext(_getQuery(config.getFindContextProfiles()));
} else {
final String xqueryTemplate = _getQuery(config.getFindContextProfilesByType());
try {
final String xqueryTemplate = _getQuery(config.getFindContextProfilesByType());
final String xquery = String.format(xqueryTemplate, type.stream()
.map(t -> String.format("./RESOURCE_PROFILE/BODY/CONFIGURATION/context/@type = '%s'", t))
.collect(Collectors.joining(" or ")));
return _processContext(xquery);
}catch(Exception e){
log.error(e.getMessage());
throw new RuntimeException(e);
}
final String xquery = String.format(xqueryTemplate, type.stream()
.map(t -> String.format("./RESOURCE_PROFILE/BODY/CONFIGURATION/context/@type = '%s'", t))
.collect(Collectors.joining(" or ")));
return _processContext(xquery);
}
}

View File

@ -1,12 +1,7 @@
#services.is.host = localhost
services.is.host = dev-openaire.d4science.org
#services.is.port = 8280
services.is.port = 443
#services.is.protocol = http
services.is.protocol = https
#services.is.context = app
services.is.context = is
#services.is.baseurl = ${services.is.protocol}://${services.is.host}:${services.is.port}/${services.is.context}/services
services.is.host = localhost
services.is.port = 8280
services.is.protocol = http
services.is.context = app
services.is.baseurl = ${services.is.protocol}://${services.is.host}:${services.is.port}/${services.is.context}/services
openaire.exporter.isLookupUrl = ${services.is.baseurl}/isLookUp
@ -20,7 +15,7 @@ openaire.exporter.cxfClientConnectTimeout = 60000
openaire.exporter.cxfClientReceiveTimeout = 120000
# JDBC
#openaire.exporter.jdbc.url = jdbc:postgresql://localhost:5432/dnet_openaire
#openaire.exporter.jdbc.url = jdbc:postgresql://localhost:5432/dnet_openaireplus
openaire.exporter.jdbc.url = jdbc:postgresql://localhost:5432/dev_openaire_8280
openaire.exporter.jdbc.user = dnetapi
openaire.exporter.jdbc.pwd = dnetPwd
@ -51,10 +46,9 @@ openaire.exporter.findObjectStore = /eu/dnetlib/openaire/xquery/find
openaire.exporter.findFunderContexts = /eu/dnetlib/openaire/xquery/findFunderContexts.xquery
openaire.exporter.findCommunityContexts = /eu/dnetlib/openaire/xquery/findCommunityContexts.xquery
openaire.exporter.findContextProfiles = /eu/dnetlib/openaire/xquery/findContextProfiles.xquery
openaire.exporter.findContextProfilesByType = /eu/dnetlib/openaire/xquery/findContextProfilesByType.xquery
openaire.exporter.getRepoProfile = /eu/dnetlib/openaire/xquery/getRepoProfile.xquery
openaire.exporter.contentLoadQuery = { "$and" : [ { "system:profileName" : "Graph construction [PROD]" }, { "system:isCompletedSuccessfully" : "true" }, { "reuseContent" : "false" } ] }
# REST API CONFIGURATION
openaire.exporter.swaggerDsm.apiTitle = OpenAIRE aggregator REST API
openaire.exporter.swaggerDsm.apiDescription = The OpenAIRE data provision REST API allows developers to access the metadata information space of OpenAIRE programmatically.
@ -107,4 +101,4 @@ openaire.exporter.swaggerInfo.apiContactEmail = ${openaire.exporter.swaggerD
# VOCABULARIES
openaire.exporter.vocabularies.baseUrl = http://localhost:8980/provision/mvc/vocabularies
openaire.exporter.vocabularies.countriesEndpoint = ${openaire.exporter.vocabularies.baseUrl}/dnet:countries.json
openaire.exporter.vocabularies.datasourceTypologiesEndpoint = ${openaire.exporter.vocabularies.baseUrl}/dnet:datasource_typologies.json
openaire.exporter.vocabularies.datasourceTypologiesEndpoint = ${openaire.exporter.vocabularies.baseUrl}/dnet:eosc_datasource_types.json

View File

@ -1,7 +1,12 @@
services.is.host = localhost
services.is.port = 8280
services.is.protocol = http
services.is.context = app
#services.is.host = localhost
services.is.host = dev-openaire.d4science.org
#services.is.port = 8280
services.is.port = 443
#services.is.protocol = http
services.is.protocol = https
#services.is.context = app
services.is.context = is
#services.is.baseurl = ${services.is.protocol}://${services.is.host}:${services.is.port}/${services.is.context}/services
services.is.baseurl = ${services.is.protocol}://${services.is.host}:${services.is.port}/${services.is.context}/services
openaire.exporter.isLookupUrl = ${services.is.baseurl}/isLookUp
@ -15,7 +20,7 @@ openaire.exporter.cxfClientConnectTimeout = 60000
openaire.exporter.cxfClientReceiveTimeout = 120000
# JDBC
#openaire.exporter.jdbc.url = jdbc:postgresql://localhost:5432/dnet_openaireplus
#openaire.exporter.jdbc.url = jdbc:postgresql://localhost:5432/dnet_openaire
openaire.exporter.jdbc.url = jdbc:postgresql://localhost:5432/dev_openaire_8280
openaire.exporter.jdbc.user = dnetapi
openaire.exporter.jdbc.pwd = dnetPwd
@ -49,6 +54,8 @@ openaire.exporter.findContextProfiles = /eu/dnetlib/openaire/xquery/find
openaire.exporter.findContextProfilesByType = /eu/dnetlib/openaire/xquery/findContextProfilesByType.xquery
openaire.exporter.getRepoProfile = /eu/dnetlib/openaire/xquery/getRepoProfile.xquery
openaire.exporter.contentLoadQuery = { "$and" : [ { "system:profileName" : "Graph construction [PROD]" }, { "system:isCompletedSuccessfully" : "true" }, { "reuseContent" : "false" } ] }
# REST API CONFIGURATION
openaire.exporter.swaggerDsm.apiTitle = OpenAIRE aggregator REST API
openaire.exporter.swaggerDsm.apiDescription = The OpenAIRE data provision REST API allows developers to access the metadata information space of OpenAIRE programmatically.
@ -101,4 +108,4 @@ openaire.exporter.swaggerInfo.apiContactEmail = ${openaire.exporter.swaggerD
# VOCABULARIES
openaire.exporter.vocabularies.baseUrl = http://localhost:8980/provision/mvc/vocabularies
openaire.exporter.vocabularies.countriesEndpoint = ${openaire.exporter.vocabularies.baseUrl}/dnet:countries.json
openaire.exporter.vocabularies.datasourceTypologiesEndpoint = ${openaire.exporter.vocabularies.baseUrl}/dnet:eosc_datasource_types.json
openaire.exporter.vocabularies.datasourceTypologiesEndpoint = ${openaire.exporter.vocabularies.baseUrl}/dnet:datasource_typologies.json