private void printXMLcore(PrintWriter pw, String pad, boolean constrained) {

        Enumeration e = getAttributeNames();
        while (e.hasMoreElements()) {
            String aName = (String) e.nextElement();

            Attribute a = getAttribute(aName);
            if(a!=null)
                a.printXML(pw, pad + "\t", constrained);

        }


        BaseType bt = null;

        PrimitiveVector pv = getPrimitiveVector();
        // *** Nathan, can we get rid of this 'if?' 05/15/03 jhrg
        //Coverity[IDENTICAL_BRANCHES]
        if (pv instanceof BaseTypePrimitiveVector) {
            bt = pv.getTemplate();
        } else {
            bt = pv.getTemplate();
        }

        String nameCache = bt.getEncodedName();

        bt.setEncodedName(null);

        bt.printXML(pw, pad + "\t", constrained);

        bt.setEncodedName(nameCache);

        Enumeration dae = getDimensions();
        while (dae.hasMoreElements()) {
            DArrayDimension dad = (DArrayDimension) dae.nextElement();
            int size = dad.getSize();
            String name = dad.getEncodedName();
            if (name == null) {
                pw.println(pad + "\t" + "<dimension size=\"" + size + "\"/>");
            } else {
                pw.println(pad + "\t" + "<dimension name=\"" +
                        DDSXMLParser.normalizeToXML(name) +
                        "\" size=\"" + size + "\"/>");
            }
        }
    }
private void printXMLcore ( PrintWriter pw , String pad , boolean constrained ) { Enumeration e = getAttributeNames ( ) ; while ( e . hasMoreElements ( ) ) { String aName = ( String ) e . nextElement ( ) ; Attribute a = getAttribute ( aName ) ; if ( a != null ) a . printXML ( pw , pad + "\t" , constrained ) ; } BaseType bt = null ; PrimitiveVector pv = getPrimitiveVector ( ) ; if ( pv instanceof BaseTypePrimitiveVector ) { bt = pv . getTemplate ( ) ; } else { bt = pv . getTemplate ( ) ; } String nameCache = bt . getEncodedName ( ) ; bt . setEncodedName ( null ) ; bt . printXML ( pw , pad + "\t" , constrained ) ; bt . setEncodedName ( nameCache ) ; Enumeration dae = getDimensions ( ) ; while ( dae . hasMoreElements ( ) ) { DArrayDimension dad = ( DArrayDimension ) dae . nextElement ( ) ; int size = dad . getSize ( ) ; String name = dad . getEncodedName ( ) ; if ( name == null ) { pw . println ( pad + "\t" + "<dimension size=\"" + size + "\"/>" ) ; } else { pw . println ( pad + "\t" + "<dimension name=\"" + DDSXMLParser . normalizeToXML ( name ) + "\" size=\"" + size + "\"/>" ) ; } } }
@param pw
@param pad
@param constrained
@opendap.ddx.experimental