Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.IGeoResource


        SimpleFeature[] features=new SimpleFeature[2];
        // add lines
        features[0]=SimpleFeatureBuilder.build(ft,new Object[]{line[0], attrValues[0]}, Integer.toString(0));   
        features[1]=SimpleFeatureBuilder.build(ft,new Object[]{line[1], attrValues[1]}, Integer.toString(1));   
       
        IGeoResource resource = MapTests.createGeoResource(features, true);
        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500,512));
        ValidateLineNoSelfIntersect isValidLine = new ValidateLineNoSelfIntersect();
        isValidLine.op(Display.getDefault(), map.getLayersInternal().get(0), new NullProgressMonitor());
        //System.out.println(isValidLine.genericResults.failedFeatures.size()+" failed feature");
        assertEquals(1,isValidLine.results.failedFeatures.size());
View Full Code Here


        SimpleFeature[] features=new SimpleFeature[2];
        // add lines
        features[0]=SimpleFeatureBuilder.build(ft,new Object[]{line[0], attrValues[0]}, Integer.toString(0));   
        features[1]=SimpleFeatureBuilder.build(ft,new Object[]{line[1], attrValues[1]}, Integer.toString(1));   
       
        IGeoResource resource = MapTests.createGeoResource(features, true);
        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500,512));
        ValidateLineNoSelfOverlapping isValidLine = new ValidateLineNoSelfOverlapping();
        isValidLine.op(Display.getDefault(), map.getLayersInternal().get(0), new NullProgressMonitor());
        //System.out.println(isValidLine.genericResults.failedFeatures.size()+" failed feature");
        assertEquals(1,isValidLine.results.failedFeatures.size());
View Full Code Here

        // add lines
        features[0]=SimpleFeatureBuilder.build(ft,new Object[]{line[0], attrValues[0]}, Integer.toString(0));   
        features[1]=SimpleFeatureBuilder.build(ft,new Object[]{line[1], attrValues[1]}, Integer.toString(1));   
        //FeatureFactory ff = new FeatureFactory();
       
        IGeoResource resource = MapTests.createGeoResource(features, true);
        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500,512));
        ValidateNullZero isValidAttr = new ValidateNullZero();

        // test the dialog
        Dialog dialog = isValidAttr.getDialog(Display.getDefault().getActiveShell(), ((ILayer) map.getLayersInternal().get(0)).getSchema());
View Full Code Here

        public Image getImage( Object arg0 ) {
            return ImageCache.getInstance().getImage(ImageCache.GRID);
        }
        public String getText( Object arg0 ) {
            if (arg0 instanceof IGeoResource) {
                IGeoResource geoResr = (IGeoResource) arg0;
                return geoResr.getTitle();
            }
            if (arg0 instanceof String) {
                String name = (String) arg0;
                return name;
            }
View Full Code Here

        ResourceSearchState search = getWorkflow().getState( ResourceSearchState.class );
        if( search != null ){
            for( IResolve resolve : search.getSelected() ){
                if( resolve instanceof IGeoResource ){
                    try {
                        IGeoResource geoResource = (IGeoResource) resolve;
                        IService service = geoResource.service( new NullProgressMonitor() );
                        list.add( service );
                    }
                    catch( IOException t){
                        CatalogUIPlugin.log("Unable to connect to service "+ t, t);
                    }
View Full Code Here

    private TileSetControl tileControlPage;

    @Override
    protected Control createContents( Composite parent ) {
        final Layer layer = (Layer) getElement();
        IGeoResource resource = layer.getGeoResource();
        IGeoResourceInfo info = null;
        try {
            info = resource.getInfo(null);
        } catch (IOException e) {
            ProjectUIPlugin.trace( TileSetPropertyPage.class, "Unable to obtain info:"+e, e );
        }
        if (info != null) {
            this.tileControlPage = new TileSetControl(resource);
View Full Code Here

        }
        ResourceSearchState search = getWorkflow().getState( ResourceSearchState.class );
        if( search != null ){
            for( IResolve resolve : search.getSelected() ){
                if( resolve instanceof IGeoResource ){
                    IGeoResource geoResource = (IGeoResource) resolve;
                    IService service = geoResource.service( new NullProgressMonitor() );
                    resources.put( geoResource, service );
                }
            }
        }
       
View Full Code Here

        Collection<URL> selectedResources = state.getSelectedResources();
        return selectedResources;
    }

    private void addResource( IProgressMonitor monitor, URL url ) throws IOException {
        IGeoResource match = match(getServices(), url, monitor);
        if (match != null) {
            resources.put(match, match.service(monitor));
        }
    }
View Full Code Here

    /**
     * @see org.locationtech.udig.ui.operations.IOp#op(java.lang.Object)
     */
    public void op( final Display display, Object target, IProgressMonitor monitor )
            throws Exception {
            IGeoResource resource = (IGeoResource) target;
            op(display, monitor, resource);
    }
View Full Code Here

            } catch (IOException e) {
                CatalogUIPlugin.log("No information for service", e); //$NON-NLS-1$
            }

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

TOP

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

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.