Skip to content

Commit

Permalink
fix issue with space in url after a document's publication
Browse files Browse the repository at this point in the history
  • Loading branch information
alicela committed May 10, 2021
1 parent b4d57ff commit 50f4531
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 50f4531

Please sign in to comment.