                    (:title meta) ": " vals]))
     :value (fn [parent uri binding meta val]
              (hic/html val))
-    :update nil}
-
-   (db :text-field)
+    :update nil
+    :type :relator}
+
+   :text-field
    {:resource (fn [uri binding meta vals]
                 (hic/html [:label (str (:title meta) " ")
                    [:input {:type "text"

    :value (fn [parent uri binding meta val]
             (hic/html val))
    :update (fn [uri pred data]
              {:type "update" :uri uri :predicate pred :value data})}})


(defn relator [statement model resource]

                                "")))
                          (relate-right model (prop (:haschild db)) binding))

        bindable (bound-func binding model)

        type (:type bindable)

        sub-calls (map (fn [child] (s-rec child model)) children) ;; make the next part of the tree
        meta-data (get-meta-data binding model)]

    (cond (= type :relator)
          (let [statement (get-bound binding model) ;; fuckery for binding
                relation-getter (fn [data resource] (relator statement data resource))
                child-func (:value bindable)
                parent-func (:resource bindable)] ;; extraneous function getting]
            (fn [data child resource]

              (let [related (if child   ;; get sub-resources (a single one if partial rendering)
                              (seq [child])
                              (relation-getter data resource))
                    func (if child ;; get the bound function
                           (fn [uri bind meta vals]
                             (let [val (first vals)]
                               (child-func
                                uri (:uri val) bind meta (:html val))))
                           (fn [uri bind meta vals]
                             (parent-func
                              uri bind meta
                              (map (fn [val] (child-func
                                             uri (:uri val) bind meta (:html val))) vals))))]
                (func (.getURI resource) ;; apply the bound function to the thing, the binding that points at the funtion, meta-data, and the finished children (should be ordered by now).
                      (.getURI binding)
                      meta-data
                      (map (fn [val] {:uri (first val) :html (second val)})
                           (map vector
                                (map #(.toString %) related) ;; TODO this is a little sketchy
                                (if (empty? sub-calls)
                                  (map literalize related)
                                  (map seq (apply map vector (map (fn [sub-call]
                                                                    (map
                                                                     (partial sub-call data nil)
                                                                     related))
                                                                  sub-calls))))))))))
          (= type :container)
          (fn [data child resource]
            (let [func (:display bindable)]
              (func
                  meta-data
                  (map (fn [sub-call] (sub-call data nil resource)) sub-calls)))))))

(defn select [model subject predicate object]
  (iterator-seq (.listStatements (new SimpleSelector subject predicate object))))
