diff --git a/sparql-anything-docs/src/main/java/io/github/sparqlanything/docs/DocxTriplifier.java b/sparql-anything-docs/src/main/java/io/github/sparqlanything/docs/DocxTriplifier.java index 5558188f..711a6799 100644 --- a/sparql-anything-docs/src/main/java/io/github/sparqlanything/docs/DocxTriplifier.java +++ b/sparql-anything-docs/src/main/java/io/github/sparqlanything/docs/DocxTriplifier.java @@ -62,7 +62,7 @@ public void triplify(Properties properties, FacadeXGraphBuilder builder) throws try (XWPFDocument document = new XWPFDocument(is)) { List paragraphs = document.getParagraphs(); - builder.addType(dataSourceId, SPARQLAnythingConstants.ROOT_ID, namespace + "Document"); + builder.addType(dataSourceId, SPARQLAnythingConstants.ROOT_ID, "Document"); int count = 1; if (!mergeParagraphs) { @@ -72,10 +72,10 @@ public void triplify(Properties properties, FacadeXGraphBuilder builder) throws if (para.getStyle() != null) { paragraphId = "/".concat(Triplifier.toSafeURIString(para.getStyle())).concat("/").concat(String.valueOf(count)) ; builder.addType(dataSourceId, paragraphId, - namespace + Triplifier.toSafeURIString(para.getStyle())); + Triplifier.toSafeURIString(para.getStyle())); } else { paragraphId ="/paragraph/".concat(String.valueOf(count)); - builder.addType(dataSourceId, paragraphId, namespace + "Paragraph"); + builder.addType(dataSourceId, paragraphId, "Paragraph"); } diff --git a/sparql-anything-markdown/src/main/java/io/github/sparqlanything/markdown/MARKDOWNTriplifier.java b/sparql-anything-markdown/src/main/java/io/github/sparqlanything/markdown/MARKDOWNTriplifier.java index 76cd3a5e..ce12198f 100644 --- a/sparql-anything-markdown/src/main/java/io/github/sparqlanything/markdown/MARKDOWNTriplifier.java +++ b/sparql-anything-markdown/src/main/java/io/github/sparqlanything/markdown/MARKDOWNTriplifier.java @@ -155,7 +155,7 @@ private String handleContainer(Node node){ String containerId = String.join("/", parentId , node.getClass().getSimpleName().toLowerCase() , Integer.toString(counter)); this.typeCounter.put(node.getClass(), counter); this.builder.addContainer(dataSourceId, parentId, slot, containerId); - this.builder.addType(dataSourceId, containerId, XYZ_NS + node.getClass().getSimpleName()); + this.builder.addType(dataSourceId, containerId, node.getClass().getSimpleName()); this.lastSlot.put(parentId, slot); this.containers.put(node, containerId); this.lastSlot.put(containerId, 0); diff --git a/sparql-anything-model/src/main/java/io/github/sparqlanything/model/BaseFacadeXBuilder.java b/sparql-anything-model/src/main/java/io/github/sparqlanything/model/BaseFacadeXBuilder.java index cbbb7f4e..21273452 100644 --- a/sparql-anything-model/src/main/java/io/github/sparqlanything/model/BaseFacadeXBuilder.java +++ b/sparql-anything-model/src/main/java/io/github/sparqlanything/model/BaseFacadeXBuilder.java @@ -59,7 +59,7 @@ public boolean addContainer(String dataSourceId, String containerId, Integer slo } public boolean addType(String dataSourceId, String containerId, String typeId) { - return add(dataSourceId2node(dataSourceId), container2node(containerId, dataSourceId), RDF.type.asNode(), NodeFactory.createURI(typeId)); + return add(dataSourceId2node(dataSourceId), container2node(containerId, dataSourceId), RDF.type.asNode(), key2predicate(typeId)); } public boolean addType(String dataSourceId, String containerId, URI type) { diff --git a/sparql-anything-spreadsheet/src/main/java/io/github/sparqlanything/spreadsheet/SpreadsheetTriplifier.java b/sparql-anything-spreadsheet/src/main/java/io/github/sparqlanything/spreadsheet/SpreadsheetTriplifier.java index 0deb402d..4e71e25a 100644 --- a/sparql-anything-spreadsheet/src/main/java/io/github/sparqlanything/spreadsheet/SpreadsheetTriplifier.java +++ b/sparql-anything-spreadsheet/src/main/java/io/github/sparqlanything/spreadsheet/SpreadsheetTriplifier.java @@ -163,7 +163,7 @@ private Object extractCellValue(Cell cell, boolean evaluateFormulas) { private void extractCompositeCellValue(String dataSourceId, String containerId, Cell cell, boolean evaluateFormulas, FacadeXGraphBuilder builder, String namespace) { if (cell == null) return; - builder.addType(dataSourceId, containerId, namespace + cell.getCellType().toString()); + builder.addType(dataSourceId, containerId, cell.getCellType().toString()); switch (cell.getCellType()) { case BOOLEAN: builder.addValue(dataSourceId, containerId, 1, cell.getBooleanCellValue());