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 |
backslashEscapeCDMString(String s,
String toescape)
Given a CDM string, insert backslashes before
|
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 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 |
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 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 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 String backslashToDAP(String bs)
bs
- the string to DAP encode; may have backslash escapespublic static String backslashEscapeDapString(String s)