opendap/src/main/java/opendap/dap/DDS.java
private void ingestAttributeTable(AttributeTable at, DConstructor dc) throws DASException
    {


        Enumeration ate = at.getNames();

        while (ate.hasMoreElements()) {

            String aName = (String) ate.nextElement();
            Attribute a = at.getAttribute(aName);
            boolean foundIt = false;

            Enumeration bte = dc.getVariables();
            while (bte.hasMoreElements()) {

                BaseType thisBT = (BaseType) bte.nextElement();
                String bName = thisBT.getEncodedName();

                if (bName.equals(aName)) {

                    if (a.isContainer() && thisBT instanceof DConstructor) {

                        ingestAttributeTable(a.getContainer(), (DConstructor) thisBT);
                    } else {
                        ingestAttribute(a, thisBT);
                    }
                    foundIt = true;
                }
            }

            if (!foundIt) {
                ingestAttribute(a, dc);
            }
        }

    }
private void ingestAttributeTable(AttributeTable at, DConstructor dc) throws DASException
    {


        Enumeration ate = at.getNames();

        while (ate.hasMoreElements()) {

            String aName = (String) ate.nextElement();
            Attribute a = at.getAttribute(aName);
            boolean foundIt = false;

            Enumeration bte = dc.getVariables();
            while (bte.hasMoreElements()) {

                BaseType thisBT = (BaseType) bte.nextElement();
                String bName = thisBT.getEncodedName();

                if (bName.equals(aName)) {

                    if (a.isContainer() && thisBT instanceof DConstructor) {

                        ingestAttributeTable(a.getContainer(), (DConstructor) thisBT);
                    } else {
                        ingestAttribute(a, thisBT);
                    }
                    foundIt = true;
                }
            }

            if (!foundIt) {
                ingestAttribute(a, dc);
            }
        }

    }
private void ingestAttributeTable ( AttributeTable at , DConstructor dc ) throws DASException { Enumeration ate = at . getNames ( ) ; while ( ate . hasMoreElements ( ) ) { String aName = ( String ) ate . nextElement ( ) ; Attribute a = at . getAttribute ( aName ) ; boolean foundIt = false ; Enumeration bte = dc . getVariables ( ) ; while ( bte . hasMoreElements ( ) ) { BaseType thisBT = ( BaseType ) bte . nextElement ( ) ; String bName = thisBT . getEncodedName ( ) ; if ( bName . equals ( aName ) ) { if ( a . isContainer ( ) && thisBT instanceof DConstructor ) { ingestAttributeTable ( a . getContainer ( ) , ( DConstructor ) thisBT ) ; } else { ingestAttribute ( a , thisBT ) ; } foundIt = true ; } } if ( ! foundIt ) { ingestAttribute ( a , dc ) ; } } }
A helper methods for ingestDAS().

@param at
@param dc
@throws DASException
@see #ingestDAS(DAS)
@see #ingestAttribute(Attribute, BaseType)
@see #ingestAttributeTable(AttributeTable, BaseType)
A helper methods for ingestDAS () .