All, I've been looking at the existing database and file plugins and the com.vividsolutions.jump.io.datasource.DataSource class and from what I can tell there is a one to one relationship between a layer and a data source.
What I would like to do for some of the file and database based data sources is to have the concept of a DataSource that can contain many different layers. Within a project you would be able to select which layers you wanted to view from that data source. In the database world this concept would relate to having a connection to the data base using a java.sql.Connection. When adding the database connection to a project there would be a UI that would list the available layers (database tables) and the user could select which layers they wish to view. This compares to the current PostGIS plug-in where you have to manually enter the connection and table details for each layer. When the project is closed then the "connection" must also be closed. In the Jump project file the "connection" parameters would be stored once, then the data sources used for each layer would reference the "connection" and have a different query for each table. Now if we look at a file based example, I have a file format which is basically a zip file that contains one file for each layer along with some metadata files. I would like to be able to open the zip file and create a layer for each of the layers in the zip file. To do this I would extract the file to the temp directory and as required load the data from the individual files in the temp directory. Then when you close the project the "connection" is closed by deleting the temporary files. Another file based example would be to open a directory of files, loading each layer file in that directory, this is basically the same as the zip file idea but without the temporary files. In both the file cases once the file is loaded the first time the user can select which of the layers to view. So the question is, does any of the existing functionality in JUMP allow for multi-layer data sources? If not I'm going to do some prototyping for the file format I have and then share this with the group for comment to see if it would be useful elsewhere. After that I have an interest in Oracle connections so would need to do the same kind of thing there. One other question, where would I find the code for writing out the project .jmp XML files as I'd need to add the "connection" definitions to this. Cheers, Paul ------------------------------------------------------------------------- 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/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel