Can you check the code and see what the resolve method supports for PostGIS;
there is no longer a PostgisDatastore - as we moved to the single JDBCDataStore
for all database connections (they handle the difference between databases
internally).
You check the "dbtype" connection parameter if you need to tell them apart. We
could use the dbttype at the ID level if that gives you an easy way to look
them up.
--
Jody Garnett
On Saturday, 20 August 2011 at 8:09 AM, Mifan Careem wrote:
> Hi All,
>
> I'm putting the final touches for my SoC work on the CatalogNG browse view,
> and I have a quick question.
>
> I have a set of IResolves that I categorize using certain canResolve(Class)
> criteria, and this method works well for shapefiles, wms etc.. However, I
> have a PostGIS IResolve (I see the Iresolve in the debug view, which shows as
> a Postgisservice2), but it doesn't satisfy a
> .canResolve(PostgisDataStore.class). I need to know what class to use here to
> identify a PostGIS IResolve. My code snippet is shown below.
>
>
> for( ISearch searchCatalog : CatalogPlugin.getDefault().getCatalogs()){
> try {
> for( IResolve resolveItem : searchCatalog.members(null)){
>
> if( resolveItem.canResolve(PostgisDataStore.class) ||
> resolveItem.canResolve(PostgisFeatureStore.class) ||
> resolveItem.canResolve(PostgisDataStoreFactory.class)
>
> )
> //IDENTIFY AS A POSTGIS DATABASE
> }
> }
>
> Appreciate some guidance here.
>
> Cheers
>
> Mifan
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel