 (defn relate-left [model predicate resource]
   (iterator-seq (.listResourcesWithProperty model predicate resource)))
 
+
+(defn parse-uri [uri]
+  (let [parts (filter (comp not (partial re-matches #"^\s*$")) (clojure.string/split uri #"/"))]
+    (println "'" uri"'\n\n\n!!!!!!!\n\n\n\n" parts)
+    (if (empty? parts)
+     {}
+     (apply assoc {} parts))))
 
 (defn s-rec [binding model url-parts]
 

  {:projector
   {:resource (fn [uri binding active url meta vals]
                (let [s (apply str vals)]
                  (hic/html [:a {:href url :class (if active "active projector-binding" "projector-binding")
                                 :data-binding binding
                                 :data-uri uri} (if (re-matches #"^\s*$" s) "untitled" s)])))
    :value (fn [parent uri binding meta val]
             uri)
    :update nil


   :list
   {:resource (fn [uri binding meta vals]
                (hic/html
                          [:ul {:class "list-binding nav nav-list"
                                             :data-uri uri
                                :data-binding binding
                                :data-description (:description meta)}
                           [:li.nav-header (:title meta)]
                           vals]
                          [:a
                           {:href "#"
                            :class "list-add-binding btn"
                            :data-uri uri
                            :data-binding binding} "Create"]))
    :value (fn [parent uri binding meta val]
             (hic/html val))

    :update (fn [uri pred data]
              {:type "create" :uri uri :predicate pred :value (uuid)})
