File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ public class Catalog extends DatasetNode {
3030 public static final String CATALOG_NAMESPACE_10 = "http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0" ;
3131 public static final Namespace defNS = Namespace .getNamespace (CATALOG_NAMESPACE_10 );
3232 public static final String NJ22_NAMESPACE = "http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" ;
33+ // The following line (and related code) handles incorrect HTTPS variant of NcML Namespace URI.
34+ // NOTE: The HTTPS variant is incorrect (according to recent, Oct 2021, decision).
35+ // The variant probably appeared when Unidata servers started requiring HTTPS.
36+ // NcML is only place HTTPS namespace variants are handled (and tested in testReadHttps.xml).
37+ // Should probably just be dropped.
3338 public static final String NJ22_NAMESPACE_HTTPS = "https://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" ;
3439 public static final Namespace ncmlNS = Namespace .getNamespace ("ncml" , NJ22_NAMESPACE );
3540 public static final Namespace ncmlNSHttps = Namespace .getNamespace ("ncml" , NJ22_NAMESPACE_HTTPS );
Original file line number Diff line number Diff line change 4343@ Deprecated
4444public class NcMLWriter {
4545 /**
46- * A default namespace constructed from the NcML URI: {@code https ://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2}.
46+ * A default namespace constructed from the NcML URI: {@code http ://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2}.
4747 */
4848 // A default namespace means that we can use it without having to prepend the "ncml:" prefix to every element name.
4949 // thredds.client.catalog.Catalog.ncmlNS is *not* default and therefore *does* require the prefix.
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public class NcmlWriter {
5757 private static final Logger log = LoggerFactory .getLogger (NcmlWriter .class );
5858
5959 /**
60- * A default namespace constructed from the NcML URI: {@code https ://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2}.
60+ * A default namespace constructed from the NcML URI: {@code http ://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2}.
6161 */
6262 // A default namespace means that we can use it without having to prepend the "ncml:" prefix to every element name.
6363 // thredds.client.catalog.Catalog.ncmlNS is *not* default and therefore *does* require the prefix.
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <!-- DO NOT Change namespace URI
3+ - Used to test handling of alternate/incorrect namespace URI.
4+ - (See note in Catalog.java.)
5+ -->
26<nc : netcdf xmlns : nc =" https://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"
37 location =" file:src/test/data/example1.nc" >
48
Original file line number Diff line number Diff line change @@ -266,7 +266,8 @@ public TestRead2(String name) {
266266
267267 static public class TestReadHttps extends TestNcmlRead {
268268
269- // equivalent dataset using "readMetadata"
269+ // Test handling of incorrect https variant of NcML namespace URI.
270+ // See note in Catalog.java.
270271 public TestReadHttps (String name ) {
271272 super (name );
272273 ncfile = null ;
You can’t perform that action at this time.
0 commit comments