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


        try {

            String atName = at.getEncodedName();
            String bName = bt.getEncodedName();
            //LogStream.out.println("ingestATTbl: atName:"+atName+" bName: "+bName);

            if (bName.equals(atName)) {

                //LogStream.out.println("adding each attribute!");
                Enumeration e = at.getNames();
                while (e.hasMoreElements()) {
                    String aName = (String) e.nextElement();
                    Attribute a = at.getAttribute(aName);

                    ingestAttribute(a, bt);
                }
            } else {
                //LogStream.out.println("addingcontainer!");
                bt.addAttributeContainer(at);
            }
        } catch (AttributeExistsException ase) {

            Enumeration e = at.getNames();
            while (e.hasMoreElements()) {
                String aName = (String) e.nextElement();
                Attribute a = at.getAttribute(aName);

                ingestAttribute(a, bt);
            }

        }

    }
private void ingestAttributeTable(AttributeTable at, BaseType bt) throws DASException
    {


        try {

            String atName = at.getEncodedName();
            String bName = bt.getEncodedName();
            //LogStream.out.println("ingestATTbl: atName:"+atName+" bName: "+bName);

            if (bName.equals(atName)) {

                //LogStream.out.println("adding each attribute!");
                Enumeration e = at.getNames();
                while (e.hasMoreElements()) {
                    String aName = (String) e.nextElement();
                    Attribute a = at.getAttribute(aName);

                    ingestAttribute(a, bt);
                }
            } else {
                //LogStream.out.println("addingcontainer!");
                bt.addAttributeContainer(at);
            }
        } catch (AttributeExistsException ase) {

            Enumeration e = at.getNames();
            while (e.hasMoreElements()) {
                String aName = (String) e.nextElement();
                Attribute a = at.getAttribute(aName);

                ingestAttribute(a, bt);
            }

        }

    }
A helper methods for ingestDAS().

@see #ingestDAS(DAS)
@see #ingestAttribute(Attribute, BaseType)
@see #ingestAttributeTable(AttributeTable, DConstructor)