opendap/src/main/java/opendap/servers/SDGrid.java
public void printVal(PrintWriter os, String space, boolean print_decl_p) {

        if (!isProject())
            return;

        //System.out.println("\nSome Part of this object is projected...");

        if (print_decl_p) {
            printDecl(os, space, false, true);
            os.print(" = ");
        }

        boolean isStillGrid = projectionYieldsGrid(true);

        os.print("{ ");
        if (isStillGrid) os.print("ARRAY: ");

        if (((SDArray) arrayVar).isProject())
            arrayVar.printVal(os, "", false);

        if (isStillGrid) os.print(" MAPS: ");

        boolean firstPass = true;
        Enumeration e = mapVars.elements();
        while (e.hasMoreElements()) {

            SDArray sda = (SDArray) e.nextElement();

            if (((SDArray) sda).isProject()) {
                if (!firstPass) os.print(", ");
                sda.printVal(os, "", false);
                firstPass = false;
            }

        }
        os.print(" }");

        if (print_decl_p)
            os.println(";");

    }
public void printVal(PrintWriter os, String space, boolean print_decl_p) {

        if (!isProject())
            return;

        //System.out.println("\nSome Part of this object is projected...");

        if (print_decl_p) {
            printDecl(os, space, false, true);
            os.print(" = ");
        }

        boolean isStillGrid = projectionYieldsGrid(true);

        os.print("{ ");
        if (isStillGrid) os.print("ARRAY: ");

        if (((SDArray) arrayVar).isProject())
            arrayVar.printVal(os, "", false);

        if (isStillGrid) os.print(" MAPS: ");

        boolean firstPass = true;
        Enumeration e = mapVars.elements();
        while (e.hasMoreElements()) {

            SDArray sda = (SDArray) e.nextElement();

            if (((SDArray) sda).isProject()) {
                if (!firstPass) os.print(", ");
                sda.printVal(os, "", false);
                firstPass = false;
            }

        }
        os.print(" }");

        if (print_decl_p)
            os.println(";");

    }
public void printVal ( PrintWriter os , String space , boolean print_decl_p ) { if ( ! isProject ( ) ) return ; //System.out.println("\nSome Part of this object is projected..."); if ( print_decl_p ) { printDecl ( os , space , false , true ) ; os . print ( " = " ) ; } boolean isStillGrid = projectionYieldsGrid ( true ) ; os . print ( "{ " ) ; if ( isStillGrid ) os . print ( "ARRAY: " ) ; if ( ( ( SDArray ) arrayVar ) . isProject ( ) ) arrayVar . printVal ( os , "" , false ) ; if ( isStillGrid ) os . print ( " MAPS: " ) ; boolean firstPass = true ; Enumeration e = mapVars . elements ( ) ; while ( e . hasMoreElements ( ) ) { SDArray sda = ( SDArray ) e . nextElement ( ) ; if ( ( ( SDArray ) sda ) . isProject ( ) ) { if ( ! firstPass ) os . print ( ", " ) ; sda . printVal ( os , "" , false ) ; firstPass = false ; } } os . print ( " }" ) ; if ( print_decl_p ) os . println ( ";" ) ; }
Prints the value of the variable, with its declaration.  This
function is primarily intended for debugging OPeNDAP applications and
text-based clients such as geturl.
<p/>
<h2> Important Note</h2>
This method overrides the BaseType method of the same name and
type signature and it significantly changes the behavior for all versions
of <code>printVal()</code> for this type:
<b><i> All the various versions of printVal() will only
print a value, or a value with declaration, if the variable is
in the projection.</i></b>
<br>
<br>In other words, if a call to
<code>isProject()</code> for a particular variable returns
<code>true</code> then <code>printVal()</code> will print a value
(or a declaration and a value).
<br>
<br>If <code>isProject()</code> for a particular variable returns
<code>false</code> then <code>printVal()</code> is basically a No-Op.
<br>
<br>

@param os           the <code>PrintWriter</code> on which to print the value.
@param space        this value is passed to the <code>printDecl</code> method,
and controls the leading spaces of the output.
@param print_decl_p a boolean value controlling whether the
variable declaration is printed as well as the value.
@see BaseType#printVal(PrintWriter, String, boolean)
@see ServerMethods#isProject()
Prints the value of the variable with its declaration . This function is primarily intended for debugging OPeNDAP applications and text - based clients such as geturl . <p / > <h2 > Important Note< / h2 > This method overrides the BaseType method of the same name and type signature and it significantly changes the behavior for all versions of <code > printVal () < / code > for this type : <b > <i > All the various versions of printVal () will only print a value or a value with declaration if the variable is in the projection . < / i > < / b > <br > <br > In other words if a call to <code > isProject () < / code > for a particular variable returns <code > true< / code > then <code > printVal () < / code > will print a value ( or a declaration and a value ) . <br > <br > If <code > isProject () < / code > for a particular variable returns <code > false< / code > then <code > printVal () < / code > is basically a No - Op . <br > <br >