Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.ID


//                        IGeoResourceInfo info = resource.getInfo(new NullProgressMonitor());
//                        if(info != null) {
//                          title = info.getTitle();
//                        }
//                    }
                    ID id = resource.getID();
                    if(title == null) {
                      title = id.labelResource();
                    }
                    return title;

                } else if (resolve instanceof IService) {
                    IService service = (IService) resolve;
                    ID id = service.getID();

                    String title = service.getTitle();
//                    if (title == null) {
//                        IServiceInfo info = service.getInfo(new NullProgressMonitor());
//                        if (info != null) {
//                            title = info.getTitle();
//                        }
//                    }
                    if (title == null) {
                        // we are going to fake something here
                        String name = id.toString();
                        name = name.replace('_', ' ');
                        name = name.replace("%20", " "); //$NON-NLS-1$ //$NON-NLS-2$
                        return name;
                    }
                    if (id.getTypeQualifier() != null) {
                        return title + "(" + id.getTypeQualifier() + ")";
                    } else {
                        return title;
                    }
                } else if (resolve instanceof IProcess) {
                    IProcess proc = (IProcess) element;
View Full Code Here


        IServiceFactory serviceFactory = CatalogPlugin.getDefault().getServiceFactory();
        ICatalog catalog = CatalogPlugin.getDefault().getLocalCatalog();

        for( IService original : servers ) {
            try {
                final ID id = original.getID();
                CatalogUIPlugin.trace("Reset service " + original.getIdentifier()); //$NON-NLS-1$

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

                                if (resources.size() > 0) {
                                    geoResource = resources.get(0);
                                }
                            }
                            if (geoResource != null) {
                                ID id = geoResource.getID();
                                if (id != null)
                                    if (id.isFile()) {
                                        File file = id.toFile();
                                        if (file.exists()) {
                                            setTextContent(file);
                                            OmsBoxPlugin.getDefault().setLastFolderChosen(file.getParentFile().getAbsolutePath());
                                        }
                                    } else if (id.toString().contains("#") && id.toString().startsWith("file")) {
                                        // try to get the file
                                        String string = id.toString().replaceAll("#", "");
                                        URL url = new URL(string);
                                        File file = new File(url.toURI());
                                        if (file.exists()) {
                                            setTextContent(file);
                                            OmsBoxPlugin.getDefault().setLastFolderChosen(file.getParentFile().getAbsolutePath());
                                        }
                                    } else {
                                        System.out.println("Not a file: " + id.toString());
                                    }
                            }

                        }
                    } catch (Exception e) {
View Full Code Here

     * @param factory
     */
    LocalProcessFolder( LocalProcessService service, ProcessFactory factory ) {
        this.service = service;
        this.factory = factory;
        this.id = new ID( service.getID() + "/" + factory.getClass().getSimpleName(), "local" );
    }
View Full Code Here

    private ID id;

    LocalProcess( LocalProcessFolder folder, Name name ) {
        this.folder = folder;
        this.name = name;
        this.id = new ID(folder.getID(), name.getLocalPart());
    }
View Full Code Here

        URL identifier = (URL) params.get( ID_KEY );
        URL forward = (URL) params.get( FORWARD_KEY );
        if( identifier == null || forward == null ){
            return null;
        }
        return new MovedService(new ID(id),new ID(forward));
    }
View Full Code Here

                        .createDataAcessParameters(url);
                return params;
            }
            if (context instanceof IResolve) {
                IResolve resolve = (IResolve) context;
                ID id = resolve.getID();
                URL url = id.toURL();

                Map<String, Serializable> params = DataStoreServiceExtension
                        .createDataAcessParameters(url);
                return params;
            }
View Full Code Here

                        .createDataAcessParameters(url);
                return params != null ? url : null;
            }
            if (context instanceof IResolve) {
                IResolve resolve = (IResolve) context;
                ID id = resolve.getID();
                URL url = id.toURL();

                Map<String, Serializable> params = DataStoreServiceExtension
                        .createDataAcessParameters(url);

                return params != null ? url : null;
View Full Code Here

        URL query = resourceId.toURL();
        Set<IResolve> found = new LinkedHashSet<IResolve>();

        monitor.beginTask("find " + resourceId, services.size());
        for( IService service : services ) {
            ID id = service.getID();
            URL identifier = service.getIdentifier();

            if (URLUtils.urlEquals(query, identifier, true)) {
                if (query.getRef() == null && URLUtils.urlEquals(query, identifier, false)) {
                    found.add(service);
View Full Code Here

        HashSet<IService> searchScope = new HashSet<IService>();
        searchScope.addAll(this.services);
        try {
            monitor.beginTask(Messages.CatalogImpl_finding, searchScope.size() * 10);
            SERVICE: for( IService service : searchScope ) {
                ID serviceID = service.getID();
                if (check(service, ast)) {
                    result.add(service);
                }
                // Iterator< ? extends IGeoResource> resources;
                SubProgressMonitor submonitor = new SubProgressMonitor(monitor, 10);
                try {
                    List< ? extends IGeoResource> members = service.resources(submonitor);
                    if (members == null) {
                        continue SERVICE;
                    }
                    for( IGeoResource resource : members ) {
                        ID resoruceID = resource.getID();
                        try {
                            if (check(resource, ast, bbox)) {
                                result.add(resource);
                            }
                        } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.ID

Copyright © 2018 www.massapicom. 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.