Examples of resources()


Examples of org.locationtech.udig.catalog.IService.resources()

        Collection<IService> services = getServices();
       
        List<IService> toRemove=new ArrayList<IService>();
        if( services != null ){
            for( IService service : services ) {
                List< ? extends IGeoResource> members = service.resources(monitor);
                if (members != null && members.size() < 1){
                    toRemove.add(service);
                    continue;
                }
                addPreferredResources(service, members);
View Full Code Here

Examples of org.locationtech.udig.catalog.IService.resources()

    }

    private void tryAdaptingToService( Object object, Collection<Data> data ) throws IOException {
        if (object instanceof IService) {
            IService service = (IService) object;
            List< ? extends IGeoResource> resources = service.resources(ProgressManager.instance().get());
            for( IGeoResource resource : resources ) {
                data.add(new Data(resource));
            }
        }
       
View Full Code Here

Examples of org.locationtech.udig.catalog.IService.resources()

    public void testSwitchStyle() throws Exception {
        LayerImpl layer = MapTests.createLayer(null, new RendererCreatorTestObjForSingleRenderer(), null);
        layer.setName("Layer1"); //$NON-NLS-1$
        IService createService = DummyService.createService(new URL("http://dummy77"), Collections.emptyList(), //$NON-NLS-1$
                        Collections.singletonList(Arrays.asList(new Object[]{new RendererCreatorTestObjForMulitRenderer()})));
        layer.getGeoResources().add(createService.resources(null).get(0));
       
        StyleBlackboard bb = layer.getStyleBlackboard();
       
        bb.put(SingleRendererStyleContent.ID, new SingleRendererStyleContent());
       
View Full Code Here

Examples of org.locationtech.udig.catalog.IService.resources()

                                geoResource = layer.getGeoResource();

                            }
                            if (firstElement instanceof IService) {
                                IService service = (IService) firstElement;
                                List< ? extends IGeoResource> resources = service.resources(new NullProgressMonitor());
                                if (resources.size() > 0) {
                                    geoResource = resources.get(0);
                                }
                            }
                            if (geoResource != null) {
View Full Code Here

Examples of org.locationtech.udig.catalog.IService.resources()

    private List< ? extends IGeoResource> members2;

    @Before
    public void setUp() throws Exception {
        IService service = createService(new URL("http://serviceWMSRenderMetricsTest"), true); //$NON-NLS-1$
        members = service.resources(new NullProgressMonitor());
        service = createService(new URL("http://serviceWMSRenderMetricsTest2"), true); //$NON-NLS-1$
        members2 = service.resources(new NullProgressMonitor());
        map = MapTests.createNonDynamicMapAndRenderer(members.get(0), null);
        map.getLayersInternal().add(map.getLayerFactory().createLayer(members.get(1)));
    }
View Full Code Here

Examples of org.locationtech.udig.catalog.IService.resources()

    @Before
    public void setUp() throws Exception {
        IService service = createService(new URL("http://serviceWMSRenderMetricsTest"), true); //$NON-NLS-1$
        members = service.resources(new NullProgressMonitor());
        service = createService(new URL("http://serviceWMSRenderMetricsTest2"), true); //$NON-NLS-1$
        members2 = service.resources(new NullProgressMonitor());
        map = MapTests.createNonDynamicMapAndRenderer(members.get(0), null);
        map.getLayersInternal().add(map.getLayerFactory().createLayer(members.get(1)));
    }

    static IService createService(URL string, boolean make2Resources) throws MalformedURLException {
View Full Code Here

Examples of org.locationtech.udig.catalog.IService.resources()

    @Before
    public void setUp() throws Exception {
        IService service = WMSRenderMetricsTest.createService(new URL(
                "http://BasicWMSRenderer2Test"), false); //$NON-NLS-1$
        members = service.resources(new NullProgressMonitor());
        map = MapTests.createNonDynamicMapAndRenderer(members.get(0), new Dimension(1024, 1024));
        viewportBBox = new Envelope(-180, 180, -90, 90);
        viewportCRS = DefaultGeographicCRS.WGS84;
        viewport = new ReferencedEnvelope(viewportBBox, viewportCRS);
        wmsLayers = Arrays.asList(members.get(0).resolve(Layer.class, new NullProgressMonitor()));
View Full Code Here

Examples of org.locationtech.udig.catalog.IService.resources()

       
        //Set the resources on the state and press finish
        IService service=currentState.getServices().iterator().next();
        Map<IGeoResource, IService> resources=new HashMap<IGeoResource, IService>();
       
        for (IResolve resolve : service.resources(new NullProgressMonitor())) {
      resources.put((IGeoResource) resolve, service);
    }
       
       
        currentState.setResources(resources);
View Full Code Here

Examples of org.locationtech.udig.catalog.IService.resources()

            }
        }
       
        if( s==null )
            throw new AssertionError();
        if( !(s.resources(null).size()>0))
            throw new AssertionError();
       
      CatalogPlugin.getDefault().getLocalCatalog().add(s);
      List<IResolve> resources = CatalogPlugin.getDefault().getLocalCatalog().find(new URL(resourceURL), null);
      if( !(resources.size()>0) )
View Full Code Here

Examples of org.locationtech.udig.catalog.IService.resources()

        final IService service = getServiceById(id);
        List<IResolveDelta> changes = new ArrayList<IResolveDelta>();
        List<IResolveDelta> childChanges = new ArrayList<IResolveDelta>();
        try {
            List< ? extends IGeoResource> newChildren = replacement.resources(null);
            List< ? extends IGeoResource> oldChildren = service.resources(null);
            if (oldChildren != null)
                for( IGeoResource oldChild : oldChildren ) {
                    String oldName = oldChild.getIdentifier().toString();

                    for( IGeoResource child : newChildren ) {
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.