public class EscapeStrings
extends java.lang.Object
Constructor and Description |
---|
EscapeStrings() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
backslashEscape(java.lang.String x,
java.lang.String reservedChars)
backslash escape a string
|
static java.lang.String |
backslashEscapeCDMString(java.lang.String s,
java.lang.String toescape)
Given a CDM string, insert backslashes before
|
static java.lang.String |
backslashEscapeDapString(java.lang.String s)
Given a DAP (attribute) string, insert backslashes before '"' and '/' characters.
|
static java.lang.String |
backslashToDAP(java.lang.String bs)
Given a backslash escaped name, convert to a DAP escaped name
|
static java.lang.String |
backslashUnescape(java.lang.String x)
backslash unescape a string
|
static java.lang.String |
escapeDAPIdentifier(java.lang.String s)
Define the DAP escape identifier function.
|
static java.lang.String |
escapeOGC(java.lang.String s)
Define the OGC Web Services escape function.
|
static java.lang.String |
escapeURLQuery(java.lang.String ce)
Define the DEFINITIVE URL constraint expression escape function.
|
static int |
indexOf(java.lang.String escapedName,
char c)
Find first occurence of char c in escapedName, excluding escaped c.
|
static void |
testOGC() |
static java.util.List<java.lang.String> |
tokenizeEscapedName(java.lang.String escapedName)
Tokenize an escaped name using "." as delimiter, skipping "\."
|
static java.lang.String |
unescapeDAPIdentifier(java.lang.String id)
Define the DEFINITIVE opendap identifier unescape function.
|
static java.lang.String |
unescapeURL(java.lang.String url)
Decode all of the parts of the url including query and fragment
|
static java.lang.String |
unescapeURLQuery(java.lang.String ce)
Define the DEFINITIVE URL constraint expression unescape function.
|
static java.lang.String |
urlDecode(java.lang.String s)
Define the DEFINITIVE URL unescape function.
|
public static java.lang.String backslashEscape(java.lang.String x, java.lang.String reservedChars)
x
- escape this; may be nullreservedChars
- these chars get a backslash in front of thempublic static java.lang.String backslashEscapeCDMString(java.lang.String s, java.lang.String toescape)
public static java.lang.String backslashEscapeDapString(java.lang.String s)
public static java.lang.String backslashToDAP(java.lang.String bs)
bs
- the string to DAP encode; may have backslash escapespublic static java.lang.String backslashUnescape(java.lang.String x)
x
- unescape thispublic static java.lang.String escapeDAPIdentifier(java.lang.String s)
s
- The string to encode.public static java.lang.String escapeOGC(java.lang.String s)
s
- The string to encode.public static java.lang.String escapeURLQuery(java.lang.String ce)
ce
- The expression to modify.public static int indexOf(java.lang.String escapedName, char c)
escapedName
- search in this stringc
- for this char but not \\chapublic static void testOGC()
public static java.util.List<java.lang.String> tokenizeEscapedName(java.lang.String escapedName)
escapedName
- an escaped namepublic static java.lang.String unescapeDAPIdentifier(java.lang.String id)
id
- The identifier to unescape.public static java.lang.String unescapeURL(java.lang.String url)
url
- the url to encodepublic static java.lang.String unescapeURLQuery(java.lang.String ce)
ce
- The expression to unescape.public static java.lang.String urlDecode(java.lang.String s)
s
- The string to unescape.