commonmeta-ruby 3.9.0 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -8
- data/lib/commonmeta/author_utils.rb +9 -5
- data/lib/commonmeta/readers/commonmeta_reader.rb +1 -1
- data/lib/commonmeta/readers/datacite_reader.rb +7 -1
- data/lib/commonmeta/schema_utils.rb +1 -1
- data/lib/commonmeta/utils.rb +47 -2
- data/lib/commonmeta/version.rb +1 -1
- data/resources/{commonmeta_v0.10.5.json → commonmeta_v0.10.6.json} +12 -4
- data/resources/{datacite-v4.json → datacite-v45.json} +26 -5
- data/resources/kernel-4/include/datacite-relationType-v4.xsd +2 -0
- data/resources/kernel-4/include/datacite-resourceType-v4.xsd +2 -0
- data/resources/kernel-4/metadata.xsd +11 -7
- data/spec/fixtures/commonmeta.json +1 -1
- data/spec/fixtures/datacite-dataset_v4.5.json +736 -0
- data/spec/fixtures/datacite-instrument.json +135 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/SoftwareSourceCode.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/dissertation.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/funding_references.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/subject_scheme.yml +22 -22
- data/spec/readers/commonmeta_reader_spec.rb +1 -1
- data/spec/readers/datacite_reader_spec.rb +34 -9
- data/spec/utils_spec.rb +30 -4
- data/spec/writers/datacite_writer_spec.rb +0 -1
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7bc4df0a364fc1ff53342960355c5fc534a0c479cf825cc0d856e282e42e7d49
|
|
4
|
+
data.tar.gz: 57dcd210498057807f46ffb851eb40b4db189636d915152a77de1fd1191012c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a4265c7a8d17ab99b963459015232400bcd7541e4c827e2bf0863e9809fbe64d70d0ce6ced7dbcf2a9186beca2075be73617bd3d3cace2e4b9c67e39d8e756a
|
|
7
|
+
data.tar.gz: 765b9d3d29683badac4ed6b77ac6f86f6b939f5081d23016c1484a9f8b7e0d26039559a9f6d5c2e2b8fe5c06bc1d70d5e09e17f16a5a24c6c9bb84291a8c1548
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
commonmeta-ruby (3.
|
|
4
|
+
commonmeta-ruby (3.11.0)
|
|
5
5
|
activesupport (>= 4.2.5, < 8.0)
|
|
6
6
|
addressable (~> 2.8.1, < 2.8.2)
|
|
7
7
|
base32-url (>= 0.7.0, < 1)
|
|
@@ -27,7 +27,7 @@ PATH
|
|
|
27
27
|
GEM
|
|
28
28
|
remote: https://rubygems.org/
|
|
29
29
|
specs:
|
|
30
|
-
activesupport (7.1.
|
|
30
|
+
activesupport (7.1.3)
|
|
31
31
|
base64
|
|
32
32
|
bigdecimal
|
|
33
33
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
@@ -47,7 +47,7 @@ GEM
|
|
|
47
47
|
bibtex-ruby (6.1.0)
|
|
48
48
|
latex-decode (~> 0.0)
|
|
49
49
|
racc (~> 1.7)
|
|
50
|
-
bigdecimal (3.1.
|
|
50
|
+
bigdecimal (3.1.6)
|
|
51
51
|
builder (3.2.4)
|
|
52
52
|
citeproc (1.0.10)
|
|
53
53
|
namae (~> 1.0)
|
|
@@ -56,7 +56,7 @@ GEM
|
|
|
56
56
|
csl (~> 2.0)
|
|
57
57
|
code-scanning-rubocop (0.6.1)
|
|
58
58
|
rubocop (~> 1.0)
|
|
59
|
-
concurrent-ruby (1.2.
|
|
59
|
+
concurrent-ruby (1.2.3)
|
|
60
60
|
connection_pool (2.4.1)
|
|
61
61
|
crack (0.4.5)
|
|
62
62
|
rexml
|
|
@@ -132,7 +132,7 @@ GEM
|
|
|
132
132
|
crass (~> 1.0.2)
|
|
133
133
|
nokogiri (>= 1.12.0)
|
|
134
134
|
matrix (0.4.2)
|
|
135
|
-
minitest (5.21.
|
|
135
|
+
minitest (5.21.2)
|
|
136
136
|
multi_json (1.15.0)
|
|
137
137
|
mutex_m (0.2.0)
|
|
138
138
|
namae (1.2.0)
|
|
@@ -143,7 +143,7 @@ GEM
|
|
|
143
143
|
bigdecimal (>= 3.0)
|
|
144
144
|
optimist (3.1.0)
|
|
145
145
|
parallel (1.24.0)
|
|
146
|
-
parser (3.3.0.
|
|
146
|
+
parser (3.3.0.5)
|
|
147
147
|
ast (~> 2.4.1)
|
|
148
148
|
racc
|
|
149
149
|
postrank-uri (1.1)
|
|
@@ -191,11 +191,11 @@ GEM
|
|
|
191
191
|
rspec-xsd (0.1.0)
|
|
192
192
|
nokogiri (~> 1.6)
|
|
193
193
|
rspec (~> 3)
|
|
194
|
-
rubocop (1.
|
|
194
|
+
rubocop (1.60.2)
|
|
195
195
|
json (~> 2.3)
|
|
196
196
|
language_server-protocol (>= 3.17.0)
|
|
197
197
|
parallel (~> 1.10)
|
|
198
|
-
parser (>= 3.
|
|
198
|
+
parser (>= 3.3.0.2)
|
|
199
199
|
rainbow (>= 2.2.2, < 4.0)
|
|
200
200
|
regexp_parser (>= 1.8, < 3.0)
|
|
201
201
|
rexml (>= 3.2.5, < 4.0)
|
|
@@ -54,18 +54,22 @@ module Commonmeta
|
|
|
54
54
|
id = parse_attributes(author.fetch("id", nil), first: true) ||
|
|
55
55
|
parse_attributes(author.fetch("identifier", nil), first: true) ||
|
|
56
56
|
parse_attributes(author.fetch("sameAs", nil), first: true)
|
|
57
|
-
|
|
57
|
+
id = normalize_orcid(id) || normalize_ror(id) if id.present?
|
|
58
|
+
|
|
58
59
|
# DataCite metadata
|
|
59
60
|
if id.nil? && author["nameIdentifiers"].present?
|
|
60
61
|
id = Array.wrap(author.dig("nameIdentifiers")).find do |ni|
|
|
61
|
-
ni
|
|
62
|
+
normalize_name_identifier(ni).present?
|
|
62
63
|
end
|
|
63
|
-
id = id
|
|
64
|
-
|
|
64
|
+
id = normalize_name_identifier(id) if id.present?
|
|
65
|
+
# Crossref metadata
|
|
65
66
|
elsif id.nil? && author["ORCID"].present?
|
|
66
67
|
id = author.fetch("ORCID")
|
|
68
|
+
id = normalize_orcid(id)
|
|
69
|
+
# JSON Feed metadata
|
|
70
|
+
elsif id.nil? && author["url"].present?
|
|
71
|
+
id = author.fetch("url")
|
|
67
72
|
end
|
|
68
|
-
id = normalize_orcid(id) || normalize_ror(id)
|
|
69
73
|
|
|
70
74
|
# parse author type, i.e. "Person", "Organization" or not specified
|
|
71
75
|
type = author.fetch("type", nil)
|
|
@@ -12,7 +12,7 @@ module Commonmeta
|
|
|
12
12
|
read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url,
|
|
13
13
|
:sandbox, :validate, :ra))
|
|
14
14
|
meta = string.present? ? JSON.parse(string) : {}
|
|
15
|
-
meta["schema_version"] = "https://commonmeta.org/commonmeta_v0.10
|
|
15
|
+
meta["schema_version"] = "https://commonmeta.org/commonmeta_v0.10"
|
|
16
16
|
meta.compact.merge(read_options)
|
|
17
17
|
end
|
|
18
18
|
end
|
|
@@ -55,7 +55,13 @@ module Commonmeta
|
|
|
55
55
|
end
|
|
56
56
|
contributors = get_authors(from_datacite(meta.fetch('creators', nil)))
|
|
57
57
|
contributors += get_authors(from_datacite(meta.fetch('contributors', nil)))
|
|
58
|
-
|
|
58
|
+
if meta.fetch('publisher', nil).is_a?(Hash)
|
|
59
|
+
publisher = { 'name' => meta.fetch('publisher', nil).fetch('name', nil) }
|
|
60
|
+
elsif meta.fetch('publisher', nil).is_a?(String)
|
|
61
|
+
publisher = { 'name' => meta.fetch('publisher', nil) }
|
|
62
|
+
else
|
|
63
|
+
publisher = nil
|
|
64
|
+
end
|
|
59
65
|
|
|
60
66
|
container = meta.fetch('container', nil)
|
|
61
67
|
funding_references = meta.fetch('funding_references', nil)
|
|
@@ -5,7 +5,7 @@ require "pathname"
|
|
|
5
5
|
|
|
6
6
|
module Commonmeta
|
|
7
7
|
module SchemaUtils
|
|
8
|
-
COMMONMETA = File.read(File.expand_path("../../resources/commonmeta_v0.10.
|
|
8
|
+
COMMONMETA = File.read(File.expand_path("../../resources/commonmeta_v0.10.6.json",
|
|
9
9
|
__dir__))
|
|
10
10
|
|
|
11
11
|
def json_schema_errors
|
data/lib/commonmeta/utils.rb
CHANGED
|
@@ -223,6 +223,7 @@ module Commonmeta
|
|
|
223
223
|
"Dissertation" => "Dissertation",
|
|
224
224
|
"Event" => "Event",
|
|
225
225
|
"Image" => "Image",
|
|
226
|
+
"Instrument" => "Instrument",
|
|
226
227
|
"InteractiveResource" => "InteractiveResource",
|
|
227
228
|
"Journal" => "Journal",
|
|
228
229
|
"JournalArticle" => "JournalArticle",
|
|
@@ -237,6 +238,7 @@ module Commonmeta
|
|
|
237
238
|
"Software" => "Software",
|
|
238
239
|
"Sound" => "Sound",
|
|
239
240
|
"Standard" => "Standard",
|
|
241
|
+
"StudyRegistration" => "StudyRegistration",
|
|
240
242
|
"Text" => "Document",
|
|
241
243
|
"Thesis" => "Dissertation",
|
|
242
244
|
"Workflow" => "Workflow",
|
|
@@ -256,6 +258,7 @@ module Commonmeta
|
|
|
256
258
|
"Event" => "Event",
|
|
257
259
|
"Figure" => "Image",
|
|
258
260
|
"Image" => "Image",
|
|
261
|
+
"Instrument" => "Instrument",
|
|
259
262
|
"JournalArticle" => "JournalArticle",
|
|
260
263
|
"LegalDocument" => "Text",
|
|
261
264
|
"Manuscript" => "Text",
|
|
@@ -271,6 +274,7 @@ module Commonmeta
|
|
|
271
274
|
"Software" => "Software",
|
|
272
275
|
"Sound" => "Sound",
|
|
273
276
|
"Standard" => "Standard",
|
|
277
|
+
"StudyRegistration" => "StudyRegistration",
|
|
274
278
|
"WebPage" => "Text",
|
|
275
279
|
}
|
|
276
280
|
|
|
@@ -370,6 +374,7 @@ module Commonmeta
|
|
|
370
374
|
"CreativeWork" => "Other",
|
|
371
375
|
"Dataset" => "Dataset",
|
|
372
376
|
"Dissertation" => "Dissertation",
|
|
377
|
+
"Instrument" => "Instrument",
|
|
373
378
|
"NewsArticle" => "Article",
|
|
374
379
|
"Legislation" => "LegalDocument",
|
|
375
380
|
"ScholarlyArticle" => "JournalArticle",
|
|
@@ -389,6 +394,7 @@ module Commonmeta
|
|
|
389
394
|
"Event" => "CreativeWork",
|
|
390
395
|
"Figure" => "CreativeWork",
|
|
391
396
|
"Image" => "CreativeWork",
|
|
397
|
+
"Instrument" => "Instrument",
|
|
392
398
|
"JournalArticle" => "ScholarlyArticle",
|
|
393
399
|
"LegalDocument" => "Legislation",
|
|
394
400
|
"Software" => "SoftwareSourceCode",
|
|
@@ -497,7 +503,9 @@ module Commonmeta
|
|
|
497
503
|
def find_from_format_by_string(string)
|
|
498
504
|
begin # try to parse as JSON
|
|
499
505
|
hsh = MultiJson.load(string).to_h
|
|
500
|
-
if hsh.dig("
|
|
506
|
+
if hsh.dig("blog", "version") == "https://jsonfeed.org/version/1.1"
|
|
507
|
+
return "json_feed_item"
|
|
508
|
+
elsif hsh.dig("schema_version").to_s.start_with?("https://commonmeta.org")
|
|
501
509
|
return "commonmeta"
|
|
502
510
|
elsif hsh.dig("@context") && URI.parse(hsh.dig("@context")).host == "schema.org"
|
|
503
511
|
return "schema_org"
|
|
@@ -507,7 +515,7 @@ module Commonmeta
|
|
|
507
515
|
return "crossref"
|
|
508
516
|
elsif hsh.dig("issued", "date-parts").present?
|
|
509
517
|
return "csl"
|
|
510
|
-
elsif URI.parse(hsh.dig("@context")).to_s == "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld"
|
|
518
|
+
elsif hsh.dig("@context") && URI.parse(hsh.dig("@context")).to_s == "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld"
|
|
511
519
|
return "codemeta"
|
|
512
520
|
end
|
|
513
521
|
rescue MultiJson::ParseError
|
|
@@ -649,6 +657,43 @@ module Commonmeta
|
|
|
649
657
|
"https://ror.org/" + Addressable::URI.encode(ror)
|
|
650
658
|
end
|
|
651
659
|
|
|
660
|
+
def normalize_name_identifier(hsh)
|
|
661
|
+
return nil unless hsh.present? && hsh.is_a?(Hash)
|
|
662
|
+
|
|
663
|
+
name_identifier = hsh["nameIdentifier"]
|
|
664
|
+
name_identifier_scheme = hsh["nameIdentifierScheme"]
|
|
665
|
+
scheme_uri = hsh["schemeURI"] || hsh["schemeUri"]
|
|
666
|
+
return nil unless name_identifier.present?
|
|
667
|
+
|
|
668
|
+
if name_identifier_scheme == "ORCID" || scheme_uri == "https://orcid.org"
|
|
669
|
+
return normalize_orcid(name_identifier)
|
|
670
|
+
elsif name_identifier_scheme == "ROR" || scheme_uri == "https://ror.org"
|
|
671
|
+
return normalize_ror(name_identifier)
|
|
672
|
+
elsif name_identifier_scheme == "ISNI" || scheme_uri == "https://isni.org"
|
|
673
|
+
return normalize_isni(name_identifier)
|
|
674
|
+
elsif validate_url(name_identifier) == "URL"
|
|
675
|
+
return name_identifier
|
|
676
|
+
elsif scheme_uri.present?
|
|
677
|
+
return scheme_uri + Addressable::URI.encode(name_identifier)
|
|
678
|
+
end
|
|
679
|
+
|
|
680
|
+
return nil
|
|
681
|
+
end
|
|
682
|
+
|
|
683
|
+
def validate_isni(isni)
|
|
684
|
+
isni = Array(%r{\A(?:(?:http|https)://)?(isni\.org/isni/)?(\d{4}[[:space:]-]\d{4}[[:space:]-]\d{4}[[:space:]-]\d{3}[0-9X]+)\z}.match(isni)).last
|
|
685
|
+
isni.gsub(/[[:space:]]/, "-") if isni.present?
|
|
686
|
+
end
|
|
687
|
+
|
|
688
|
+
def normalize_isni(isni)
|
|
689
|
+
# TODO fix validation
|
|
690
|
+
# isni = validate_isni(isni)
|
|
691
|
+
return nil unless isni.present?
|
|
692
|
+
|
|
693
|
+
# turn ISNI ID into URL
|
|
694
|
+
"https://isni.org/isni/" + Addressable::URI.encode(isni)
|
|
695
|
+
end
|
|
696
|
+
|
|
652
697
|
# pick electronic issn if there are multiple
|
|
653
698
|
# format issn as xxxx-xxxx
|
|
654
699
|
def normalize_issn(input, options = {})
|
data/lib/commonmeta/version.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://commonmeta.org/commonmeta_v0.10.
|
|
4
|
-
"title": "Commonmeta v0.10.
|
|
3
|
+
"$id": "https://commonmeta.org/commonmeta_v0.10.6.json",
|
|
4
|
+
"title": "Commonmeta v0.10.6",
|
|
5
5
|
"description": "JSON representation of the Commonmeta schema.",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"definitions": {
|
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"ReportSeries",
|
|
126
126
|
"Report",
|
|
127
127
|
"Software",
|
|
128
|
+
"StudyRegistration",
|
|
128
129
|
"Other"
|
|
129
130
|
]
|
|
130
131
|
},
|
|
@@ -508,7 +509,7 @@
|
|
|
508
509
|
"description": "The schema version of the resource.",
|
|
509
510
|
"type": "string",
|
|
510
511
|
"enum": [
|
|
511
|
-
"https://commonmeta.org/commonmeta_v0.10
|
|
512
|
+
"https://commonmeta.org/commonmeta_v0.10",
|
|
512
513
|
"http://datacite.org/schema/kernel-3",
|
|
513
514
|
"http://datacite.org/schema/kernel-4"
|
|
514
515
|
]
|
|
@@ -523,7 +524,14 @@
|
|
|
523
524
|
"type": "array",
|
|
524
525
|
"items": {
|
|
525
526
|
"type": "string",
|
|
526
|
-
"enum": [
|
|
527
|
+
"enum": [
|
|
528
|
+
"CLOCKSS",
|
|
529
|
+
"LOCKSS",
|
|
530
|
+
"Portico",
|
|
531
|
+
"KB",
|
|
532
|
+
"Internet Archive",
|
|
533
|
+
"DWT"
|
|
534
|
+
]
|
|
527
535
|
},
|
|
528
536
|
"uniqueItems": true
|
|
529
537
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"id": "datacite-
|
|
4
|
-
"title": "DataCite v4",
|
|
5
|
-
"description": "JSON representation of the DataCite v4 schema.",
|
|
3
|
+
"id": "datacite-v45.json",
|
|
4
|
+
"title": "DataCite v4.5",
|
|
5
|
+
"description": "JSON representation of the DataCite v4.5 schema.",
|
|
6
6
|
"additionalProperties": true,
|
|
7
7
|
"definitions": {
|
|
8
8
|
"nameType": {
|
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
"Dissertation",
|
|
111
111
|
"Event",
|
|
112
112
|
"Image",
|
|
113
|
+
"Instrument",
|
|
113
114
|
"InteractiveResource",
|
|
114
115
|
"Journal",
|
|
115
116
|
"JournalArticle",
|
|
@@ -123,6 +124,7 @@
|
|
|
123
124
|
"Software",
|
|
124
125
|
"Sound",
|
|
125
126
|
"Standard",
|
|
127
|
+
"StudyRegistration",
|
|
126
128
|
"Text",
|
|
127
129
|
"Workflow",
|
|
128
130
|
"Other"
|
|
@@ -187,7 +189,9 @@
|
|
|
187
189
|
"IsRequiredBy",
|
|
188
190
|
"Requires",
|
|
189
191
|
"IsObsoletedBy",
|
|
190
|
-
"Obsoletes"
|
|
192
|
+
"Obsoletes",
|
|
193
|
+
"Collects",
|
|
194
|
+
"IsCollectedBy"
|
|
191
195
|
]
|
|
192
196
|
},
|
|
193
197
|
"descriptionType": {
|
|
@@ -276,7 +280,24 @@
|
|
|
276
280
|
"uniqueItems": true
|
|
277
281
|
},
|
|
278
282
|
"publisher": {
|
|
279
|
-
"type": "string"
|
|
283
|
+
"type": ["object", "string"],
|
|
284
|
+
"anyOf": [
|
|
285
|
+
{
|
|
286
|
+
"type": "object",
|
|
287
|
+
"properties": {
|
|
288
|
+
"name": { "type": "string" },
|
|
289
|
+
"publisherIdentifier": { "type": "string", "format": "uri" },
|
|
290
|
+
"publisherIdentifierScheme": { "type": "string" },
|
|
291
|
+
"schemeUri": { "type": "string", "format": "uri" },
|
|
292
|
+
"lang": { "type": "string" }
|
|
293
|
+
},
|
|
294
|
+
"required": ["name"]
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"type": "string",
|
|
298
|
+
"minLength": 1
|
|
299
|
+
}
|
|
300
|
+
]
|
|
280
301
|
},
|
|
281
302
|
"publication_year": {
|
|
282
303
|
"type": "integer"
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
<xs:enumeration value="IsRequiredBy" />
|
|
47
47
|
<xs:enumeration value="Obsoletes" />
|
|
48
48
|
<xs:enumeration value="IsObsoletedBy" />
|
|
49
|
+
<xs:enumeration value="Collects" />
|
|
50
|
+
<xs:enumeration value="IsCollectedBy" />
|
|
49
51
|
</xs:restriction>
|
|
50
52
|
</xs:simpleType>
|
|
51
53
|
</xs:schema>
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
<xs:enumeration value="Dissertation" />
|
|
23
23
|
<xs:enumeration value="Event" />
|
|
24
24
|
<xs:enumeration value="Image" />
|
|
25
|
+
<xs:enumeration value="Instrument" />
|
|
25
26
|
<xs:enumeration value="InteractiveResource" />
|
|
26
27
|
<xs:enumeration value="Journal" />
|
|
27
28
|
<xs:enumeration value="JournalArticle" />
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
<xs:enumeration value="Software" />
|
|
36
37
|
<xs:enumeration value="Sound" />
|
|
37
38
|
<xs:enumeration value="Standard" />
|
|
39
|
+
<xs:enumeration value="StudyRegistration" />
|
|
38
40
|
<xs:enumeration value="Text" />
|
|
39
41
|
<xs:enumeration value="Workflow" />
|
|
40
42
|
<xs:enumeration value="Other" />
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!-- Revision history
|
|
3
3
|
2010-08-26 Complete revision according to new common specification by the metadata work group after review. AJH, DTIC
|
|
4
4
|
2010-11-17 Revised to current state of kernel review, FZ, TIB
|
|
5
|
-
2011-01-17 Complete
|
|
5
|
+
2011-01-17 Complete revision after community review. FZ, TIB
|
|
6
6
|
2011-03-17 Release of v2.1: added a namespace; mandatory properties got minLength; changes in the definitions of relationTypes IsDocumentedBy/Documents and isCompiledBy/Compiles; changes type of property "Date" from xs:date to xs:string. FZ, TIB
|
|
7
7
|
2011-06-27 v2.2: namespace: kernel-2.2, additions to controlled lists "resourceType", "contributorType", "relatedIdentifierType", and "descriptionType". Removal of intermediate include-files.
|
|
8
8
|
2013-07-24 v3.0: namespace: kernel-3.0; delete LastMetadataUpdate & MetadateVersionNumber; additions to controlled lists "contributorType", "dateType", "descriptionType", "relationType", "relatedIdentifierType" & "resourceType"; deletion of "StartDate" & "EndDate" from list "dateType" and "Film" from "resourceType"; allow arbitrary order of elements; allow optional wrapper elements to be empty; include xml:lang attribute for title, subject & description; include attribute schemeURI for nameIdentifier of creator, contributor & subject; added new attributes "relatedMetadataScheme", "schemeURI" & "schemeType" to relatedIdentifier; included new property "geoLocation"
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
2018-09-08 v4.1.1 Make schema 4.1 backwards compatible to 4.0 by allowing geolocation elements in any order
|
|
13
13
|
2019-02-14 v4.2: Addition of dateType value "Withdrawn", relationType values "Obsoletes", "isObsoletedBy", addition of new subproperties for Rights: rightsIdentifier, rightsIdentifierScheme, schemeURI, addition of the XML language attribute to the properties Creator, Contributor and Publisher for organizational names, don't check format of DOI
|
|
14
14
|
2019-07-13 v4.3: Addition of new subproperties for Affiliation: "affiliationIdentifier", "affiliationIdentifierScheme", "schemeURI", addition of new sub-property for funderIdentifier: "schemeURI", addition of new funderIdentifierScheme: "ROR", added documentation for nameIdentifier
|
|
15
|
-
2021-03-08 v4.4: Addition of new property relatedItem, relationType value "isPublishedIn", subject subproperty "classificationCode", controlled list "numberType", additional 13 properties for controlled list "resourceType"
|
|
15
|
+
2021-03-08 v4.4: Addition of new property relatedItem, relationType value "isPublishedIn", subject subproperty "classificationCode", controlled list "numberType", additional 13 properties for controlled list "resourceType"
|
|
16
|
+
2024-01-22 v4.5: Addition of new subproperties for publisher: "publisherIdentifier", "publisherIdentifierScheme", and "schemeURI"; addition of new resourceTypeGeneral values "Instrument" and "StudyRegistration"; addition of new relationType values "Collects" and "IsCollectedBy".-->
|
|
16
17
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified" xml:lang="EN">
|
|
17
18
|
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="include/xml.xsd" />
|
|
18
19
|
<xs:include schemaLocation="include/datacite-titleType-v4.xsd" />
|
|
@@ -105,6 +106,9 @@
|
|
|
105
106
|
<xs:complexType>
|
|
106
107
|
<xs:simpleContent>
|
|
107
108
|
<xs:extension base="nonemptycontentStringType">
|
|
109
|
+
<xs:attribute name="publisherIdentifier" type="xs:string" use="optional" />
|
|
110
|
+
<xs:attribute name="publisherIdentifierScheme" type="xs:string" use="optional" />
|
|
111
|
+
<xs:attribute name="schemeURI" type="xs:anyURI" use="optional" />
|
|
108
112
|
<xs:attribute ref="xml:lang" />
|
|
109
113
|
</xs:extension>
|
|
110
114
|
</xs:simpleContent>
|
|
@@ -161,7 +165,7 @@
|
|
|
161
165
|
<xs:sequence>
|
|
162
166
|
<xs:element name="contributor" minOccurs="0" maxOccurs="unbounded">
|
|
163
167
|
<xs:annotation>
|
|
164
|
-
<xs:documentation>The institution or person responsible for collecting, creating, or otherwise contributing to the
|
|
168
|
+
<xs:documentation>The institution or person responsible for collecting, creating, or otherwise contributing to the development of the dataset.</xs:documentation>
|
|
165
169
|
<xs:documentation>The personal name format should be: Family, Given.</xs:documentation>
|
|
166
170
|
</xs:annotation>
|
|
167
171
|
<xs:complexType>
|
|
@@ -524,7 +528,7 @@ Use the complete title of a license and include version information if applicabl
|
|
|
524
528
|
</xs:element>
|
|
525
529
|
<xs:element name="number" minOccurs="0">
|
|
526
530
|
<xs:annotation>
|
|
527
|
-
<xs:documentation>
|
|
531
|
+
<xs:documentation>Number of the related item e.g. report number of article number.</xs:documentation>
|
|
528
532
|
</xs:annotation>
|
|
529
533
|
<xs:complexType>
|
|
530
534
|
<xs:simpleContent>
|
|
@@ -641,19 +645,19 @@ Use the complete title of a license and include version information if applicabl
|
|
|
641
645
|
<xs:pattern value="\d{2}(\d{2}|\?\?|\d(\d|\?))(-(\d{2}|\?\?))?~?\??" />
|
|
642
646
|
<!--
|
|
643
647
|
The following pattern is for yearMonthDay - yyyymmdd, where 'dd' may be '??' so '200412??' means "some day during the month of 12/2004".
|
|
644
|
-
The whole string may be followed by '?' or '~' to mean "questionable" or "approximate".
|
|
648
|
+
The whole string may be followed by '?' or '~' to mean "questionable" or "approximate". Hyphens are not allowed for this pattern.
|
|
645
649
|
-->
|
|
646
650
|
<xs:pattern value="\d{6}(\d{2}|\?\?)~?\??" />
|
|
647
651
|
<!--
|
|
648
652
|
|
|
649
653
|
The following pattern is for date and time with T separator:'yyyymmddThhmmss'.
|
|
650
|
-
|
|
654
|
+
Hyphens in date and colons in time not allowed for this pattern.
|
|
651
655
|
-->
|
|
652
656
|
<xs:pattern value="\d{8}T\d{6}" />
|
|
653
657
|
<!--
|
|
654
658
|
|
|
655
659
|
The following pattern is for a date range. in years: 'yyyy/yyyy'; or year/month: yyyy-mm/yyyy-mm, or year/month/day: yyyy-mm-dd/yyyy-mm-dd. Beginning or end of range value may be 'unknown'. End of range value may be 'open'.
|
|
656
|
-
|
|
660
|
+
Hyphens mandatory when month is present.
|
|
657
661
|
-->
|
|
658
662
|
<xs:pattern value="((-)?(\d{4}(-\d{2})?(-\d{2})?)|unknown)/((-)?(\d{4}(-\d{2})?(-\d{2})?)|unknown|open)" />
|
|
659
663
|
</xs:restriction>
|