Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.IGeoResource.service()


        prop.addListener(l);
       
        URL id = layer.getID();
        ICatalog localCatalog = CatalogPlugin.getDefault().getLocalCatalog();
        IGeoResource resource = localCatalog.getById(IGeoResource.class, new ID(id), new NullProgressMonitor());
        IService parent = resource.service(new NullProgressMonitor());
        localCatalog.replace(parent.getID(), parent);
       
        assertEquals(0, changed[0]);
       
        assertTrue(prop.isTrue(layer, "Polygon")); //$NON-NLS-1$
View Full Code Here


        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

        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

    }

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

    @Override
    public Pair<Boolean, State> dryRun() {
View Full Code Here

        }

        if (prop instanceof Filter || prop instanceof Query) {
            try {
                IGeoResource geoResource = layer.findGeoResource(FeatureSource.class);
                IService service = geoResource.service(ProgressManager.instance().get());
               
                if (service != null) {
                    DataStore ds = service.resolve(DataStore.class,
                            ProgressManager.instance().get());
                    if (ds == null){
View Full Code Here

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

  }
  private File toShpFile( IResolve resolve ) {
      IGeoResource resource = (IGeoResource) resolve;
        IService service;
        try {
            service = resource.service(new NullProgressMonitor());
        if (service.canResolve(ShapefileDataStore.class)) {
            return service.resolve(File.class, new NullProgressMonitor());
        }
        } catch (IOException e) {
            RasteringsPlugin.log("Error obtaining shapefile file", e); //$NON-NLS-1$
View Full Code Here

    @Before
    public void setUp() throws Exception {
        features = UDIGTestUtil.createTestFeatures("testType", new Geometry[]{}, //$NON-NLS-1$
            new String[]{"firstValue", ORIGINAL_VALUE, "thirdValue", "fourthValue"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        IGeoResource resource=CatalogTests.createGeoResource(features,true);
        service=resource.service(null);
        ds=service.resolve(MemoryDataStore.class, null);
        map=MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(512,512));
       
    }
View Full Code Here

          service = createService(catalog);
        }else{
          IResolve resolve=services.get(0);
          if (resolve instanceof IGeoResource) {
            IGeoResource resource = (IGeoResource) resolve;
            service=resource.service(null);
          }else if (resolve instanceof IService) {
            service=(IService) services.get(0);       
          }
        }
        if( deleteService ){
View Full Code Here

        for( Object object : collection ) {
            try {
                if( object instanceof IGeoResource ){
                    IGeoResource geoResource = (IGeoResource)object;
                    resources.add(geoResource);
                    services.add(geoResource.service(ProgressManager.instance().get()));
                }
                if( object instanceof IService ){
                    IService service = (IService) object;
                    List< ? extends IGeoResource> members;
                    members = service.resources( ProgressManager.instance().get() );
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.