Package org.locationtech.udig.catalog.memory

Examples of org.locationtech.udig.catalog.memory.ActiveMemoryDataStore


        return new ScratchServiceInfo();
    }

    @Override
    public List< ? extends IGeoResource> resources( IProgressMonitor monitor ) throws IOException {
        ActiveMemoryDataStore ds = getDS();
        String[] types = ds.getTypeNames();
        if (memberList == null) {
            rLock.lock();
            try {
                if (memberList == null) {
                    this.memberList = new ArrayList<MemoryGeoResourceImpl>();
View Full Code Here


        return ds;
    }

    private ActiveMemoryDataStore createNewDS() {
        if (this.factory != null) {
            ActiveMemoryDataStore ds = this.factory.createNewDS();
            if (ds != null) {
                return ds;
            } else {
                CatalogPlugin
                        .log(
                                "MemoryDSFactory '" + this.factory.getClass() + "' returned invalid ActiveMemoryDataStore", null); //$NON-NLS-1$//$NON-NLS-2$
            }
        }
        return new ActiveMemoryDataStore();
    }
View Full Code Here

            service=(IService) services.get(0);       
          }
        }
        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()))
                            s.removeFeatures(Filter.INCLUDE);
                    }
                }
        }
       
        MemoryDataStore ds=service.resolve(MemoryDataStore.class, null);
        try{
          ds.getSchema(features[0].getFeatureType().getTypeName());
    //      if( deleteService)
    //        throw new IOException("SimpleFeatureType already exists in Service"); //$NON-NLS-1$
        }catch( SchemaNotFoundException exception){
          // verified that schema does not yet exist.
        }
        ds.addFeatures(features);
        return service;
      }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.memory.ActiveMemoryDataStore

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.