[udig-devel] ServiceFinder/Catalog and DefaultPerspective

Ingmar Eveslage eveslage at gmail.com
Fri Feb 15 19:02:37 PST 2008


Hello,

me again ;) i have two questions:

I want to ship uDig with a plugin i programmed. this plugin contains a
perspective and i want that this perspective is loaded on startup. i found a
"dirty" way:

- import project net.refractions.udig.ui
- open net.refractions.udig.ui.preferences.PreferenceInitializer
- change this line
store.setDefault(PreferenceConstants.P_DEFAULT_PERSPECTIVE,
"MYPERSPECTIVE_ID");

this works. but is there a "smoother" and "nicer" way?

and the second point of interest: i want to add a wfs-server to the local
catalog, when udig (with my plugin) starts. the first idea i had: ship a
workspace with udig. but this isnt realy nice. i searched the mailing list
and found a link to the catalog tutorial
(http://docs.codehaus.org/display/GEOTOOLS/Catalog+Tutorial). i found an
interesting code snippet:

Catalog catalog = ...
ServiceFinder finder = ...

URI uri = new
URI("http://wms.jpl.nasa.gov/wms.cgiService=WMS&Version=1.1.1&Request=GetCapabilities");
List services = finder.aquire(uri);
if (!services.isEmpty()) {
  Service service = (Service)services.get(0);
  catalog.add(service);
}

i think i located the ServiceFinder here: ServiceFinder finder = new
DefaultServiceFinder(catalog);
but where can i find the Catalog?
CatalogPlugin.getDefault().getLocalCatalog(); gives me an ICatalog and
ICatalog is not "castable" to Catalog.

Whats my mistake?

Thanks forward

Ingmar



-- 
View this message in context: http://www.nabble.com/ServiceFinder-Catalog-and-DefaultPerspective-tp15514382p15514382.html
Sent from the udig-devel mailing list archive at Nabble.com.



More information about the udig-devel mailing list