// add the service to the catalog
IServiceFactory sFactory = CatalogPlugin.getDefault().getServiceFactory();
ICatalog catalog = CatalogPlugin.getDefault().getLocalCatalog();
URL url = URLUtils.fileToURL(file);
List<IService> services = sFactory.createService(url);
monitor.beginTask("add to catalog", services.size() * 10);
for( IService service : services ) {
IService registeredService = catalog.add(service);
SubProgressMonitor monitor2 = new SubProgressMonitor(monitor, 10);
List<IGeoResource> contents = (List<IGeoResource>) registeredService.resources(monitor2);
data.addNewResources( contents );