         qm (new QuerySolutionMap)]
     (doall (map (fn [key] (.add qm (str key) (res (get vals key)))) (keys vals)))
     qm))
-(defn build-query [inf uri]
-  (let [query  (qbuild inf (parse-uri uri))
+
+(defn uni [] (. ModelFactory createRDFSModel (.union (to-model example-view) (to-model widgets))))
+(defn build-query [view-data widget-data uri]
+  (let [inf (. ModelFactory createRDFSModel (.union view-data widget-data))
+        query  (qbuild inf (parse-uri uri))
         qm (query-map query)
         s (str "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

                (or (= (:type command) "update") (= (:type command) "create"))
                (assoc command
                  :value
                  ((serializer inf binding)
                   (build-query inf url)
                   (if (= (:type command) "update")
                     (plit (:value command))
                     (res (:value command)))


(defn parse-uri [uri]
  (let [parts (filter (comp not (partial re-matches #"^\s*$")) (clojure.string/split uri #"/"))]

    (if (empty? parts)
     {}
     (apply assoc {} parts))))
