opendap/src/main/java/opendap/dap/DDS.java
public DAPNode cloneDAG(CloneMap map)
        throws CloneNotSupportedException
    {
            DDS d = (DDS) super.cloneDAG(map);
            d.vars = new Vector();
            for (int i = 0; i < vars.size(); i++) {
                BaseType element = (BaseType) vars.elementAt(i);
                d.vars.addElement(cloneDAG(map,element));
            }
            d.setEncodedName(this.getEncodedName());

            // Question:
            // What about copying the BaseTypeFactory?
            // Do we want a reference to the same one? Or another             // Is there a difference? Should we be building the clone
            // using "new DDS(getFactory())"??

            // Answer:
            // Yes. Use the same type factory!

            d.factory = this.factory;
            return d;
    }
public DAPNode cloneDAG(CloneMap map)
        throws CloneNotSupportedException
    {
            DDS d = (DDS) super.cloneDAG(map);
            d.vars = new Vector();
            for (int i = 0; i < vars.size(); i++) {
                BaseType element = (BaseType) vars.elementAt(i);
                d.vars.addElement(cloneDAG(map,element));
            }
            d.setEncodedName(this.getEncodedName());

            // Question:
            // What about copying the BaseTypeFactory?
            // Do we want a reference to the same one? Or another             // Is there a difference? Should we be building the clone
            // using "new DDS(getFactory())"??

            // Answer:
            // Yes. Use the same type factory!

            d.factory = this.factory;
            return d;
    }
Returns a clone of this <code>DDS</code>.
See DAPNode.cloneDag()

@param map track previously cloned nodes
@return a clone of this DDS.