Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.ICatalog.replace()


       
        URL id = layer.getID();
        ICatalog localCatalog = CatalogPlugin.getDefault().getLocalCatalog();
        IGeoResource resource = localCatalog.getById(IGeoResource.class, new ID(id), new NullProgressMonitor());
        IService parent = resource.service(new NullProgressMonitor());
        localCatalog.replace(parent.getID(), parent);
       
        assertEquals(0, changed[0]);
       
        assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$
        assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$
View Full Code Here


        assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$
        assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$
        assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$
        assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$

        localCatalog.replace(parent.getID(), parent);
       
        assertEquals(1, changed[0]);
       
        parent=CatalogTests.createResource(null, "ResolveTo").service(new NullProgressMonitor()); //$NON-NLS-1$
View Full Code Here

       
        assertEquals(1, changed[0]);
       
        parent=CatalogTests.createResource(null, "ResolveTo").service(new NullProgressMonitor()); //$NON-NLS-1$

        localCatalog.replace(parent.getID(), parent);
        changed[0]=0;
        assertEquals(0, changed[0]);
    }
}
View Full Code Here

                }
                if (replacement == null) {
                    CatalogUIPlugin.log("Could not reset "+id+" - as we could not connect!",null); //$NON-NLS-1$ //$NON-NLS-2$
                    continue; // skip - too bad we cannot update status the original
                }
                catalog.replace(id, replacement);               
            } catch (Throwable failed) {
                CatalogUIPlugin.log("Reset failed", failed); //$NON-NLS-1$
            }
        }
    }
View Full Code Here

                            .getIdentifier());
                    IService replacement = fac
                        .createService(resolve
                            .getIdentifier(),
                            params);
                    catalog.replace(
                        resolve.getID(),
                        replacement);
                  }
                }
              }
View Full Code Here

        }
        ID id = shapefile.getID();
    IServiceFactory serviceFactory = CatalogPlugin.getDefault().getServiceFactory();
    IService newService = serviceFactory.createService(parametersMap).iterator().next();
    ICatalog localCatalog = CatalogPlugin.getDefault().getLocalCatalog();
    localCatalog.replace(id, newService );
        return null;
    }

  private void updateConnectionParameters(File destinationFolder,
      Map<String, Serializable> parametersMap, String completeShapeFilePath)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.