gpt4 book ai didi

org.geowebcache.config.XMLGridSubset.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 14:23:05 26 4
gpt4 key购买 nike

本文整理了Java中org.geowebcache.config.XMLGridSubset.<init>()方法的一些代码示例,展示了XMLGridSubset.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLGridSubset.<init>()方法的具体详情如下:
包路径:org.geowebcache.config.XMLGridSubset
类名称:XMLGridSubset
方法名:<init>

XMLGridSubset.<init>介绍

[英]Empty constructor
[中]空构造函数

代码示例

代码示例来源:origin: GeoWebCache/geowebcache

@Override
public XMLGridSubset clone() {
  return new XMLGridSubset(this);
}

代码示例来源:origin: GeoWebCache/geowebcache

public enum HttpRequestMode {
  Get,
  FormPost;
}

代码示例来源:origin: org.geoserver/gwc

@Override
public void addGridSubset(GridSubset gridSubset) {
  XMLGridSubset gridSubsetInfo = new XMLGridSubset(gridSubset);
  Set<XMLGridSubset> gridSubsets = new HashSet<XMLGridSubset>(info.getGridSubsets());
  gridSubsets.add(gridSubsetInfo);
  info.setGridSubsets(gridSubsets);
  this.subSets = null;
}

代码示例来源: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

@Override
  public synchronized void addGridSubset(GridSubset gridSubset) {
    removeGridSubset(gridSubset.getName());
    gridSubsets.add(new XMLGridSubset(gridSubset));
    subSets.put(gridSubset.getName(), gridSubset);
  }
}

代码示例来源:origin: org.geoserver/gs-gwc

@Override
public void addGridSubset(GridSubset gridSubset) {
  XMLGridSubset gridSubsetInfo = new XMLGridSubset(gridSubset);
  if (gridSubset instanceof DynamicGridSubset) {
    gridSubsetInfo.setExtent(null);
  }
  Set<XMLGridSubset> gridSubsets = new HashSet<XMLGridSubset>(info.getGridSubsets());
  gridSubsets.add(gridSubsetInfo);
  info.setGridSubsets(gridSubsets);
  this.subSets = null;
}

代码示例来源: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: GeoWebCache/geowebcache

subSets.put(converted.getSRS().toString(), converted);
gridSubsets.add(new XMLGridSubset(converted));

代码示例来源:origin: org.geoserver/gwc

XMLGridSubset xmlGridSubset = new XMLGridSubset();
String gridSetName = gridSet.getName();
xmlGridSubset.setGridSetName(gridSetName);

代码示例来源:origin: GeoWebCache/geowebcache

XMLGridSubset xmlGridSubset = new XMLGridSubset();
String gridSetName = gridSet.getName();
xmlGridSubset.setGridSetName(gridSetName);

代码示例来源: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);

代码示例来源: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);

代码示例来源: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());
}

代码示例来源:origin: GeoWebCache/geowebcache

GridSubset actual = l.getGridSubset(expected.getName());
assertNotNull(actual);
assertEquals(new XMLGridSubset(expected), new XMLGridSubset(actual));

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com