connectTimeout = metadata.get("connectTimeout", Integer.class); readTimeout = metadata.get("readTimeout", Integer.class); metadata.remove("maxConnections"); metadata.remove("connectTimeout"); metadata.remove("readTimeout"); connectTimeout = metadata.get("connectTimeout", Integer.class); readTimeout = metadata.get("readTimeout", Integer.class); metadata.remove("maxConnections"); metadata.remove("connectTimeout"); metadata.remove("readTimeout");
public static void clear(MetadataMap metadata) { if (metadata != null) { for (String key : LegacyTileLayerInfoLoader._ALL_KEYS) { metadata.remove(key); } } }
public static void clear(MetadataMap metadata) { if (metadata != null) { for (String key : LegacyTileLayerInfoLoader._ALL_KEYS) { metadata.remove(key); } } }
/** * Before using {@code gwc-gs.xml} to hold the integrated GWC configuration, the only property * configured was whether the direct WMS integration option was enabled, and it was saved as * part of the {@link WMSInfo} metadata map under the {@code GWC_WMS_Integration} key. This * method removes that key from WMSInfo if present and sets its value to the {@code gwcConfig} * instead. */ private void upgradeWMSIntegrationConfig(final GeoServer geoServer, final GWCConfig gwcConfig) throws IOException { // Check whether we're using the old way of storing this information, and get rid of it WMSInfo service = geoServer.getService(WMSInfo.class); if (service != null) { MetadataMap metadata = service.getMetadata(); if (service != null && metadata != null) { Boolean storedValue = metadata.get(WMS_INTEGRATION_ENABLED_KEY, Boolean.class); if (storedValue != null) { boolean enabled = storedValue.booleanValue(); gwcConfig.setDirectWMSIntegrationEnabled(enabled); metadata.remove(WMS_INTEGRATION_ENABLED_KEY); geoServer.save(service); } } } }
/** * Before using {@code gwc-gs.xml} to hold the integrated GWC configuration, the only property * configured was whether the direct WMS integration option was enabled, and it was saved as * part of the {@link WMSInfo} metadata map under the {@code GWC_WMS_Integration} key. This * method removes that key from WMSInfo if present and sets its value to the {@code gwcConfig} * instead. */ private void upgradeWMSIntegrationConfig(final GeoServer geoServer, final GWCConfig gwcConfig) throws IOException { // Check whether we're using the old way of storing this information, and get rid of it WMSInfo service = geoServer.getService(WMSInfo.class); if (service != null) { MetadataMap metadata = service.getMetadata(); if (service != null && metadata != null) { Boolean storedValue = metadata.get(WMS_INTEGRATION_ENABLED_KEY, Boolean.class); if (storedValue != null) { boolean enabled = storedValue.booleanValue(); gwcConfig.setDirectWMSIntegrationEnabled(enabled); metadata.remove(WMS_INTEGRATION_ENABLED_KEY); geoServer.save(service); } } } }
/** * Clears dimension information from the specified coverage * * @param coverageName * @param metadataKey * @param presentation * @param resolution */ protected void clearDimensions(String coverageName) { CoverageInfo info = getCatalog().getCoverageByName(coverageName); info.getMetadata().remove(ResourceInfo.TIME); info.getMetadata().remove(ResourceInfo.ELEVATION); getCatalog().save(info); } }
/** * Clears dimension information from the specified coverage * * @param coverageName * @param metadataKey * @param presentation * @param resolution */ protected void clearDimensions(String coverageName) { CoverageInfo info = getCatalog().getCoverageByName(coverageName); info.getMetadata().remove(ResourceInfo.TIME); info.getMetadata().remove(ResourceInfo.ELEVATION); getCatalog().save(info); }
metadata.put(CONFIG_KEY_CACHED_STYLES, marshalList(cachedStyles)); } else { metadata.remove(CONFIG_KEY_CACHED_STYLES);
metadata.put(CONFIG_KEY_CACHED_STYLES, marshalList(cachedStyles)); } else { metadata.remove(CONFIG_KEY_CACHED_STYLES);
@After public void removeRasterDimensions() { CoverageInfo info = getCatalog().getCoverageByName(WATTEMP.getLocalPart()); info.getMetadata().remove(ResourceInfo.CUSTOM_DIMENSION_PREFIX + DIMENSION_NAME); getCatalog().save(info); }
@After public void removeRasterDimensions() { CoverageInfo info = getCatalog().getCoverageByName(WATTEMP.getLocalPart()); info.getMetadata().remove(ResourceInfo.CUSTOM_DIMENSION_PREFIX + DIMENSION_NAME); getCatalog().save(info); }
@After public void removeRasterDimensions() { CoverageInfo info = getCatalog().getCoverageByName(WATTEMP.getLocalPart()); info.getMetadata().remove(ResourceInfo.CUSTOM_DIMENSION_PREFIX + DIMENSION_NAME); getCatalog().save(info); }
@Before public void resetMetadata() throws IOException { FeatureTypeInfo fti = getFeatureTypeInfo(TILE_TESTS); fti.getMetadata().remove("kml.regionateFeatureLimit"); getCatalog().save(fti); }
public void removeDynamicDimensions(String resourceName) throws Exception { ResourceInfo ri = getCatalog().getResourceByName(resourceName, ResourceInfo.class); ri.getMetadata().remove(DefaultValueConfigurations.KEY); getCatalog().save(ri); }
@Before public void resetBuffer() { Catalog catalog = getCatalog(); LayerInfo layer = catalog.getLayerByName(getLayerId(LINE_WIDTH_LAYER)); layer.getMetadata().remove(LayerInfo.BUFFER); catalog.save(layer); }
resource.getMetadata().remove("recalculate-bounds");
@Test public void testEmptyDataSet() throws Exception { for (DimensionPresentation p : DimensionPresentation.values()) { setupVectorDimension( V_TIME_ELEVATION_EMPTY.getLocalPart(), ResourceInfo.TIME, "time", p, null, null, null); checkEmptyTimeDimensionAndExtent(); } // clear time metadata FeatureTypeInfo info = getCatalog().getFeatureTypeByName(V_TIME_ELEVATION_EMPTY.getLocalPart()); info.getMetadata().remove(ResourceInfo.TIME); getCatalog().save(info); for (DimensionPresentation p : DimensionPresentation.values()) { setupVectorDimension( V_TIME_ELEVATION_EMPTY.getLocalPart(), ResourceInfo.ELEVATION, "elevation", p, null, UNITS, UNIT_SYMBOL); checkEmptyElevationDimensionAndExtent(); } }
@Test public void testEmptyDataSet() throws Exception { for (DimensionPresentation p : DimensionPresentation.values()) { setupVectorDimension( V_TIME_ELEVATION_EMPTY.getLocalPart(), ResourceInfo.TIME, "time", p, null, null, null); checkEmptyTimeDimensionAndExtent(); } // clear time metadata FeatureTypeInfo info = getCatalog().getFeatureTypeByName(V_TIME_ELEVATION_EMPTY.getLocalPart()); info.getMetadata().remove(ResourceInfo.TIME); getCatalog().save(info); for (DimensionPresentation p : DimensionPresentation.values()) { setupVectorDimension( V_TIME_ELEVATION_EMPTY.getLocalPart(), ResourceInfo.ELEVATION, "elevation", p, null, UNITS, UNIT_SYMBOL); checkEmptyElevationDimensionAndExtent(); } }
@Test public void testBasicNoMaxCount() throws Exception { // remove the max count config WCSInfo wcs = getGeoServer().getService(WCSInfo.class); wcs.getMetadata().remove(WCSEOMetadata.COUNT_DEFAULT.key); getGeoServer().save(wcs); Document dom = getAsDOM( "wcs?request=DescribeEOCoverageSet&version=2.0.1&service=WCS&eoid=sf__timeranges_dss"); // print(dom); // main structure is there assertEquals("1", xpath.evaluate("count(/wcseo:EOCoverageSetDescription)", dom)); assertEquals( "1", xpath.evaluate( "count(/wcseo:EOCoverageSetDescription/wcs:CoverageDescriptions)", dom)); assertEquals( "1", xpath.evaluate( "count(/wcseo:EOCoverageSetDescription/wcseo:DatasetSeriesDescriptions)", dom)); // expected granules are there assertEquals("12", xpath.evaluate("/wcseo:EOCoverageSetDescription/@numberMatched", dom)); assertEquals("12", xpath.evaluate("/wcseo:EOCoverageSetDescription/@numberReturned", dom)); assertEquals( "12", xpath.evaluate("count(//wcs:CoverageDescriptions/wcs:CoverageDescription)", dom)); }