Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.IServiceFactory.createService()


            if (service.canResolve(type)) {
                return service.getIdentifier();
            }
        }
        IServiceFactory serviceFactory = CatalogPlugin.getDefault().getServiceFactory();
        List<IService> candidates = serviceFactory.createService(url);
        try {
            for( Iterator<IService> i=candidates.iterator(); i.hasNext();){
                IService service = i.next();
                if (service.canResolve(type)) {
                    IService registered = local.add(service);
View Full Code Here


                                            + " does not have a Resource:" + layer.getID(), //$NON-NLS-1$
                                    new Exception("Failure loading layer")); //$NON-NLS-1$
                    continue;
                }

                List<IService> createdServices = serviceFactory.createService(params);
                updateLayerID(createdServices);
                if (serviceExistsInCatalog(createdServices, catalog)) {
                    continue;
                } else {
                    addServicesToCatalog(createdServices, catalog);
View Full Code Here

        monitor.beginTask("Check", 1);
        monitor.subTask("Check available services");

        try {
            List<IService> possible = factory.createService(url);
            monitor.worked(urlProcessCount);

            IProgressMonitor monitor3 = new SubProgressMonitor(monitor, 60);
            monitor3.beginTask("connect", possible.size() * 10);

 
View Full Code Here

        //
        IOException eek = null;
        try {

            if (params != null && !params.isEmpty()) {
                List<IService> createdServices = factory.createService(params);
                Set<IService> results = new HashSet<IService>(createdServices);
                if( results.isEmpty() ){
                    return createdServices; // nothing was willing to try connecting!
                }
                for( IService service : results ) {
View Full Code Here

        Map<String, Serializable> map = new HashMap<String, Serializable>();
        map.put( "url", file.toURI().toURL() );
        map.put( "fstype", "shape" );
              
        IServiceFactory serviceFactory = CatalogPlugin.getDefault().getServiceFactory();
        List<IService> test = serviceFactory.createService(map);
        assertFalse( "Able to connect to shapefile", test.isEmpty() );
       
        boolean found = checkForInstanceOf( test, ShpServiceImpl.class);
        assertTrue( "ShpServiceImpl", found );
    }
View Full Code Here

        Map<String, Serializable> map = new HashMap<String, Serializable>();
        map.put( "url", file.toURI().toURL() );
        map.put( "fstype", "shape-ng" );
       
        IServiceFactory serviceFactory = CatalogPlugin.getDefault().getServiceFactory();
        List<IService> test = serviceFactory.createService(map);
       
        boolean found = checkForInstanceOf( test, ShpServiceImpl.class );
        assertTrue( "ShpServiceImpl", !found );
       
        found = checkForInstanceOf( test, DataStoreService.class );
View Full Code Here

    }
    private void loadFileInMap( File file ) throws Exception {
        URL fileUrl = file.toURI().toURL();
        CatalogPlugin cp = CatalogPlugin.getDefault();
        IServiceFactory sf = cp.getServiceFactory();
        List<IService> services = sf.createService(fileUrl);
        List<IGeoResource> resources = new ArrayList<IGeoResource>();
        for( IService service : services ) {
            List< ? extends IGeoResource> geoResource = service.resources(new NullProgressMonitor());
            if (geoResource != null) {
                if (service instanceof JGrassService) {
View Full Code Here

        super(Messages.MapGraphic_title);
    }

    public List<IService> getResources( IProgressMonitor monitor ) throws Exception {
        IServiceFactory factory = CatalogPlugin.getDefault().getServiceFactory();
        List<IService> services = factory.createService(MapGraphicService.SERVICE_URL);

        return services;
    }

    public String getId() {
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;
    }
View Full Code Here

     */
    List<IService> acquireGoodServices( URL url, IProgressMonitor monitor ) throws IOException {
        if (url == null)
            return Collections.<IService>emptyList();
        IServiceFactory factory = CatalogPlugin.getDefault().getServiceFactory();
        List<IService> result = factory.createService(url);
        if (result.isEmpty()) {
            throw new IOException("Could not acquire a working service for " + url); //$NON-NLS-1$
        }
        List<IService> good = new ArrayList<IService>();
        IOException notGood = null;
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.