@Test public void testValidateBaseUrl() { WMTSLayerParam params = new WMTSLayerParam(); params.requestEncoding = RequestEncoding.KVP; params.layer = "Layer"; params.baseURL = "http: assertTrue(params.validateBaseUrl()); params.requestEncoding = RequestEncoding.REST; params.matrixSet = "basemap"; params.baseURL = "http: assertFalse(params.validateBaseUrl()); params.requestEncoding = RequestEncoding.REST; params.matrixSet = "basemap"; params.baseURL = "http: ".com:1234/wmts/tiger-ny/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.tiff"; assertTrue(params.validateBaseUrl()); params.requestEncoding = RequestEncoding.REST; params.matrixSet = "basemap"; params.style = "default"; params.baseURL = "http: ".com:1234/wmts/tiger-ny/{style}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}" + ".tiff"; assertTrue(params.validateBaseUrl()); }
@Override public boolean validateBaseUrl() { String url = getBaseUrl(); if (StringUtils.isEmpty(url)) { return false; } if (RequestEncoding.REST == this.requestEncoding) { if (!containsVariables(url)) { LOGGER.warn("URL {} is missing some variables", url); return false; } try { WMTSLayer.createRestURI("matrix", 0, 0, this); return true; } catch (URISyntaxException exc) { LOGGER.warn("URL {} is invalid: {}", url, exc.getMessage()); return false; } } else { return super.validateBaseUrl(); } }
WMTSLayerParam extends AbstractWMXLayerParams { @Override public boolean validateBaseUrl() { String url = getBaseUrl(); if (StringUtils.isEmpty(url)) { return false; } if (RequestEncoding.REST == this.requestEncoding) { if (!containsVariables(url)) { LOGGER.warn("URL {} is missing some variables", url); return false; } try { WMTSLayer.createRestURI("matrix", 0, 0, this); return true; } catch (URISyntaxException exc) { LOGGER.warn("URL {} is invalid: {}", url, exc.getMessage()); return false; } } else { return super.validateBaseUrl(); } } }
WMTSLayerParam extends AbstractWMXLayerParams { @Override public boolean validateBaseUrl() { String url = getBaseUrl(); if (StringUtils.isEmpty(url)) { return false; } if (RequestEncoding.REST == this.requestEncoding) { if (!containsVariables(url)) { LOGGER.warn("URL {} is missing some variables", url); return false; } try { WMTSLayer.createRestURI("matrix", 0, 0, this); return true; } catch (URISyntaxException exc) { LOGGER.warn("URL {} is invalid: {}", url, exc.getMessage()); return false; } } else { return super.validateBaseUrl(); } }  }
WMTSLayerParam extends AbstractWMXLayerParams { @Override public boolean validateBaseUrl() { String url = getBaseUrl(); if (StringUtils.isEmpty(url)) { return false; } if (RequestEncoding.REST == this.requestEncoding) { if (!containsVariables(url)) { LOGGER.warn("URL {} is missing some variables", url); return false; } try { WMTSLayer.createRestURI("matrix", 0, 0, this); return true; } catch (URISyntaxException exc) { LOGGER.warn("URL {} is invalid: {}", url, exc.getMessage()); return false; } } else { return super.validateBaseUrl(); } }  @Override String getBaseUrl(); void postConstruct(); @Override String createCommonUrl(); @Override boolean validateBaseUrl(); }
WMTSLayerParam extends AbstractWMXLayerParams { @Override public boolean validateBaseUrl() { String url = getBaseUrl(); if (StringUtils.isEmpty(url)) { return false; } if (RequestEncoding.REST == this.requestEncoding) { if (!containsVariables(url)) { LOGGER.warn("URL {} is missing some variables", url); return false; } try { WMTSLayer.createRestURI("matrix", 0, 0, this); return true; } catch (URISyntaxException exc) { LOGGER.warn("URL {} is invalid: {}", url, exc.getMessage()); return false; } } else { return super.validateBaseUrl(); } }  @Override String getBaseUrl(); void postConstruct(); @Override String createCommonUrl(); @Override boolean validateBaseUrl(); public String baseURL; public String layer; @HasDefaultValue
    public String version; @HasDefaultValue
    public RequestEncoding requestEncoding; @HasDefaultValue
    public String style; @HasDefaultValue
    public String[] dimensions; @HasDefaultValue
    public PObject dimensionParams; @HasDefaultValue
    public String imageFormat; public String matrixSet; public Matrix[] matrices; }