From d7330799f29d4d7d44f055e23a93bc8ad8fec48a Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Fri, 28 Feb 2020 14:03:43 +0100 Subject: [PATCH] Get document id as input filename --- src/main/java/writer2latex/rdf/DocumentStructure.java | 5 +++-- src/main/java/writer2latex/rdf/RDFDocumentResult.java | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/writer2latex/rdf/DocumentStructure.java b/src/main/java/writer2latex/rdf/DocumentStructure.java index f388fe1..eea9d50 100644 --- a/src/main/java/writer2latex/rdf/DocumentStructure.java +++ b/src/main/java/writer2latex/rdf/DocumentStructure.java @@ -32,7 +32,7 @@ public class DocumentStructure { private final String EXCERPT = "textExcerpt"; private final String TOC_ELEMENT = "TOCElement"; private final String ELENPHARTICLE = "elenphArticle"; - private String documentID = "12DOC_ID"; + private String documentID = "DOC_ID"; private OntModel m; @@ -53,8 +53,9 @@ public class DocumentStructure { } - public DocumentStructure(Vector files) { + public DocumentStructure(Vector files,String fileName) { this(); + this.documentID = fileName; Iterator filesIterator = files.iterator(); while (filesIterator.hasNext()) { XhtmlDocument inputDoc = filesIterator.next(); diff --git a/src/main/java/writer2latex/rdf/RDFDocumentResult.java b/src/main/java/writer2latex/rdf/RDFDocumentResult.java index 00b95c8..88aa66f 100644 --- a/src/main/java/writer2latex/rdf/RDFDocumentResult.java +++ b/src/main/java/writer2latex/rdf/RDFDocumentResult.java @@ -24,10 +24,10 @@ public class RDFDocumentResult implements OutputFile { private DocumentStructure rdfStructure = null; - public RDFDocumentResult(Vector outFiles, String sFileName, XhtmlConfig config) { - this.sFileName = Misc.removeExtension(sFileName); + public RDFDocumentResult(Vector outFiles, String fileName, XhtmlConfig config) { + this.sFileName = Misc.removeExtension(fileName); this.config = config; - rdfStructure = new DocumentStructure(outFiles); + rdfStructure = new DocumentStructure(outFiles,fileName); rdfStructure.createTree(); }