irstv/orbisgis — pull request #79 by gourlaysama (2012-07-24 13:25:07+00:00)
Title: Integration of the stream API into Gdms

This integrates into Gdms the work of the previous branch [topic/streams](https://github.com/irstv/orbisgis/tree/topic/streams).

The usefull commits have been cherrypicked onto a more recent version of master. Then came some cleanup.

The result is that:
* there is a typecode `Type.STREAM` and a corresponding value `StreamValue`,
* the value is a wrapper over a `GeoStream`, like for raster values,
* we have a whole new type of source that replaces WMS. This means a `StreamSource`, a `StreamSourceDefiniton`, a `StreamDataSourceAdapter`, a `StreamDriver` interface, and a `SourceManager.STREAM` type.
* **contrary to raster values**, these values cannot be serialized/deserialized into the gdms file format ; the only way to create a value is to have a `GeoStream`, and the way to have this is to have a `StreamDriver`, so only drivers control the (only) `StreamValue` they expose ;
* the dependency to `remoteServiceApi` was pushed down into Gdms, with the `WMSConnection` and `WMSStatus` classes. They are just as crappy as before, but I was told they would be replaced someday...
* These stream drivers are not writable.

Another important change that had to come with this (or that should have come sooner) is that before, one used to **always** get a DataSource in edition when asking for it, even over a read-only driver.
We would register edition listeners (useless), notify commiter and commit listener classes (useless), but still return ```isEditable() == false``` when asked...

This time has passed. Now asking for a DS over a read-only resource will not return a DS in edition, and registering an edition listener on a DS that is not in edition will result in an error. Bim.
This forces the layer model, toc, etc. to check for edition before blindly registering stuff, which is never a bad thing. Those fixes are included as well in here.

As a side note, this will reduce the amount of useless `EditionDecorator` wondering around doing nothing.

Finally, this breaks the public API, orbisgis-ui is fixed, but monomap is affected as well. I have the changes ready, another PR will follow (to be merged after this one, obviously).

cc @agueganno