public class WMTSHelper extends Object
Might have their substitution elsewhere
Constructor and Description |
---|
WMTSHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
appendQueryString(String baseUrl,
Map<String,String> params)
Append the parameters to the baseUrl.
|
static String |
encodeParameter(String name)
Encodes a parameter using UTF-8 encoding (suitable for URLs).
|
static String |
replaceToken(String baseUrl,
String dimName,
String dimValue)
Performs a case-insensitive replacement of the first occurrence of {dimName} with dimValue
within the baseUrl.
|
public static String replaceToken(String baseUrl, String dimName, String dimValue)
encodeParameter(String)
before passing into
this functionbaseUrl
- the string which contains {dimName}dimName
- the value in baseurl that needs to be replaced. Should NOT have the curly
braces around itdimValue
- the encoded value to replace {dimName} with. If this is null then a blank
string is usedpublic static String appendQueryString(String baseUrl, Map<String,String> params)
Add a ? mark if baseUrl doesn't have it.
Does not add existing parameters
If a value starts with {, it will avoid url-encoding
public static String encodeParameter(String name)
name
- The parameter to be encodedCopyright © 1996–2022 Geotools. All rights reserved.