                                   (.getObject statement)))))))
     ))
 
-;;TODO projectors url should bind itself some stuff so it knows its unique values and its name
-
 (defn literalize [res]
   (if (.isLiteral res)
     (.getString (.asLiteral res))


(defn test-rhino []
  (let [cx (Context/enter)
        scope (.initStandardObjects cx)
        ret (.evaluateString cx scope "funcs = {'http://example.com/test' : function(input){ return input + 1;} } ;" "<cmd>" 1 nil)
        funcs (.get scope "funcs" scope)
        f (.get funcs "http://example.com/test" scope)]
    (if (instance? Function f)
      (do (println "got here")
          (println (.call f cx scope scope (to-array [5]))))
      (println f " is not a function."))))

(defn -main
  [& args]

(defn get-bound [binding model]
  (or  (.getProperty model binding (prop (:binds db)))
       (.getProperty model binding (prop (:bindo db)))))

(defn relate-right [model predicate resource]
  (iterator-seq (.listObjectsOfProperty model resource predicate)))
