opendap/src/main/java/opendap/dap/DConnect2.java
private String
    getCompleteCE(String proj, String sel)
    {
        if(proj != null && proj.length() == 0) proj = "";  // canonical
        if(sel != null && sel.length() == 0) sel = null;  // canonical
        StringBuilder buf = new StringBuilder();
        if(proj.startsWith("?"))
            buf.append(proj.substring(1));
        else
            buf.append(proj);
        if(sel != null) {
            if(sel.startsWith("&"))
                buf.append(sel);
            else {
                buf.append("&");
                buf.append(sel);
            }
        }
        return getCompleteCE(buf.toString());
    }
private String
    getCompleteCE(String proj, String sel)
    {
        if(proj != null && proj.length() == 0) proj = "";  // canonical
        if(sel != null && sel.length() == 0) sel = null;  // canonical
        StringBuilder buf = new StringBuilder();
        if(proj.startsWith("?"))
            buf.append(proj.substring(1));
        else
            buf.append(proj);
        if(sel != null) {
            if(sel.startsWith("&"))
                buf.append(sel);
            else {
                buf.append("&");
                buf.append(sel);
            }
        }
        return getCompleteCE(buf.toString());
    }
private String getCompleteCE ( String proj , String sel ) { if ( proj != null && proj . length ( ) == 0 ) proj = "" ; // canonical if ( sel != null && sel . length ( ) == 0 ) sel = null ; // canonical StringBuilder buf = new StringBuilder ( ) ; if ( proj . startsWith ( "?" ) ) buf . append ( proj . substring ( 1 ) ) ; else buf . append ( proj ) ; if ( sel != null ) { if ( sel . startsWith ( "&" ) ) buf . append ( sel ) ; else { buf . append ( "&" ) ; buf . append ( sel ) ; } } return getCompleteCE ( buf . toString ( ) ) ; }
ALternate interface to getCompleteCE(String ce)

@param proj the projection
@param sel  the selection
@return the combined constraint
ALternate interface to getCompleteCE ( String ce )