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 3545acb61f..ac55c6a6aa 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 @@ -482,6 +482,42 @@ else if (biblio.getE_Year().length() == 4) // if it's not something in English, we will write it anyway as note without type at the end } + if (!StringUtils.isEmpty(biblio.getDOI())) { + String theDOI = TextUtilities.HTMLEncode(biblio.getDOI()); + if (theDOI.endsWith(".xml")) { + theDOI = theDOI.replace(".xml", ""); + } + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(theDOI) + "\n"); + } + + if (!StringUtils.isEmpty(biblio.getHalId())) { + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getHalId()) + "\n"); + } + + if (!StringUtils.isEmpty(biblio.getArXivId())) { + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getArXivId()) + "\n"); + } + + if (!StringUtils.isEmpty(biblio.getPMID())) { + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getPMID()) + "\n"); + } + + if (!StringUtils.isEmpty(biblio.getPMCID())) { + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getPMCID()) + "\n"); + } + + if (!StringUtils.isEmpty(biblio.getPII())) { + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getPII()) + "\n"); + } + + if (!StringUtils.isEmpty(biblio.getArk())) { + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getArk()) + "\n"); + } + + if (!StringUtils.isEmpty(biblio.getIstexId())) { + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getIstexId()) + "\n"); + } + tei.append("\t\t\t\t\t\n"); if ((biblio.getJournal() != null) || @@ -744,35 +780,35 @@ else if (biblio.getE_Year().length() == 4) if (theDOI.endsWith(".xml")) { theDOI = theDOI.replace(".xml", ""); } - tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(theDOI) + "\n"); + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(theDOI) + "\n"); } if (!StringUtils.isEmpty(biblio.getHalId())) { - tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getHalId()) + "\n"); + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getHalId()) + "\n"); } if (!StringUtils.isEmpty(biblio.getArXivId())) { - tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getArXivId()) + "\n"); + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getArXivId()) + "\n"); } if (!StringUtils.isEmpty(biblio.getPMID())) { - tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getPMID()) + "\n"); + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getPMID()) + "\n"); } if (!StringUtils.isEmpty(biblio.getPMCID())) { - tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getPMCID()) + "\n"); + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getPMCID()) + "\n"); } if (!StringUtils.isEmpty(biblio.getPII())) { - tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getPII()) + "\n"); + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getPII()) + "\n"); } if (!StringUtils.isEmpty(biblio.getArk())) { - tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getArk()) + "\n"); + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getArk()) + "\n"); } if (!StringUtils.isEmpty(biblio.getIstexId())) { - tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getIstexId()) + "\n"); + tei.append("\t\t\t\t\t" + TextUtilities.HTMLEncode(biblio.getIstexId()) + "\n"); } if (!StringUtils.isEmpty(biblio.getOAURL())) {