本文整理了Java中org.geowebcache.config.XMLGridSubset.setGridSetName()
方法的一些代码示例,展示了XMLGridSubset.setGridSetName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLGridSubset.setGridSetName()
方法的具体详情如下:
包路径:org.geowebcache.config.XMLGridSubset
类名称:XMLGridSubset
方法名:setGridSetName
暂无
代码示例来源:origin: org.geoserver/gs-gwc
/**
* @param gridSubsetsStr comma separated list of epsg codes (usually just {@code
* EPSG:900913,EPSG:4326}
* @return the list of parsed grid subsets from the argument JSON array
* @throws IllegalArgumentException if {@code str} can't be parsed to a JSONArray
*/
private static Set<XMLGridSubset> unmarshalGridSubsets(String gridSubsetsStr)
throws IllegalArgumentException {
Set<XMLGridSubset> gridSubsets = new HashSet<XMLGridSubset>();
// backwards compatibility check for when str comes in as "EPSG:XXX,EPSG:YYY"
String[] epsgCodes = gridSubsetsStr.split(",");
for (String code : epsgCodes) {
if (code.trim().length() == 0) {
continue;
}
try {
XMLGridSubset xmlGridSubset = new XMLGridSubset();
xmlGridSubset.setGridSetName(code);
gridSubsets.add(xmlGridSubset);
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Invalid GridSubset list: " + gridSubsetsStr);
}
}
gridSubsets.remove(null);
return gridSubsets;
}
代码示例来源:origin: org.geoserver/gwc
/**
* @param gridSubsetsStr
* comma separated list of epsg codes (usually just {@code EPSG:900913,EPSG:4326}
* @return the list of parsed grid subsets from the argument JSON array
* @throws IllegalArgumentException
* if {@code str} can't be parsed to a JSONArray
*/
private static Set<XMLGridSubset> unmarshalGridSubsets(String gridSubsetsStr)
throws IllegalArgumentException {
Set<XMLGridSubset> gridSubsets = new HashSet<XMLGridSubset>();
// backwards compatibility check for when str comes in as "EPSG:XXX,EPSG:YYY"
String[] epsgCodes = gridSubsetsStr.split(",");
for (String code : epsgCodes) {
if (code.trim().length() == 0) {
continue;
}
try {
XMLGridSubset xmlGridSubset = new XMLGridSubset();
xmlGridSubset.setGridSetName(code);
gridSubsets.add(xmlGridSubset);
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Invalid GridSubset list: " + gridSubsetsStr);
}
}
gridSubsets.remove(null);
return gridSubsets;
}
代码示例来源:origin: GeoWebCache/geowebcache
static class CustomLayerImplementation {
private String name;
private String title;
private boolean isAuthorized;
private List<String> formats;
public CustomLayerImplementation(
String name, String title, boolean isAuthorized, List<String> formats) {
this.name = name;
this.title = title;
this.isAuthorized = isAuthorized;
this.formats = formats;
}
}
代码示例来源:origin: org.geoserver/gwc
XMLGridSubset xmlGridSubset = new XMLGridSubset();
String gridSetName = gridSet.getName();
xmlGridSubset.setGridSetName(gridSetName);
GridSubset gridSubSet = xmlGridSubset.getGridSubSet(broker);
subsets.put(gsetName, gridSubSet);
代码示例来源:origin: GeoWebCache/geowebcache
XMLGridSubset xmlGridSubset = new XMLGridSubset();
String gridSetName = gridSet.getName();
xmlGridSubset.setGridSetName(gridSetName);
GridSubset gridSubSet = xmlGridSubset.getGridSubSet(broker);
subsets.put(gsetName, gridSubSet);
代码示例来源:origin: org.geoserver/gwc
public void testMarshallingGridSubsets() {
List<XMLGridSubset> subsets = new ArrayList<XMLGridSubset>();
XMLGridSubset subset;
subset = new XMLGridSubset();
subset.setGridSetName("EPSG:4326");
subset.setZoomStart(1);
subset.setZoomStop(10);
subset.setExtent(new BoundingBox(0, 0, 180, 90));
subsets.add(subset);
subset = new XMLGridSubset();
subset.setGridSetName("EPSG:900913");
subsets.add(subset);
subset = new XMLGridSubset();
subset.setGridSetName("GlobalCRS84Scale");
subset.setZoomStart(4);
subset.setExtent(new BoundingBox(-100, -40, 100, 40));
subsets.add(subset);
info.getGridSubsets().add(subsets.get(0));
testMarshaling(info);
info.getGridSubsets().clear();
info.getGridSubsets().add(subsets.get(1));
testMarshaling(info);
info.getGridSubsets().clear();
info.getGridSubsets().add(subsets.get(2));
testMarshaling(info);
info.getGridSubsets().addAll(subsets);
testMarshaling(info);
}
代码示例来源:origin: GeoWebCache/geowebcache
XMLGridSubset xmlGridSubset = new XMLGridSubset();
String gridSetName = gridSet.getName();
xmlGridSubset.setGridSetName(gridSetName);
GridSubset gridSubSet = xmlGridSubset.getGridSubSet(broker);
subsets.put(gsetName, gridSubSet);
代码示例来源:origin: org.geoserver/gwc
/**
* Creates a default tile layer info based on the global defaults, public only for unit testing
* purposes.
*/
public static GeoServerTileLayerInfoImpl create(GWCConfig defaults) {
GeoServerTileLayerInfoImpl info = new GeoServerTileLayerInfoImpl();
info.setEnabled(defaults.isCacheLayersByDefault());
info.setAutoCacheStyles(defaults.isCacheNonDefaultStyles());
for (String gsetId : defaults.getDefaultCachingGridSetIds()) {
XMLGridSubset subset = new XMLGridSubset();
subset.setGridSetName(gsetId);
info.getGridSubsets().add(subset);
}
info.getMimeFormats().addAll(defaults.getDefaultOtherCacheFormats());
info.setGutter(defaults.getGutter());
info.setMetaTilingX(defaults.getMetaTilingX());
info.setMetaTilingY(defaults.getMetaTilingY());
return info;
}
代码示例来源:origin: org.geoserver/gs-gwc
/**
* Creates a default tile layer info based on the global defaults, public only for unit testing
* purposes.
*/
public static GeoServerTileLayerInfoImpl create(GWCConfig defaults) {
GeoServerTileLayerInfoImpl info = new GeoServerTileLayerInfoImpl();
info.setEnabled(defaults.isCacheLayersByDefault());
info.setAutoCacheStyles(defaults.isCacheNonDefaultStyles());
for (String gsetId : defaults.getDefaultCachingGridSetIds()) {
XMLGridSubset subset = new XMLGridSubset();
subset.setGridSetName(gsetId);
info.getGridSubsets().add(subset);
}
info.getMimeFormats().addAll(defaults.getDefaultOtherCacheFormats());
info.setGutter(defaults.getGutter());
info.setMetaTilingX(defaults.getMetaTilingX());
info.setMetaTilingY(defaults.getMetaTilingY());
info.setInMemoryCached(true);
return info;
}
代码示例来源:origin: GeoWebCache/geowebcache
XMLGridSubset xmlGridSubset = new XMLGridSubset();
String gridSetName = gridSet.getName();
xmlGridSubset.setGridSetName(gridSetName);
GridSubset gridSubSet = xmlGridSubset.getGridSubSet(broker);
subsets.put(gsetName, gridSubSet);
代码示例来源:origin: GeoWebCache/geowebcache
/** Builds an XMLGridSubset out of a {@link GridSubset} */
public XMLGridSubset(GridSubset sset) {
setGridSetName(sset.getName());
setExtent(
sset.getOriginalExtent() == null
? null
: new BoundingBox(sset.getOriginalExtent()));
setZoomStart(sset.getZoomStart());
setZoomStop(sset.getZoomStop());
setMinCachedLevel(sset.getMinCachedZoom());
setMaxCachedLevel(sset.getMaxCachedZoom());
}
代码示例来源:origin: GeoWebCache/geowebcache
/** Copy constructor */
public XMLGridSubset(XMLGridSubset sset) {
setGridSetName(sset.getGridSetName());
setExtent(sset.getExtent() == null ? null : new BoundingBox(sset.getExtent()));
setZoomStart(sset.getZoomStart());
setZoomStop(sset.getZoomStop());
setMinCachedLevel(sset.getMinCachedLevel());
setMaxCachedLevel(sset.getMaxCachedLevel());
}
代码示例来源:origin: org.geoserver/gwc
public void testGetGridSubsets() throws Exception {
layerInfoTileLayer = new GeoServerTileLayer(layerInfo, defaults, gridSetBroker);
Set<String> gridSubsets = layerInfoTileLayer.getGridSubsets();
assertNotNull(gridSubsets);
assertEquals(2, gridSubsets.size());
Set<XMLGridSubset> subsets = layerInfoTileLayer.getInfo().getGridSubsets();
subsets.clear();
XMLGridSubset xmlGridSubset = new XMLGridSubset();
xmlGridSubset.setGridSetName("EPSG:900913");
subsets.add(xmlGridSubset);
LegacyTileLayerInfoLoader.save(layerInfoTileLayer.getInfo(), layerInfo.getMetadata());
layerInfoTileLayer = new GeoServerTileLayer(layerInfo, defaults, gridSetBroker);
gridSubsets = layerInfoTileLayer.getGridSubsets();
assertNotNull(gridSubsets);
assertEquals(1, gridSubsets.size());
layerGroup.setBounds(layerInfo.getResource().getLatLonBoundingBox());
layerGroupInfoTileLayer = new GeoServerTileLayer(layerGroup, defaults, gridSetBroker);
gridSubsets = layerGroupInfoTileLayer.getGridSubsets();
assertNotNull(gridSubsets);
assertEquals(2, gridSubsets.size());
}
内容来源于网络,如有侵权,请联系作者删除!