                                                         (res (:root db))
                                                         (prop (:haschild db)))))]
 
+
         (fn [data resource uri]
           ((s-rec root inf []) data nil resource uri "/view/"))
         ))

    (.add qm "root" (res "http://logangilmour.com/example-ontology#person"))  ;; TODO DIRTY DIRTY HACKS

    (let [done (.toString (new ParameterizedSparqlString s qm))]
      (println (render-query query false) "\n\n\n" (render-graph query) "\n\n\n" done)
      (.execConstruct
       (. QueryExecutionFactory sparqlService
          "http://localhost:8000/sparql/"

                  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))
