Package org.locationtech.udig.catalog

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


      = CatalogPlugin.getDefault().getServiceFactory();
   
    HashMap params = new HashMap();
    params.put("dummy", DummyService.url);
   
    List<IService> services = sFactory.createService(params);
    service = services.get(0);
   
    CreateMapCommand cmCommand =
      new CreateMapCommand(null,(List<IGeoResource>) service.resources(null),null);
    ProjectPlugin.getPlugin().getProjectRegistry().getDefaultProject()
View Full Code Here


  public static void addFileToCatalogLong() throws Exception {
    File file = new File( "C:\\data\\cities.shp" );
    URL url = file.toURI().toURL();
   
    IServiceFactory serviceFactory = CatalogPlugin.getDefault().getServiceFactory();
    List<IService> created = serviceFactory.createService( url );
   
    IRepository local = CatalogPlugin.getDefault().getLocal();
    for( IService service : created ){
        IService registered = local.add(service);
        //...
View Full Code Here

        //get the service factory
        IServiceFactory factory = CatalogPlugin.getDefault().getServiceFactory();
       
        //create the service
       
        List<IService> services = factory.createService( fileUrl );
       
        //ensure the service was created
        assertNotNull(services);
        assertEquals(1, services.size() );
       
View Full Code Here

     * @throws MalformedURLException
     */
  private void addToCatalog(File destination) throws MalformedURLException {
    IServiceFactory serviceFactory = CatalogPlugin.getDefault().getServiceFactory();
    URL url = DataUtilities.fileToURL( destination );
        List<IService> services = serviceFactory.createService(url);
    ICatalog localCatalog = CatalogPlugin.getDefault().getLocalCatalog();;
    for (IService service : services) {
      localCatalog.add(service);
    }
  }
View Full Code Here

        // get the service factory
        IServiceFactory factory = CatalogPlugin.getDefault().getServiceFactory();

        // create the service
        URL url = new URL( getCapabilities );
        List<IService> services = factory.createService(url);

        // ensure the service was created
        assertNotNull(services);
        assertEquals(1, services.size());
View Full Code Here

                }
            }
        }
       
        if( params!=null && !params.isEmpty()){
            Set<IService> results = new HashSet<IService>(sFactory.createService(params));           
            for( IService service : results ) {
                Collection<IService> searchResult = searchLocalCatalog(service.getIdentifier(), monitor);
                if (searchResult.isEmpty() ) {
                    services.add(service);
                } else {
View Full Code Here

                urls = CorePlugin.stringsToURLs((String) data);
            } else {
                urls = CorePlugin.stringsToURLs((String[]) data);
            }
            for( URL url : urls ) {
                List<IService> services = serviceFactory
                        .createService(url);
                for( IService service : services ) {
                    CatalogPlugin.getDefault().getLocalCatalog().add(service);
                }
            }
View Full Code Here

        try {
            URL fileUrl = new File(outputFile).toURI().toURL();
            if (addToCatalog) {
                IServiceFactory sFactory = CatalogPlugin.getDefault().getServiceFactory();
                ICatalog catalog = CatalogPlugin.getDefault().getLocalCatalog();
                List<IService> services = sFactory.createService(fileUrl);
                for( IService service : services ) {
                    catalog.add(service);
                    if (addToActiveMap) {
                        IMap activeMap = ApplicationGIS.getActiveMap();
                        int layerNum = activeMap.getMapLayers().size();
View Full Code Here

    }
  }

  private IGeoResource getTiffResource(URL url) {
    IServiceFactory factory = CatalogPlugin.getDefault().getServiceFactory();
    List<IService> services = factory.createService(url);

    if (services.isEmpty()) {
      return null;
    }
    for (IService service : services) {
View Full Code Here

                Map<java.lang.String, java.io.Serializable>
                    connectionParams = original.getConnectionParams();

                IService replacement = null; // unknown
                TEST: for( IService candidate : serviceFactory.createService(connectionParams) ) {
                    try {
                        CatalogUIPlugin.trace(id + " : connecting"); //$NON-NLS-1$
                        IServiceInfo info = candidate.getInfo(monitor);
                       
                        CatalogUIPlugin.trace(id + " : found " + info.getTitle()); //$NON-NLS-1$
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.