Package org.geoserver.catalog

Examples of org.geoserver.catalog.MetadataMap


    }
   
    protected void resolve(GeoServerInfo info) {
        GeoServerInfoImpl global = (GeoServerInfoImpl) info;
        if(global.getMetadata() == null) {
            global.setMetadata(new MetadataMap());
        }
        if(global.getClientProperties() == null) {
            global.setClientProperties(new HashMap<Object, Object>());
        }
        if (global.getCoverageAccess() == null) {
View Full Code Here


            StoreInfo store = (StoreInfo) super.doUnmarshal(result, reader, context);
           
            // 2.1.3+ backwards compatibility check
            if (store instanceof WMSStoreInfo) {
                WMSStoreInfo wmsStore = (WMSStoreInfo) store;
                MetadataMap metadata = wmsStore.getMetadata();
                Integer maxConnections = null;
                Integer connectTimeout = null;
                Integer readTimeout = null;
                if (metadata != null) {
                    maxConnections = metadata.get("maxConnections", Integer.class);
                    connectTimeout = metadata.get("connectTimeout", Integer.class);
                    readTimeout = metadata.get("readTimeout", Integer.class);
                    metadata.remove("maxConnections");
                    metadata.remove("connectTimeout");
                    metadata.remove("readTimeout");
                }
                if (wmsStore.getMaxConnections() <= 0) {
                    wmsStore.setMaxConnections(maxConnections != null
                            && maxConnections.intValue() > 0 ? maxConnections
                            : WMSStoreInfoImpl.DEFAULT_MAX_CONNECTIONS);
View Full Code Here

            }
            if ( featureType.getResponseSRS() == null) {
                featureType.setResponseSRS(new ArrayList());
            }
            if( featureType.getMetadata() == null) {
                featureType.setMetadata(new MetadataMap());
            }
           
            callback.postEncodeFeatureType(featureType, writer, context);
        }
View Full Code Here

            }
            if (impl.getKeywords() == null) {
                impl.setKeywords(new ArrayList());
            }
            if (impl.getMetadata() == null) {
                impl.setMetadata(new MetadataMap());
            }
            if (impl.getVersions() == null) {
                impl.setVersions(new ArrayList());
            }
        }
View Full Code Here

       
        @Override
        public void marshal(Object source, HierarchicalStreamWriter writer,
                MarshallingContext context) {
            if ( source instanceof MetadataMap) {
                MetadataMap mdmap = (MetadataMap) source;
                source = mdmap.getMap();
            }
           
            super.marshal(source, writer, context);
        }
View Full Code Here

       
        @Override
        public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
            Map map = (Map) super.unmarshal(reader, context);
            if ( !(map instanceof MetadataMap ) ) {
                map = new MetadataMap(map);
            }
            return map;
        }
View Full Code Here

        // add the descriptors for custom dimensions
        Set<ParameterDescriptor<List>> dynamicParameters = reader.getDynamicParameters();
        parameterDescriptors.addAll(dynamicParameters);

        final ReaderDimensionsAccessor dimensions = new ReaderDimensionsAccessor(reader);
        final MetadataMap metadata = coverageInfo.getMetadata();

        // Setup small envelope to get a piece of coverage to retrieve stats
        final ReferencedEnvelope testEnvelope = createTestEnvelope(coverageInfo);
        final GridGeometry2D gridGeometry = new GridGeometry2D(new GridEnvelope2D(new Rectangle(0, 0, 2,
                2)), testEnvelope);
View Full Code Here

    private List<DefaultValueConfiguration> filterConfigurations(
            DefaultValueConfigurations configsBean, ResourceInfo resource) {
        List<DefaultValueConfiguration> configs = configsBean.getConfigurations();
        List<DefaultValueConfiguration> result = new ArrayList<DefaultValueConfiguration>(
                configs.size());
        MetadataMap metadata = resource.getMetadata();
        for (DefaultValueConfiguration config : configs) {
            String key = getDimensionMetadataKey(config.getDimension());
            DimensionInfo di = metadata.get(key, DimensionInfo.class);
            if (di == null) {
                LOGGER.warning("Skipping dynamic default configuration for dimension "
                        + config.getDimension() + " as the base dimension configuration is missing");
            } else if (!di.isEnabled()) {
                LOGGER.warning("Skipping dynamic default configuration for dimension "
View Full Code Here

        assertEquals(0, stylesNotFound.size());
    }
   
    private void checkTimeDimension(LayerInfo layer) {
        ResourceInfo resource = layer.getResource();
        MetadataMap metadata = resource.getMetadata();
       
        DimensionInfo timeDimension = (DimensionInfo) metadata.get("time");
        assertNotNull(timeDimension);       
    }
View Full Code Here

            // geoserver info objects
            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

TOP

Related Classes of org.geoserver.catalog.MetadataMap

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.