protected DapDataset parseDMR ( String document ) throws DapException { // Parse the dmr Dap4Parser parser ; //if(USEDOM) parser = new DOM4Parser ( null ) ; //else // parser = new DOM4Parser(new DefaultDMRFactory()); if ( PARSEDEBUG ) parser . setDebugLevel ( 1 ) ; try { if ( ! parser . parse ( document ) ) throw new DapException ( "DMR Parse failed" ) ; } catch ( SAXException se ) { throw new DapException ( se ) ; } if ( parser . getErrorResponse ( ) != null ) throw new DapException ( "Error Response Document not supported" ) ; DapDataset result = parser . getDMR ( ) ; processAttributes ( result ) ; return result ; }
It is common to want to parse a DMR text to a DapDataset so provide this utility .