diff --git a/src/main/java/writer2latex/rdf/DocumentStructure.java b/src/main/java/writer2latex/rdf/DocumentStructure.java index c2fa1d7..fd9c658 100644 --- a/src/main/java/writer2latex/rdf/DocumentStructure.java +++ b/src/main/java/writer2latex/rdf/DocumentStructure.java @@ -247,6 +247,9 @@ public class DocumentStructure { if (docPart.isEmpty()) { return; } + if (docPart.getBody().isEmpty() && isMaster(element)) { + return; + } Resource excerpt = createExcerpt(docPart); excerpt.addProperty( RDFS.label, docPart.getName()); Property hasText = m.createProperty(TS + "hasText"); @@ -255,6 +258,9 @@ public class DocumentStructure { addMetadataProperties(excerpt,docPart.getMetadata()); } } + private boolean isMaster(Resource element) { + return element.getNameSpace().contains(TS + ELENPHARTICLE); + } public void createTree() { createElements();