Skip to content

Commit df9c87b

Browse files
committed
Update mappings for DOI processing
1 parent ffe5a0b commit df9c87b

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

src/finalizing/templates/doi-xml.njk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</creators>
1717
<publisher>{{ publisher }}</publisher>
1818
<publicationYear>{{ creation_date | year }}</publicationYear>
19-
<resourceType resourceTypeGeneral="{{ resource_mappings[resource_type] }}">{{ resource_title_mappings[resource_type] }}</resourceType>
19+
<resourceType resourceTypeGeneral="{{ resource_mappings[resource_type] or resource_mappings.default }}">{{ resource_title_mappings[resource_type] or resource_title_mappings.default }}</resourceType>
2020
<subjects>
2121
<subject>{{ title }}, {{ version }}</subject>
2222
</subjects>
@@ -55,8 +55,10 @@
5555
<language>EN</language>
5656
<alternateIdentifiers>
5757
<alternateIdentifier alternateIdentifierType="HuBMAP ID">{{ hubmapId }}</alternateIdentifier>
58-
<alternateIdentifier alternateIdentifierType="How to Cite This {{ cite_model_mappings[type] }}">{{ citation }}</alternateIdentifier>
59-
<alternateIdentifier alternateIdentifierType="How to Cite {{ cite_overall_model_mappings[type] }} Overall">{{ citationOverall }}</alternateIdentifier>
58+
<alternateIdentifier alternateIdentifierType="How to Cite This {{ cite_model_mappings[type] or cite_model_mappings.default }}">{{ citation }}</alternateIdentifier>
59+
{% if citationOverall -%}
60+
<alternateIdentifier alternateIdentifierType="How to Cite {{ cite_overall_model_mappings[type] or cite_overall_model_mappings.default }} Overall">{{ citationOverall }}</alternateIdentifier>
61+
{%- endif %}
6062
</alternateIdentifiers>
6163
<formats>
6264
<format>.{{ datatable | fileExtension }}</format>

src/finalizing/utils/generate-doi-xml.js

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ import { resolve } from 'path';
44

55
// TODO: Factor these properties out
66
const TYPE_MAPPINGS = {
7-
model_mappings: {
8-
'asct-b': 'ASCT+B',
9-
'2d-ftu': '2D Reference FTU',
10-
omap: 'Organ Mapping Antibody Panels(OMAPs)',
11-
'ref-organ': '3D Reference Organs',
12-
},
137
resource_mappings: {
148
'asct-b': 'Dataset',
159
'2d-ftu': 'Image',
@@ -18,22 +12,38 @@ const TYPE_MAPPINGS = {
1812
'asct-b-crosswalk': 'Dataset',
1913
'ref-organ-crosswalk': 'Dataset',
2014
'2d-ftu-crosswalk': 'Dataset',
15+
ctann: 'Dataset',
16+
millitome: 'Dataset',
17+
landmark: 'Model',
18+
'ds-graph': 'Dataset',
19+
default: 'Dataset',
2120
},
2221
resource_title_mappings: {
2322
'asct-b': 'ASCT+B Table',
2423
'2d-ftu': '2D reference human organ FTU object',
2524
omap: 'Organ Mapping Antibody Panel',
2625
'ref-organ': '3D reference human organ model',
27-
'asct-b-crosswalk': 'ASCT+B Crosswalk Table',
28-
'2d-ftu-crosswalk': 'ASCT+B table to 2D FTU crosswalk Table',
29-
'ref-organ-crosswalk': 'ASCT+B table to 3D model crosswalk Table',
26+
'asct-b-crosswalk': 'ASCT+B crosswalk table',
27+
'2d-ftu-crosswalk': 'ASCT+B table to 2D FTU crosswalk table',
28+
'ref-organ-crosswalk': 'ASCT+B table to 3D model crosswalk table',
29+
ctann: 'Cell type annotation label to ASCT+B Table crosswalk table',
30+
landmark: '3D reference human organ landmarks model',
31+
millitome: '3D extraction sites using the millitome process',
32+
default: 'Dataset',
33+
},
34+
cite_model_mappings: {
35+
'asct-b': 'Data Table',
36+
'2d-ftu': '2D Data',
37+
omap: 'OMAP Tables',
38+
'ref-organ': '3D Data',
39+
default: 'Data',
3040
},
31-
cite_model_mappings: { 'asct-b': 'Data Table', '2d-ftu': '2D Data', omap: 'OMAP Tables', 'ref-organ': '3D Data' },
3241
cite_overall_model_mappings: {
3342
'asct-b': 'ASCT+B Tables',
3443
'2d-ftu': '2D Data',
3544
omap: 'OMAP Tables',
3645
'ref-organ': '3D Data',
46+
default: 'Data',
3747
},
3848
extension_fixes: { ai: 'svg', xlsx: 'csv' },
3949
};

0 commit comments

Comments
 (0)