Jody Garnett a écrit :
> I am a bit worried about the mixing of factory code and logic.
>
> Aside: In this case you are trying to stick additional context into the
> creation process ... that smacks of logic to me? FilterFactory is
> supposed to be stupid. An option would be to add the configuration step
> to a FilterBuilder using normal injection (the FilterBuilder would be
> constructed with your prefix mappings and a filter factory).
I don't claim that it is good practice, but we are already doing that... A fair
amount of hints are for something else than an other factory dependency:
- The "force longitude first" hint
- The "force standard units" hint
- The "datum shift method" hint (this is a String)
- The JNDI name for EPSG factory
etc.
So Grabriel's idea of using a hint for namespace prefix would just fit with what
we already do - actually FactoryRegistry is really designed for this kind of
task. I don't know if it is good practice or not, but if we added a builder for
each of the above-cited hints, the (already quite large) amount of interfaces in
the referencing module (for example) would yet increase, and the module would
probably be more complex with more indirection levels.
Martin
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel