From 50f4531707b0c37bbbe9a754b17707a9d856803c Mon Sep 17 00:00:00 2001 From: Alice Lambois Date: Mon, 10 May 2021 12:07:58 +0200 Subject: [PATCH] fix issue with space in url after a document's publication --- .../documentations/documents/DocumentsPublication.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/operations/documentations/documents/DocumentsPublication.java b/src/main/java/fr/insee/rmes/bauhaus_services/operations/documentations/documents/DocumentsPublication.java index 3d2171052..81e7fd1e2 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/operations/documentations/documents/DocumentsPublication.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/operations/documentations/documents/DocumentsPublication.java @@ -112,7 +112,7 @@ private Model getModelToPublish(String documentId, String filename) throws RmesE Resource subject = PublicationUtils.tranformBaseURIToPublish(st.getSubject()); IRI predicate = RdfUtils .createIRI(PublicationUtils.tranformBaseURIToPublish(st.getPredicate()).stringValue()); - String newUrl = Config.DOCUMENTS_BASEURL + "/"+ filename; + String newUrl = Config.DOCUMENTS_BASEURL.trim() + "/"+ filename; logger.info("Publishing document : {}",newUrl); Value object = RdfUtils.toURI(newUrl); model.add(subject, predicate, object, st.getContext()); @@ -159,7 +159,7 @@ private Model getModelWithErrorToPublish(String documentId, String filename) thr String predicatString = tuple.getString("predicat"); IRI predicate = (SimpleIRI) PublicationUtils.tranformBaseURIToPublish(RdfUtils.toURI(predicatString)); if (predicatString.endsWith("url")) { - String newUrl = Config.DOCUMENTS_BASEURL + "/"+ filename; + String newUrl = Config.DOCUMENTS_BASEURL.trim() + "/"+ filename; logger.info("Publishing document : {}",newUrl); object = RdfUtils.toURI(newUrl); } else {