                    built-url
                    meta-data
                    vals)))))
-     (contains? types (db :container)) ;;TODO make it so we can project from a container.
-          (fn [data child resource url built-url]
-            (let [ppath (if path (.getString (.asLiteral path)))
-                  p (get (parse-uri url) ppath)
-                  projected (if (and p (res p))
-                              (if (.containsResource data (res p))
-                                (res p)))
-
-                  current (if mypath (get (parse-uri url) mypath))
-
-                  active (if mypath (= current (.getURI resource)))
-                  built-url (or (if mypath (str built-url mypath "/" (.getURI resource) "/")) built-url)]
-
-              (if ppath
-                (if projected
-                  (func
-                   (.getURI resource)
-                   (.getURI binding)
-                   active
-                   built-url
-                   meta-data
-                   (map (fn [sub-call] (sub-call data nil projected url (str built-url ppath "/" (.getURI resource) "/"))) sub-calls))
-                  "")
-                (func
-                 (.getURI resource)
-                 (.getURI binding)
-                 active
-                 built-url
-                 meta-data
-                 (map (fn [sub-call] (sub-call data nil resource url built-url)) sub-calls))
-                ))))))
+
+          )))
 
 (defn select [model subject predicate object]
   (iterator-seq (.listStatements (new SimpleSelector subject predicate object))))

(defn s-rec [binding model url-parts]

  (let [children (sort-by (fn [resource]
                            (let [p (.getProperty model resource (prop (:rank db)))]
                              (if p
                                (.getString (.asLiteral (.getObject p)))
                                "")))
                          (concat
                           (relate-right model (prop (:contains db)) binding)
                           (relate-right model (prop (:haschild db)) binding)))

        projector (first (relate-left model (prop (:projects db)) binding)) ;;TODO only works for container pointed at by projector for now.
        path (if projector (first (relate-right model (prop (:path db)) projector)))

        bindable (first (relate-right model (prop "http://www.w3.org/1999/02/22-rdf-syntax-ns#type") binding))



(defn qbuild [inf uri]
  (let [root (.asResource (.getObject (.getProperty inf
                                                        (res (bind :root))
                                                        (prop (bind :child)))))
        init (qb root inf uri)

        numbered (loop [loc (z/vector-zip (flatten-seq init))
