What was interesting is that there looks like two separate and independent "download code" implementations that do almost the same thing for different areas of the application.
The first component, if you will, was in the project called WebDownload, this was the first one I was able to step my way through. Unfortunately, it was not the component that could solve the problem I was tasked with fixing.
The next set of classes was in another project, PluginSDK. Here was where I eventually made some quick changes to actually stop the repeating downloads from happening.
The QuadTileSet is the center of action here, it has the queue of download requests that it services. I changed this class to have a Hashtable where it would store the download requests for tiles where the server responded with a 404 response. Then it wouldn't re-add these items to the download queue if they were in this Hashtable already.
All in all I had to make some slight changes to three classes here:
- QuadTileSet
- GeoSpatialDownloadRequest
- WebDownload
You may notice the snazzy UML class diagrams I used above. I am not really big on UML, though I used to do class diagrams a lot for a previous company. I went looking for some free, preferably Open Source UML Editors, just to let me crank out the class diagrams above (which I had already hand-drawn on paper).
I tried out two, both were basically Eclipse plugins. One did not work and the other I felt was too complex and buggy for the simple diagrams I want to do.
Papyrus UML - this actually worked but was difficult to use
acceleo - I installed this in my Eclipse environment as a plugin as per directions. I didn't allow me to create any diagrams after about 10 minutes of trying so I uninstalled it.
No comments:
Post a Comment