Package org.geoserver.catalog

Examples of org.geoserver.catalog.MetadataMap.containsKey()


            final CoverageInfo cInfo=queryLayerInfo.getCoverage();
            final LayerInfo layerInfo=queryLayerInfo.getLayerInfo();
           
            // is it a BANDS Layer?
            final MetadataMap metadata = layerInfo.getMetadata();
            if(metadata.containsKey(EoLayerType.KEY)&&metadata.get(EoLayerType.KEY).equals(EoLayerType.BAND_COVERAGE.name())){
               
                // check the MERGE_BEHAVIOR as flat (this is harmless anyway)
                Map<String, Serializable> params = cInfo.getParameters();
                for(Entry<String, Serializable> entry:params.entrySet()){
                    if(entry.getKey().equalsIgnoreCase(ImageMosaicFormat.MERGE_BEHAVIOR.getName().getCode())){
View Full Code Here


            if(tempLayer instanceof RasterLayer){
                String title = tempLayer.getTitle();
                LayerInfo layerInfo = catalog.getLayerByName(title);       
                if(layerInfo!=null){
                    MetadataMap metadata= layerInfo.getMetadata();
                    if(metadata.containsKey(EoLayerType.KEY)&&metadata.get(EoLayerType.KEY).equals(BAND_COVERAGE_VALUE)){  
                        layer=(RasterLayer) tempLayer;
                        break;
                    }
                }
            }
View Full Code Here

            for (AttributeTypeInfo attr : attributes) {
                ftb.add(attr.getName(), attr.getBinding());
            }
            ft = ftb.buildFeatureType();
            MetadataMap metadata = fti.getMetadata();
            if (metadata.containsKey("importschemanames")) {
                Map<Object, Object> userData = ft.getUserData();
                userData.put("schemanames", metadata.get("importschemanames"));
            }
        }
        return read(ft, file);
View Full Code Here

            GeoServerInfo gsInfo = GeoServerExtensions.bean(GeoServer.class).getGlobal();
            // Global info should be always not null
            if(gsInfo != null){
                SettingsInfo info = gsInfo.getSettings();
                MetadataMap map = info != null ? info.getMetadata() : null;
                if(map != null && map.containsKey(RESTUtils.QUIET_ON_NOT_FOUND_KEY)){
                    quietOnNotFound = map.get(RESTUtils.QUIET_ON_NOT_FOUND_KEY, Boolean.class);
                }
            }
        }
        if(quietOnNotFound == null){
View Full Code Here

            try {
                GeoServerTileLayerInfo tileLayerInfo;
                tileLayerInfo = TileLayerInfoUtil.loadOrCreate(layer, defaultSettings);
                tileLayerCatalog.save(tileLayerInfo);
                MetadataMap metadata = layer.getMetadata();
                if (metadata.containsKey(LegacyTileLayerInfoLoader.CONFIG_KEY_ENABLED)) {
                    LegacyTileLayerInfoLoader.clear(metadata);
                    rawCatalog.save(layer);
                }
            } catch (RuntimeException e) {
                LOGGER.log(
View Full Code Here

                GeoServerTileLayerInfo tileLayerInfo;
                tileLayerInfo = TileLayerInfoUtil.loadOrCreate(layer, defaultSettings);
                tileLayerCatalog.save(tileLayerInfo);

                MetadataMap metadata = layer.getMetadata();
                if (metadata.containsKey(LegacyTileLayerInfoLoader.CONFIG_KEY_ENABLED)) {
                    LegacyTileLayerInfoLoader.clear(metadata);
                    rawCatalog.save(layer);
                }
            } catch (RuntimeException e) {
                LOGGER.log(Level.WARNING,
View Full Code Here

        if (!hasTileLayerDef(metadataMap)) {
            return null;
        }
        GeoServerTileLayerInfoImpl tileLayerInfo = load(metadataMap);

        if (metadataMap.containsKey(CONFIG_KEY_CACHED_STYLES)) {
            final String defaultStyle = layer.getDefaultStyle() == null ? "" : layer
                    .getDefaultStyle().getName();
            String cachedStylesStr = metadataMap.get(CONFIG_KEY_CACHED_STYLES, String.class);
            Set<String> cachedStyles = unmarshalSet(cachedStylesStr);
            TileLayerInfoUtil.setCachedStyles(tileLayerInfo, defaultStyle, cachedStyles);
View Full Code Here

                    Catalog catalog = app.getCatalog();
                    CatalogBuilder cb = new CatalogBuilder(catalog);
                    cb.setStore(ci.getStore());
                    MetadataMap metadata = ci.getMetadata();
                    CoverageInfo rebuilt = null;
                    if (metadata != null && metadata.containsKey(CoverageView.COVERAGE_VIEW)) {
                        GridCoverage2DReader reader = (GridCoverage2DReader) catalog.getResourcePool().getGridCoverageReader(ci, nativeName, GeoTools.getDefaultHints());
                        rebuilt = cb.buildCoverage(reader, nativeName, null);   
                    } else {
                        rebuilt = cb.buildCoverage(nativeName);
                    }
View Full Code Here

                }
            }

            //check to see if this is a virtual JDBC feature type
            MetadataMap mdm = featureType.getMetadata();
            boolean virtual = mdm != null && mdm.containsKey(FeatureTypeInfo.JDBC_VIRTUAL_TABLE);

            if(!virtual && !typeExists) {
                gtds.createSchema(buildFeatureType(featureType));
                // the attributes created might not match up 1-1 with the actual spec due to
                // limitations of the data store, have it re-compute them
View Full Code Here

        catalog.save( featureTypeInfo );
        catalog.getResourcePool().clear(featureTypeInfo);
       
        Map<String, Serializable> parameters = featureTypeInfo.getStore().getConnectionParameters();
        MetadataMap mdm = featureTypeInfo.getMetadata();
        boolean virtual = mdm != null && mdm.containsKey(FeatureTypeInfo.JDBC_VIRTUAL_TABLE);
       
        if( !virtual && parameters.equals(parametersCheck)){
            LOGGER.info( "PUT FeatureType" + datastore + "," + featuretype + " updated metadata only");
        }
        else {
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.