 	     (apply expand-property src-type src-getter prop)))
        props))
 
+;; TODO
+;; allow selection from a number of src-models
+;; allow selection into a number of src views
+;; allow filtering :filter <filter-fn>
+;; allow splitting :split <split-fn> implemented by router - should provide fn for tgt-view construction...
+;; abstract out tgt-view construction so it can be done from parameters, during select, or on-demand from router...
+
 (defn select [src-model key-name version-name props & pvec]
   (let [pmap (apply array-map pvec)
-	tgt-class-name (or (pmap :class) (.toString (gensym "org.dada.tmp.OutputValue")))
-	tgt-model-name (or (pmap :model) (.toString (gensym "OutputModel")))
 	src-metadata (. src-model getMetadata)
 	src-class (. src-metadata getValueClass)
 	src-names (. src-metadata getAttributeNames)

	src-getters (. src-metadata getAttributeGetters)
	src-getter-map (apply array-map (interleave src-names src-getters)) ; name:getter
	fields (make-fields src-type-map src-getter-map props) ; selection ([type name ...])
   	tgt-types (map (fn [field] (nth field 0)) fields)
	;; test to see if transform is needed should be done somewhere here...
   	tgt-names (map (fn [field] (nth field 1)) fields)
   	sel-getters (map (fn [field] (nth field 2)) fields)
	tgt-props (map (fn [field] [(nth field 0) (nth field 1)]) fields) ; ([type name]..)
	class-factory (new ClassFactory)
  	tgt-class (apply make-class class-factory tgt-class-name tgt-props)
   	tgt-getter-map (make-getter-map tgt-class fields) ; name:getter
	tgt-getters (vals tgt-getter-map)
   	tgt-key-getter (tgt-getter-map key-name)

  (def metamodel (start-server "Server0"))
  (start-client "Server0")

  (def factory (new ClassFactory))
  (def properties (list [(Integer/TYPE) "id"] [(Integer/TYPE) "version"] [(Long/TYPE) "time"] [(Double/TYPE) "amount"]))
  (def input-class (apply make-class factory "org.dada.tmp.InputItem" Object properties))
  (def input-types (map (fn [property] (nth property 0)) properties))
  (def input-names (map (fn [property] (nth property 1)) properties))
  (def input-getters (map (fn [property] (make-proxy-getter input-class (nth property 0) (nth property 1))) properties))
