Skip to content

Commit 2ce6986

Browse files
Merge pull request #889 from datacite/schema-4.6
Schema 4.6
2 parents e37f70f + 996597e commit 2ce6986

21 files changed

+78
-37
lines changed

app/components/doi-alternate-identifier.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const alternateIdentifierTypeList = [
77
'ARK',
88
'arXiv',
99
'bibcode',
10+
'CSTR',
1011
'DOI',
1112
'EAN13',
1213
'EISSN',
@@ -19,6 +20,7 @@ const alternateIdentifierTypeList = [
1920
'LSID',
2021
'PMID',
2122
'PURL',
23+
'RRID',
2224
'UPC',
2325
'URL',
2426
'URN',

app/components/doi-contributor.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
<label for="contributorType" class="subtitle">Contributor Type</label>
2+
<label for="contributorType" class="subtitle required-label">Contributor Type</label>
33
<div class="power-select-fragment" doi-contributor-type>
44
<@form.element @controlType="power-select" @value={{this.humanContributorType}} @helpText="The type of contributor of the resource." @options={{this.humanContributorTypes}} @formLayout="vertical" @selected={{this.humanContributorType}} @destination={{this.humanContributorType}} as |el|>
55
<el.control @onChange={{action "selectContributorTypeAction"}} @placeholder="Select Contributor Type" @disabled={{this.disabled}} @searchEnabled={{true}} />

app/components/doi-contributor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const contributorTypes = [
2525
'RightsHolder',
2626
'Sponsor',
2727
'Supervisor',
28+
'Translator',
2829
'WorkPackageLeader',
2930
'Other'
3031
];

app/components/doi-date.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const dateTypesCompleteList = [
77
'Available',
88
'Copyrighted',
99
'Collected',
10+
'Coverage',
1011
'Created',
1112
'Issued',
1213
'Submitted',

app/components/doi-related-identifier.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<div
1010
class="help-block help-block-fragment related-identifier-field no-error {{unless this.fragment.relatedIdentifier 'no-success'}}">
11-
Must be a globally unique identifier. Visit our support website for
12-
<a target="_blank" rel="noopener noreferrer" href="https://support.datacite.org/docs/schema-optional-properties-v43#section-12-a-related-identifier-type"> the list of supported unique identifiers.</a>
11+
Must be a globally unique identifier. Visit the DataCite Metadata Schema documentation for
12+
<a target="_blank" rel="noopener noreferrer" href="https://datacite-metadata-schema.readthedocs.io/en/4/appendices/appendix-1/relatedIdentifierType"> the list of supported unique identifiers.</a>
1313
</div>
1414

1515
<div class="power-select-label">

app/components/doi-related-identifier.js

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,51 @@ import { isBlank } from '@ember/utils';
88
import { pascalCase } from 'pascal-case';
99

1010
const relationTypeList = [
11-
'Cites',
1211
'Is cited by',
13-
'Compiles',
14-
'Is compiled by',
15-
'Continues',
12+
'Cites',
13+
'Is supplement to',
14+
'Is supplemented by',
1615
'Is continued by',
17-
'Describes',
16+
'Continues',
1817
'Is described by',
19-
'Documents',
20-
'Is documented by',
21-
'Is derived from',
22-
'Is source of',
18+
'Describes',
2319
'Has metadata',
2420
'Is metadata for',
25-
'Has part',
26-
'Is part of',
27-
'Is supplemented by',
28-
'Is supplement to',
29-
'Obsoletes',
30-
'Is obsoleted by',
31-
'References',
32-
'Is referenced by',
33-
'Requires',
34-
'Is required by',
35-
'Reviews',
36-
'Is reviewed by',
3721
'Has version',
3822
'Is version of',
3923
'Is new version of',
4024
'Is previous version of',
25+
'Is part of',
26+
'Has part',
4127
'Is published in',
28+
'Is referenced by',
29+
'References',
30+
'Is documented by',
31+
'Documents',
32+
'Is compiled by',
33+
'Compiles',
4234
'Is variant form of',
4335
'Is original form of',
4436
'Is identical to',
37+
'Is reviewed by',
38+
'Reviews',
39+
'Is derived from',
40+
'Is source of',
41+
'Is required by',
42+
'Requires',
43+
'Is obsoleted by',
44+
'Obsoletes',
4545
'Is collected by',
46-
'Collects'
46+
'Collects',
47+
'Is translation of',
48+
'Has translation'
4749
];
4850

4951
const relatedIdentifierTypeList = [
5052
'ARK',
5153
'arXiv',
5254
'bibcode',
55+
'CSTR',
5356
'DOI',
5457
'EAN13',
5558
'EISSN',
@@ -62,6 +65,7 @@ const relatedIdentifierTypeList = [
6265
'LSID',
6366
'PMID',
6467
'PURL',
68+
'RRID',
6569
'UPC',
6670
'URL',
6771
'URN',
@@ -70,6 +74,7 @@ const relatedIdentifierTypeList = [
7074

7175
const resourceTypeGeneralList = [
7276
'Audiovisual',
77+
'Award',
7378
'Book',
7479
'BookChapter',
7580
'Collection',
@@ -90,6 +95,7 @@ const resourceTypeGeneralList = [
9095
'PeerReview',
9196
'PhysicalObject',
9297
'Preprint',
98+
'Project',
9399
'Report',
94100
'Service',
95101
'Software',
@@ -160,6 +166,7 @@ export default class DoiRelatedIdentifier extends Component {
160166
/^(?:(http|https):\/\/(dx.)?(doi.org|handle.test.datacite.org)?\/)(10\.\d{4,5}\/.+)/;
161167
const bibcode = /\d{4}[A-Za-z\.\&]{5}[\w\.]{4}[ELPQ-Z\.][\d\.]{4}[A-Z]/;
162168
const urn = /^urn:[a-z0-9][a-z0-9-]{0,31}:[a-z0-9()+,\-.:=@;$_!*'%/?#]/;
169+
const rrid = /^RRID:[a-zA-Z]+.+$/;
163170

164171
switch (true) {
165172
case isBlank(value):
@@ -211,6 +218,11 @@ export default class DoiRelatedIdentifier extends Component {
211218
this.fragment.set('relatedIdentifierType', 'URN');
212219
this.set('controlledIdentifierType', true);
213220
break;
221+
case rrid.test(value):
222+
this.fragment.set('relatedIdentifier', value);
223+
this.fragment.set('relatedIdentifierType', 'RRID');
224+
this.set('controlledIdentifierType', true);
225+
break;
214226
case isISBN(value):
215227
this.fragment.set('relatedIdentifier', value);
216228
this.fragment.set('relatedIdentifierType', 'ISBN');

app/components/doi-related-item-contributor.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
<label for="contributorType" class="subtitle">Contributor Type</label>
1212
<div class="power-select-fragment" doi-related-item-contributor-type>
1313
<@form.element @controlType="power-select" @value={{this.humanContributorType}} @helpText="The type of contributor of the resource." @options={{this.humanContributorTypes}} @formLayout="vertical" @selected={{this.humanContributorType}} @destination={{this.humanContributorType}} as |el|>
14-
<el.control @allowClear={{true}} @onChange={{action "selectContributorType"}} @placeholder="Select Contributor Type" @disabled={{this.disabled}} @searchEnabled={{true}} />
14+
<el.control @allowClear={{true}} @onChange={{action "selectContributorTypeAction"}} @placeholder="Select Contributor Type" @disabled={{this.disabled}} @searchEnabled={{true}} />
1515
</@form.element>
1616
</div>

app/components/doi-related-item-contributor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const contributorTypes = [
2525
'RightsHolder',
2626
'Sponsor',
2727
'Supervisor',
28+
'Translator',
2829
'WorkPackageLeader',
2930
'Other'
3031
];
@@ -128,7 +129,7 @@ export default class DoiRelatedItemContributor extends Component {
128129
}
129130

130131
@action
131-
selectContributorType(contributorType) {
132+
selectContributorTypeAction(contributorType) {
132133
this.selectContributorType(contributorType);
133134
}
134135

app/components/doi-related-item-identifier.hbs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
<input type="text"
55
class="form-control related-item-identifier-field" placeholder="" value={{this.fragment.relatedItemIdentifier}} oninput={{action "updateRelatedItemIdentifierAction" value="target.value"}} data-test-related-item-identifier />
66

7-
<div
8-
class="help-block help-block-fragment related-item-identifier-field">
9-
Must be a globally unique identifier. Visit our support website for
10-
<a target="_blank" rel="noopener noreferrer" href="https://support.datacite.org/docs/schema-optional-properties-v43#section-12-a-related-identifier-type"> the list of supported unique identifiers.</a>
7+
<div class="help-block help-block-fragment related-item-identifier-field">
8+
Must be a globally unique identifier. Visit the DataCite Metadata Schema documentation for
9+
<a target="_blank" rel="noopener noreferrer" href="https://datacite-metadata-schema.readthedocs.io/en/4/appendices/appendix-1/relatedIdentifierType"> the list of supported unique identifiers.</a>
1110
</div>
1211

1312
<div class="power-select-label">

app/components/doi-related-item-identifier.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const relatedItemIdentifierTypeList = [
1010
'ARK',
1111
'arXiv',
1212
'bibcode',
13+
'CSTR',
1314
'DOI',
1415
'EAN13',
1516
'EISSN',
@@ -22,6 +23,7 @@ const relatedItemIdentifierTypeList = [
2223
'LSID',
2324
'PMID',
2425
'PURL',
26+
'RRID',
2527
'UPC',
2628
'URL',
2729
'URN',
@@ -67,6 +69,7 @@ export default class DoiRelatedItemIdentifier extends Component {
6769
/^(?:(http|https):\/\/(dx.)?(doi.org|handle.test.datacite.org)?\/)(10\.\d{4,5}\/.+)/;
6870
const bibcode = /\d{4}[A-Za-z\.\&]{5}[\w\.]{4}[ELPQ-Z\.][\d\.]{4}[A-Z]/;
6971
const urn = /^urn:[a-z0-9][a-z0-9-]{0,31}:[a-z0-9()+,\-.:=@;$_!*'%/?#]/;
72+
const rrid = /^RRID:[a-zA-Z]+.+$/;
7073

7174
switch (true) {
7275
case isBlank(value):
@@ -124,6 +127,11 @@ export default class DoiRelatedItemIdentifier extends Component {
124127
this.fragment.set('relatedItemIdentifierType', 'URL');
125128
this.set('controlledIdentifierType', true);
126129
break;
130+
case rrid.test(value):
131+
this.fragment.set('relatedItemIdentifier', value);
132+
this.fragment.set('relatedIdentifierType', 'RRID');
133+
this.set('controlledIdentifierType', true);
134+
break;
127135
default:
128136
// // Clears the relatedItemIdentifierType in case the user changes the relatedItemIdentifier after selecting it once before.
129137
this.fragment.set('relatedItemIdentifier', value);

0 commit comments

Comments
 (0)