Skip to content

Commit 29ffa8f

Browse files
authored
ISO19115-3 / Formatter / Datacite (#9191)
* ISO19115-3 / Formatter / Datacite * Update to version 4.6 and more complete mapping. * ISO19115-3 / From Datacite conversion. * ISO19115-3 / Formatter / Citation / Add withAffiliation parameter and add co-authors. * ISO19115-3 / From Datacite conversion / Add more example of resource type and add some more mapping values. * ISO19115-3 / Formatter / Citation / Improve affiliation output. * ISO19115-3 / Formatter / Datacite / Comment datacite value having no ISO mapping.
1 parent ae90bd4 commit 29ffa8f

File tree

15 files changed

+5292
-236
lines changed

15 files changed

+5292
-236
lines changed

docs/manual/docs/user-guide/associating-resources/cite.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ The citation can be use to cite a dataset in publications.
1010

1111
The citation generated by default follows general conventions on how to cite a dataset but can be customized.
1212

13-
The default is: * list of authors (and organisation) * publication year * title * list of publisher * DOI URL or landing page URL.
13+
The default is:
14+
15+
* list of authors, co-author (and organisation)
16+
* publication year
17+
* title
18+
* list of publisher
19+
* DOI URL or landing page URL.
20+
1421

1522
These are the data needed to create DOI (see [Digital Object Identifier (DOI)](doi.md)).
1623

@@ -43,4 +50,10 @@ The citation can be displayed in the default XSL formatter used for the full vie
4350

4451
The formatter producing the citation can be accessed directly using: <http://localhost:8080/geonetwork/srv/api/records/31255efc-c5c1-7787-2ae6-b8fc4bcd6e55/formatters/citation?format=ris>
4552

46-
To list available formats use: <http://localhost:8080/geonetwork/srv/api/records/31255efc-c5c1-7787-2ae6-b8fc4bcd6e55/formatters/citation?format=>?
53+
To list available formats use: <http://localhost:8080/geonetwork/srv/api/records/31255efc-c5c1-7787-2ae6-b8fc4bcd6e55/formatters/citation?format=?>
54+
55+
Formatter parameters:
56+
57+
* `citation?withAffiliation=true` to include affiliation in the list of authors
58+
* custom author roles (comma separated) eg. `citation?authorRoles=processor`
59+
* custom publisher roles (comma separated) eg. `citation?publisherRoles=owner,custodian`

schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/convert/fromDatacite.xsl

Lines changed: 717 additions & 0 deletions
Large diffs are not rendered by default.

schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/formatter/citation/base.xsl

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<xsl:function name="gn-fn-iso19115-3.2018:get-author-list">
2323
<xsl:param name="authors" as="node()*"/>
2424
<xsl:param name="langId" as="xs:string"/>
25+
<xsl:param name="withAffiliation" as="xs:string"/>
2526

2627
<xsl:variable name="authorsNameAndOrgListTmp"
2728
as="node()*">
@@ -40,13 +41,25 @@
4041
</xsl:variable>
4142

4243
<xsl:value-of select="$listOfNames"/>
43-
<xsl:if test="normalize-space($listOfNames) != ''"> (</xsl:if>
44-
<xsl:for-each select="cit:party/*/cit:name">
45-
<xsl:call-template name="get-iso19115-3.2018-localised">
46-
<xsl:with-param name="langId" select="$langId"/>
47-
</xsl:call-template>
48-
</xsl:for-each>
49-
<xsl:if test="normalize-space($listOfNames) != ''">)</xsl:if>
44+
45+
<xsl:variable name="affiliation">
46+
<xsl:for-each select="cit:party/*/cit:name">
47+
<xsl:call-template name="get-iso19115-3.2018-localised">
48+
<xsl:with-param name="langId" select="$langId"/>
49+
</xsl:call-template>
50+
</xsl:for-each>
51+
</xsl:variable>
52+
53+
<xsl:choose>
54+
<xsl:when test="normalize-space($listOfNames) != ''">
55+
<xsl:if test="$withAffiliation = 'true' and normalize-space($affiliation) != ''">
56+
(<xsl:value-of select="$affiliation"/>)
57+
</xsl:if>
58+
</xsl:when>
59+
<xsl:otherwise>
60+
<xsl:value-of select="$affiliation"/>
61+
</xsl:otherwise>
62+
</xsl:choose>
5063
</author>
5164
</xsl:for-each>
5265
</xsl:variable>
@@ -67,7 +80,7 @@
6780
select="$metadata/mdb:identificationInfo/*/mri:pointOfContact/
6881
*[cit:role/*/@codeListValue = $authorRolesList]"/>
6982
<xsl:variable name="authorsNameAndOrgList"
70-
select="gn-fn-iso19115-3.2018:get-author-list($authors, $langId)"/>
83+
select="gn-fn-iso19115-3.2018:get-author-list($authors, $langId, $withAffiliation)"/>
7184

7285

7386
<!-- What name is the data set called? -->
@@ -110,7 +123,7 @@
110123
*[cit:role/*/@codeListValue = $publisherRolesList]"/>
111124

112125
<xsl:variable name="publishersNameAndOrgList" as="node()*"
113-
select="gn-fn-iso19115-3.2018:get-author-list($publishers, $langId)"/>
126+
select="gn-fn-iso19115-3.2018:get-author-list($publishers, $langId, $withAffiliation)"/>
114127

115128
<!-- Electronic Retrieval Location -->
116129
<xsl:variable name="doiInResourceIdentifier"

schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/formatter/citation/common.xsl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@
1717

1818
<!-- Who is the creator of the data set? This can be an individual, a group of individuals, or an organization. -->
1919
<xsl:param name="authorRoles"
20-
select="'custodian,author'"/>
20+
select="'custodian,author,coAuthor'"/>
2121
<xsl:variable name="authorRolesList"
2222
select="tokenize($authorRoles, ',')"/>
2323

2424
<!-- What entity is responsible for producing and/or distributing the data set? Also, is there a physical location associated with the publisher? -->
2525
<xsl:param name="publisherRoles"
2626
select="'publisher'"/>
27-
2827
<xsl:variable name="publisherRolesList"
2928
select="tokenize($publisherRoles, ',')"/>
3029

30+
<xsl:param name="withAffiliation"
31+
select="'false'"/>
32+
3133
<xsl:variable name="formats" as="node()*">
3234
<format key="html"/>
3335
<format key="text"/>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Conversion from iso19115-3 to Datacite (version 4.6)
2+
3+
See http://schema.datacite.org/meta/kernel-4.6/
4+
or https://datacite-metadata-schema.readthedocs.io/_/downloads/en/4.6/pdf/
5+
6+
This conversion is used in the context of DOI creation.
7+
8+
9+
## DataCite Mandatory Properties
10+
11+
| ID | Property | Obligation |
12+
|----|----------|-----------|
13+
| 1 | Identifier (with mandatory type sub-property) | M |
14+
| 2 | Creator (with optional given name, family name, name identifier and affiliation sub-properties) | M |
15+
| 3 | Title (with optional type sub-properties) | M |
16+
| 4 | Publisher | M |
17+
| 5 | PublicationYear | M |
18+
| 10 | ResourceType (with mandatory general type description subproperty) | M |
19+
20+
The conversion does not check that those elements are present in the record.
21+
22+
23+
`datacite:creator` are any point of contact in identification section with role `author`.
24+
`datacite:publisher` is the first organization in identification or distribution section with role `publisher` or `distributor`.
25+
26+
## DataCite Recommended and Optional Properties
27+
28+
| ID | Property | Obligation |
29+
|----|----------|-----------|
30+
| 6 | Subject | R |
31+
| 7 | Contributor | R |
32+
| 8 | Date | R |
33+
| 9 | Language | O |
34+
| 11 | AlternateIdentifier | O |
35+
| 12 | RelatedIdentifier | R |
36+
| 13 | Size | O |
37+
| 14 | Format | O |
38+
| 15 | Version | O |
39+
| 16 | Rights | O |
40+
| 17 | Description | R |
41+
| 18 | GeoLocation | R |
42+
| 19 | FundingReference | O |
43+
| 20 | RelatedItem | O |
44+
45+
46+
## DataCite unsupported properties
47+
48+
* givenName
49+
* familyName
50+
* schemeURI
51+
* rightsIdentifier
52+
* rightsIdentifierScheme
53+
* geoLocationBox and place only (no point or polygon)
54+
* awardNumber
55+
* awardTitle
56+
57+
58+
## Accessing the formatter
59+
60+
To retrieve a record:
61+
* http://localhost:8080/geonetwork/srv/api/records/ff8d8cd6-c753-4581-99a3-af23fe4c996b/formatters/datacite?output=xml

0 commit comments

Comments
 (0)