Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.IServiceInfo


        return Collections.emptyList();
    }

    @Override
    protected IServiceInfo createInfo(IProgressMonitor monitor) throws IOException {
        return new IServiceInfo("Driverless Teradata connection", "Teradata plugin needs jdbc driver", "", null, null,
                null, null, null);
    }
View Full Code Here


        FeatureSource featureSource = dataStore.getFeatureSource( typeName );
       
        assertEquals( 4, featureSource.getCount( Query.ALL ) );
       
        //IServiceInfo info = service.getInfo(new NullProgressMonitor());
        IServiceInfo info = getInfo(service, new NullProgressMonitor());
        assertNotNull("Title available", info.getTitle());
        assertNotNull("Description available", info.getDescription());
       
        List<? extends IGeoResource> m = service.resources(new NullProgressMonitor());
        for(IGeoResource resource: m) {
            ID id = resource.getID();
            assertNotNull(id);
View Full Code Here

           
        };
        FutureTask<IServiceInfo> task = new FutureTask<IServiceInfo>(job);
        Thread t = new Thread(task);
        t.start();
        IServiceInfo info = null;
       
        try {
            info = task.get();
        } catch (InterruptedException e) {
        } catch (ExecutionException e) {
View Full Code Here

            } catch (IOException e) {
                CatalogUIPlugin.log("No information for catalog", e); //$NON-NLS-1$
            }
        } else if (record instanceof IService) {
            IService service = (IService) record;
            IServiceInfo info;
            try {
                info = service.getInfo(searchMonitor);
                showInfo(new Info(service.getIdentifier(), info));
            } catch (IOException e) {
                CatalogUIPlugin.log("No information for service", e); //$NON-NLS-1$
View Full Code Here

        ImageDescriptor icon = service.resolve( ImageDescriptor.class, monitor);
        if( icon != null ) return icon;
      }
      // check for static icon next
        try{
            IServiceInfo info;
            info = service.resolve(IServiceInfo.class, monitor);           
            if( info != null ){
                ImageDescriptor icon = info.getImageDescriptor();
                if( icon != null ) {
                    return icon;           
                }
            }
        }catch(Throwable t){
View Full Code Here

                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$
                        replacement = candidate;
                       
                        break TEST;
                    } catch (Throwable t) {
                        CatalogUIPlugin.trace(id + " : ... " + t.getLocalizedMessage()); //$NON-NLS-1$
View Full Code Here

                            if( service != null ){
                                service.getPersistentProperties().put(resource.getID() + "_title", data.text);
                            }
                          } else if(element instanceof IService) {
                            IService service = (IService) element;
                            IServiceInfo info = service.getInfo(monitor);
                            if( info != null ){
                                data.text = info.getTitle();
                                service.getPersistentProperties().put("title", data.text);
                            }
                          } else if(element instanceof IProcess) {
                            IProcess proc = (IProcess) element;
                            data.text = proc.getInfo(monitor).getTitle();
View Full Code Here

    /* check the fields we catre about */
    protected static boolean check( IService service, AST pattern ) {
        if (pattern == null) {
            return false;
        }
        IServiceInfo info;
        try {
            info = service == null ? null : service.getInfo(null);
        } catch (IOException e) {
            info = null;
            CatalogPlugin.log(null, e);
        }
        boolean t = false;
        if (info != null) {
            if (info.getTitle() != null)
                t = pattern.accept(info.getTitle());
            if (!t && info.getKeywords() != null) {
                String[] keys = info.getKeywords().toArray(new String[0]);
                for( int i = 0; !t && i < keys.length; i++ )
                    if (keys[i] != null)
                        t = pattern.accept(keys[i]);
            }
            if (!t && info.getSchema() != null)
                t = pattern.accept(info.getSchema().toString());
            if (!t && info.getAbstract() != null)
                t = pattern.accept(info.getAbstract());
            if (!t && info.getDescription() != null)
                t = pattern.accept(info.getDescription());
        }
        return t;
    }
View Full Code Here

        class IServiceComparator implements Comparator<IService> {
           
            public int compare( IService o1, IService o2 ) {
                try {
                    IServiceInfo info1 = o1.getInfo(new SubProgressMonitor(monitor2, 1));
                    IServiceInfo info2 = o2.getInfo(new SubProgressMonitor(monitor2, 1));
                    double metric1 = info1.getMetric();
                    double metric2 = info2.getMetric();
                   
                    if (metric1 > metric2) {
                        return 1;
                    }else if(metric1 < metric2){
                       return -1;
View Full Code Here

    /* check the fields we catre about */
    protected static boolean check( IService service, AST pattern ) {
        if (pattern == null) {
            return false;
        }
        IServiceInfo info;
        try {
            info = service == null ? null : service.getInfo(null);
        } catch (IOException e) {
            info = null;
            CatalogPlugin.log(null, e);
        }
        boolean t = false;
        if (info != null) {
            if (info.getTitle() != null)
                t = pattern.accept(info.getTitle());
            if (!t && info.getKeywords() != null) {
                String[] keys = info.getKeywords().toArray(new String[0]);
                for( int i = 0; !t && i < keys.length; i++ )
                    if (keys[i] != null)
                        t = pattern.accept(keys[i]);
            }
            if (!t && info.getSchema() != null)
                t = pattern.accept(info.getSchema().toString());
            if (!t && info.getAbstract() != null)
                t = pattern.accept(info.getAbstract());
            if (!t && info.getDescription() != null)
                t = pattern.accept(info.getDescription());
        }
        return t;
    }
View Full Code Here

TOP

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

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.