cirneco 0.9.12 → 0.9.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +124 -49
  3. data/cirneco.gemspec +5 -4
  4. data/lib/cirneco/api.rb +8 -8
  5. data/lib/cirneco/base.rb +2 -2
  6. data/lib/cirneco/cli.rb +1 -1
  7. data/lib/cirneco/utils.rb +48 -95
  8. data/lib/cirneco/version.rb +1 -1
  9. data/lib/cirneco/work.rb +8 -203
  10. data/spec/api_spec.rb +16 -28
  11. data/spec/doi_spec.rb +9 -11
  12. data/spec/fixtures/cool-dois-minted/index.html +189 -234
  13. data/spec/fixtures/cool-dois-minted.html.md +1 -1
  14. data/spec/fixtures/cool-dois.html.md +2 -2
  15. data/spec/fixtures/index-minted.html +1 -1
  16. data/spec/fixtures/index.html +50 -1
  17. data/spec/fixtures/index.html.erb +2 -2
  18. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/get/should_get_all_dois_by_prefix.yml +20 -18
  19. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/jats/should_generate_jats_for_all_urls.yml +38 -0
  20. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_for_all_urls.yml +20 -20
  21. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_for_url.yml +19 -17
  22. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_metadata_for_work.yml +19 -17
  23. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_and_hide_for_all_urls.yml +204 -108
  24. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_and_hide_for_url.yml +72 -64
  25. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_for_all_urls.yml +17 -291
  26. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_post_metadata_for_work.yml +47 -82
  27. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/MDS_DOI_API/get/should_get_all_dois.yml +22 -18
  28. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/MDS_DOI_API/get/should_get_doi.yml +19 -17
  29. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/MDS_DOI_API/put/should_put_doi.yml +20 -18
  30. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/jats/writes_jats_for_list_of_urls.yml +38 -0
  31. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/hides_a_doi.yml +19 -17
  32. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/hides_dois_for_list_of_urls.yml +81 -0
  33. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_and_hides_a_doi.yml +72 -64
  34. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_and_hides_dois_for_list_of_urls.yml +204 -108
  35. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_dois_for_list_of_urls.yml +17 -291
  36. data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_all_dois.yml +140 -18
  37. data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_doi.yml +137 -17
  38. data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_doi_not_found.yml +134 -16
  39. data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/username_missing.yml +121 -0
  40. data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/put/should_put_doi.yml +138 -18
  41. data/spec/fixtures/vcr_cassettes/Cirneco_Work/Media_API/get/should_get_media.yml +135 -17
  42. data/spec/fixtures/vcr_cassettes/Cirneco_Work/Media_API/post/should_post_media.yml +137 -17
  43. data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/delete/should_delete_metadata.yml +137 -17
  44. data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/get/should_get_metadata.yml +170 -27
  45. data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/post/should_post_metadata.yml +173 -28
  46. data/spec/fixtures/vcr_cassettes/Cirneco_Work/media/includes_media.yml +121 -0
  47. data/spec/fixtures/vcr_cassettes/Cirneco_Work/schema/BlogPosting.yml +121 -0
  48. data/spec/spec_helper.rb +1 -1
  49. data/spec/utils_spec.rb +28 -41
  50. data/spec/work_spec.rb +33 -43
  51. metadata +43 -19
  52. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_for_url.yml +0 -174
  53. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_a_doi.yml +0 -174
@@ -1,3 +1,4 @@
1
+
1
2
  <!DOCTYPE html>
2
3
  <html>
3
4
  <head>
@@ -25,11 +26,6 @@
25
26
  <meta property="dc:subject" content="Scholarly Communication" />
26
27
  <meta property="dc:type" content="website" />
27
28
 
28
- <meta name="twitter:card" content="summary" />
29
- <meta name="twitter:site" content="datacite" />
30
- <meta name="twitter:title" content="Cool DOI's" />
31
- <meta name="twitter:image" content="https://blog.datacite.org/images/2016/12/cool-dois.png" />
32
- <meta name="twitter:description" content="In 1998 Tim Berners-Lee coined the term cool URIs (1998), that is URIs that don’t change. We know that URLs referenced in the scholarly literature are often not cool, leading to link rot (Klein et al., 2014) and making it hard or impossible to find..." />
33
29
 
34
30
  <meta property="og:site_name" content="Cool DOI's" />
35
31
  <meta property="og:description" content="In 1998 Tim Berners-Lee coined the term cool URIs (1998), that is URIs that don’t change. We know that URLs referenced in the scholarly literature are often not cool, leading to link rot (Klein et al., 2014) and making it hard or impossible to find..." />
@@ -39,172 +35,91 @@
39
35
  <link href="//fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700" rel="stylesheet">
40
36
  <link href='//fonts.googleapis.com/css?family=Raleway:400,600,400italic,600italic' rel='stylesheet' type='text/css'>
41
37
  <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet" type='text/css'>
42
- <link href="//localhost:4568/stylesheets/datacite.css" rel='stylesheet' type='text/css'>
38
+ <link href="https://assets.datacite.org/stylesheets/datacite.css" rel='stylesheet' type='text/css'>
39
+ <link href="https://assets.datacite.org/images/favicon.ico" rel="icon" type="image/ico" />
43
40
 
44
- <link href="/images/favicon.ico" rel="icon" type="image/ico" />
41
+ <script
42
+ src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js"
43
+ data-apikey="c37a5861967091a9b42a1a77e235114a">
44
+ </script>
45
45
 
46
46
  <script type="application/ld+json">
47
- {
48
- "@context": "http://schema.org",
49
- "@type": "BlogPosting",
50
- "@id": "https://doi.org/10.5072/0000-03WD",
51
- "name": "Cool DOI's",
52
- "alternateName":"MS-124",
53
- "url": "https://blog.datacite.org/cool-dois/",
54
- "author": [
55
- {
56
- "@type": "Person",
57
- "@id": "http://orcid.org/0000-0003-1419-2405",
58
- "givenName": "Martin",
59
- "familyName": "Fenner",
60
- "name": "Martin Fenner"
61
- }
62
- ],
63
- "publisher": {
64
- "@type": "Organization",
65
- "name": "DataCite"
66
- },
67
- "dateCreated": "2016-12-15",
68
- "datePublished": "2016-12-15",
69
- "dateModified": "2016-12-15",
70
- "keywords": "doi, featured",
71
- "version": "1.0",
72
- "description": "In 1998 Tim Berners-Lee coined the term cool URIs (1998), that is URIs that don’t change. We know that URLs referenced in the scholarly literature are often not cool, leading to link rot (Klein et al., 2014) and making it hard or impossible to find...",
73
- "license": "https://creativecommons.org/licenses/by/4.0/",
74
- "image": "https://blog.datacite.org/images/2016/12/cool-dois.png",
75
- "encoding": {
76
- "@type": "MediaObject",
77
- "@id": "https://blog.datacite.org/cool-dois/0000-03WD.xml",
78
- "fileFormat": "application/xml"
79
- },
80
- "isPartOf": {
81
- "@type": "Blog",
82
- "@id": "https://blog.datacite.org",
83
- "name": "DataCite Blog"
84
- },
85
- "citation": [
86
- {
87
- "@type": "CreativeWork",
88
- "@id": "https://www.w3.org/Provider/Style/URI"
89
- },
90
- {
91
- "@type": "CreativeWork",
92
- "@id": "https://doi.org/10.1371/journal.pone.0115253"
93
- }
94
- ]
95
- }
47
+ {"@context":"http://schema.org","@type":"BlogPosting","@id":"https://doi.org/10.5438/55E5-T5C0","name":"Cool DOI's","alternateName":"MS-55-5135-1980","url":"https://blog.datacite.org/cool-dois/","author":[{"@type":"Person","@id":"http://orcid.org/0000-0003-1419-2405","givenName":"Martin","familyName":"Fenner","name":"Martin Fenner"}],"publisher":{"@type":"Organization","name":"DataCite"},"dateCreated":"2016-12-15","datePublished":"2016-12-15","dateModified":"2016-12-15","keywords":"doi, featured","version":"1.0","description":"In 1998 Tim Berners-Lee coined the term cool URIs (1998), that is URIs that don’t change. We know that URLs referenced in the scholarly literature are often not cool, leading to link rot (Klein et al., 2014) and making it hard or impossible to find...","license":"https://creativecommons.org/licenses/by/4.0/","image":"https://blog.datacite.org/images/2016/12/cool-dois.png","encoding":{"@type":"MediaObject","@id":"https://blog.datacite.org/cool-dois/cool-dois.xml","fileFormat":"application/xml"},"isPartOf":{"@type":"Blog","@id":"https://doi.org/10.5438/0000-00SS","name":"DataCite Blog"},"citation":[{"@type":"CreativeWork","@id":"https://www.w3.org/Provider/Style/URI"},{"@type":"CreativeWork","@id":"https://doi.org/10.1371/journal.pone.0115253"}]}
96
48
  </script>
97
49
  </head>
98
50
  <body>
99
-
100
- <!-- header start -->
101
-
102
- <div class="header" id="navtop">
103
- <div class="navbar navbar-white navbar-static-top" role="navigation">
104
- <div class="container-fluid">
105
- <div class="navbar-header"
106
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
107
- <span class="sr-only">Toggle navigation</span>
108
- <span class="icon-bar"></span>
109
- <span class="icon-bar"></span>
110
- <span class="icon-bar"></span>
111
- </button>
112
- <a class="navbar-brand" href="/">DataCite Blog</a>
113
- </div>
114
- <div class="navbar-collapse collapse">
115
- <ul class="nav navbar-nav navbar-right">
116
- <li class="dropdown">
117
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="support">Support <span class="caret"></a>
118
- <ul class="dropdown-menu" role="menu">
119
- <li><a href="mailto:support@datacite.org">Email</a></li>
120
- <li><a href="https://github.com/datacite/blog">Source Code</a></li>
121
- </ul>
122
- </li>
123
- <li class="dropdown">
124
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="sites"><i class='fa fa-th'></i> <span class="caret"></span></a>
125
- <ul class="dropdown-menu" role="menu">
126
- <li>
127
- <a href='https://api.datacite.org'>
128
- <i class='fa fa-cogs fa-fw'></i>
129
- API
130
- </a>
131
- </li>
132
- <li>
133
- <a href='https://blog.datacite.org'>
134
- <i class='fa fa-rss fa-fw'></i>
135
- Blog
136
- </a>
51
+ <header class="header" id="navtop">
52
+ <div class="navbar navbar-white" role="navigation">
53
+ <div class="container-fluid">
54
+ <div class="navbar-header"
55
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
56
+ <span class="sr-only">Toggle navigation</span>
57
+ <span class="icon-bar"></span>
58
+ <span class="icon-bar"></span>
59
+ <span class="icon-bar"></span>
60
+ </button>
61
+ </div>
62
+ <a class="navbar-brand" href="/">DataCite Blog</a>
63
+ <div class="navbar-collapse collapse">
64
+ <ul class="nav navbar-nav navbar-right">
65
+ <li><a href="https://support.datacite.org">Support</a></li>
66
+ <li class="dropdown">
67
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="sites"><i class='fa fa-th'></i> <span class="caret"></span></a>
68
+ <ul class="dropdown-menu" role="menu">
69
+ <li><a href="https://www.datacite.org">
70
+ <i class='fa fa-globe fa-fw'></i>
71
+ Homepage</a>
137
72
  </li>
138
- <li>
139
- <a href='http://citation.crosscite.org'>
140
- <i class='fa fa-file-text-o fa-fw'></i>
141
- Citation Formatter
142
- </a>
73
+ <li><a href="https://blog.datacite.org">
74
+ <i class='fa fa-rss fa-fw'></i>
75
+ Blog</a>
143
76
  </li>
144
- <li>
145
- <a href='https://data.datacite.org'>
146
- <i class='fa fa-repeat fa-fw'></i>
147
- Content Resolver
148
- </a>
77
+ <li class="divider"></li>
78
+ <li><a href="https://mds.datacite.org">
79
+ <i class='fa fa-database fa-fw'></i>
80
+ MDS</a>
149
81
  </li>
150
- <li>
151
- <a href='https://www.datacite.org'>
152
- <i class='fa fa-globe fa-fw'></i>
153
- Homepage
154
- </a>
82
+ <li><a href="https://schema.datacite.org">
83
+ <i class='fa fa-file-code-o fa-fw'></i>
84
+ Schema</a>
155
85
  </li>
156
- <li>
157
- <a href='https://mds.datacite.org'>
158
- <i class='fa fa-database fa-fw'></i>
159
- MDS
160
- </a>
86
+ <li><a href="http://citation.crosscite.org">
87
+ <i class='fa fa-file-text-o fa-fw'></i>
88
+ Citation Formatter</a>
161
89
  </li>
162
- <li>
163
- <a href='https://oai.datacite.org'>
164
- <i class='fa fa-table fa-fw'></i>
165
- OAI-PMH
166
- </a>
90
+ <li class="divider"></li>
91
+ <li><a href="https://search.datacite.org">
92
+ <i class='fa fa-search fa-fw'></i>
93
+ Search</a>
167
94
  </li>
168
- <li>
169
- <a href='https://profiles.datacite.org'>
170
- <i class='fa fa-user fa-fw'></i>
171
- Profiles
172
- </a>
95
+ <li><a href="https://oai.datacite.org">
96
+ <i class='fa fa-table fa-fw'></i>
97
+ OAI-PMH</a>
173
98
  </li>
174
- <li>
175
- <a href='https://schema.datacite.org'>
176
- <i class='fa fa-file-code-o fa-fw'></i>
177
- Schema
178
- </a>
99
+ <li><a href="https://stats.datacite.org">
100
+ <i class='fa fa-bar-chart fa-fw'></i>
101
+ Statistics</a>
179
102
  </li>
180
- <li>
181
- <a href='https://search.datacite.org'>
182
- <i class='fa fa-search fa-fw'></i>
183
- Search
184
- </a>
103
+ <li><a href="https://api.datacite.org">
104
+ <i class='fa fa-cogs fa-fw'></i>
105
+ REST API</a>
185
106
  </li>
186
- <li>
187
- <a href='https://stats.datacite.org'>
188
- <i class='fa fa-bar-chart fa-fw'></i>
189
- Statistics
190
- </a>
107
+ <li><a href="http://www.re3data.org">
108
+ <i class='fa fa-cubes fa-fw'></i>
109
+ re3data</a>
191
110
  </li>
192
- <li>
193
- <a href='http://status.datacite.org'>
194
- <i class='fa fa-calendar-check-o fa-fw'></i>
195
- Status
196
- </a>
111
+ <li class="divider"></li>
112
+ <li><a href="http://status.datacite.org">
113
+ <i class='fa fa-calendar-check-o fa-fw'></i>
114
+ Status</a>
197
115
  </li>
116
+ </ul>
117
+ </li>
198
118
  </ul>
199
- </li>
200
- </ul>
119
+ </div>
120
+ </div>
201
121
  </div>
202
- </div>
203
- </div>
204
- </div>
205
-
206
- <!-- header end -->
207
-
122
+ </header>
208
123
  <div class="wrapper">
209
124
  <div class="section section-white">
210
125
  <div class="container-fluid">
@@ -222,21 +137,21 @@
222
137
  <p>Cool URIs are, of course, a fundamental principle behind DOIs, with the two important concepts <a href="https://www.doi.org/doi_handbook/3_Resolution.html"><em>resolution</em></a> (it is very hard to maintain a URL directly pointing at a resource) and <a href="https://www.doi.org/doi_handbook/6_Policies.html"><em>policies</em></a> (that all DOI registration agencies and organizations minting DOIs agree to maintain the redirection). The third essential element for DOIs, their <a href="https://www.doi.org/doi_handbook/4_Data_Model.html"><em>data model</em></a>, is not directly about persistent linking, but about the discoverability of the linked resources via standard metadata in a central index.</p>
223
138
  <p>All DOIs, expressed as HTTP URI, are therefore cool URIs. So what is a cool DOI? And, furthermore, how to create and use them? To understand what a cool DOI is, we have to explain the three parts that make up a DOI:</p>
224
139
  <div class="figure">
225
- <img src="/images/2016/12/doi-parts.png" />
226
-
140
+ <img src="/images/2016/12/doi-parts.png" alt="The three parts that make up a DOI" />
141
+ <p class="caption">The three parts that make up a DOI</p>
227
142
  </div>
228
143
  <h3 id="proxy">Proxy</h3>
229
- <p>The proxy is not part of the DOI specification, but almost all scholarly DOIs that users encounter today will be expressed as HTTP URLs. DataCite recommends that all DOIs are displayed as permanent URLs, consistent with the recommendations of other DOI registration agencies, e.g. the <a href="http://www.crossref.org/02publishers/doi_display_guidelines.html">Crossref DOI display guidelines</a>. When the DOI system was originally designed, it was thought that the DOI protocol would become widely used, but that clearly has not happened and displaying DOIs as <strong>doi:10.5281/ZENODO.31780</strong> is therefore not recommended.</p>
144
+ <p>The proxy is not part of the DOI specification, but almost all scholarly DOIs that users encounter today will be expressed as HTTP URLs. DataCite recommends that all DOIs are displayed as permanent URLs, consistent with the recommendations of other DOI registration agencies, e.g. the <a href="http://www.crossref.org/02publishers/doi_display_guidelines.html">Crossref DOI display guidelines</a>. When the DOI system was originally designed, it was thought that the DOI protocol would become widely used, but that clearly has not happened and displaying DOIs as <strong>doi:10.5281/ZENODO.31780</strong> is therefore not recommended.</p>
230
145
  <p>The DOI proxy enables the functionality of expressing DOIs as HTTP URIs. Users should also be aware of two these two recommendations:</p>
231
146
  <ul>
232
147
  <li>Use <a href="https://www.doi.org/doi_proxy/proxy_policies.html">doi.org</a> instead of dx.doi.org as DNS name</li>
233
148
  <li>Use the HTTPS protocol instead of HTTP protocol</li>
234
149
  </ul>
235
150
  <p>Ed Pentz from Crossref makes the case for HTTPS in a <a href="http://blog.crossref.org/2016/09/new-crossref-doi-display-guidelines.html">September blog post</a>. The web, and therefore also the scholarly web, is moving to HTTPS as the default. It is important that the DOI proxy redirects to HTTPS URLs, and it will take some time until all DataCite data centers use HTTPS for the landing pages their DOIs redirects to.</p>
236
- <p>What many users don’t know is that doi.org is not the only proxy server for DOIs. DOIs use the handle system and any handle server will resolve a DOI, just as doi.org will resolve any handle. This means that <a href="https://hdl.handle.net/10.5281/ZENODO.31780" class="uri">https://hdl.handle.net/10.5281/ZENODO.31780</a> will resolve to the landing page for that DOI and that <a href="http://doi.org/10273/BGRB5054RX05201" class="uri">http://doi.org/10273/BGRB5054RX05201</a> is a handle (for a <a href="http://www.igsn.org/">IGSN</a>) and not a DOI.</p>
151
+ <p>What many users don’t know is that doi.org is not the only proxy server for DOIs. DOIs use the handle system and any handle server will resolve a DOI, just as doi.org will resolve any handle. This means that <a href="https://hdl.handle.net/10.5281/ZENODO.31780" class="uri">https://hdl.handle.net/10.5281/ZENODO.31780</a> will resolve to the landing page for that DOI and that <a href="https://doi.org/10273/BGRB5054RX05201" class="uri">https://doi.org/10273/BGRB5054RX05201</a> is a handle (for a <a href="http://www.igsn.org/">IGSN</a>) and not a DOI.</p>
237
152
  <h3 id="prefix">Prefix</h3>
238
- <p>The DOI prefix is used as a namespace so that DOIs are globally unique without requiring global coordination for every new identifier. Prefixes in the handle system and therefore for DOIs are numbers without any semantic meaning. One lesson learned with persistent identifiers is that adding meaning to the identifier (e.g. by using a prefix with the name of the data repository) is always dangerous, because – despite best intentions – all names can change over time.</p>
239
- <p>Since the DOI prefix is a namespace to keep DOIs globally unique, there is usually no need for multiple prefixes for one organization managing DOI assignment. The tricky part is that these responsibilities can change, e.g. when an organization manages multiple repositories and one of them is migrated to another organization. It therefore makes sense to assign one prefix per list of resources that always stays together, e.g. one repository. It is possible that one prefix is managed by multiple organizations (as long as they use the same DOI registration agency), but that makes DOI management more complex.</p>
153
+ <p>The DOI prefix is used as a namespace so that DOIs are globally unique without requiring global coordination for every new identifier. Prefixes in the handle system and therefore for DOIs are numbers without any semantic meaning. One lesson learned with persistent identifiers is that adding meaning to the identifier (e.g. by using a prefix with the name of the data repository) is always dangerous, because – despite best intentions – all names can change over time.</p>
154
+ <p>Since the DOI prefix is a namespace to keep DOIs globally unique, there is usually no need for multiple prefixes for one organization managing DOI assignment. The tricky part is that these responsibilities can change, e.g. when an organization manages multiple repositories and one of them is migrated to another organization. It therefore makes sense to assign one prefix per list of resources that always stays together, e.g. one repository. It is possible that one prefix is managed by multiple organizations (as long as they use the same DOI registration agency), but that makes DOI management more complex.</p>
240
155
  <h3 id="suffix">Suffix</h3>
241
156
  <p>The suffix for a DOI can be (almost) any string. Which is both a feature and a curse. It is a feature because it gives maximal flexibility, for example when migrating existing identifiers to the DOI system. And it is a curse because it not always works well in the web context, as the list of characters allowed in a URL is limited. A good example of this are SICIs (<a href="https://en.wikipedia.org/wiki/Serial_Item_and_Contribution_Identifier">Serial Item and Contribution Identifier</a>), they were defined in 1996 before the DOI system was implemented, and could then be migrated to DOIs. Unfortunately they can contain many characters that are problematic in a URL or make it difficult to validate the DOI, as in <a href="https://doi.org/10.1002/(sici)1099-1409(199908/10)3:6/7%3C672::aid-jpp192%3E3.0.co;2-8" class="uri">https://doi.org/10.1002/(sici)1099-1409(199908/10)3:6/7&lt;672::aid-jpp192&gt;3.0.co;2-8</a>. A Crossref <a href="http://blog.crossref.org/2015/08/doi-regular-expressions.html">blog post</a> by Andrew Gilmartin gives a good overview about the characters found in DOIs and suggests the following regular expression to check for valid DOIs:</p>
242
157
  <pre><code>/^10.\d{4,9}/[-._;()/:A-Z0-9]+$/i</code></pre>
@@ -245,7 +160,7 @@
245
160
  <li>they contain semantic information (ISSN, volume, number, etc.) that may change over time, and</li>
246
161
  <li>they are long, difficult to transcribe, with characters not allowed in URLs, and not very human-readable.</li>
247
162
  </ul>
248
- <p>Semantic information might also lead users to expect certain functionalities. A common pattern that we see at DataCite is to include information about the version or parent in the suffix, e.g. <a href="https://doi.org/10.6084/M9.FIGSHARE.3501629.V1" class="uri">https://doi.org/10.6084/M9.FIGSHARE.3501629.V1</a> or <a href="https://doi.org/10.5061/DRYAD.0SN63/7" class="uri">https://doi.org/10.5061/DRYAD.0SN63/7</a>. While the decision on what to put into the suffix is up to each data center, we should make sure users don’t think that these are functionalities of the DOI system (e.g. that adding <strong>.V2</strong> to any DOI name will resolve to version 2 of that resource).</p>
163
+ <p>Semantic information might also lead users to expect certain functionalities. A common pattern that we see at DataCite is to include information about the version or parent in the suffix, e.g. <a href="https://doi.org/10.6084/M9.FIGSHARE.3501629.V1" class="uri">https://doi.org/10.6084/M9.FIGSHARE.3501629.V1</a> or <a href="https://doi.org/10.5061/DRYAD.0SN63/7" class="uri">https://doi.org/10.5061/DRYAD.0SN63/7</a>. While the decision on what to put into the suffix is up to each data center, we should make sure users don’t think that these are functionalities of the DOI system (e.g. that adding <strong>.V2</strong> to any DOI name will resolve to version 2 of that resource).</p>
249
164
  <p>Another issue to keep in mind when assigning suffixes is that DOIs – in contrast to HTTP URIs – are case-insensitive, <a href="https://doi.org/10.5281/ZENODO.31780" class="uri">https://doi.org/10.5281/ZENODO.31780</a> and <a href="https://doi.org/10.5281/zenodo.31780" class="uri">https://doi.org/10.5281/zenodo.31780</a> are the same DOI. All DOIs are <a href="https://www.doi.org/doi_handbook/2_Numbering.html#2.4">converted to upper case</a> upon registration and DOI resolution, but DOIs are not consistently displayed in such a way.</p>
250
165
  <h3 id="generating-cool-dois">Generating cool DOIs</h3>
251
166
  <p>With all that, what should the ideal DOI look like? Its suffix should be:</p>
@@ -267,11 +182,11 @@
267
182
  <p>Another cirneco command checks that this is a valid bas32 string using the checksum</p>
268
183
  <pre><code>cirneco doi check 10.5555/KVTD-VPWM
269
184
  Checksum for 10.5555/KVTD-VPWM is valid</code></pre>
270
- <p>This can be used to quickly verify a DOI, e.g. in a web form or API. The Ruby base32 encoding library used by cirneco is open source (<a href="https://github.com/datacite/base32" class="uri">https://github.com/datacite/base32</a>. I added the checksum to the existing library), and implementations of the Crockford base32 encoding pattern are available in many other languages, including <a href="https://github.com/jbittel/base32-crockford">Python</a>, <a href="https://github.com/dflydev/dflydev-base32-crockford">PHP</a>, <a href="https://www.npmjs.com/package/base32-crockford">Javascript</a>, <a href="http://stackoverflow.com/questions/22385467/crockford-base32-encoding-for-large-number-java-implementation">Java</a>, <a href="https://github.com/richardlehane/crock32">Go</a> and <a href="https://crockfordbase32.codeplex.com/">.NET</a>.</p>
271
- <p>To answer the question raised at the beginning: a cool DOI is a DOI expressed as HTTPS URI using the doi.org proxy and using a base32-encoded suffix, for example <strong>https://doi.org/10.5555/KVTD-VPWM</strong>. This DOI works well in a web environment, is human readable, easy to parse and detect (e.g. in text mining), and can be generated using an algorithm that is well understood and supported.</p>
185
+ <p>This can be used to quickly verify a DOI, e.g. in a web form or API. The Ruby base32 encoding library used by cirneco is open source (<a href="https://github.com/datacite/base32" class="uri">https://github.com/datacite/base32</a>. I added the checksum to the existing library), and implementations of the Crockford base32 encoding pattern are available in many other languages, including <a href="https://github.com/jbittel/base32-crockford">Python</a>, <a href="https://github.com/dflydev/dflydev-base32-crockford">PHP</a>, <a href="https://www.npmjs.com/package/base32-crockford">Javascript</a>, <a href="http://stackoverflow.com/questions/22385467/crockford-base32-encoding-for-large-number-java-implementation">Java</a>, <a href="https://github.com/richardlehane/crock32">Go</a> and <a href="https://www.nuget.org/packages/crockford-base32">.NET</a>.</p>
186
+ <p>To answer the question raised at the beginning: a cool DOI is a DOI expressed as HTTPS URI using the doi.org proxy and using a base32-encoded suffix, for example <strong>https://doi.org/10.5555/KVTD-VPWM</strong>. This DOI works well in a web environment, is human readable, easy to parse and detect (e.g. in text mining), and can be generated using an algorithm that is well understood and supported.</p>
272
187
  <div class="figure">
273
- <img src="/images/2016/12/cool-dois.svg" />
274
-
188
+ <img src="/images/2016/12/cool-dois.svg" alt="Cool DOIs" />
189
+ <p class="caption">Cool DOIs</p>
275
190
  </div>
276
191
  <h3 id="references" class="unnumbered">References</h3>
277
192
  <div id="refs" class="references">
@@ -279,7 +194,7 @@ Checksum for 10.5555/KVTD-VPWM is valid</code></pre>
279
194
  <p>Berners-Lee, T. (1998). Hypertext Style: Cool URIs don’t change. Retrieved from <a href="https://www.w3.org/Provider/Style/URI" class="uri">https://www.w3.org/Provider/Style/URI</a></p>
280
195
  </div>
281
196
  <div id="ref-https://doi.org/10.1371/journal.pone.0115253">
282
- <p>Klein, M., Sompel, H. V. de, Sanderson, R., Shankar, H., Balakireva, L., Zhou, K., &amp; Tobin, R. (2014). Scholarly Context Not Found: One in Five Articles Suffers from Reference Rot. <em>PLOS ONE</em>, <em>9</em>(12), e115253. <a href="http://doi.org/10.1371/journal.pone.0115253" class="uri">http://doi.org/10.1371/journal.pone.0115253</a></p>
197
+ <p>Klein, M., Sompel, H. V. de, Sanderson, R., Shankar, H., Balakireva, L., Zhou, K., &amp; Tobin, R. (2014). Scholarly Context Not Found: One in Five Articles Suffers from Reference Rot. <em>PLOS ONE</em>, <em>9</em>(12), e115253. <a href="https://doi.org/10.1371/journal.pone.0115253" class="uri">https://doi.org/10.1371/journal.pone.0115253</a></p>
283
198
  </div>
284
199
  </div>
285
200
 
@@ -314,11 +229,11 @@ Checksum for 10.5555/KVTD-VPWM is valid</code></pre>
314
229
  <div class="bottom-teaser cf">
315
230
  <div class="isLeft">
316
231
  <h5 class="index-headline featured"><span>Share on</span></h5>
317
- <a class="icon-twitter" href="http://twitter.com/share?text=On the @datacite blog: Cool DOI's&amp;url=http://localhost:4567/cool-dois/"
232
+ <a class="icon-twitter" href="http://twitter.com/share?text=On the @datacite blog: Cool DOI's&amp;url=https://blog.datacite.org/cool-dois/"
318
233
  onclick="window.open(this.href, 'twitter-share', 'width=550,height=255');return false;">
319
234
  <i class="fa fa-twitter fa-2x"></i><span class="hidden">twitter</span>
320
235
  </a>
321
- <a class="icon-facebook" href="https://www.facebook.com/sharer.php?t=On the @datacite blog: Cool DOI's&amp;u=http://localhost:4567/cool-dois/"
236
+ <a class="icon-facebook" href="https://www.facebook.com/sharer.php?t=On the @datacite blog: Cool DOI's&amp;u=https://blog.datacite.org/cool-dois/"
322
237
  onclick="window.open(this.href, 'facebook-share', 'width=550,height=255');return false;">
323
238
  <i class="fa fa-facebook fa-2x"></i><span class="hidden">facebook</span>
324
239
  </a>
@@ -327,78 +242,118 @@ Checksum for 10.5555/KVTD-VPWM is valid</code></pre>
327
242
 
328
243
  </div>
329
244
  </div>
330
- </div>
331
- </div>
332
- </div>
245
+ <div class="row">
246
+ <div class="col-md-8 col-md-offset-2 post-content">
247
+ <div id="disqus_thread"></div>
248
+ <script>
249
+ var disqus_config = function () {
250
+ this.page.url = 'https://blog.datacite.org/cool-dois/';
251
+ this.page.identifier = 'https://doi.org/10.5438/55E5-T5C0';
252
+ };
253
+ (function() {
254
+ var d = document, s = d.createElement('script');
333
255
 
334
- <!-- footer start -->
256
+ s.src = '//datacite.disqus.com/embed.js'; //
335
257
 
336
- <footer class='row footer'>
337
- <div class="container-fluid">
338
- <div class='col-md-3 col-sm-4'>
339
- <h4>About DataCite</h4>
340
- <ul>
341
- <li><a href="https://www.datacite.org/mission.html">What we do</a></a></li>
342
- <li><a href="https://www.datacite.org/board.html">Board</a></a></li>
343
- <li><a href="https://www.datacite.org/steering.html">Steering groups</a></a></li>
344
- <li><a href="https://www.datacite.org/staff.html">Staff</a></a></li>
345
- <li><a href="https://www.datacite.org/jobopportunities.html">Job opportunities</a></a></li>
346
- </ul>
347
- </div>
348
- <div class='col-md-3 col-sm-4'>
349
- <h4>Services</h4>
350
- <ul>
351
- <li><a href="https://www.datacite.org/dois.html">Assign DOIs</a></a></li>
352
- <li><a href="https://www.datacite.org/search.html">Metadata search</a></a></li>
353
- <li><a href="https://www.datacite.org/eventdata.html">Event data</a></a></li>
354
- <li><a href="https://www.datacite.org/profiles.html">Profiles</a></a></li>
355
- <li><a href="https://www.datacite.org/re3data.html">re3data</a></a></li>
356
- <li><a href="https://www.datacite.org/citation.html">Citation formatter</a></a></li>
357
- <li><a href="https://www.datacite.org/stats.html">Statistics</a></a></li>
358
- <li><a href="https://www.datacite.org/service.html">Service status</a></a></li>
359
- <li><a href="https://www.datacite.org/content.html">Content negotiation</a></a></li>
360
- <li><a href="https://www.datacite.org/oaipmh.html">OAI-PMH</a></a></li>
361
- <li><a href="https://www.datacite.org/test.html">Test environment</a></a></li>
362
- </ul>
363
- </div>
364
- <div class='col-md-3 col-sm-4'>
365
- <h4>Resources</h4>
366
- <ul>
367
- <li><a href="https://schema.datacite.org">Metadata schema</a></a></li>
368
- <li><a href="https://www.datacite.org/technical.html">Technical documentation</a></a></li>
369
- <li><a href="https://www.datacite.org/outreach.html">Outreach material</a></a></li>
370
- <li><a href="https://www.datacite.org/events.html">Events</a></a></li>
371
- </ul>
372
- <h4>Community</h4>
373
- <ul>
374
- <li><a href="https://www.datacite.org/members.html">Members</a></a></li>
375
- <li><a href="https://www.datacite.org/partners.html">Partners</a></a></li>
376
- <li><a href="https://www.datacite.org/steering.html">Steering groups</a></a></li>
377
- <li><a href="https://www.datacite.org/events.html">Events</a></a></li>
378
- </ul>
379
- </div>
380
- <div class='col-md-3'>
381
- <h4 class="share">Contact us</h4>
382
- <a href='mailto:support@datacite.org' class="share">
383
- <i class='fa fa-at'></i>
384
- </a>
385
- <a href='https://blog.datacite.org' class="share">
386
- <i class='fa fa-rss'></i>
387
- </a>
388
- <a href='https://twitter.com/datacite' class="share">
389
- <i class='fa fa-twitter'></i>
390
- </a>
391
- <a href='https://www.linkedin.com/company/datacite' class="share">
392
- <i class='fa fa-linkedin'></i>
393
- </a>
394
- <ul class="share">
395
- <li><a href="https://www.datacite.org/terms.html">Terms and conditions</a></a></li>
396
- <li><a href="https://www.datacite.org/privacy.html">Privacy policy</a></a></li>
397
- <li><a href="https://www.datacite.org/acknowledgments.html">Acknowledgements</a></a></li>
398
- </ul>
258
+ s.setAttribute('data-timestamp', +new Date());
259
+ (d.head || d.body).appendChild(s);
260
+ })();
261
+ </script>
262
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
263
+
264
+ </div>
265
+ </div>
266
+ </div>
399
267
  </div>
400
268
  </div>
401
- </div>
269
+ <footer class='row footer'>
270
+ <div class="container-fluid">
271
+ <div class='col-md-3 col-sm-4'>
272
+ <h4>About DataCite</h4>
273
+ <ul>
274
+ <li><a href="https://www.datacite.org/mission.html">What we do</a></li>
275
+ <li><a href="https://www.datacite.org/board.html">Board</a></li>
276
+ <li><a href="https://www.datacite.org/steering.html">Steering groups</a></li>
277
+ <li><a href="https://www.datacite.org/staff.html">Staff</a></li>
278
+ <li><a href="https://www.datacite.org/jobopportunities.html">Job opportunities</a></li>
279
+ </ul>
280
+ </div>
281
+ <div class='col-md-3 col-sm-4'>
282
+ <h4>Services</h4>
283
+ <ul>
284
+ <li><a href="https://www.datacite.org/dois.html">Assign DOIs</a></li>
285
+ <li><a href="https://www.datacite.org/search.html">Metadata search</a></li>
286
+ <li><a href="https://www.datacite.org/eventdata.html">Event data</a></li>
287
+ <li><a href="https://www.datacite.org/profiles.html">Profiles</a></li>
288
+ <li><a href="https://www.datacite.org/re3data.html">re3data</a></li>
289
+ <li><a href="https://www.datacite.org/citation.html">Citation formatter</a></li>
290
+ <li><a href="https://www.datacite.org/stats.html">Statistics</a></li>
291
+ <li><a href="https://www.datacite.org/content.html">Content negotiation</a></li>
292
+ <li><a href="https://www.datacite.org/oaipmh.html">OAI-PMH</a></li>
293
+ <li><a href="https://www.datacite.org/test.html">Test environment</a></li>
294
+ </ul>
295
+ </div>
296
+ <div class='col-md-3 col-sm-4'>
297
+ <h4>Resources</h4>
298
+ <ul>
299
+ <li><a href="https://schema.datacite.org">Metadata schema</a></li>
300
+ <li><a href="https://support.datacite.org">Support</a></li>
301
+ </ul>
302
+ <h4>Community</h4>
303
+ <ul>
304
+ <li><a href="https://www.datacite.org/members.html">Members</a></li>
305
+ <li><a href="https://www.datacite.org/partners.html">Partners</a></li>
306
+ <li><a href="https://www.datacite.org/steering.html">Steering groups</a></li>
307
+ <li><a href="https://www.datacite.org/events.html">Events</a></li>
308
+ <li><a href="https://www.datacite.org/roadmap.html">Roadmap</a></li>
309
+ <li><a href="https://www.datacite.org/user-stories.html">User Stories</a></li>
310
+ </ul>
311
+ </div>
312
+ <div class='col-md-3'>
313
+ <h4 class="share">Contact us</h4>
314
+ <a href='mailto:support@datacite.org' class="share">
315
+ <i class='fa fa-at'></i>
316
+ </a>
317
+ <a href='https://blog.datacite.org/feed.xml' class="share">
318
+ <i class='fa fa-rss'></i>
319
+ </a>
320
+ <a href='https://twitter.com/datacite' class="share">
321
+ <i class='fa fa-twitter'></i>
322
+ </a>
323
+ <a href='https://github.com/datacite/datacite' class="share">
324
+ <i class='fa fa-github'></i>
325
+ </a>
326
+ <a href='https://www.linkedin.com/company/datacite' class="share">
327
+ <i class='fa fa-linkedin'></i>
328
+ </a>
329
+ <ul>
330
+ <li><a href="https://www.datacite.org/terms.html">Terms and conditions</a></li>
331
+ <li><a href="https://www.datacite.org/privacy.html">Privacy policy</a></li>
332
+ <li><a href="https://www.datacite.org/acknowledgments.html">Acknowledgements</a></li>
333
+ </ul>
334
+ <a href="http://status.datacite.org" target="_blank">
335
+ <span class="color-dot"></span>
336
+ <span class="color-description"></span>
337
+ </a>
338
+ </div>
339
+ </div>
340
+ </footer>
341
+ <script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
342
+ <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
343
+ <script src="//cdn.statuspage.io/se-v2.js"></script>
344
+ <script src="https://assets.datacite.org/javascripts/default.js"></script>
345
+ <script src="/javascripts/readingTime.min.js"></script>
346
+ <script src="/javascripts/index.js"></script>
347
+ <script src="/javascripts/search.js"></script>
348
+ <script id="dsq-count-scr" src="//datacite.disqus.com/count.js" async></script>
349
+ <script>
350
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
351
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
352
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
353
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
402
354
 
355
+ ga('create', 'UA-22806196-6', 'auto');
356
+ ga('send', 'pageview');
357
+ </script>
403
358
  </body>
404
359
  </html>
@@ -2,13 +2,13 @@
2
2
  layout: post
3
3
  title: Cool DOI's
4
4
  author: mfenner
5
- date: 2016-12-15
6
5
  tags:
7
6
  - doi
8
7
  - featured
9
8
  accession_number: MS-124
10
9
  image: https://blog.datacite.org/images/2016/12/cool-dois.png
11
10
  published: false
11
+ doi: 10.5438/0000-03WD
12
12
  ---
13
13
  In 1998 Tim Berners-Lee coined the term cool URIs [-@https://www.w3.org/Provider/Style/URI], that is URIs that don’t change. We know that URLs referenced in the scholarly literature are often not cool, leading to link rot [@https://doi.org/10.1371/journal.pone.0115253] and making it hard or impossible to find the referenced resource.READMORE
14
14
 
@@ -2,14 +2,14 @@
2
2
  layout: post
3
3
  title: Cool DOI's
4
4
  author: mfenner
5
- date: '2016-12-15'
6
5
  tags:
7
6
  - doi
8
7
  - featured
9
8
  accession_number: MS-123
10
9
  image: https://blog.datacite.org/images/2016/12/cool-dois.png
11
- doi: 10.5072/0000-03VC
12
10
  published: false
11
+ doi: 10.5438/0000-03VC
12
+ date: '2016-12-15'
13
13
  ---
14
14
  In 1998 Tim Berners-Lee coined the term cool URIs [-@https://www.w3.org/Provider/Style/URI], that is URIs that don’t change. We know that URLs referenced in the scholarly literature are often not cool, leading to link rot [@https://doi.org/10.1371/journal.pone.0115253] and making it hard or impossible to find the referenced resource.READMORE
15
15
 
@@ -45,7 +45,7 @@
45
45
  </script>
46
46
 
47
47
  <script type="application/ld+json">
48
- {"@context":"http://schema.org","@type":"Blog","@id":"https://doi.org/10.5072/0000-NW90","name":"DataCite Blog","alternateName":"MS-25-1785","url":"https://blog.datacite.org/","author":[{"@type":"Person","@id":"http://orcid.org/0000-0002-9300-5278","givenName":"Patricia","familyName":"Cruse","name":"Trisha Cruse"},{"@type":"Person","@id":"http://orcid.org/0000-0001-5952-7630","givenName":"Laura","familyName":"Rueda","name":"Laura Rueda"},{"@type":"Person","@id":"http://orcid.org/0000-0003-3484-6875","givenName":"Kristian","familyName":"Garza","name":"Kristian Garza"},{"@type":"Person","@id":"http://orcid.org/0000-0003-1419-2405","givenName":"Martin","familyName":"Fenner","name":"Martin Fenner"}],"publisher":{"@type":"Organization","name":"DataCite"},"dateCreated":"2015-08-03","datePublished":"2015-08-03","dateModified":"2015-08-03","version":"1.0","description":"The DataCite blog.","license":"https://creativecommons.org/licenses/by/4.0/","hasPart":[{"@type":"BlogPosting","@id":"https://doi.org/10.5438/55E5-T5C0","name":"Cool DOI's","datePublished":"2016-12-15"}]}
48
+ {"@context":"http://schema.org","@type":"Blog","@id":"https://doi.org/10.5438/0000-NW90","name":"DataCite Blog","alternateName":"MS-25-1785","url":"https://blog.datacite.org/","author":[{"@type":"Person","@id":"http://orcid.org/0000-0002-9300-5278","givenName":"Patricia","familyName":"Cruse","name":"Trisha Cruse"},{"@type":"Person","@id":"http://orcid.org/0000-0001-5952-7630","givenName":"Laura","familyName":"Rueda","name":"Laura Rueda"},{"@type":"Person","@id":"http://orcid.org/0000-0003-3484-6875","givenName":"Kristian","familyName":"Garza","name":"Kristian Garza"},{"@type":"Person","@id":"http://orcid.org/0000-0003-1419-2405","givenName":"Martin","familyName":"Fenner","name":"Martin Fenner"}],"publisher":{"@type":"Organization","name":"DataCite"},"dateCreated":"2015-08-03","datePublished":"2015-08-03","dateModified":"2015-08-03","version":"1.0","description":"The DataCite blog.","license":"https://creativecommons.org/licenses/by/4.0/","hasPart":[{"@type":"BlogPosting","@id":"https://doi.org/10.5438/55E5-T5C0","name":"Cool DOI's","datePublished":"2016-12-15"}]}
49
49
  </script>
50
50
  </head>
51
51
  <body>