Package ucar.nc2.dods

Class EscapeStringsDap


  • public class EscapeStringsDap
    extends Object
    Escape utilities for DAP
    • Constructor Detail

      • EscapeStringsDap

        public EscapeStringsDap()
    • Method Detail

      • backslashEscapeDapString

        public static String backslashEscapeDapString​(String s)
        Given a DAP (attribute) string, insert backslashes before '"' and '/' characters. This code also escapes control characters, although the spec does not call for it; make that code conditional.
      • backslashToDAP

        public static String backslashToDAP​(String bs)
        Given a backslash escaped name, convert to a DAP escaped name
        Parameters:
        bs - the string to DAP encode; may have backslash escapes
        Returns:
        escaped string
      • unescapeDAPIdentifier

        public static String unescapeDAPIdentifier​(String id)
        Define the DEFINITIVE opendap identifier unescape function.
        Parameters:
        id - The identifier to unescape.
        Returns:
        The unescaped identifier.
      • escapeDAPIdentifier

        public static String escapeDAPIdentifier​(String s)
        Define the DAP escape identifier function.
        Parameters:
        s - The string to encode.
        Returns:
        The escaped string.