Skip to content

Commit a3f6e66

Browse files
eereiterjwteague
authored andcommitted
CMR-7751 adding URLContentType parsing for ISO records in the distribution section. (#1350)
1 parent 448be17 commit a3f6e66

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

umm-spec-lib/resources/example-data/error-cases/CMR-5366.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,22 @@
12251225
</gmd:function>
12261226
</gmd:CI_OnlineResource>
12271227
</gmd:onLine>
1228+
<gmd:onLine>
1229+
<gmd:CI_OnlineResource>
1230+
<gmd:linkage>
1231+
<gmd:URL>https://search.earthdata.nasa.gov/search?q=MOD10A1</gmd:URL>
1232+
</gmd:linkage>
1233+
<gmd:name>
1234+
<gco:CharacterString>Earthdata Search</gco:CharacterString>
1235+
</gmd:name>
1236+
<gmd:description>
1237+
<gco:CharacterString>URLContentType: CollectionURL Description: Project Home Page. Type: PROJECT HOME PAGE</gco:CharacterString>
1238+
</gmd:description>
1239+
<gmd:function>
1240+
<gmd:CI_OnLineFunctionCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="function">download</gmd:CI_OnLineFunctionCode>
1241+
</gmd:function>
1242+
</gmd:CI_OnlineResource>
1243+
</gmd:onLine>
12281244
</gmd:MD_DigitalTransferOptions>
12291245
</gmd:distributorTransferOptions>
12301246
</gmd:MD_Distributor>

umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/iso_shared/distributions_related_url.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@
110110
:when (not (= href-type "DirectDistributionInformation"))]
111111
(merge
112112
{:URL url-link
113-
:URLContentType "DistributionURL"
113+
:URLContentType (or (:URLContentType types-and-desc)
114+
"DistributionURL")
114115
:Type type
115116
:Subtype (if opendap-type
116117
"OPENDAP DATA (DODS)"

umm-spec-lib/test/cmr/umm_spec/test/xml_to_umm_mappings/iso_shared/distributions_related_url.clj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,12 @@
139139
:Unit "KB",
140140
:Fees nil,
141141
:Checksum nil,
142-
:MimeType nil}}))
142+
:MimeType nil}}
143+
{:URL "https://search.earthdata.nasa.gov/search?q=MOD10A1",
144+
:URLContentType "CollectionURL",
145+
:Type "PROJECT HOME PAGE",
146+
:Subtype nil,
147+
:Description "Project Home Page."}))
143148

144149
(defn- distribution-related-url-iso-mends-record
145150
"Returns an example ISO19115 metadata record that includes multiple related urls

0 commit comments

Comments
 (0)