From 4359b405a3c394fa66b398a18845b6d19bb108e3 Mon Sep 17 00:00:00 2001 From: lopez Date: Thu, 1 Feb 2024 19:38:48 +0100 Subject: [PATCH] change copyrights owner attribute to @rest, with a comment to explain --- .../grobid/core/document/TEIFormatter.java | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/grobid-core/src/main/java/org/grobid/core/document/TEIFormatter.java b/grobid-core/src/main/java/org/grobid/core/document/TEIFormatter.java index 638e4eb4b6..a77c15dab8 100755 --- a/grobid-core/src/main/java/org/grobid/core/document/TEIFormatter.java +++ b/grobid-core/src/main/java/org/grobid/core/document/TEIFormatter.java @@ -264,22 +264,32 @@ public StringBuilder toTEIHeader(BiblioItem biblio, } // We introduce something more meaningful with TEI customization to encode copyrights information: - // - @copyrightsOwner with value "publisher", "authors", "unknown" + // - @resp with value "publisher", "authors", "unknown", we add a comment to clarify that @resp + // should be interpreted as the copyrights owner // - license related to copyrights exception is encoded via // (note: I have no clue what can mean "free" as status for a document - there are always some sort of // restrictions like moral rights even for public domain documents) if (copyrightsLicense != null) { tei.append("\t\t\t\t"); - tei.append(""+copyrightsLicense.getLicense().getName()+""); + tei.append("status=\"restricted\">\n"); + if (addCopyrightsComment) { + tei.append("\t\t\t\t\t\n"); + } + tei.append("\t\t\t\t\t"+copyrightsLicense.getLicense().getName()+"\n"); } else { - tei.append(" status=\"unknown\">"); + tei.append(" status=\"unknown\">\n"); + if (addCopyrightsComment) { + tei.append("\t\t\t\t\t\n"); + } + tei.append("\t\t\t\t\t\n"); } /*tei.append("

Copyright ");