tds/src/main/java/thredds/server/opendap/GetHTMLInterfaceHandler2.java
public DDS getWebFormDDS(String dataSet, ServerDDS sDDS) // changed jc
            throws DAP2Exception, ParseException {

        // Get the DDS we need, using the getDDS method
        // for this particular server
        // ServerDDS sDDS = dServ.getDDS(dataSet);

        // Make a new DDS using the web form (www interface) class factory
        wwwFactory wfactory = new wwwFactory();
        DDS wwwDDS = new DDS(dataSet, wfactory);
        wwwDDS.setURL(dataSet);

        // Make a special print writer to catch the ServerDDS's
        // persistent representation in a String.
        StringWriter ddsSW = new StringWriter();
        sDDS.print(new PrintWriter(ddsSW));

        // Now use that string to make an input stream to
        // pass to our new DDS for parsing.

	// Since parser expects/requires InputStream,
	// we must adapt utf16 string to at least utf-8

	ByteArrayInputStream bai = null;
        try {
	    bai = new ByteArrayInputStream(ddsSW.toString().getBytes("UTF-8"));
	} catch (UnsupportedEncodingException uee) {
	    throw new DAP2Exception("UTF-8 encoding not supported");
	}
        wwwDDS.parse(bai);

        return (wwwDDS);


    }
public DDS getWebFormDDS(String dataSet, ServerDDS sDDS) // changed jc
            throws DAP2Exception, ParseException {

        // Get the DDS we need, using the getDDS method
        // for this particular server
        // ServerDDS sDDS = dServ.getDDS(dataSet);

        // Make a new DDS using the web form (www interface) class factory
        wwwFactory wfactory = new wwwFactory();
        DDS wwwDDS = new DDS(dataSet, wfactory);
        wwwDDS.setURL(dataSet);

        // Make a special print writer to catch the ServerDDS's
        // persistent representation in a String.
        StringWriter ddsSW = new StringWriter();
        sDDS.print(new PrintWriter(ddsSW));

        // Now use that string to make an input stream to
        // pass to our new DDS for parsing.

	// Since parser expects/requires InputStream,
	// we must adapt utf16 string to at least utf-8

	ByteArrayInputStream bai = null;
        try {
	    bai = new ByteArrayInputStream(ddsSW.toString().getBytes("UTF-8"));
	} catch (UnsupportedEncodingException uee) {
	    throw new DAP2Exception("UTF-8 encoding not supported");
	}
        wwwDDS.parse(bai);

        return (wwwDDS);


    }
public DDS getWebFormDDS ( String dataSet , ServerDDS sDDS ) // changed jc
 throws DAP2Exception , ParseException { // Get the DDS we need, using the getDDS method
 // for this particular server
 // ServerDDS sDDS = dServ.getDDS(dataSet);
 // Make a new DDS using the web form (www interface) class factory
 wwwFactory wfactory = new wwwFactory ( ) ; DDS wwwDDS = new DDS ( dataSet , wfactory ) ; wwwDDS . setURL ( dataSet ) ; // Make a special print writer to catch the ServerDDS's
 // persistent representation in a String.
 StringWriter ddsSW = new StringWriter ( ) ; sDDS . print ( new PrintWriter ( ddsSW ) ) ; // Now use that string to make an input stream to
 // pass to our new DDS for parsing.
 // Since parser expects/requires InputStream,
 // we must adapt utf16 string to at least utf-8
 ByteArrayInputStream bai = null ; try { bai = new ByteArrayInputStream ( ddsSW . toString ( ) . getBytes ( "UTF-8" ) ) ; } catch ( UnsupportedEncodingException uee ) { throw new DAP2Exception ( "UTF-8 encoding not supported" ) ; } wwwDDS . parse ( bai ) ; return ( wwwDDS ) ; }
************************************************************************
Gets a DDS for the specified data set and builds it using the class
factory in the package <b>opendap.servlet.www</b>.
<p/>
Currently this method uses a deprecated API to perform a translation
of DDS types. This is a known problem, and as soon as an alternate
way of achieving this result is identified we will implement it.
(Your comments appreciated!)

@param dataSet A <code>String</code> containing the data set name.
3     * @return A DDS object built using the www interface class factory.
@see opendap.dap.DDS
@see opendap.servlet.www.wwwFactory
************************************************************************ Gets a DDS for the specified data set and builds it using the class factory in the package <b > opendap . servlet . www< / b > . <p / > Currently this method uses a deprecated API to perform a translation of DDS types . This is a known problem and as soon as an alternate way of achieving this result is identified we will implement it . ( Your comments appreciated! )