From f41c411bdc0775a4de68a3508fbc78daf2b97e70 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Mon, 29 Apr 2024 08:13:44 +0200 Subject: [PATCH] #4769 - Cannot export CAS RDF - Add prefix to URI to make it a valid URI --- .../tudarmstadt/ukp/inception/io/rdf/internal/Uima2Rdf.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inception/inception-io-rdf/src/main/java/de/tudarmstadt/ukp/inception/io/rdf/internal/Uima2Rdf.java b/inception/inception-io-rdf/src/main/java/de/tudarmstadt/ukp/inception/io/rdf/internal/Uima2Rdf.java index 36fb9cf08be..9bfc82b4d9b 100644 --- a/inception/inception-io-rdf/src/main/java/de/tudarmstadt/ukp/inception/io/rdf/internal/Uima2Rdf.java +++ b/inception/inception-io-rdf/src/main/java/de/tudarmstadt/ukp/inception/io/rdf/internal/Uima2Rdf.java @@ -96,6 +96,10 @@ private void convertView(JCas aJCas, Model aTarget) var docuri = dmd.getDocumentUri() != null ? dmd.getDocumentUri() : DOCUMENT_SCHEME + dmd.getDocumentId(); + if (docuri.indexOf(':') < 0) { + docuri = DOCUMENT_SCHEME + docuri; + } + // These only collect a single view... var reachable = CasDoctorUtils.collectReachable(aJCas.getCas()); var indexed = CasDoctorUtils.collectIndexed(aJCas.getCas());