Get document id as input filename

This commit is contained in:
Georgy Litvinov 2020-02-28 14:03:43 +01:00
parent a2ef3f7496
commit d7330799f2
2 changed files with 6 additions and 5 deletions

View file

@ -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<XhtmlDocument> files) {
public DocumentStructure(Vector<XhtmlDocument> files,String fileName) {
this();
this.documentID = fileName;
Iterator<XhtmlDocument> filesIterator = files.iterator();
while (filesIterator.hasNext()) {
XhtmlDocument inputDoc = filesIterator.next();

View file

@ -24,10 +24,10 @@ public class RDFDocumentResult implements OutputFile {
private DocumentStructure rdfStructure = null;
public RDFDocumentResult(Vector<XhtmlDocument> outFiles, String sFileName, XhtmlConfig config) {
this.sFileName = Misc.removeExtension(sFileName);
public RDFDocumentResult(Vector<XhtmlDocument> outFiles, String fileName, XhtmlConfig config) {
this.sFileName = Misc.removeExtension(fileName);
this.config = config;
rdfStructure = new DocumentStructure(outFiles);
rdfStructure = new DocumentStructure(outFiles,fileName);
rdfStructure.createTree();
}