    :format ((clojure.set/map-invert doc-format) (.getFormat opts))
    :graph (.getGraph opts)
    :language (.getLanguage opts)
+   :locale (.getLocale opts)
    :namespace (.getNamespace opts)
    :permissions (mapv #(hash-map (.getRole %)
                                  (keyword (.toString (.getCapability %))))

              [:language    #(.setLanguage cco %)]
              [:locale      #(.setLocale cco %)]
              [:namespace   #(.setNamespace cco %)]
              [:permissions #(.setPermissions
                              cco
                              (into-array ContentPermission
                                          (reduce (fn [permissions permission]
                                                    (conj permissions
                                                          (ContentPermission.
                                                           (content-capability (val (first permission)))
                                                           (key (first permission)))))
                                                  []
                                                  %)))]
              [:placement-keys #(.setPlaceKeys cco %)]
              [:quality #(setQuality cco %)]
              [:repair-level #(.setRepairLevel cco (doc-repair-level %))]
              [:resolve-buffer-size #(.setResolveBufferSize cco %)]
              [:resolve-entities #(.setResolveEntities cco %)]
              [:temporal-collection #(.setTemporalCollection cco %)]]]
      (doseq [[k fn] xs]
        (when-let [x (k options)]
          (f x))))
    cco))

(defn describe-content-creation-options

    :resolve-entities
    :temporal-collection})

(defn make-content-permissions
  "Return an array of ContentPermissions decribing the given seq of
  content capability keys."
  [permissions]
  (into-array ContentPermission
              (reduce (fn [permissions-acc permission]
                        (conj permissions-acc
                              (ContentPermission.
                               (content-capability (val (first permission)))
                               (key (first permission)))))
                      []
                      permissions)))

(defn content-creation-options
  "Creates a ContentCreateOptions object (to pass to a ContentFactory
  newContent call) out of the given options map. See
