Package org.locationtech.udig.catalog.memory.internal

Examples of org.locationtech.udig.catalog.memory.internal.MemoryServiceImpl


        if (params.containsKey(KEY)) {
            if (id == null) {
                id = (URL) params.get(KEY);
            }
            if (!impl.containsKey(id))
                impl.put(id, new MemoryServiceImpl(id, this.factory));
            MemoryServiceImpl service = impl.get(id);
            MemoryDataStore store = null;
           
            try {
                store = service.resolve(MemoryDataStore.class, null);
            } catch (IOException e) {
                // won't happen
                throw (RuntimeException) new RuntimeException(e.getLocalizedMessage())
                        .initCause(e);
            }
View Full Code Here


     * java.lang.UnsupportedOperationException: Schema modification not supported)
     *
     * @param typeName the name of the type to remove, if it is there
     */
    public static synchronized void removeMemoryServiceByTypeName( String typeName ) {
        MemoryServiceImpl service = null;
        try {
            List< ? extends IResolve> members = CatalogPlugin.getDefault().getLocalCatalog().members(new NullProgressMonitor());
            for( IResolve resolve : members ) {
                if (resolve instanceof MemoryServiceImpl) {
                    if (URLUtils.urlEquals(resolve.getIdentifier(), MemoryServiceExtensionImpl.URL, true)) {
                        service = (MemoryServiceImpl) resolve;
                        break;
                    }
                }
            }
            if (service == null)
                return;
            MemoryDataStore ds = service.resolve(MemoryDataStore.class, new NullProgressMonitor());
            if (Arrays.asList(ds.getTypeNames()).contains(typeName)) {
                CatalogPlugin.getDefault().getLocalCatalog().remove(service);
            }
        } catch (IOException e) {
            CatalogPlugin.log("Error finding services", e); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.memory.internal.MemoryServiceImpl

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.