Skip to content

Commit

Permalink
change copyrights owner attribute to @rest, with a comment to explain
Browse files Browse the repository at this point in the history
  • Loading branch information
kermitt2 committed Feb 1, 2024
1 parent 0f9a1dc commit 4359b40
Showing 1 changed file with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <licence>
// (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<availability ");

boolean addCopyrightsComment = false;
if (copyrightsLicense.getCopyrightsOwner() != null) {
tei.append("copyrightsOwner=\""+ copyrightsLicense.getCopyrightsOwner().getName() +"\" ");
tei.append("resp=\""+ copyrightsLicense.getCopyrightsOwner().getName() +"\" ");
addCopyrightsComment = true;
}

if (copyrightsLicense.getLicense() != null && copyrightsLicense.getLicense() != License.UNDECIDED) {
tei.append("status=\"restricted\">");
tei.append("<licence>"+copyrightsLicense.getLicense().getName()+"</licence>");
tei.append("status=\"restricted\">\n");
if (addCopyrightsComment) {
tei.append("\t\t\t\t\t<!-- the @rest attribute above gives the document copyrights owner (publisher, authors), if known -->\n");
}
tei.append("\t\t\t\t\t<licence>"+copyrightsLicense.getLicense().getName()+"</licence>\n");
} else {
tei.append(" status=\"unknown\"><licence/>");
tei.append(" status=\"unknown\">\n");
if (addCopyrightsComment) {
tei.append("\t\t\t\t\t<!-- the @rest attribute above gives the document copyrights owner (publisher, authors), if known -->\n");
}
tei.append("\t\t\t\t\t<licence/>\n");
}

/*tei.append("<p>Copyright ");
Expand Down

0 comments on commit 4359b40

Please sign in to comment.