ICatalog catalog = CatalogPlugin.getDefault().getLocalCatalog();
catalog.add(service); // we can now find this service!
ID id = new ID(new ID(url), "tasmania");
IGeoResource resource = (IGeoResource) catalog.getById(IGeoResource.class, id, null);
/*
* setup the properties so this adapter is enabled
*/
resource.getPersistentProperties().put(PreferenceConstants.P_TILESET_ON_OFF, true);
resource.getPersistentProperties().put(PreferenceConstants.P_TILESET_WIDTH, PreferenceConstants.DEFAULT_TILE_SIZE+"");
resource.getPersistentProperties().put(PreferenceConstants.P_TILESET_HEIGHT,PreferenceConstants.DEFAULT_TILE_SIZE+"");
resource.getPersistentProperties().put(PreferenceConstants.P_TILESET_IMAGE_TYPE,PreferenceConstants.DEFAULT_IMAGE_TYPE);
resource.getPersistentProperties().put(PreferenceConstants.P_TILESET_SCALES,
"1000000.0 100000.0 50000.0 20000.0 10000.0 5000.0 2500.0 1000.0");
assertNotNull(resource);
TileSet ts = resource.resolve(TileSet.class, null);
assertNotNull(ts);
}