   (evaluate [this]
     (.execute this)))
 
-(defn ->connection [repo]
+(defn ->connection
+  "Given a sesame repository return a connection to it."
+  [repo]
   (if (instance? RepositoryConnection repo)
     repo
     (.getConnection repo)))
 
 (defn prepare-query
+  "Low level function to prepare (parse, but not process) a sesame RDF
+  query.  Takes a repository a query string and an optional sesame
+  Dataset to act as a query restriction.
+
+  Prepared queries still need to be evaluated with evaluate."
   ([repo sparql-string] (prepare-query repo sparql-string nil))
   ([repo sparql-string dataset]
      (let [conn (->connection repo)]

  (context [this] (.getContext this)))

(defprotocol ISesameRDFConverter
  (->sesame-rdf-type [this])
  (sesame-rdf-type->type [this]))

(defn s
  "Cast a string to an RDF literal"
  ([str]
     {:pre [(string? str)]}
     (reify Object

       (.initialize))))

(defn repo
  "Given a sesame Store of some type, return a sesame SailRepository."
  ([] (repo (MemoryStore.)))
  ([store]
     (doto (SailRepository. store)
       (.initialize))))

(defn load-rdf
  "Loads the specified RDF file into the supplied repository.

  Takes a String or File (specifying a path to an RDF file) a base-uri
  String and an RDFFormat."
  [connection file base-uri-str format]
  (.add connection (io/file file) base-uri-str format (into-array Resource [])))

(defn- query-bindings->map [qbs]
