File tree Expand file tree Collapse file tree
dap4/src/main/java/dap4/core/dmr/parser Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
2- * Copyright 2012, UCAR /Unidata.
3- * See the LICENSE file for more information.
2+ * Copyright (c) 2012-2026 University Corporation for Atmospheric Research /Unidata
3+ * See LICENSE for license information.
44 */
55
66package dap4 .core .dmr .parser ;
@@ -35,7 +35,8 @@ public class DOM4Parser implements Dap4Parser {
3535 // Constants
3636
3737 static final float DAPVERSION = 4.0f ;
38- static final float DMRVERSION = 1.0f ;
38+ static final float DMRVERSION_10 = 1.0f ;
39+ static final float DMRVERSION_20 = 2.0f ;
3940
4041 static final String DEFAULTATTRTYPE = "Int32" ;
4142
@@ -461,9 +462,9 @@ protected void parsedataset(Node rootnode) throws ParseException {
461462 try {
462463 ndmrversion = Float .parseFloat (dmrversion );
463464 } catch (NumberFormatException nfe ) {
464- ndmrversion = DMRVERSION ;
465+ ndmrversion = DMRVERSION_10 ;
465466 }
466- if (ndmrversion != DMRVERSION )
467+ if (ndmrversion != DMRVERSION_10 && ndmrversion != DMRVERSION_20 )
467468 throw new ParseException ("Dataset dmrVersion mismatch: " + dmrversion );
468469 this .root = factory .newDataset (name );
469470 this .root .setDapVersion (Float .toString (ndapversion ));
You can’t perform that action at this time.
0 commit comments