On Wed, Dec 8, 2010 at 4:48 PM, Frank Gasdorf <[email protected]> wrote: > Hello List, > > I would like to discuss the usage of java.net.URL's instead of java.net.URI > in the interface ExternalGraphic. > In my opinion it is quite difficult to extend SDLStyleFactory with an > ExternalGraphicFactory implementation if the OnlineResource would look like: > myprotocoll://code.... > > If extending the SLD Styler it is recommend to write a Handler for the > protocol :( if it doesn't exists > > The OnlineResource interface instead uses URI for locations. Could somebody > explain, why the SLDParser makes an URL object out of it?
Because in the end that's what ExternalGraphic "location" property demands: a URL. Looked around, the change is not without pain: - ExternalGraphic.getLocation is called 9 times in Geotools - ExternalGraphic.getLocation is called 21 times in GeoServer I don't have the stats for uDig but there might be calls there as well. > From my point of view it would be great to refactor the ExternalGraphic > interface. That could make it easier to extend the SDLStyleFactory. > > What do you think? Do you have any suggestions? That we need the get go for quite a bit of people here: ExternalGraphic location seems to be used in a quite lot of places, URL and URI are simply not compatible. Also, thought I'm not sure why, the setURI() method is deprecated. Jody, do you know more? Cheers Andrea ----------------------------------------------------- Ing. Andrea Aime Senior Software Engineer GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584962313 fax: +39 0584962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ----------------------------------------------------- ------------------------------------------------------------------------------ This SF Dev2Dev email is sponsored by: WikiLeaks The End of the Free Internet http://p.sf.net/sfu/therealnews-com _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
