geopaparazzi/geopaparazzi — pull request #183 by mj10777 (2014-07-10 08:05:23+00:00)
Title: Spatialite open

This is an attempt to correct 2 problems

1) Raster-Datasource has more than one Image
* an unique Name did not show up in `SourcesTreeListActivity` and only the first was selectable
* SpatialTable.getTitle() was added
* returning the already existing `title`
* which is either a 'Short description'
* OR if missing, the TableName

`SourcesTreeListActivity` will now show this title
* when selected, getTitle() will be used to retrieve the RasterTable
* getTitle() is stored in the selected preferences

2) MessageBox `ERROR null`
* has occurred, possibly due to the max. connections restriction in spatialite
* database.open was **not** inside a try/catch [SpatialiteDatabaseHandler]
* the jsqlite driver did not check if `p_cache` was valid (to many connections)
* which spatialite **must** have to start correctly
* the jsqlite internal `throwex` seems to call the java exception logic
* if `p_cache` is NULL, `throwex` will be called
* SpatialiteDatabaseHandler will set `isDatabaseValid = true`
* when the exception is not call
* `DaoSpatialite.checkDatabaseTypeAndValidity` will only be called if (isValid())

(I just saw the the 'open' command is being called twice, I will update this)

This should MessageBox `ERROR null` problem.
Also it will catch any other problems that may have occurred during the open process
* there are 3 other `throwex` during open, including invalid file-name

2b) a `bounds_west` was set to a positive number
* bounds_west = -180.0;

**Note**
* in the jsqlite driver a connection counter has been added with a fetch routine
* Database.java now has a db_connections() to retrieve this value
* at the moment not used, but may be needed in the future