Skip to content

Commit 537d8ef

Browse files
committed
CMR10589: kondo cleanup, mostly removing str functions
1 parent 023916e commit 537d8ef

7 files changed

Lines changed: 10 additions & 11 deletions

File tree

umm-spec-lib/src/cmr/umm_spec/migration/version/subscription.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[_context _subscription & _]
2121
(errors/throw-service-errors
2222
:bad-request
23-
[(str "Cannot migrate UMM-Sub v1.1 to v1.0.")]))
23+
["Cannot migrate UMM-Sub v1.1 to v1.0."]))
2424

2525
(defmethod interface/migrate-umm-version [:subscription "1.1" "1.1.1"]
2626
[_context subscription & _]

umm-spec-lib/src/cmr/umm_spec/umm_g/spatial.clj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
(defn- umm-g-gpolygon->GPolygon
3535
"Returns the spatial polygon from the given UMM-G GPolygon."
3636
[gpolygon]
37-
[gpolygon]
3837
(let [outer-ring (umm-g-boundary->Ring (:Boundary gpolygon))
3938
holes (map umm-g-boundary->Ring (get-in gpolygon [:ExclusiveZone :Boundaries]))]
4039
(poly/polygon (cons outer-ring holes))))

umm-spec-lib/src/cmr/umm_spec/umm_to_xml_mappings/dif9/spatial_extent.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
[elevation-type]
1111
(if (.contains elevation-type "Altitude")
1212
(if (.contains elevation-type "Min")
13-
(keyword (str "Minimum_Altitude"))
13+
(keyword "Minimum_Altitude")
1414
(when (.contains elevation-type "Max")
15-
(keyword (str "Maximum_Altitude"))))
15+
(keyword "Maximum_Altitude")))
1616
(when (.contains elevation-type "Depth")
1717
(if (.contains elevation-type "Min")
18-
(keyword (str "Minimum_Depth"))
18+
(keyword "Minimum_Depth")
1919
(when (.contains elevation-type "Max")
20-
(keyword (str "Maximum_Depth")))))))
20+
(keyword "Maximum_Depth"))))))
2121

2222
(defn- create-vertical-domain-maps
2323
"For the given passed in vector of UMM vertical domains key and value:

umm-spec-lib/src/cmr/umm_spec/umm_to_xml_mappings/iso19115_2/tiling_system.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
[:gmd:code
3333
(char-string (tiling-system-string tiling-system))]
3434
[:gmd:codeSpace
35-
(char-string (str "gov.nasa.esdis.umm.tilingidentificationsystem"))]
35+
(char-string "gov.nasa.esdis.umm.tilingidentificationsystem")]
3636
[:gmd:description
3737
(char-string (:TilingIdentificationSystemName tiling-system))]]]]])
3838

umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/iso19115_2/spatial.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"/" id-xpath "/gmd:code/gco:CharacterString")))
3939

4040
(def zone-identifier-xpath
41-
(str "/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicDescription[@id='ZoneIdentifier']/gmd:geographicIdentifier/gmd:MD_Identifier/gmd:code/gco:CharacterString"))
41+
"/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicDescription[@id='ZoneIdentifier']/gmd:geographicIdentifier/gmd:MD_Identifier/gmd:code/gco:CharacterString")
4242

4343
(def vertical-string-xpath
4444
(let [id-xpath "gmd:EX_GeographicDescription/gmd:geographicIdentifier/gmd:MD_Identifier"]

umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/iso19115_2/tiling_system.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[cmr.umm-spec.xml-to-umm-mappings.iso-shared.shared-iso-parsing-util :as iso-xml-parsing-util]))
1010

1111
(def tiling-system-xpath
12-
(str "gmd:extent/gmd:EX_Extent[@id='TilingIdentificationSystem']/gmd:geographicElement/gmd:EX_GeographicDescription/gmd:geographicIdentifier/gmd:MD_Identifier"))
12+
"gmd:extent/gmd:EX_Extent[@id='TilingIdentificationSystem']/gmd:geographicElement/gmd:EX_GeographicDescription/gmd:geographicIdentifier/gmd:MD_Identifier")
1313

1414
(defn- get-double
1515
"Parse the input string into a double and return it. Return nil when I can't."

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
:Description (char-string-value chars (str pc-attr-base-path "/eos:description"))
2525
:DataType (value-of chars (str pc-attr-base-path "/eos:dataType/eos:EOS_AdditionalAttributeDataTypeCode"))
2626
:Unit (char-string-value chars (str pc-attr-base-path "/eos:parameterUnitsOfMeasure"))
27-
:Value (char-string-value chars (str "eos:value"))})))))))
27+
:Value (char-string-value chars "eos:value")})))))))
2828

2929
(defn parse-operationalmodes
3030
"Returns the parsed operationalmodes from the element."
@@ -33,4 +33,4 @@
3333
(remove nil?
3434
(for [chars (select element characteristics-and-operationalmodes-xpath)]
3535
(when (= "OperationalMode" (char-string-value chars (str pc-attr-base-path "/eos:name")))
36-
(char-string-value chars (str "eos:value")))))))
36+
(char-string-value chars "eos:value"))))))

0 commit comments

Comments
 (0)