From f7acc676433456229ae343315ff3eaec227d30c9 Mon Sep 17 00:00:00 2001 From: sxu123 Date: Thu, 29 Apr 2021 15:42:34 -0400 Subject: [PATCH] CMR-6945: Added default value for nil UMM Version from iso19115. (#1237) * CMR-6945: Added default value for nil UMM Version from iso19115. * CMR-6945: Fixed a test. Co-authored-by: siwei xu --- .../collection_misc_validation_test.clj | 5 +- .../example-data/iso19115/CMR-6945.xml | 831 ++++++++++++++++++ .../xml_to_umm_mappings/iso19115_2.clj | 2 +- 3 files changed, 834 insertions(+), 4 deletions(-) create mode 100644 umm-spec-lib/resources/example-data/iso19115/CMR-6945.xml diff --git a/system-int-test/test/cmr/system_int_test/ingest/collection_misc_validation_test.clj b/system-int-test/test/cmr/system_int_test/ingest/collection_misc_validation_test.clj index 421b63d369..5f05a7f3de 100644 --- a/system-int-test/test/cmr/system_int_test/ingest/collection_misc_validation_test.clj +++ b/system-int-test/test/cmr/system_int_test/ingest/collection_misc_validation_test.clj @@ -59,9 +59,8 @@ (testing "Collections with nil versions are rejected" (let [concept (data-umm-c/collection-concept {:Version nil} :iso19115) response (ingest/ingest-concept concept)] - (is (= {:status 422 - :errors ["Version is required."]} - response))))) + (is (= 201 + (:status response)))))) (deftest field-exceeding-maxlength-warnings (testing "Multiple warnings returned for the fields exceeding maxlength allowed" diff --git a/umm-spec-lib/resources/example-data/iso19115/CMR-6945.xml b/umm-spec-lib/resources/example-data/iso19115/CMR-6945.xml new file mode 100644 index 0000000000..db4443bb33 --- /dev/null +++ b/umm-spec-lib/resources/example-data/iso19115/CMR-6945.xml @@ -0,0 +1,831 @@ + + + + Investigation of Bird Mortality in the Playa Lakes of Southeastern New Mexico. + + + eng + + + utf8 + + + series + + + + + TYLER B. STEVENS + + + + + + + (301) 614-6898 + + + 301-614-5268 + + + + + + + NASA Goddard Space Flight Center + + + Global Change Master Directory + + + Greenbelt + + + MD + + + 20771 + + + USA + + + Tyler.B.Stevens@nasa.gov + + + + + + + pointOfContact + + + + + + + DOI/USGS/BRD/NWHC > National Wildlife Health Center, Biological Resources Division, USGS, U.S. Department of the Interior + + + + + + + http://www.nwhc.usgs.gov/ + + + http + + + + + + + + + + + custodian + + + + + 2015-12-02T00:00:00.000Z + + + ISO 19115-2 Geographic Information - Metadata Part 2 Extensions for imagery and gridded data + + + ISO 19115-2:2009(E) + + + + + + + CARTESIAN + + + + + + + + + + + Metadata Update Date + + + Update Date + + + Date + + + 2015-12-02T00:00:00.000Z + + + + + + + + + + + + + + Investigation of Bird Mortality in the Playa Lakes of Southeastern New Mexico. + + + + + 1970-01-01T00:00:00 + + + creation + + + + + + + + brdnwhc0001 + + + gov.nasa.esdis.umm.shortname + + + Short Name + + + + + + + + gov.nasa.esdis.umm.doi + + + Explanation: It is unknown if this record has a DOI. + + + + + + + Joshua Dein, Laurie Baeten + + + author + + + + + + + National Biological Service + + + publisher + + + + + + + release place + + + + + + + Washington, D.C. + + + + + + + publisher + + + + + + + Not provided Version Description: + + + 1. Estimate weekly migratory waterfowl use and mean duration of stay on selected playa lakes in the Potash Area, 2. Estimate weekly migratory waterfowl mortality on the selected playas, 3. Determine the cause(s) of death of birds found on + and around the selected playas, 4. Determine if the ingestion of waters of selected playa lakes in southwestern New Mexico causes deleterious physiologic changes in mallards, with and without direct contact with the water. 5. Prepare an annotated + bibliography of the existing literature on the geology, hydrology, water quality, playa ecology, and historic and current land uses in the Secretary's Potash Region in relation to potential causes or contributing factors to migratory bird mortality + and the suitability of playas as wildlife habitat.Playa lakes are shallow basins that are scattered through 140,000square miles in Texas, New Mexico, Oklahoma, Kansas, and Colorado.They are characterized as water catchments that are most + oftenephemeral, drain internally, accumulate sediment, and serve asrecharge points to underground aquifers. An estimated 31% (2,460) ofthese playas occur in New Mexico. The playas are important winteringareas for many species of waterfowl in the + Central Flyway, and providerefuge for many birds along this migratory pathway (Playa Lakes JointVenture, 1994).In the early 1990's the deaths of hundreds of migratory birds weredocumented along the shorelines of several playas in southeastern + NewMexico in an area known as the Secretary's Potash Area. This area,including parts of Lea and Eddy Counties, has been the subject ofmining and mineral development for 60- 70 years. Potash extractionbegan in the early 1930's following the + development of oil and gasresources in the late 1920's, and continues today as a major industry.The playa basins in this area have served as convenient dischargesites for waters produced by these mining and refining operations.The frequency, + magnitude, and geographic extent of migratory birdmortality in this region has not been assessed since there have beenno extensive surveys of historical and current bird use or mortalityon these playas. Likewise, the cause of death of birds dying + duringthe early 1990's has not been adequately evaluated. Necropsy of asmall number of birds found dead during 1993 suggest that physical andphysiological effects of high salt concentrations in certain playascaused or contributed to their deaths. + Concern has been raised thatconstituents of discharge water from potash mining and/or oil and gasdevelopment into playas may also be involved in causing mortality.Water quality surveys performed on several of the playas experiencingmortality in 1992 + showed that there were significant differences inmany chemical and biological properties between playas that havereceived discharges and those without a similar history (Davis andHopkins, 1993). Questions also have been raised concerning + thehydrologic and geologic relationships amongst the playas involved inavian mortality. Information may exist on many of these issues, butpertinent sources have yet to be collected and analyzed.In April 1994, the National Wildlife Health Center + (NWHC) and theSouthern Ecological Science Center (SESC) received directives toinitiate a collaborative study investigating bird mortality in theplaya lakes of southeastern New Mexico. The NWHC was assigned leadresponsibility for the project in + cooperation with the SESC and theNew Mexico Cooperative Fish and Wildlife Research Unit (NMCFWRU). Aliterature survey on topics related to historic and current land use,hydrology, geology, water quality, playa ecology, and bird use andmortality were + also to be included in the study. + + + completed + + + + + DOI/USGS/BRD/NWHC > National Wildlife Health Center, Biological Resources Division, USGS, U.S. Department of the Interior + + + + + + + http://www.nwhc.usgs.gov/ + + + http + + + + + + + + + + + custodian + + + + + + + DOI/USGS/BRD/NWHC > National Wildlife Health Center, Biological Resources Division, USGS, U.S. Department of the Interior + + + + + + + http://www.nwhc.usgs.gov/ + + + http + + + + + + + + + + + distributor + + + + + + + JOSHUA DEIN + + + DOI/USGS/BRD/NWHC > National Wildlife Health Center, Biological Resources Division, USGS, U.S. Department of the Interior + + + + + + + (608) 264-5411 + + + (608) 271-4640 + + + + + + + National Wildlife Health Center + + + Biological Resources Division + + + U.S. Geological Survey + + + 6006 Shroeder Road + + + Madison + + + WI + + + 53711 + + + USA + + + joshua_dein@nbs.gov + + + + + + + pointOfContact + + + + + + + JOSHUA DEIN + + + + + + + (608) 264-5411 + + + (608) 271-4640 + + + + + + + National Wildlife Health Center + + + Biological Resources Division + + + U.S. Geological Survey + + + 6006 Shroeder Road + + + Madison + + + WI + + + 53711 + + + USA + + + joshua_dein@nbs.gov + + + + + + + pointOfContact + + + + + + + EARTH SCIENCE > BIOLOGICAL CLASSIFICATION > ANIMALS/VERTEBRATES > BIRDS > NONE > NONE > NONE + + + EARTH SCIENCE > BIOSPHERE > AQUATIC ECOSYSTEMS > LAKES > NONE > NONE > NONE + + + EARTH SCIENCE > BIOSPHERE > AQUATIC ECOSYSTEMS > LAKES > SALINE LAKES > NONE > NONE + + + EARTH SCIENCE > BIOSPHERE > AQUATIC ECOSYSTEMS > MARINE HABITAT > NONE > NONE > NONE + + + EARTH SCIENCE > BIOSPHERE > ECOLOGICAL DYNAMICS > SPECIES/POPULATION INTERACTIONS > MIGRATORY RATES/ROUTES > NONE > NONE + + + EARTH SCIENCE > BIOSPHERE > ECOLOGICAL DYNAMICS > SPECIES/POPULATION INTERACTIONS > POPULATION DYNAMICS > NONE > NONE + + + EARTH SCIENCE gmxAnchor > BIOSPHERE > ECOLOGICAL DYNAMICS > ECOTOXICOLOGY > TOXICITY LEVELS > NONE > NONE + + + theme + + + + + Global Change Master Directory (GCMD) Science Keywords + + + + + + + + + + skw-oceanography + + + theme + + + + + Global Change Master Directory (GCMD) Science Keywords + + + + + 2012-09-15 + + + publication + + + + + + + + + + + skw-nottheme-oceanography + + + nottheme + + + + + Global Change Master Directory (GCMD) Science Keywords + + + + + 2012-09-15 + + + publication + + + + + + + + + + + wkw-oceanography + + + theme + + + + + WMO_CategoryCode + + + + + 2012-09-15 + + + publication + + + + + + + + + + + CONTINENT > NORTH AMERICA > NONE > NONE > NONE > NONE + + + CONTINENT > NORTH AMERICA > UNITED STATES OF AMERICA > NEW MEXICO > NONE > NONE + + + place + + + + + + + + BIRD MORTALITY + + + BIRD USE + + + BRD + + + CALCIUM + + + DEHYDRATION + + + EDDY COUNTY + + + INLAND SALINE WATERS + + + LAGUNA TOSTON + + + LEA COUNTY + + + MAGNESIUM + + + MALLARD + + + NATIONAL POTASH COMPANY + + + NEW MEXICO + + + NORTHERN SHOVELER + + + PLAYA LAKES + + + POTASH MANUFACTURING + + + POTASSIUM + + + SALT POISONING + + + SODIUM + + + SOUTHEASTERN NEW MEXICO + + + SULFATE + + + TOSTON COUNTY + + + USGS + + + USGWS + + + WATERFOWL + + + WILLIAMS SINK + + + + + + + + Not provided + + + platform + + + + + + + + + None + + + + Restriction Comment: + Individuals interested in obtaining the playa lakes data set should contact Dr. Joshua Dein of the National Wildlife Health Center at Biological Resources Division in Minneapolis, Minnesota. + + + + + + + + + + + + + + + + + + http://mercury-ops2.ornl.gov/clearinghouse/send/xsltText2?fileURL=%2Fdata%2FMercury_instances%2Fusgs%2Fcsas%2Fharvested%2Fwww1.usgs.gov_metadata_mdata_USGS_NWHC_brdnwhc0001.xml&full_datasource=Metadata+Clearinghouse+Principal+Node&full_queryString=+Investigation+of+Bird+Mortality+in+the+Playa+Lakes+of+Southeastern+New+Mexico.&ds_id= + + + URLContentType: CollectionURL Type: EXTENDED METADATA + + + + + + + + + + + + + + + + + eng + + + biota + + + inlandWaters + + + oceans + + + + + SpatialCoverageType=HORIZONTAL,SpatialGranuleSpatialRepresentation=NO_SPATIAL,CoordinateSystem=CARTESIAN + + + + + 1 + + + -105.0 + + + -103.0 + + + 32.0 + + + 34.0 + + + + + + + + 1994-10-01T00:00:00.000Z + 1995-04-30T23:59:59.999Z + + + + + + + + + + Not provided + + + gov.nasa.esdis.umm.processinglevelid + + + + + + + + + + + + + Not provided + + + gov.nasa.esdis.umm.processinglevelid + + + + + + + + + + + series + + + + + + + + + PrecisionOfSeconds + + + + + + + + + + + + + + + + + + The data was screened statistically to identify possible outliers and influential measurements. + + + + + + + + + + + + + + + + + + + + + + + + Not provided + + + gov.nasa.esdis.umm.platformshortname + + + + + Not provided + + + + + + + diff --git a/umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/iso19115_2.clj b/umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/iso19115_2.clj index c312521908..7a79c5c7d1 100644 --- a/umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/iso19115_2.clj +++ b/umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/iso19115_2.clj @@ -234,7 +234,7 @@ :EntryTitle (char-string-value citation-el "gmd:title") :DOI (doi/parse-doi doc citation-base-xpath) :AssociatedDOIs (doi/parse-associated-dois doc associated-doi-xpath) - :Version (char-string-value citation-el "gmd:edition") + :Version (or (char-string-value citation-el "gmd:edition") "Not Applicable") :VersionDescription version-description :Abstract abstract :Purpose (su/truncate (char-string-value md-data-id-el "gmd:purpose") su/PURPOSE_MAX sanitize?)