From bee3e73f7bcd549ad2d3be36a5f592149bd9c0f7 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Mon, 2 Mar 2020 20:43:27 +0100 Subject: [PATCH] Removed empty body from rdf export --- src/main/java/writer2latex/rdf/DocumentStructure.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/writer2latex/rdf/DocumentStructure.java b/src/main/java/writer2latex/rdf/DocumentStructure.java index 11107bf..c2fa1d7 100644 --- a/src/main/java/writer2latex/rdf/DocumentStructure.java +++ b/src/main/java/writer2latex/rdf/DocumentStructure.java @@ -123,8 +123,11 @@ public class DocumentStructure { private Resource createExcerpt(DocumentPart docExcerpt) { String name = TS + EXCERPT + "/" + PARSERNAME + "_" + documentID + docExcerpt.getSafePath(); Resource excerpt = m.createIndividual(name, excerptClass); - Property htmlExcerpt = m.createProperty(TS + "htmlExcerpt"); - excerpt.addLiteral(htmlExcerpt, docExcerpt.getBody()); + if (!docExcerpt.getBody().isEmpty()) { + Property htmlExcerpt = m.createProperty(TS + "htmlExcerpt"); + excerpt.addLiteral(htmlExcerpt, docExcerpt.getBody()); + } + return excerpt; }