 (ns vault.data
   "Code to handle structured data, usually represented as EDN."
-  (:require [clojure.string :as string]
-            [clojure.data.codec.base64 :as b64]))
+  (:require [clojure.data.codec.base64 :as b64])
+  (:import
+    (java.net URI)
+    (java.text SimpleDateFormat)
+    (java.util Date TimeZone UUID)))
 
 
 ;; TOTAL-ORDERING COMPARATOR


; #uri - Universal Resource Identifier string.

(extend-type java.net.URI
  TaggedValue
  (edn-tag [this] 'uri)
  (edn-value [this] (str this)))


(defprint-method java.net.URI)


(defn read-uri
  "Constructs a URI from a string value."
  ^java.net.URI
  [^String uri]
  (java.net.URI. uri))


; #uuid - Universally-unique identifier string.

(extend-type UUID
  TaggedValue
  (edn-tag [this] 'uuid)
  (edn-value [this] (str this)))
