/** * Return a variable name suitable for use in a DAP constraint expression. * [Original code seemed wrong because structures can be nested and hence * would have to use the full name just like non-structures] * * @param var The variable whose name will appear in the CE * @return The name in a form suitable for use in a cE */ static public String getDODSConstraintName(Variable var) { String vname = var.getDODSName(); // The vname is backslash escaped, so we need to // modify to use DAP %xx escapes. return EscapeStrings.backslashToDAP(vname); /* if (var instanceof DODSVariable) return ((DODSVariable) var).getDODSName(); else if (var instanceof DODSStructure) return ((DODSStructure) var).getDODSConstraintName(); else return null; */ }