Removed empty body from rdf export

This commit is contained in:
Georgy Litvinov 2020-03-02 20:43:27 +01:00
parent 5eaa8910b4
commit bee3e73f7b

View file

@ -123,8 +123,11 @@ public class DocumentStructure {
private Resource createExcerpt(DocumentPart docExcerpt) { private Resource createExcerpt(DocumentPart docExcerpt) {
String name = TS + EXCERPT + "/" + PARSERNAME + "_" + documentID + docExcerpt.getSafePath(); String name = TS + EXCERPT + "/" + PARSERNAME + "_" + documentID + docExcerpt.getSafePath();
Resource excerpt = m.createIndividual(name, excerptClass); Resource excerpt = m.createIndividual(name, excerptClass);
Property htmlExcerpt = m.createProperty(TS + "htmlExcerpt"); if (!docExcerpt.getBody().isEmpty()) {
excerpt.addLiteral(htmlExcerpt, docExcerpt.getBody()); Property htmlExcerpt = m.createProperty(TS + "htmlExcerpt");
excerpt.addLiteral(htmlExcerpt, docExcerpt.getBody());
}
return excerpt; return excerpt;
} }