Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.IRepository.acquire()


        URL url = file.toURI().toURL();
       
        IProgressMonitor monitor = ProgressManager.instance().get();
       
        IRepository local = CatalogPlugin.getDefault().getLocal();
        IService service = local.acquire( url, monitor );       
    }
   
  /**
   * This is the "long" way to add an entry to the catalog.
   */
 
View Full Code Here


        }));
       
        // add the diff shapefile as a udig resource
        URL url = tmp.toURI().toURL();
        IRepository local = CatalogPlugin.getDefault().getLocal();
        IService service = local.acquire( url, null );
       
        // List<IService> services = CatalogPlugin.getDefault().getServiceFactory().createService(tmp.toURL());
        // IService service = services.get(0);
        // CatalogPlugin.getDefault().getLocalCatalog().add(service);
        List< ? extends IGeoResource> resources = service.resources(null);
View Full Code Here

public class CatalogIntegrationTest {

    @Test
    public void testAquire() throws Exception {
        IRepository local = CatalogPlugin.getDefault().getLocal();
        local.acquire(MapGraphicService.SERVICE_URL, null);
       
        // Test ScaleBar
        final ID SCALE_BAR = new ID("mapgraphic:/localhost/mapgraphic#scalebar", null); //$NON-NLS-1$
        IGeoResource scalebarResource = local.getById(IGeoResource.class, SCALE_BAR,
                new NullProgressMonitor());
View Full Code Here

        IRepository local = CatalogPlugin.getDefault().getLocal();
       
        if (data instanceof URL) {
            URL url = (URL) data;
            try {
                local.acquire( url, null )// add to catalog if needed
               
            } catch (IOException e) {
                CatalogUIPlugin.log( "Drag and Drop "+url, e);
            }
            //List<IService> candidates = serviceFactory.createService((URL) data);
View Full Code Here

            }
            //List<IService> candidates = serviceFactory.createService((URL) data);
        } else if (data instanceof java.util.Map) {
            java.util.Map<String, Serializable> connectionParams = (java.util.Map<String, Serializable>) data;
            try {
                local.acquire(connectionParams, null);
            } catch (IOException e) {
                CatalogUIPlugin.log( "Drag and Drop "+connectionParams, e);
            }
            //List<IService> candidates = serviceFactory.createService( connectionParams );           
        } else if (data instanceof String || data instanceof String[]) {
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.