Examples of resources()


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

        } else {
            ds.createSchema(featureType);
        }

        IGeoResource resource = null;
        for( IResolve resolve : service.resources(new NullProgressMonitor()) ) {
            if (resolve instanceof IGeoResource) {
                IGeoResource r = (IGeoResource) resolve;
                if (r.resolve(SimpleFeatureType.class, new NullProgressMonitor()).getName().getLocalPart()
                        .equals(featureType.getName().getLocalPart())) {
                    resource = r;
View Full Code Here

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

     * Calls createService and finds the georesource containing the features.
     */
    public static IGeoResource createGeoResource(SimpleFeature [] features, boolean deleteService) throws IOException{
      IService service = getService(features, deleteService);
     
      List<? extends IGeoResource> resources = service.resources(null);
      for (IGeoResource resource : resources) {
        if( resource.resolve(FeatureSource.class, null).getSchema().getName().getLocalPart().
            equals(features[0].getFeatureType().getTypeName()))
          return resource;
      }
View Full Code Here

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

        if( deleteService ){
                if( service.resolve(MemoryDataStore.class, null) instanceof ActiveMemoryDataStore ){
                  ActiveMemoryDataStore ds=(ActiveMemoryDataStore) service.resolve(MemoryDataStore.class, null);
                    ds.removeSchema(features[0].getFeatureType().getTypeName());
                } else {
                    List< ? extends IGeoResource> members = service.resources(new NullProgressMonitor());
                    for( IGeoResource resource : members ) {
                        FeatureStore<SimpleFeatureType, SimpleFeature> s = resource
                                .resolve(FeatureStore.class, new NullProgressMonitor());
                        if (s.getSchema().getTypeName().equals(
                                features[0].getName().getLocalPart()))
View Full Code Here

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

     * @throws IOException
     */
    public static IGeoResource createResource( URL id, Object resolveTo ) throws IOException {
        IService service=DummyService.createService(id, null, Collections.singletonList(Collections.singletonList(resolveTo)));
       
        IGeoResource resource = service.resources(null).get(0);
        return resource;
    }

}
View Full Code Here

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

  }
  private void addAlertsMapgraphic(IProgressMonitor monitor,
      List<IGeoResource> resources) throws IOException {
    IService service = CatalogPlugin.getDefault().getLocalCatalog().acquire(MapGraphicService.SERVICE_URL,monitor);
    String desiredIdString = MapGraphicService.SERVICE_URL+"#"+ShowAlertsMapGraphic.EXTENSION_ID;
    for (IGeoResource resource : service.resources(null)) {
      String idString = resource.getID().toString();
      if(idString.equals(desiredIdString)) {
        resources.add(resource);
        return;
      }
View Full Code Here

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

  }
 
  private void addShpService(URL url,List<IGeoResource> resources, IProgressMonitor monitor) throws IOException {
    IService service = CatalogPlugin.getDefault().getLocalCatalog().acquire(url,monitor);
   
    resources.addAll(service.resources(monitor));
  }

  @Override
  protected boolean acquireToolbar() {
    return true;
View Full Code Here

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

    private List<IGeoResource> handleResolve( IResolve resolve, IProgressMonitor monitor )
            throws IOException {
        if( resolve instanceof IService ){
            IService service = (IService) resolve;
            resources(service.resources(monitor));
        }
        return Collections.emptyList();
    }

    private List<IService> handleURL( URL url, IProgressMonitor monitor ) throws IOException {
View Full Code Here

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

        List<IService> services = sFactory.createService(url);
        monitor.beginTask("add to catalog", services.size() * 10);
        for( IService service : services ) {
            IService registeredService = catalog.add(service);
            SubProgressMonitor monitor2 = new SubProgressMonitor(monitor, 10);
            List<IGeoResource> contents = (List<IGeoResource>) registeredService.resources(monitor2);
            data.addNewResources( contents );
        }
    }

    @SuppressWarnings("unchecked")
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()

                    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() );
                    if( members.isEmpty() )
                        continue;
                    services.add(service);
                    if( members.size()==1 )
                        resources.add(members.get(0));
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.