cocina_display 1.8.2 → 1.9.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/lib/cocina_display/identifier.rb +8 -1
- data/lib/cocina_display/version.rb +1 -1
- 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: d724bfbe5e313a116cdba675f7d4f563662e8370f9ede927bef32a8cb7f90f26
|
|
4
|
+
data.tar.gz: e3fccfd8188a3f21ad05beb49d281bca8e24cf7e03524b51bd03fde4facbfa90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a3bcecb41e8a3ca656f079f2fb7f09aa256669e868c0ca34c1b42e5e60ed3e083b1f1bb862122f0a9864fbfd989406a961671b560edff1ba8d29e9620b0c62c
|
|
7
|
+
data.tar.gz: 5f1b3688911de060ff1a7ef6a31f4e98a300d217a42fb27cf76d401766a4d741a93821d26f0bdb7549506e462911d0a9da3f5fc25c68d041b7a7d2cc12285b29
|
|
@@ -57,7 +57,7 @@ module CocinaDisplay
|
|
|
57
57
|
# The type of the identifier, e.g. "DOI".
|
|
58
58
|
# @return [String, nil]
|
|
59
59
|
def type
|
|
60
|
-
("DOI" if doi?) || cocina["type"].presence
|
|
60
|
+
("DOI" if doi?) || ("ORCID" if orcid_uri?) || cocina["type"].presence
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
# The declared encoding of the identifier, if any.
|
|
@@ -97,5 +97,12 @@ module CocinaDisplay
|
|
|
97
97
|
def label_key
|
|
98
98
|
type&.parameterize&.underscore
|
|
99
99
|
end
|
|
100
|
+
|
|
101
|
+
# Identifer is an ORCID if the URI contains "orcid.org".
|
|
102
|
+
# (in other cases this is indicated by type)
|
|
103
|
+
# @return [Boolean]
|
|
104
|
+
def orcid_uri?
|
|
105
|
+
cocina["uri"]&.include?("orcid.org")
|
|
106
|
+
end
|
|
100
107
|
end
|
|
101
108
|
end
|