public class EscapeStrings
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
_allowableInDAP |
protected static java.lang.String |
_allowableInOGC |
protected static java.lang.String |
_allowableInUrl |
protected static java.lang.String |
_allowableInUrlQuery |
protected static char |
_JavaEscape |
protected static char |
_URIEscape |
protected static java.lang.String |
alpha |
protected static java.lang.String |
alphaNumeric |
protected static java.lang.String |
numeric |
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 |
escapeURL(java.lang.String url)
Deprecated.
do not use
|
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 java.lang.String |
normalizeToXML(java.lang.String s)
Deprecated.
do not use
|
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.
|
protected static final java.lang.String alpha
protected static final java.lang.String numeric
protected static final java.lang.String alphaNumeric
protected static final java.lang.String _allowableInUrl
protected static final java.lang.String _allowableInUrlQuery
protected static final java.lang.String _allowableInDAP
protected static final java.lang.String _allowableInOGC
protected static final char _URIEscape
protected static final char _JavaEscape
public static java.lang.String unescapeDAPIdentifier(java.lang.String id)
id
- The identifier to unescape.@Deprecated public static java.lang.String escapeURL(java.lang.String url)
public static java.lang.String escapeURLQuery(java.lang.String ce)
ce
- The expression to modify.public 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.public static java.lang.String unescapeURL(java.lang.String url)
url
- the url to encodepublic 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 void testOGC()
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 backslashUnescape(java.lang.String x)
x
- unescape thispublic static java.util.List<java.lang.String> tokenizeEscapedName(java.lang.String escapedName)
escapedName
- an escaped namepublic static int indexOf(java.lang.String escapedName, char c)
escapedName
- search in this stringc
- for this char but not \\cha@Deprecated public static java.lang.String normalizeToXML(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 backslashEscapeDapString(java.lang.String s)
public static java.lang.String backslashEscapeCDMString(java.lang.String s, java.lang.String toescape)