 
 (comment
   ;; Translate and validate a specific collection by concept-id
-  (def record (get-collection "C1279109560-SCIOPS"))
+  (def record (get-collection "C1214604828-SCIOPS"))
   (translate-and-validation-collection record)
   (translate-record-to-umm record)
-  (:metadata-format record))
+  (:metadata-format record)
+  (:metadata record))

  (remove empty?
   (concat
     [(str (get-in record [:collection :_errors]))] ; Errors from translating to UMM
     (umm/validate-xml :collection (:metadata-format record) (:metadata record))
     (json-schema/validate-umm-json (umm-json/umm->json (:collection record)) :collection)
     (umm-validation/validate-collection record))))

(defn- translate-and-validation-collection

  (let [{:keys [metadata-format metadata concept-id]} record]
    (umm/parse-metadata context :collection metadata-format metadata {:apply-default? true})))

(defn- validate-record-schemas
  "Validate a record against the XML schema if applicable and UMM JSON schema. For records in umm-json
  validate the json schema against the collection's schema version"
  [record]
  (let [format (:metadata-format record)
        metadata (:metadata record)]
    (if (= :umm-json (:format format))
      (json-schema/validate-umm-json metadata :collection (:version format))
      (do
        (umm/validate-xml :collection format metadata)
        (json-schema/validate-umm-json (umm-json/umm->json (:collection record)) :collection)))))


(defn- get-collection-validation-errors
  "Collect the following collection validations:
   * Errors from translating from native XML to UMM-C
