Skip to content

Commit

Permalink
Hyperlink DOIs to preferred resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinleinweber committed Nov 19, 2019
1 parent ebfeeb5 commit 33c1453
Show file tree
Hide file tree
Showing 120 changed files with 24,135 additions and 24,135 deletions.
20 changes: 10 additions & 10 deletions src/main/java/org/contentmine/cproject/metadata/CMDOI.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ public class CMDOI extends AbstractCM {

/**
*
http://dx.doi.org/10.5539/cis.v9n2p126
http://dx.doi.org/10.1530/edm-16-0003
http://dx.doi.org/10.12968/bjsn.2016.11.4.166
http://dx.doi.org/10.14358/pers.82.5.320
http://dx.doi.org/10.3109/10715762.2016.1162299
http://dx.doi.org/10.1127/ejm/2015/0027-2502
http://dx.doi.org/10.7467/ksae.2016.24.3.285
http://dx.doi.org/10.20488/austd.22645
http://dx.doi.org/10.1177/2150135116645604
http://dx.doi.org/10.1525/irqr.2016.9.1.29
https://doi.org/10.5539/cis.v9n2p126
https://doi.org/10.1530/edm-16-0003
https://doi.org/10.12968/bjsn.2016.11.4.166
https://doi.org/10.14358/pers.82.5.320
https://doi.org/10.3109/10715762.2016.1162299
https://doi.org/10.1127/ejm/2015/0027-2502
https://doi.org/10.7467/ksae.2016.24.3.285
https://doi.org/10.20488/austd.22645
https://doi.org/10.1177/2150135116645604
https://doi.org/10.1525/irqr.2016.9.1.29
*/

static Pattern PATTERN = Pattern.compile("https?://dx\\.doi\\.org/(10\\.\\d{3,8})/(.*)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public class DOIResolver {
LOG.setLevel(Level.DEBUG);
}

private static final String HTTP_DOI_ORG_API_HANDLES = "http://doi.org/api/handles/";
private static final String HTTP_DX_DOI_ORG = "http://dx.doi.org/";
private static final String HTTP_DOI_ORG_API_HANDLES = "https://doi.org/api/handles/";
private static final String HTTP_DX_DOI_ORG = "https://doi.org/";
private static final String VALUE = "value";
private static final String DATA = "data";
private static final String VALUES = "values";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
public class QSRecord {

private static final String HTTP_DX_DOI_ORG = "http://dx.doi.org/";
private static final String HTTP_DX_DOI_ORG = "https://doi.org/";
private static final Logger LOG = Logger.getLogger(QSRecord.class);
static {
LOG.setLevel(Level.DEBUG);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class QuickscrapeLog {

// info: URL processed
private final static Pattern OUTER = Pattern.compile("(trace|debug|info|warn|error)\\:\\s(.*)");
// [debug] [phantom] opening url: http://dx.doi.org/10.1093/mnras/stw468, HTTP GET
// [debug] [phantom] opening url: https://doi.org/10.1093/mnras/stw468, HTTP GET
private final static Pattern INNER1 = Pattern.compile("\\s*\\[(trace|debug|info|warn|error)\\]\\s+\\[(phantom)\\]\\s+(.*)");
// private final static Pattern INNER2 = Pattern.compile("\\[(^\\])+\\]\\s+(.*)");

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/contentmine/cproject/util/CMineUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class CMineUtil {
LOG.setLevel(Level.DEBUG);
}

private static final String HTTP_DX_DOI_ORG2 = "http://dx.doi.org/";
private static final String HTTP_DX_DOI_ORG2 = "https://doi.org/";
private static final String HTML_START = "<";
private static final String PDF_START = "%PDF";
private static final String URL_PUNCT = "[\\/\\$\\%\\*\\(\\)\\[\\]]";
Expand Down Expand Up @@ -310,7 +310,7 @@ public static String stripChars(String s, String regex, String replace) {
return s == null ? null : s.replaceAll(regex, replace);
}

/** removes "http://dx.doi.org/" from start of string.
/** removes "https://doi.org/" from start of string.
*
* @param string
* @return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class EPMCResultsJsonEntry extends AbstractMetadata {
new CellRenderer(SOURCE).setVisible(false),
new CellRenderer(AUTHOR_STRING).setBrief(20),
new CellRenderer(ABSTRACT_TEXT).setBrief(20),
new CellRenderer(DOI).setHref0("http://doi.org/"),
new CellRenderer(DOI).setHref0("https://doi.org/"),
new CellRenderer(ID).setVisible(false),
new CellRenderer(PMID).setVisible(false),
new CellRenderer(PMCID).setHref0("foo/").setHref1("/bar").setVisible(false),
Expand Down
23,122 changes: 11,561 additions & 11,561 deletions src/main/resources/org/contentmine/ami/plugins/dictionary/funders.xml

Large diffs are not rendered by default.

23,124 changes: 11,562 additions & 11,562 deletions src/main/resources/org/contentmine/ami/plugins/dictionary/organization.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Volume 2014 (2014), Article ID 801626, 8 pages
<br></br>
// doi
<a href="http://dx.doi.org/10.1155/2014/801626">http://dx.doi.org/10.1155/2014/801626</a>
<a href="https://doi.org/10.1155/2014/801626">https://doi.org/10.1155/2014/801626</a>
</pre>
// articleType
<div class="article_type">Research Article</div>
Expand Down
50 changes: 25 additions & 25 deletions src/main/resources/org/contentmine/graphics/html/badhtml1.html

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions src/main/resources/org/contentmine/graphics/html/badhtml1a.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
<em>Arts</em>
<b>2014</b>,
<em>3</em>(1), 27-45; doi:
<a href="http://dx.doi.org/10.3390/arts3010027">10.3390/arts3010027</a>
<a href="https://doi.org/10.3390/arts3010027">10.3390/arts3010027</a>
</div>
<div class="pubdates">
Received: 30 September 2013; in revised form: 28 October 2013 / Accepted: 1 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -221,7 +221,7 @@
<em>Symmetry</em>
<b>2014</b>,
<em>6</em>(1), 23-66; doi:
<a href="http://dx.doi.org/10.3390/sym6010023">10.3390/sym6010023</a>
<a href="https://doi.org/10.3390/sym6010023">10.3390/sym6010023</a>
</div>
<div class="pubdates">
Received: 28 October 2013; in revised form: 13 December 2013 / Accepted: 13 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -263,7 +263,7 @@
<em>Processes</em>
<b>2014</b>,
<em>2</em>(1), 34-57; doi:
<a href="http://dx.doi.org/10.3390/pr2010034">10.3390/pr2010034</a>
<a href="https://doi.org/10.3390/pr2010034">10.3390/pr2010034</a>
</div>
<div class="pubdates">
Received: 18 September 2013; in revised form: 5 December 2013 / Accepted: 19 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -310,7 +310,7 @@
<em>Plants</em>
<b>2014</b>,
<em>3</em>(1), 27-57; doi:
<a href="http://dx.doi.org/10.3390/plants3010027">10.3390/plants3010027</a>
<a href="https://doi.org/10.3390/plants3010027">10.3390/plants3010027</a>
</div>
<div class="pubdates">
Received: 4 November 2013; in revised form: 18 December 2013 / Accepted: 20 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -362,7 +362,7 @@
<em>Forests</em>
<b>2014</b>,
<em>5</em>(1), 21-71; doi:
<a href="http://dx.doi.org/10.3390/f5010021">10.3390/f5010021</a>
<a href="https://doi.org/10.3390/f5010021">10.3390/f5010021</a>
</div>
<div class="pubdates">
Received: 4 November 2013; in revised form: 15 December 2013 / Accepted: 18 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -404,7 +404,7 @@
<em>Adm. Sci.</em>
<b>2014</b>,
<em>4</em>(1), 1-14; doi:
<a href="http://dx.doi.org/10.3390/admsci4010001">10.3390/admsci4010001</a>
<a href="https://doi.org/10.3390/admsci4010001">10.3390/admsci4010001</a>
</div>
<div class="pubdates">
Received: 8 October 2013; in revised form: 16 December 2013 / Accepted: 19 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -442,7 +442,7 @@
<em>Arts</em>
<b>2014</b>,
<em>3</em>(1), 15-26; doi:
<a href="http://dx.doi.org/10.3390/arts3010015">10.3390/arts3010015</a>
<a href="https://doi.org/10.3390/arts3010015">10.3390/arts3010015</a>
</div>
<div class="pubdates">
Received: 27 October 2013; in revised form: 2 December 2013 / Accepted: 17 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -485,7 +485,7 @@
<em>J. Funct. Biomater.</em>
<b>2014</b>,
<em>5</em>(1), 1-14; doi:
<a href="http://dx.doi.org/10.3390/jfb5010001">10.3390/jfb5010001</a>
<a href="https://doi.org/10.3390/jfb5010001">10.3390/jfb5010001</a>
</div>
<div class="pubdates">
Received: 27 August 2013; in revised form: 26 November 2013 / Accepted: 27 November 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -526,7 +526,7 @@
<em>Int. J. Environ. Res. Public Health</em>
<b>2014</b>,
<em>11</em>(1), 713-733; doi:
<a href="http://dx.doi.org/10.3390/ijerph110100713">10.3390/ijerph110100713</a>
<a href="https://doi.org/10.3390/ijerph110100713">10.3390/ijerph110100713</a>
</div>
<div class="pubdates">
Received: 14 October 2013; in revised form: 16 December 2013 / Accepted: 18 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -567,7 +567,7 @@
<em>Diversity</em>
<b>2014</b>,
<em>6</em>(1), 33-42; doi:
<a href="http://dx.doi.org/10.3390/d6010033">10.3390/d6010033</a>
<a href="https://doi.org/10.3390/d6010033">10.3390/d6010033</a>
</div>
<div class="pubdates">
Received: 2 October 2013; in revised form: 20 December 2013 / Accepted: 27 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -618,7 +618,7 @@
<em>Diversity</em>
<b>2014</b>,
<em>6</em>(1), 18-32; doi:
<a href="http://dx.doi.org/10.3390/d6010018">10.3390/d6010018</a>
<a href="https://doi.org/10.3390/d6010018">10.3390/d6010018</a>
</div>
<div class="pubdates">
Received: 27 October 2013; in revised form: 3 December 2013 / Accepted: 24 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -652,7 +652,7 @@
<em>Sustainability</em>
<b>2014</b>,
<em>6</em>(1), 251-266; doi:
<a href="http://dx.doi.org/10.3390/su6010251">10.3390/su6010251</a>
<a href="https://doi.org/10.3390/su6010251">10.3390/su6010251</a>
</div>
<div class="pubdates">
Received: 11 November 2013; in revised form: 13 December 2013 / Accepted: 27 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -698,7 +698,7 @@
<em>Membranes</em>
<b>2014</b>,
<em>4</em>(1), 20-39; doi:
<a href="http://dx.doi.org/10.3390/membranes4010020">10.3390/membranes4010020</a>
<a href="https://doi.org/10.3390/membranes4010020">10.3390/membranes4010020</a>
</div>
<div class="pubdates">
Received: 6 November 2013; in revised form: 26 November 2013 / Accepted: 21 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -743,7 +743,7 @@
<em>Energies</em>
<b>2014</b>,
<em>7</em>(1), 130-149; doi:
<a href="http://dx.doi.org/10.3390/en7010130">10.3390/en7010130</a>
<a href="https://doi.org/10.3390/en7010130">10.3390/en7010130</a>
</div>
<div class="pubdates">
Received: 21 October 2013; in revised form: 11 December 2013 / Accepted: 27 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -781,7 +781,7 @@
<em>Societies</em>
<b>2014</b>,
<em>4</em>(1), 16-29; doi:
<a href="http://dx.doi.org/10.3390/soc4010016">10.3390/soc4010016</a>
<a href="https://doi.org/10.3390/soc4010016">10.3390/soc4010016</a>
</div>
<div class="pubdates">
Received: 31 October 2013; in revised form: 24 December 2013 / Accepted: 24 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -820,7 +820,7 @@
<em>J. Sens. Actuator Netw.</em>
<b>2014</b>,
<em>3</em>(1), 44-63; doi:
<a href="http://dx.doi.org/10.3390/jsan3010044">10.3390/jsan3010044</a>
<a href="https://doi.org/10.3390/jsan3010044">10.3390/jsan3010044</a>
</div>
<div class="pubdates">
Received: 26 November 2013; in revised form: 15 December 2013 / Accepted: 23 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -859,7 +859,7 @@
<em>Mar. Drugs</em>
<b>2014</b>,
<em>12</em>(1), 115-127; doi:
<a href="http://dx.doi.org/10.3390/md12010115">10.3390/md12010115</a>
<a href="https://doi.org/10.3390/md12010115">10.3390/md12010115</a>
</div>
<div class="pubdates">
Received: 14 October 2013; in revised form: 25 November 2013 / Accepted: 12 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -914,7 +914,7 @@
<em>Energies</em>
<b>2014</b>,
<em>7</em>(1), 115-129; doi:
<a href="http://dx.doi.org/10.3390/en7010115">10.3390/en7010115</a>
<a href="https://doi.org/10.3390/en7010115">10.3390/en7010115</a>
</div>
<div class="pubdates">
Received: 22 October 2013; in revised form: 17 December 2013 / Accepted: 27 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -961,7 +961,7 @@
<em>Materials</em>
<b>2014</b>,
<em>7</em>(1), 218-231; doi:
<a href="http://dx.doi.org/10.3390/ma7010218">10.3390/ma7010218</a>
<a href="https://doi.org/10.3390/ma7010218">10.3390/ma7010218</a>
</div>
<div class="pubdates">
Received: 28 November 2013; in revised form: 17 December 2013 / Accepted: 23 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -1007,7 +1007,7 @@
<em>Int. J. Mol. Sci.</em>
<b>2014</b>,
<em>15</em>(1), 525-544; doi:
<a href="http://dx.doi.org/10.3390/ijms15010525">10.3390/ijms15010525</a>
<a href="https://doi.org/10.3390/ijms15010525">10.3390/ijms15010525</a>
</div>
<div class="pubdates">
Received: 13 November 2013; in revised form: 19 December 2013 / Accepted: 23 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -1051,7 +1051,7 @@
<em>Materials</em>
<b>2014</b>,
<em>7</em>(1), 206-217; doi:
<a href="http://dx.doi.org/10.3390/ma7010206">10.3390/ma7010206</a>
<a href="https://doi.org/10.3390/ma7010206">10.3390/ma7010206</a>
</div>
<div class="pubdates">
Received: 8 October 2013; in revised form: 14 December 2013 / Accepted: 19 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -1107,7 +1107,7 @@
<em>Int. J. Mol. Sci.</em>
<b>2014</b>,
<em>15</em>(1), 504-524; doi:
<a href="http://dx.doi.org/10.3390/ijms15010504">10.3390/ijms15010504</a>
<a href="https://doi.org/10.3390/ijms15010504">10.3390/ijms15010504</a>
</div>
<div class="pubdates">
Received: 30 October 2013; in revised form: 16 December 2013 / Accepted: 27 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -1152,7 +1152,7 @@
<em>Remote Sens.</em>
<b>2014</b>,
<em>6</em>(1), 540-554; doi:
<a href="http://dx.doi.org/10.3390/rs6010540">10.3390/rs6010540</a>
<a href="https://doi.org/10.3390/rs6010540">10.3390/rs6010540</a>
</div>
<div class="pubdates">
Received: 30 October 2013; in revised form: 25 December 2013 / Accepted: 27 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -1193,7 +1193,7 @@
<em>Remote Sens.</em>
<b>2014</b>,
<em>6</em>(1), 521-539; doi:
<a href="http://dx.doi.org/10.3390/rs6010521">10.3390/rs6010521</a>
<a href="https://doi.org/10.3390/rs6010521">10.3390/rs6010521</a>
</div>
<div class="pubdates">
Received: 27 September 2013; in revised form: 13 December 2013 / Accepted: 23 December 2013 / Published: 3 January 2014
Expand Down Expand Up @@ -1238,7 +1238,7 @@
<em>Toxins</em>
<b>2014</b>,
<em>6</em>(1), 229-253; doi:
<a href="http://dx.doi.org/10.3390/toxins6010229">10.3390/toxins6010229</a>
<a href="https://doi.org/10.3390/toxins6010229">10.3390/toxins6010229</a>
</div>
<div class="pubdates">
Received: 11 November 2013; in revised form: 24 December 2013 / Accepted: 27 December 2013 / Published: 3 January 2014
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
Volume 2014 (2014), Article ID 801626, 8 pages
<br></br>
// doi
<a href="http://dx.doi.org/10.1155/2014/801626">http://dx.doi.org/10.1155/2014/801626</a>
<a href="https://doi.org/10.1155/2014/801626">https://doi.org/10.1155/2014/801626</a>
</pre>
// article type
<div class="article_type">Research Article</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<xsl:output method="xhtml"/>

<xsl:variable name="doiroot">https://dx.doi.org/</xsl:variable>
<xsl:variable name="doiroot">https://doi.org/</xsl:variable>
<xsl:variable name="nlmroot">http://www.ncbi.nlm.nih.gov/pubmed/</xsl:variable>
<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
Expand Down Expand Up @@ -817,7 +817,7 @@
<xsl:template match="*[local-name()='fig']">
<div class="fig" title="fig">
<div class="figure" title="figure">
<a href="http://doi.org/{*[local-name()='object-id' and @pub-id-type='doi']}"><xsl:apply-templates select="*[local-name()='label']"/></a>
<a href="https://doi.org/{*[local-name()='object-id' and @pub-id-type='doi']}"><xsl:apply-templates select="*[local-name()='label']"/></a>
</div>
<caption class="caption" title="caption"><xsl:apply-templates select="*[local-name()='caption']"/></caption>
<!-- the <graphic> links to files we don't have -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<xsl:variable name="publisher">Generic NLM</xsl:variable>
<xsl:variable name="prefix">10.0000</xsl:variable>

<xsl:variable name="doiroot">https://dx.doi.org/</xsl:variable>
<xsl:variable name="doiroot">https://doi.org/</xsl:variable>
<xsl:variable name="nlmroot">http://www.ncbi.nlm.nih.gov/pubmed/</xsl:variable>
<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
Expand Down Expand Up @@ -885,7 +885,7 @@ UNKNOWN nlm: alt-text:
<xsl:template match="*[local-name()='fig']">
<div class="fig" title="fig">
<div class="figure" title="figure">
<a href="http://doi.org/{*[local-name()='object-id' and @pub-id-type='doi']}"><xsl:apply-templates select="*[local-name()='label']"/></a>
<a href="https://doi.org/{*[local-name()='object-id' and @pub-id-type='doi']}"><xsl:apply-templates select="*[local-name()='label']"/></a>
</div>
<caption class="caption" title="caption"><xsl:apply-templates select="*[local-name()='caption']"/></caption>
<!-- the <graphic> links to files we don't have -->
Expand Down
Loading

0 comments on commit 33c1453

Please sign in to comment.