public class EscapeStrings extends Object
Constructor and Description |
---|
EscapeStrings() |
Modifier and Type | Method and Description |
---|---|
static String |
backslashEscape(String x,
String reservedChars)
backslash escape a string
|
static String |
backslashEscapeDapString(String s)
Given a DAP (attribute) string, insert backslashes
before '"' and '/' characters.
|
static String |
backslashToDAP(String bs)
Given a backslash escaped name,
convert to a DAP escaped name
|
static String |
backslashUnescape(String x)
backslash unescape a string
|
static String |
escapeDAPIdentifier(String s)
Define the DAP escape identifier function.
|
static String |
escapeOGC(String s)
Define the OGC Web Services escape function.
|
static String |
escapeURL(String url) |
static String |
escapeURLQuery(String ce)
Define the DEFINITIVE URL constraint expression escape function.
|
static int |
indexOf(String escapedName,
char c)
Find first occurence of char c in escapedName, excluding escaped c.
|
static void |
main(String[] args) |
static void |
main2(String[] args) |
static void |
mainOld(String[] args) |
static String |
normalizeToXML(String s) |
static void |
testOGC() |
static List<String> |
tokenizeEscapedName(String escapedName)
Tokenize an escaped name using "." as delimiter, skipping "\."
|
static String |
unescapeDAPIdentifier(String id)
Define the DEFINITIVE opendap identifier unescape function.
|
static String |
unescapeOGC(String s)
Define the OGC unescape function.
|
static String |
unescapeURL(String url)
Decode all of the parts of the url including query and fragment
|
static String |
unescapeURLQuery(String ce)
Define the DEFINITIVE URL constraint expression unescape function.
|
static String |
urlDecode(String s)
Define the DEFINITIVE URL unescape function.
|
public static org.slf4j.Logger log
protected static final String alpha
protected static final String numeric
protected static final String alphaNumeric
protected static final String httpclient_urllegal
protected static final String httpclient_querylegal
protected static final String httpclient_urlillegal
protected static final String httpclient_queryillegal
protected static final String nonAlphaNumeric
protected static final String queryReserved
protected static final String urlReserved
protected static final String urlDisallowed
protected static final String urlAllowed
protected static final String _allowableInUrl
protected static final String queryIdentDisallowed
protected static final String queryIdentAllowed
protected static final String _allowableInUrlQuery
protected static final String dapSpecAllowed
protected static final String _namAllowedInDAP
protected static final String _allowableInDAP
protected static final String _namAllowedInOGC
protected static final String _disallowedInOGC
protected static final String _allowableInOGC
protected static final String opendap_identifier_special_characters
protected static final String opendap_identifier_characters
protected static final char _URIEscape
public static String unescapeDAPIdentifier(String id)
id
- The identifier to unescape.public static String escapeURLQuery(String ce)
ce
- The expression to modify.public static String unescapeURLQuery(String ce)
ce
- The expression to unescape.public static String urlDecode(String s)
s
- The string to unescape.public static String unescapeURL(String url)
url
- the url to encodepublic static String escapeDAPIdentifier(String s)
s
- The string to encode.public static String escapeOGC(String s)
s
- The string to encode.public static void testOGC()
public static String unescapeOGC(String s)
s
- The string to unescape. bpublic static String backslashEscape(String x, String reservedChars)
x
- escape this; may be nullreservedChars
- these chars get a backslash in front of thempublic static String backslashUnescape(String x)
x
- unescape thispublic static List<String> tokenizeEscapedName(String escapedName)
escapedName
- an escaped namepublic static int indexOf(String escapedName, char c)
escapedName
- search in this stringc
- for this char but not \\chapublic static void main2(String[] args)
public static void main(String[] args)
public static String backslashToDAP(String bs)
bs
- the string to DAP encode; may have backslash escapesCopyright © 1999–2017 UCAR/Unidata. All rights reserved.