   (submit [this]
     (let [{:keys [docs jobs]} this
           doc-objs (map :obj docs)]
-      (map (fn [d j] (.. j (print @d (make-set attrs :request)))) doc-objs jobs)))
+      (map (fn [d j] (.. j (print @d (make-set attrs :request)))) doc-objs jobs))) ;; TODO: reflection
   ;; (add-listener [this listener]
   ;;   (if-let [{^DocPrintJob job :job} this]
   ;;     (do (doto job (.addPrintJobListener listener))

                         nil)]
    (if (valid-attrs? attrs :doc)
      (SimpleDoc. resource flavor (-> attrs (make-set :doc))))))

(defn- valid-attrs?
  "Returns true if all of the Attribute objects in
   attrs are bounded by the type specified by k.
   Valid keywords for k are:
     :doc
     :job
     :request,
     :service"
  {:since "0.0.1"}
  [attrs k]
  (condp = k
    :doc (every? #(instance? DocAttribute %) attrs)
    :job (every? #(instance? PrintJobAttribute %) attrs)
    :request (every? #(instance? PrintRequestAttribute %) attrs)
    :service (every? #(instance? PrintServiceAttribute %) attrs)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Job ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


      :request (HashPrintRequestAttributeSet. (into-array PrintRequestAttribute s))
      nil)))

(defn- valid-attrs?
  "Returns true if all of the Attribute objects in
   attrs are bounded by the type specified by k.
   Valid keywords for k are:
     :doc
     :job
     :request,
     :service"
  {:since "0.0.1"}
  [attrs k]
  (if (seq attrs)
    (let [mappings {:doc DocAttribute
                    :job PrintJobAttribute
                    :request PrintRequestAttribute
                    :service PrintServiceAttribute}]
      (every? (fn [attr] (instance? (k mappings) attr)) attrs))))


(defn- make-doc
  "Returns a javax.print.Doc object for the print data in this
   job map. SimpleDoc will throw an IllegalArgumentException if
