bolognese 1.3.4 → 1.3.5
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 +1 -1
- data/lib/bolognese/version.rb +1 -1
- data/resources/kernel-4.3/metadata.xsd +8 -8
- data/resources/kernel-4/metadata.xsd +30 -55
- data/spec/readers/datacite_reader_spec.rb +16 -16
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 431ba38e69fd1bf6e51774f06fbec06b5925c39a2998fdb2f143cd52df21ba48
|
|
4
|
+
data.tar.gz: 210b52a7ed81088878a9037623951c2579c4dcc55b97f28a58076acfb66a892b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 41382afb9f019c898fa49c9efa705ba218f072f4ac125b3c037708341eb903c9965f48ec6398f8fd024f9d493e4bef64c5019a7248879598ad9272591837cb85
|
|
7
|
+
data.tar.gz: 7081089408bb99805de9200110c036d29a65ed22bc96e9042950b53ced349ef8cf19c8f9be38bd1c2d39085a0ec42338c81887f871a4d67d662fba16eea215d3
|
data/Gemfile.lock
CHANGED
data/lib/bolognese/version.rb
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
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
|
-
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified" xml:lang="EN">
|
|
15
|
+
<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">
|
|
16
16
|
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="include/xml.xsd"/>
|
|
17
17
|
<xs:include schemaLocation="include/datacite-titleType-v4.xsd"/>
|
|
18
18
|
<xs:include schemaLocation="include/datacite-contributorType-v4.xsd"/>
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
</xs:element>
|
|
69
69
|
<xs:element name="givenName" minOccurs="0"/>
|
|
70
70
|
<xs:element name="familyName" minOccurs="0"/>
|
|
71
|
-
<xs:element name="nameIdentifier" type="nameIdentifier" minOccurs="0" maxOccurs="unbounded"/>
|
|
72
|
-
<xs:element name="affiliation" type="affiliation" minOccurs="0" maxOccurs="unbounded"/>
|
|
71
|
+
<xs:element name="nameIdentifier" xsi:type="nameIdentifier" minOccurs="0" maxOccurs="unbounded"/>
|
|
72
|
+
<xs:element name="affiliation" xsi:type="affiliation" minOccurs="0" maxOccurs="unbounded"/>
|
|
73
73
|
</xs:sequence>
|
|
74
74
|
</xs:complexType>
|
|
75
75
|
</xs:element>
|
|
@@ -175,8 +175,8 @@
|
|
|
175
175
|
</xs:element>
|
|
176
176
|
<xs:element name="givenName" minOccurs="0"/>
|
|
177
177
|
<xs:element name="familyName" minOccurs="0"/>
|
|
178
|
-
<xs:element name="nameIdentifier" type="nameIdentifier" minOccurs="0" maxOccurs="unbounded"/>
|
|
179
|
-
<xs:element name="affiliation" type="affiliation" minOccurs="0" maxOccurs="unbounded"/>
|
|
178
|
+
<xs:element name="nameIdentifier" xsi:type="nameIdentifier" minOccurs="0" maxOccurs="unbounded"/>
|
|
179
|
+
<xs:element name="affiliation" xsi:type="affiliation" minOccurs="0" maxOccurs="unbounded"/>
|
|
180
180
|
</xs:sequence>
|
|
181
181
|
<xs:attribute name="contributorType" type="contributorType" use="required"/>
|
|
182
182
|
</xs:complexType>
|
|
@@ -430,7 +430,7 @@ Use the complete title of a license and include version information if applicabl
|
|
|
430
430
|
</xs:annotation>
|
|
431
431
|
<xs:simpleContent>
|
|
432
432
|
<xs:extension base="nonemptycontentStringType">
|
|
433
|
-
<xs:attribute name="nameIdentifierScheme" use="required"/>
|
|
433
|
+
<xs:attribute name="nameIdentifierScheme" type="xs:string" use="required"/>
|
|
434
434
|
<xs:attribute name="schemeURI" type="xs:anyURI" use="optional"/>
|
|
435
435
|
</xs:extension>
|
|
436
436
|
</xs:simpleContent>
|
|
@@ -442,8 +442,8 @@ Use the complete title of a license and include version information if applicabl
|
|
|
442
442
|
</xs:annotation>
|
|
443
443
|
<xs:simpleContent>
|
|
444
444
|
<xs:extension base="nonemptycontentStringType">
|
|
445
|
-
<xs:attribute name="affiliationIdentifier" use="optional"/>
|
|
446
|
-
<xs:attribute name="affiliationIdentifierScheme" use="optional"/>
|
|
445
|
+
<xs:attribute name="affiliationIdentifier" type="xs:string" use="optional"/>
|
|
446
|
+
<xs:attribute name="affiliationIdentifierScheme" type="xs:string" use="optional"/>
|
|
447
447
|
<xs:attribute name="schemeURI" type="xs:anyURI" use="optional"/>
|
|
448
448
|
</xs:extension>
|
|
449
449
|
</xs:simpleContent>
|
|
@@ -12,7 +12,7 @@
|
|
|
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
|
-
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified" xml:lang="EN">
|
|
15
|
+
<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">
|
|
16
16
|
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="include/xml.xsd"/>
|
|
17
17
|
<xs:include schemaLocation="include/datacite-titleType-v4.xsd"/>
|
|
18
18
|
<xs:include schemaLocation="include/datacite-contributorType-v4.xsd"/>
|
|
@@ -68,33 +68,8 @@
|
|
|
68
68
|
</xs:element>
|
|
69
69
|
<xs:element name="givenName" minOccurs="0"/>
|
|
70
70
|
<xs:element name="familyName" minOccurs="0"/>
|
|
71
|
-
<xs:element name="nameIdentifier" minOccurs="0" maxOccurs="unbounded"
|
|
72
|
-
|
|
73
|
-
<xs:annotation>
|
|
74
|
-
<xs:documentation>Uniquely identifies a creator or contributor, according to various identifier schemes.</xs:documentation>
|
|
75
|
-
</xs:annotation>
|
|
76
|
-
<xs:simpleContent>
|
|
77
|
-
<xs:extension base="nonemptycontentStringType">
|
|
78
|
-
<xs:attribute name="nameIdentifierScheme" use="required"/>
|
|
79
|
-
<xs:attribute name="schemeURI" type="xs:anyURI" use="optional"/>
|
|
80
|
-
</xs:extension>
|
|
81
|
-
</xs:simpleContent>
|
|
82
|
-
</xs:complexType>
|
|
83
|
-
</xs:element>
|
|
84
|
-
<xs:element name="affiliation" minOccurs="0" maxOccurs="unbounded">
|
|
85
|
-
<xs:complexType>
|
|
86
|
-
<xs:annotation>
|
|
87
|
-
<xs:documentation>Uniquely identifies an affiliation, according to various identifier schemes.</xs:documentation>
|
|
88
|
-
</xs:annotation>
|
|
89
|
-
<xs:simpleContent>
|
|
90
|
-
<xs:extension base="nonemptycontentStringType">
|
|
91
|
-
<xs:attribute name="affiliationIdentifier" use="optional"/>
|
|
92
|
-
<xs:attribute name="affiliationIdentifierScheme" use="optional"/>
|
|
93
|
-
<xs:attribute name="schemeURI" type="xs:anyURI" use="optional"/>
|
|
94
|
-
</xs:extension>
|
|
95
|
-
</xs:simpleContent>
|
|
96
|
-
</xs:complexType>
|
|
97
|
-
</xs:element>
|
|
71
|
+
<xs:element name="nameIdentifier" xsi:type="nameIdentifier" minOccurs="0" maxOccurs="unbounded"/>
|
|
72
|
+
<xs:element name="affiliation" xsi:type="affiliation" minOccurs="0" maxOccurs="unbounded"/>
|
|
98
73
|
</xs:sequence>
|
|
99
74
|
</xs:complexType>
|
|
100
75
|
</xs:element>
|
|
@@ -200,33 +175,8 @@
|
|
|
200
175
|
</xs:element>
|
|
201
176
|
<xs:element name="givenName" minOccurs="0"/>
|
|
202
177
|
<xs:element name="familyName" minOccurs="0"/>
|
|
203
|
-
<xs:element name="nameIdentifier" minOccurs="0" maxOccurs="unbounded"
|
|
204
|
-
|
|
205
|
-
<xs:annotation>
|
|
206
|
-
<xs:documentation>Uniquely identifies a creator or contributor, according to various identifier schemes.</xs:documentation>
|
|
207
|
-
</xs:annotation>
|
|
208
|
-
<xs:simpleContent>
|
|
209
|
-
<xs:extension base="nonemptycontentStringType">
|
|
210
|
-
<xs:attribute name="nameIdentifierScheme" use="required"/>
|
|
211
|
-
<xs:attribute name="schemeURI" type="xs:anyURI" use="optional"/>
|
|
212
|
-
</xs:extension>
|
|
213
|
-
</xs:simpleContent>
|
|
214
|
-
</xs:complexType>
|
|
215
|
-
</xs:element>
|
|
216
|
-
<xs:element name="affiliation" minOccurs="0" maxOccurs="unbounded">
|
|
217
|
-
<xs:complexType>
|
|
218
|
-
<xs:annotation>
|
|
219
|
-
<xs:documentation>Uniquely identifies an affiliation, according to various identifier schemes.</xs:documentation>
|
|
220
|
-
</xs:annotation>
|
|
221
|
-
<xs:simpleContent>
|
|
222
|
-
<xs:extension base="nonemptycontentStringType">
|
|
223
|
-
<xs:attribute name="affiliationIdentifier" use="optional"/>
|
|
224
|
-
<xs:attribute name="affiliationIdentifierScheme" use="optional"/>
|
|
225
|
-
<xs:attribute name="schemeURI" type="xs:anyURI" use="optional"/>
|
|
226
|
-
</xs:extension>
|
|
227
|
-
</xs:simpleContent>
|
|
228
|
-
</xs:complexType>
|
|
229
|
-
</xs:element>
|
|
178
|
+
<xs:element name="nameIdentifier" xsi:type="nameIdentifier" minOccurs="0" maxOccurs="unbounded"/>
|
|
179
|
+
<xs:element name="affiliation" xsi:type="affiliation" minOccurs="0" maxOccurs="unbounded"/>
|
|
230
180
|
</xs:sequence>
|
|
231
181
|
<xs:attribute name="contributorType" type="contributorType" use="required"/>
|
|
232
182
|
</xs:complexType>
|
|
@@ -473,6 +423,31 @@ Use the complete title of a license and include version information if applicabl
|
|
|
473
423
|
<xs:minLength value="1"/>
|
|
474
424
|
</xs:restriction>
|
|
475
425
|
</xs:simpleType>
|
|
426
|
+
<!-- definition for nameIdentifier -->
|
|
427
|
+
<xs:complexType name="nameIdentifier">
|
|
428
|
+
<xs:annotation>
|
|
429
|
+
<xs:documentation>Uniquely identifies a creator or contributor, according to various identifier schemes.</xs:documentation>
|
|
430
|
+
</xs:annotation>
|
|
431
|
+
<xs:simpleContent>
|
|
432
|
+
<xs:extension base="nonemptycontentStringType">
|
|
433
|
+
<xs:attribute name="nameIdentifierScheme" type="xs:string" use="required"/>
|
|
434
|
+
<xs:attribute name="schemeURI" type="xs:anyURI" use="optional"/>
|
|
435
|
+
</xs:extension>
|
|
436
|
+
</xs:simpleContent>
|
|
437
|
+
</xs:complexType>
|
|
438
|
+
<!-- definition for affiliation -->
|
|
439
|
+
<xs:complexType name="affiliation">
|
|
440
|
+
<xs:annotation>
|
|
441
|
+
<xs:documentation>Uniquely identifies an affiliation, according to various identifier schemes.</xs:documentation>
|
|
442
|
+
</xs:annotation>
|
|
443
|
+
<xs:simpleContent>
|
|
444
|
+
<xs:extension base="nonemptycontentStringType">
|
|
445
|
+
<xs:attribute name="affiliationIdentifier" type="xs:string" use="optional"/>
|
|
446
|
+
<xs:attribute name="affiliationIdentifierScheme" type="xs:string" use="optional"/>
|
|
447
|
+
<xs:attribute name="schemeURI" type="xs:anyURI" use="optional"/>
|
|
448
|
+
</xs:extension>
|
|
449
|
+
</xs:simpleContent>
|
|
450
|
+
</xs:complexType>
|
|
476
451
|
<!-- defines the value for a year -->
|
|
477
452
|
<xs:simpleType name="yearType">
|
|
478
453
|
<xs:restriction base="xs:token">
|
|
@@ -134,22 +134,22 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
134
134
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
135
135
|
end
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
137
|
+
it "xs:string attributes" do
|
|
138
|
+
input = "https://doi.org/10.17630/bb43e6a3-72e0-464c-9fdd-fbe5d3e56a09"
|
|
139
|
+
subject = Bolognese::Metadata.new(input: input)
|
|
140
|
+
expect(subject.valid?).to be true
|
|
141
|
+
expect(subject.types["schemaOrg"]).to eq("Dataset")
|
|
142
|
+
expect(subject.types["resourceType"]).to eq("Dataset")
|
|
143
|
+
expect(subject.types["resourceTypeGeneral"]).to eq("Audiovisual")
|
|
144
|
+
expect(subject.creators.length).to eq(14)
|
|
145
|
+
expect(subject.creators.first).to eq("nameType"=>"Personal", "name"=>"Haywood, Raphaelle Dawn", "givenName"=>"Raphaelle Dawn", "familyName"=>"Haywood", "affiliation" => [{"name"=>"School of Physics and Astronomy"}])
|
|
146
|
+
expect(subject.titles).to eq([{"lang"=>"en", "title"=>"Data underpinning - The Sun as a planet-host star: Proxies from SDO images for HARPS radial-velocity variations"}])
|
|
147
|
+
expect(subject.dates).to eq([{"date"=>"2016-01-20", "dateType"=>"Available"}, {"date"=>"2016", "dateType"=>"Issued"}])
|
|
148
|
+
expect(subject.publication_year).to eq("2016")
|
|
149
|
+
expect(subject.publisher).to eq("University of St Andrews")
|
|
150
|
+
expect(subject.agency).to eq("DataCite")
|
|
151
|
+
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
152
|
+
end
|
|
153
153
|
|
|
154
154
|
it "multiple licenses" do
|
|
155
155
|
input = "https://doi.org/10.5281/ZENODO.48440"
|