From cc6686dbbf943be23f3e5a24901d74c2e63e6cc6 Mon Sep 17 00:00:00 2001 From: haileyajohnson Date: Tue, 12 Sep 2023 13:19:54 -0600 Subject: [PATCH 001/120] refactor skip if nc4 is not present to static utility spotless --- .../server/ncss/NcssGridIntegrationTest.java | 35 ++----------------- .../grid/GridDatasetControllerTest.java | 7 ++-- .../grid/SpatialSubsettingTest.java | 9 ++--- .../grid/TemporalSpaceSubsettingTest.java | 9 ++--- .../grid/VariableSpaceSubsettingTest.java | 9 ++--- .../point/TestStationFCController.java | 7 ++-- tds/src/test/java/thredds/util/TestUtils.java | 19 ++++++++++ 7 files changed, 32 insertions(+), 63 deletions(-) create mode 100644 tds/src/test/java/thredds/util/TestUtils.java diff --git a/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java b/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java index b52bbe9903..a9781efe9f 100644 --- a/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java +++ b/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java @@ -15,6 +15,7 @@ import thredds.test.util.TestOnLocalServer; import thredds.util.Constants; import thredds.util.ContentType; +import thredds.util.TestUtils; import ucar.httpservices.HTTPException; import ucar.httpservices.HTTPFactory; import ucar.httpservices.HTTPMethod; @@ -48,32 +49,6 @@ private void openBinaryNew(byte[] content, String gridName) throws IOException { } } - private void openBinaryOld(byte[] content, String gridName) throws IOException { - try (NetcdfFile nf = NetcdfFile.openInMemory("test_data.nc", content)) { - GridDataset gdsDataset = new GridDataset(new NetcdfDataset(nf)); - assertThat(gdsDataset.findGridByName(gridName)).isNotNull(); - logger.debug("{}", nf); - } - } - - /* - * @HttpTest(method = Method.GET, path = - * "ncss/grid/gribCollection/GFS_CONUS_80km/GFS_CONUS_80km_20120227_0000.grib1/GC?var=Temperature_isobaric&latitude=40&longitude=-102&vertCoord=225") - * public void checkGridAsPointXml() throws JDOMException, IOException { - * assertOk(response); - * String xml = response.getBody(String.class); - * logger.debug("xml={}", xml); - * Reader in = new StringReader(xml); - * SAXBuilder sb = new SAXBuilder(); - * Document doc = sb.build(in); - * - * XPathExpression xpath = XPathFactory.instance().compile("/grid/point/data[@name='Temperature_isobaric']", - * Filters.element()); - * List elements = xpath.evaluate(doc); - * assertEquals(1, elements.size()); - * } - */ - @Test public void checkGridForDifferentFormats() throws Exception { checkGrid(""); @@ -152,7 +127,7 @@ public void checkFmrcBest() throws Exception { // this fails when _ChunkSizes are left on @Test public void testNcssFailure() throws Exception { - skipTestIfNetCDF4NotPresent(); + TestUtils.skipTestIfNetCDF4NotPresent(); String filename = "scanCdmUnitTests/formats/netcdf4/COMPRESS_LEV2_20140201000000-GLOBCURRENT-L4-CURekm_15m-ERAWS_EEM-v02.0-fv01.0.nc"; @@ -168,7 +143,7 @@ public void testNcssFailure() throws Exception { @Test public void shouldReturnCorrectFileTypeForAcceptParameter() throws HTTPException { - skipTestIfNetCDF4NotPresent(); + TestUtils.skipTestIfNetCDF4NotPresent(); checkFileType("netcdf3", HttpServletResponse.SC_OK, ".nc"); checkFileType("netcdf", HttpServletResponse.SC_OK, ".nc"); @@ -197,8 +172,4 @@ private void checkFileType(String acceptParameter, int expectedResponseCode, Str } } } - - private static void skipTestIfNetCDF4NotPresent() { - assumeTrue(NetcdfClibrary.isLibraryPresent()); - } } diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/GridDatasetControllerTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/GridDatasetControllerTest.java index 0b35851c56..777fd5d544 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/GridDatasetControllerTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/GridDatasetControllerTest.java @@ -30,6 +30,7 @@ import thredds.mock.web.MockTdsContextLoader; import thredds.server.ncss.format.SupportedFormat; import thredds.util.Constants; +import thredds.util.TestUtils; import ucar.nc2.ffi.netcdf.NetcdfClibrary; import ucar.nc2.util.cache.FileCacheIF; import ucar.unidata.io.RandomAccessFile; @@ -78,7 +79,7 @@ public void getGridSubsetOnGridDataset() throws Exception { @Test @Category(NeedsCdmUnitTest.class) public void getGridSubsetOnGridDatasetNc4() throws Exception { - skipTestIfNetCDF4NotPresent(); + TestUtils.skipTestIfNetCDF4NotPresent(); RequestBuilder rb = MockMvcRequestBuilders.get("/ncss/grid/testGFSfmrc/GFS_CONUS_80km_nc_best.ncd") .servletPath("/ncss/grid/testGFSfmrc/GFS_CONUS_80km_nc_best.ncd") @@ -163,8 +164,4 @@ public boolean matches(Object item) { return value.endsWith(suffix); } } - - private static void skipTestIfNetCDF4NotPresent() { - assumeTrue(NetcdfClibrary.isLibraryPresent()); - } } diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/SpatialSubsettingTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/SpatialSubsettingTest.java index 46b823d1ee..e5ab46188d 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/SpatialSubsettingTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/SpatialSubsettingTest.java @@ -32,6 +32,7 @@ import thredds.server.ncss.controller.AbstractNcssController; import thredds.server.ncss.dataservice.DatasetHandlerAdapter; import thredds.server.ncss.format.SupportedFormat; +import thredds.util.TestUtils; import ucar.nc2.NetcdfFile; import ucar.nc2.NetcdfFiles; import ucar.nc2.dataset.NetcdfDataset; @@ -129,7 +130,7 @@ public void setUp() throws IOException { @Test public void shouldGetVariablesSubset() throws Exception { - skipTestIfNetCDF4NotPresent(); + TestUtils.skipTestIfNetCDF4NotPresent(format); // gridDataController.getGridSubset(params, validationResult, response); @@ -160,10 +161,4 @@ public static void showRequest(MockHttpServletRequest req) { } System.out.printf("%s%n%s%n", req.getRequestURI(), f); } - - private void skipTestIfNetCDF4NotPresent() { - if (format == SupportedFormat.NETCDF4) { - assumeTrue(NetcdfClibrary.isLibraryPresent()); - } - } } diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/TemporalSpaceSubsettingTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/TemporalSpaceSubsettingTest.java index d7867ec122..8fc6d108f4 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/TemporalSpaceSubsettingTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/TemporalSpaceSubsettingTest.java @@ -26,6 +26,7 @@ import thredds.mock.params.GridPathParams; import thredds.mock.web.MockTdsContextLoader; import thredds.server.ncss.format.SupportedFormat; +import thredds.util.TestUtils; import ucar.nc2.Dimension; import ucar.nc2.NetcdfFile; import ucar.nc2.NetcdfFiles; @@ -123,7 +124,7 @@ public void setUp() throws IOException { @Test public void shouldGetTimeRange() throws Exception { - skipTestIfNetCDF4NotPresent(); + TestUtils.skipTestIfNetCDF4NotPresent(format); MvcResult mvc = this.mockMvc.perform(requestBuilder).andReturn(); @@ -148,10 +149,4 @@ public void shouldGetTimeRange() throws Exception { assertEquals(lengthTimeDim, time.getLength()); } - - private void skipTestIfNetCDF4NotPresent() { - if (format == SupportedFormat.NETCDF4) { - assumeTrue(NetcdfClibrary.isLibraryPresent()); - } - } } diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/VariableSpaceSubsettingTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/VariableSpaceSubsettingTest.java index 53114f6cf9..413643b375 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/VariableSpaceSubsettingTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/VariableSpaceSubsettingTest.java @@ -29,6 +29,7 @@ import thredds.mock.params.GridPathParams; import thredds.mock.web.MockTdsContextLoader; import thredds.server.ncss.format.SupportedFormat; +import thredds.util.TestUtils; import ucar.nc2.NetcdfFile; import ucar.nc2.NetcdfFiles; import ucar.nc2.dataset.NetcdfDataset; @@ -127,7 +128,7 @@ public void setUp() throws IOException { @Test public void shouldGetVariablesSubset() throws Exception { - skipTestIfNetCDF4NotPresent(); + TestUtils.skipTestIfNetCDF4NotPresent(format); mockMvc.perform(requestBuilder).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(new ResultMatcher() { public void match(MvcResult result) throws Exception { @@ -151,10 +152,4 @@ public void match(MvcResult result) throws Exception { } }); } - - private void skipTestIfNetCDF4NotPresent() { - if (format == SupportedFormat.NETCDF4) { - assumeTrue(NetcdfClibrary.isLibraryPresent()); - } - } } diff --git a/tds/src/test/java/thredds/server/ncss/controller/point/TestStationFCController.java b/tds/src/test/java/thredds/server/ncss/controller/point/TestStationFCController.java index 31e1d97ce6..64e472f586 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/point/TestStationFCController.java +++ b/tds/src/test/java/thredds/server/ncss/controller/point/TestStationFCController.java @@ -31,6 +31,7 @@ import thredds.server.ncss.exception.FeaturesNotFoundException; import thredds.server.ncss.format.SupportedFormat; import thredds.util.ContentType; +import thredds.util.TestUtils; import ucar.nc2.ffi.netcdf.NetcdfClibrary; import ucar.unidata.util.test.category.NeedsCdmUnitTest; import java.lang.invoke.MethodHandles; @@ -61,7 +62,7 @@ public void setup() { @Test public void getClosestStationData() throws Exception { - skipTestIfNetCDF4NotPresent(); + TestUtils.skipTestIfNetCDF4NotPresent(); long start = System.currentTimeMillis(); RequestBuilder rb = MockMvcRequestBuilders.get(dataset).servletPath(dataset).param("longitude", "-105.203") @@ -167,9 +168,5 @@ public void noFeaturesInPointCollection() throws Exception { this.mockMvc.perform(rb).andExpect(MockMvcResultMatchers.status().isBadRequest()); } - - private static void skipTestIfNetCDF4NotPresent() { - assumeTrue(NetcdfClibrary.isLibraryPresent()); - } } diff --git a/tds/src/test/java/thredds/util/TestUtils.java b/tds/src/test/java/thredds/util/TestUtils.java new file mode 100644 index 0000000000..1895e99dbc --- /dev/null +++ b/tds/src/test/java/thredds/util/TestUtils.java @@ -0,0 +1,19 @@ +package thredds.util; + +import thredds.server.ncss.format.SupportedFormat; +import ucar.nc2.ffi.netcdf.NetcdfClibrary; + +import static org.junit.Assume.assumeTrue; + +public class TestUtils { + + public static void skipTestIfNetCDF4NotPresent(SupportedFormat format) { + if (format == SupportedFormat.NETCDF4) { + skipTestIfNetCDF4NotPresent(); + } + } + + public static void skipTestIfNetCDF4NotPresent() { + assumeTrue(NetcdfClibrary.isLibraryPresent()); + } +} From c2a5a697399a369456615e4dc6c05635bb271cdf Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 12 Sep 2023 14:22:23 -0600 Subject: [PATCH 002/120] Fix formatting --- .../src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md b/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md index 7842497457..076ddfc9fe 100644 --- a/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md +++ b/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md @@ -1,5 +1,5 @@ --- -title: TDS And `ncISO` - Metadata Services +title: TDS And ncISO - Metadata Services last_updated: 2020-08-26 sidebar: user_sidebar toc: false From c482aaa636472c6bb1e1d85495ed255f5a512024 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 12 Sep 2023 14:22:43 -0600 Subject: [PATCH 003/120] Update or remove broken links --- .../src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md b/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md index 076ddfc9fe..63610ffb93 100644 --- a/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md +++ b/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md @@ -6,13 +6,13 @@ toc: false permalink: iso_metadata.html --- -The TDS distribution includes the [ncISO](https://www.ngdc.noaa.gov/wiki/index.php/NcISO){:target="_blank"} package from NOAA/Environmental Data Management (many thanks to Dave Neufeld and Ted Habermann). +The TDS distribution includes the [ncISO](https://github.com/Unidata/threddsIso/){:target="_blank"} package from NOAA/Environmental Data Management (many thanks to Dave Neufeld and Ted Habermann). ## `ncISO` Services `ncISO` supports three new services for datasets: * `NCML`: an NcML representation of the dataset's structure and metadata; * `ISO`: an ISO 19115 metadata representation of the dataset; and -* `UDDC`: an evaluation of how well the metadata contained in the dataset conforms to the [NetCDF Attribute Convention for Data Discovery (NACDD)](https://www.unidata.ucar.edu/software/netcdf-java/v4.6/metadata/DataDiscoveryAttConvention.html){:target="_blank"} (see the [NOAA/EDM page on NACDD](http://wiki.esipfed.org/index.php/Category:Attribute_Conventions_Dataset_Discovery){:target="_blank"}). +* `UDDC`: an evaluation of how well the metadata contained in the dataset conforms to the NetCDF Attribute Convention for Data Discovery (NACDD) (see the [NOAA/EDM page on NACDD](http://wiki.esipfed.org/index.php/Category:Attribute_Conventions_Dataset_Discovery){:target="_blank"}). ## Enabling `ncISO` Services From 7d8214c0a0d0eb7274580a68d38d7b5906421b69 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 12 Sep 2023 14:36:26 -0600 Subject: [PATCH 004/120] Update viewer docs to say godiva3 instead of godiva2 and remove mention of IDV --- .../tds_configuration/AddingOgcIsoServices.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md b/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md index bb5b7544d7..ea100fd3d4 100644 --- a/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md +++ b/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md @@ -129,12 +129,11 @@ For instance, adding to the same compound service as above: 3. Select the `WCS` Access link 4. Go back, select the `WMS` Access link -5. Check Dataset Viewer Links for Godiva2 (ToolsUI and Godiva2 are there but IDV is not). +5. Check Dataset Viewer Links for Godiva3. ### Adding `Grid` DataType To Datasets -Once datasets are accessible over the `WMS` and `WCS` services, a quick look at the dataset pages shows several `Viewer` links available for each dataset (`ToolsUI` and `Godiva2`). -The IDV `Viewer` link is only added for datasets with a `Grid` data type. +Once datasets are accessible over the `WMS` and `WCS` services, a quick look at the dataset pages shows several `Viewer` links available for each dataset should include `Godiva3`. This is not whether the dataset is recognized by the `CDM` as gridded but rather if the metadata in the catalog indicates that the dataset is a `Grid`. This is accomplished with the `dataType` metadata element: @@ -153,7 +152,7 @@ This is accomplished with the `dataType` metadata element: $ ./startup.sh ~~~ -3. Check the dataset pages for the IDV Viewer link. +3. Check the dataset pages for the Godiva3 Viewer link. ### More `WMS` Configuration @@ -174,7 +173,7 @@ For long time-series, this list can cause the `GetCapabilities` document to be q ### Example: Modifying The `wmsConfig.xml` File -1. Open a dataset in Godiva2 and plot a parameter. +1. Open a dataset in Godiva3 and plot a parameter. 2. Notice the default color scale range is `[-50,50]`. Decide on a better color scale range. 3. Open the "`WMS` Detailed Configuration" page in your browser. @@ -186,7 +185,7 @@ For long time-series, this list can cause the `GetCapabilities` document to be q ~~~ and change the color scale range for the target parameter in the chosen dataset. -5. Reopen Godiva2 on the dataset and plot the target parameter. +5. Reopen Godiva3 on the dataset and plot the target parameter. Check the new default color scale range. ### Styling Features And Non-Standard Requests @@ -222,13 +221,13 @@ For long time-series, this list can cause the `GetCapabilities` document to be q * [IDL](https://www.harrisgeospatial.com/Software-Technology/IDL){:target="_blank"} (WMS) [commercial] * [gvSIG](http://www.gvsig.org/web/){:target="_blank"} (WMS and WCS) [free] -#### Godiva2 `WMS` Client +#### Godiva3 `WMS` Client -The Godiva2 `WMS` client is part of the `ncWMS` code base and as such is included in the TDS distribution. +The Godiva3 `WMS` client is part of the `ncWMS` code base and as such is included in the TDS distribution. It is a web application written in JavaScript using the OpenLayers library. -In the TDS, you can access the Godiva2 client from the `Viewers` section of all `WMS` accessible datasets. -The Godiva2 User Guide is available from the ncWMS site. +In the TDS, you can access the Godiva3 client from the `Viewers` section of all `WMS` accessible datasets. +The Godiva3 User Guide is available from the ncWMS site. {% include image.html file="tds/tutorial/tds_configuration/Godiva2_screenshot.png" alt="Godiva2" caption="" %} From 98396d66ad5962bda86f5691deb0b2c803f625f3 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 12 Sep 2023 14:40:22 -0600 Subject: [PATCH 005/120] Remove commented out text --- .../tds_tutorial/tds_configuration/AddingOgcIsoServices.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md b/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md index ea100fd3d4..d888017a64 100644 --- a/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md +++ b/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md @@ -230,9 +230,3 @@ In the TDS, you can access the Godiva3 client from the `Viewers` section of all The Godiva3 User Guide is available from the ncWMS site. {% include image.html file="tds/tutorial/tds_configuration/Godiva2_screenshot.png" alt="Godiva2" caption="" %} - - From 88a3cffc5cbd05835848ae57475f0af997fcd03c Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 12 Sep 2023 15:14:19 -0600 Subject: [PATCH 006/120] Reword slightly --- .../tds_tutorial/tds_configuration/AddingOgcIsoServices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md b/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md index d888017a64..806aec8ebd 100644 --- a/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md +++ b/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md @@ -133,7 +133,7 @@ For instance, adding to the same compound service as above: ### Adding `Grid` DataType To Datasets -Once datasets are accessible over the `WMS` and `WCS` services, a quick look at the dataset pages shows several `Viewer` links available for each dataset should include `Godiva3`. +Once datasets are accessible over the `WMS` and `WCS` services, a quick look at the dataset pages shows several `Viewer` links available for each dataset, including `Godiva3`. This is not whether the dataset is recognized by the `CDM` as gridded but rather if the metadata in the catalog indicates that the dataset is a `Grid`. This is accomplished with the `dataType` metadata element: From 10ed0a031e7b7f1d7bef62da03d2bc1c762abfaa Mon Sep 17 00:00:00 2001 From: Megan Lerman Date: Tue, 12 Sep 2023 16:18:22 -0700 Subject: [PATCH 007/120] encode URL for Godiva viewer --- .../main/java/thredds/server/wms/Godiva3Viewer.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tds/src/main/java/thredds/server/wms/Godiva3Viewer.java b/tds/src/main/java/thredds/server/wms/Godiva3Viewer.java index 4368bfae45..b0e323851e 100644 --- a/tds/src/main/java/thredds/server/wms/Godiva3Viewer.java +++ b/tds/src/main/java/thredds/server/wms/Godiva3Viewer.java @@ -28,8 +28,10 @@ package thredds.server.wms; +import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; +import java.net.URLEncoder; import javax.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,6 +41,7 @@ import thredds.server.config.ThreddsConfig; import thredds.server.viewer.Viewer; import thredds.server.viewer.ViewerLinkProvider; +import thredds.util.StringValidateEncodeUtils; /** * A Viewer for viewing datasets using the built-in Godiva3 client. The viewer @@ -89,7 +92,15 @@ public ViewerLinkProvider.ViewerLink getViewerLink(Dataset ds, HttpServletReques logger.warn("Godiva3Viewer URL=" + req.getRequestURL().toString(), e); return null; } - String url = req.getContextPath() + "/Godiva.html?server=" + dataURI.toString(); + String url; + try { + url = req.getContextPath() + "/Godiva.html?server=" + + URLEncoder.encode(dataURI.toString(), StringValidateEncodeUtils.CHARACTER_ENCODING_UTF_8); + } catch (UnsupportedEncodingException e) { + logger.warn("Godiva3Viewer URL=" + req.getRequestURL().toString(), e); + return null; + + } return new ViewerLinkProvider.ViewerLink(Godiva3Viewer.title, url, "", ViewerLinkProvider.ViewerLink.ViewerType.Browser); } From 357a2113bf511485af563ca28449335f03af4184 Mon Sep 17 00:00:00 2001 From: Megan Lerman Date: Tue, 12 Sep 2023 16:23:28 -0700 Subject: [PATCH 008/120] add test for encoding the Godiva viewer url --- .../thredds/server/wms/TestGodiva3Viewer.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tds/src/test/java/thredds/server/wms/TestGodiva3Viewer.java diff --git a/tds/src/test/java/thredds/server/wms/TestGodiva3Viewer.java b/tds/src/test/java/thredds/server/wms/TestGodiva3Viewer.java new file mode 100644 index 0000000000..bc83748537 --- /dev/null +++ b/tds/src/test/java/thredds/server/wms/TestGodiva3Viewer.java @@ -0,0 +1,40 @@ +package thredds.server.wms; + +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.mock.web.MockHttpServletRequest; +import thredds.client.catalog.Dataset; +import thredds.client.catalog.ServiceType; +import thredds.server.viewer.ViewerLinkProvider; +import thredds.util.StringValidateEncodeUtils; + +import java.io.UnsupportedEncodingException; +import java.lang.invoke.MethodHandles; +import java.net.URLDecoder; + +import static thredds.client.catalog.Dataset.makeStandalone; +import static com.google.common.truth.Truth.assertThat; + +public class TestGodiva3Viewer { + private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + @Test + public void testGodivaUrlEncode() throws UnsupportedEncodingException { + String filePath = "test/filenameWith+sign.nc"; + + Dataset ds = makeStandalone(filePath, "", "", ServiceType.WMS.name()); + + final String uri = "/thredds/catalog/catalog.html"; + final MockHttpServletRequest request = new MockHttpServletRequest("GET", uri); + + Godiva3Viewer viewer = new Godiva3Viewer(); + ViewerLinkProvider.ViewerLink link = viewer.getViewerLink(ds, request); + + String decodedUrl = URLDecoder.decode(link.getUrl(), StringValidateEncodeUtils.CHARACTER_ENCODING_UTF_8); + + assertThat(decodedUrl).endsWith(filePath); + + } + +} From 1d9c38bc83b9a763e6f5dbac695a417877fa287f Mon Sep 17 00:00:00 2001 From: Megan Lerman Date: Tue, 12 Sep 2023 16:52:05 -0700 Subject: [PATCH 009/120] add test for correct encoding jupyter notebooks with special characters in the file names --- .../server/notebook/TestNotebookService.java | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/tds/src/test/java/thredds/server/notebook/TestNotebookService.java b/tds/src/test/java/thredds/server/notebook/TestNotebookService.java index 8054f36727..0f81fa9c34 100644 --- a/tds/src/test/java/thredds/server/notebook/TestNotebookService.java +++ b/tds/src/test/java/thredds/server/notebook/TestNotebookService.java @@ -2,25 +2,35 @@ import static com.google.common.truth.Truth.assertThat; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.springframework.mock.web.MockHttpServletRequest; import thredds.client.catalog.Catalog; import thredds.client.catalog.Dataset; +import thredds.server.viewer.ViewerLinkProvider; +import thredds.util.StringValidateEncodeUtils; import ucar.nc2.constants.FeatureType; import java.io.File; import java.io.FileNotFoundException; +import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; +import java.net.URLDecoder; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; import java.util.HashMap; import java.util.Map; public class TestNotebookService { + private final String test_file = "src/test/data/testNotebookMetadata.json"; @Test public void testNotebookRegistration() throws NotebookMetadata.InvalidJupyterNotebookException, FileNotFoundException, URISyntaxException { - final String test_file = "src/test/data/testNotebookMetadata.json"; NotebookMetadata nbData = new NotebookMetadata(new File(test_file)); // dataset that matches by ID @@ -59,7 +69,6 @@ public void testNotebookRegistration() @Test public void testMatchByDatasetIdWithRegExp() throws NotebookMetadata.InvalidJupyterNotebookException, FileNotFoundException { - final String test_file = "src/test/data/testNotebookMetadata.json"; NotebookMetadata nbData = new NotebookMetadata(new File(test_file)); // dataset that matches by ID @@ -74,4 +83,36 @@ public void testMatchByDatasetIdWithRegExp() Dataset notAMatch = new Dataset(null, "not a match", fldsWithNotMatchingId, null, null); assertThat(nbData.isValidForDataset(notAMatch)).isFalse(); } + + + private static final String DIR = "src/test/content/thredds/public/testdata/"; + + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(new File(DIR)); + + @Test + public void testNotebookUrlEncode() + throws URISyntaxException, NotebookMetadata.InvalidJupyterNotebookException, IOException { + String parentUri = "/parent/catalog/by/URI"; + final String catalogUri = "/thredds/catalog/catalog.html"; + String filename = "file+name.json"; + File tempFile = temporaryFolder.newFile(filename); + Files.copy(Paths.get(test_file), tempFile.toPath(), StandardCopyOption.REPLACE_EXISTING); + NotebookMetadata nmd = new NotebookMetadata(tempFile); + + Map fldsWithId = new HashMap<>(); + fldsWithId.put(Dataset.Id, "matchById"); + Catalog parentCatalog = new Catalog(new URI(catalogUri), "Other parent name", new HashMap<>(), null); + Dataset dataset = new Dataset(parentCatalog, "match by parent catalog", fldsWithId, null, null); + + final MockHttpServletRequest request = new MockHttpServletRequest("GET", catalogUri); + + JupyterNotebookViewerService.JupyterNotebookViewer viewer = + new JupyterNotebookViewerService.JupyterNotebookViewer(nmd, parentUri); + ViewerLinkProvider.ViewerLink link = viewer.getViewerLink(dataset, request); + String decodedUrl = URLDecoder.decode(link.getUrl(), StringValidateEncodeUtils.CHARACTER_ENCODING_UTF_8); + + assertThat(decodedUrl).contains("filename=" + filename); + + } } From 8976d09724d3a79cf90473da6db7c960627de5d1 Mon Sep 17 00:00:00 2001 From: Megan Lerman Date: Wed, 13 Sep 2023 12:53:38 -0700 Subject: [PATCH 010/120] encode catalog and file names to accommodate special characters --- .../JupyterNotebookViewerService.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tds/src/main/java/thredds/server/notebook/JupyterNotebookViewerService.java b/tds/src/main/java/thredds/server/notebook/JupyterNotebookViewerService.java index e3b2a1cd6e..0b2b714100 100644 --- a/tds/src/main/java/thredds/server/notebook/JupyterNotebookViewerService.java +++ b/tds/src/main/java/thredds/server/notebook/JupyterNotebookViewerService.java @@ -1,13 +1,18 @@ package thredds.server.notebook; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import thredds.server.exception.MethodNotImplementedException; import thredds.client.catalog.Dataset; import thredds.core.StandardService; import thredds.server.viewer.Viewer; import thredds.server.viewer.ViewerLinkProvider; import thredds.server.viewer.ViewerService; +import thredds.util.StringValidateEncodeUtils; import javax.servlet.http.HttpServletRequest; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; import java.util.ArrayList; import java.util.Formatter; import java.util.List; @@ -67,6 +72,7 @@ private void buildViewerList() { } public static class JupyterNotebookViewer implements Viewer { + static private final Logger logger = LoggerFactory.getLogger(JupyterNotebookViewer.class); private static final ViewerLinkProvider.ViewerLink.ViewerType type = ViewerLinkProvider.ViewerLink.ViewerType.JupyterNotebook; @@ -100,8 +106,17 @@ public ViewerLinkProvider.ViewerLink getViewerLink(Dataset ds, HttpServletReques catUrl = catUrl.substring(catUrl.indexOf(catalogServiceBase) + catalogServiceBase.length()).replace("html", "xml"); - String url = req.getContextPath() + StandardService.jupyterNotebook.getBase() + ds.getID() + "?catalog=" + catUrl - + "&filename=" + notebook.getFilename(); + String requestQuery; + try { + requestQuery = "?" + "catalog=" + URLEncoder.encode(catUrl, StringValidateEncodeUtils.CHARACTER_ENCODING_UTF_8) + + "&filename=" + + URLEncoder.encode(notebook.getFilename(), StringValidateEncodeUtils.CHARACTER_ENCODING_UTF_8); + } catch (UnsupportedEncodingException e) { + logger.warn("JupyterNotebookViewer URL=" + req.getRequestURL().toString(), e); + return null; + } + String url = req.getContextPath() + StandardService.jupyterNotebook.getBase() + ds.getID() + requestQuery; + return new ViewerLinkProvider.ViewerLink(notebook.getFilename(), url, notebook.getDescription(), type); } } From 2dfaa604391dd5c503ff1f1d8c17d4a447939f0a Mon Sep 17 00:00:00 2001 From: Megan Lerman Date: Wed, 13 Sep 2023 14:09:56 -0700 Subject: [PATCH 011/120] clean up test --- .../server/notebook/TestNotebookService.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tds/src/test/java/thredds/server/notebook/TestNotebookService.java b/tds/src/test/java/thredds/server/notebook/TestNotebookService.java index 0f81fa9c34..f17eb4dab2 100644 --- a/tds/src/test/java/thredds/server/notebook/TestNotebookService.java +++ b/tds/src/test/java/thredds/server/notebook/TestNotebookService.java @@ -84,35 +84,34 @@ public void testMatchByDatasetIdWithRegExp() assertThat(nbData.isValidForDataset(notAMatch)).isFalse(); } - - private static final String DIR = "src/test/content/thredds/public/testdata/"; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(new File(DIR)); + public TemporaryFolder temporaryFolder = new TemporaryFolder(); @Test public void testNotebookUrlEncode() throws URISyntaxException, NotebookMetadata.InvalidJupyterNotebookException, IOException { String parentUri = "/parent/catalog/by/URI"; - final String catalogUri = "/thredds/catalog/catalog.html"; - String filename = "file+name.json"; - File tempFile = temporaryFolder.newFile(filename); + String catalogName = "my+catalog.xml"; + String catalogUri = "/thredds/catalog/" + catalogName; + String fileName = "file+name.json"; + + File tempFile = temporaryFolder.newFile(fileName); Files.copy(Paths.get(test_file), tempFile.toPath(), StandardCopyOption.REPLACE_EXISTING); - NotebookMetadata nmd = new NotebookMetadata(tempFile); + NotebookMetadata metadata = new NotebookMetadata(tempFile); Map fldsWithId = new HashMap<>(); fldsWithId.put(Dataset.Id, "matchById"); Catalog parentCatalog = new Catalog(new URI(catalogUri), "Other parent name", new HashMap<>(), null); Dataset dataset = new Dataset(parentCatalog, "match by parent catalog", fldsWithId, null, null); - - final MockHttpServletRequest request = new MockHttpServletRequest("GET", catalogUri); + MockHttpServletRequest request = new MockHttpServletRequest("GET", catalogUri); JupyterNotebookViewerService.JupyterNotebookViewer viewer = - new JupyterNotebookViewerService.JupyterNotebookViewer(nmd, parentUri); + new JupyterNotebookViewerService.JupyterNotebookViewer(metadata, parentUri); ViewerLinkProvider.ViewerLink link = viewer.getViewerLink(dataset, request); String decodedUrl = URLDecoder.decode(link.getUrl(), StringValidateEncodeUtils.CHARACTER_ENCODING_UTF_8); - assertThat(decodedUrl).contains("filename=" + filename); + assertThat(decodedUrl).contains("filename=" + fileName); + assertThat(decodedUrl).contains("catalog=" + catalogName); } } From 30d5ec414ae0e732a284db0407a39e8edbe95329 Mon Sep 17 00:00:00 2001 From: Megan Lerman Date: Wed, 13 Sep 2023 14:20:17 -0700 Subject: [PATCH 012/120] use contains instead of ends with --- tds/src/test/java/thredds/server/wms/TestGodiva3Viewer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds/src/test/java/thredds/server/wms/TestGodiva3Viewer.java b/tds/src/test/java/thredds/server/wms/TestGodiva3Viewer.java index bc83748537..11c457b80c 100644 --- a/tds/src/test/java/thredds/server/wms/TestGodiva3Viewer.java +++ b/tds/src/test/java/thredds/server/wms/TestGodiva3Viewer.java @@ -33,7 +33,7 @@ public void testGodivaUrlEncode() throws UnsupportedEncodingException { String decodedUrl = URLDecoder.decode(link.getUrl(), StringValidateEncodeUtils.CHARACTER_ENCODING_UTF_8); - assertThat(decodedUrl).endsWith(filePath); + assertThat(decodedUrl).contains(filePath); } From c17167015e707ab9129e2c14ea14f7c2fc4f45fa Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 19 Sep 2023 15:09:17 -0600 Subject: [PATCH 013/120] Update spring security bom --- tds-platform/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle index 8f986cea1d..60226a7bb6 100644 --- a/tds-platform/build.gradle +++ b/tds-platform/build.gradle @@ -15,7 +15,7 @@ dependencies { // at that point we can take things on a case-by-case basis. api enforcedPlatform("edu.ucar:netcdf-java-bom:${depVersion.netcdfJava}") api enforcedPlatform('org.springframework:spring-framework-bom:5.3.27') - api enforcedPlatform('org.springframework.security:spring-security-bom:5.7.10') + api enforcedPlatform('org.springframework.security:spring-security-bom:5.7.11') api platform('net.openhft:chronicle-bom:2.23.136') api enforcedPlatform("org.apache.logging.log4j:log4j-bom:2.17.1") api enforcedPlatform("jakarta.platform:jakarta.jakartaee-bom:8.0.0") From 520c12ade71535458dfe7c862b4120d482a58079 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 19 Sep 2023 15:15:37 -0600 Subject: [PATCH 014/120] Suppress CVE warning for quartz --- .../dependency-check-suppression.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/project-files/owasp-dependency-check/dependency-check-suppression.xml b/project-files/owasp-dependency-check/dependency-check-suppression.xml index 726e0d9e1e..08eba890ff 100644 --- a/project-files/owasp-dependency-check/dependency-check-suppression.xml +++ b/project-files/owasp-dependency-check/dependency-check-suppression.xml @@ -138,4 +138,12 @@ CVE-2020-15250 CVE-2021-28170 + + + ^pkg:maven/org\.quartz\-scheduler/quartz@.*$ + CVE-2023-39017 + From 9ecd848ec141927b3f5d4f3b2f631fa76430b923 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 20 Sep 2023 10:43:39 -0600 Subject: [PATCH 015/120] Do not include complete message with a FileNotFound exception-- it will be logged --- tds/src/main/java/thredds/server/TdsErrorHandling.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds/src/main/java/thredds/server/TdsErrorHandling.java b/tds/src/main/java/thredds/server/TdsErrorHandling.java index 996352e082..50bc975d77 100644 --- a/tds/src/main/java/thredds/server/TdsErrorHandling.java +++ b/tds/src/main/java/thredds/server/TdsErrorHandling.java @@ -85,7 +85,7 @@ public ResponseEntity handle(FileNotFoundException ex) { HttpHeaders responseHeaders = new HttpHeaders(); responseHeaders.setContentType(MediaType.TEXT_PLAIN); - return new ResponseEntity<>("FileNotFound: " + htmlEscape(ex.getMessage()), responseHeaders, HttpStatus.NOT_FOUND); + return new ResponseEntity<>("FileNotFound: No such file or directory", responseHeaders, HttpStatus.NOT_FOUND); } @ExceptionHandler(IOException.class) From 6d0f6015d86cc2dc55d80a8e21085c28702458f6 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 20 Sep 2023 09:38:33 -0600 Subject: [PATCH 016/120] Add ncml, iso, and uddc service tests --- .../server/metadata/TestMetadataServices.java | 46 ++ .../thredds/server/metadata/testgrid1.iso.xml | 152 ++++ .../server/metadata/testgrid1.ncml.xml | 27 + .../server/metadata/testgrid1.uddc.html | 719 ++++++++++++++++++ 4 files changed, 944 insertions(+) create mode 100644 tds/src/integrationTests/java/thredds/server/metadata/TestMetadataServices.java create mode 100644 tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.iso.xml create mode 100644 tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.ncml.xml create mode 100644 tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.uddc.html diff --git a/tds/src/integrationTests/java/thredds/server/metadata/TestMetadataServices.java b/tds/src/integrationTests/java/thredds/server/metadata/TestMetadataServices.java new file mode 100644 index 0000000000..04f2d2d840 --- /dev/null +++ b/tds/src/integrationTests/java/thredds/server/metadata/TestMetadataServices.java @@ -0,0 +1,46 @@ +package thredds.server.metadata; + +import static com.google.common.truth.Truth.assertWithMessage; + +import javax.servlet.http.HttpServletResponse; +import org.junit.Test; +import org.xmlunit.builder.DiffBuilder; +import org.xmlunit.builder.Input; +import org.xmlunit.diff.Diff; +import thredds.test.util.TestOnLocalServer; +import thredds.util.ContentType; + +public class TestMetadataServices { + @Test + public void shouldReturnNcml() { + final String path = "ncml/scanLocal/testgrid1.nc"; + final String expectedOutput = "testgrid1.ncml.xml"; + compare(path, expectedOutput, ContentType.xml); + } + + @Test + public void shouldReturnIso() { + final String path = "iso/scanLocal/testgrid1.nc"; + final String expectedOutput = "testgrid1.iso.xml"; + compare(path, expectedOutput, ContentType.xml); + } + + @Test + public void shouldReturnUddc() { + final String path = "uddc/scanLocal/testgrid1.nc"; + final String expectedOutput = "testgrid1.uddc.html"; + compare(path, expectedOutput, ContentType.html); + } + + private void compare(String path, String expectedOutputFilename, ContentType expectedType) { + final String endpoint = TestOnLocalServer.withHttpPath(path); + final byte[] response = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, expectedType); + + final Diff diff = DiffBuilder.compare(Input.fromStream(getClass().getResourceAsStream(expectedOutputFilename))) + .withTest(Input.fromByteArray(response)).ignoreComments().normalizeWhitespace() + // don't compare iso element with version and current datetime in it + .withNodeFilter(node -> !node.getTextContent().startsWith("This record was translated from NcML using")) + .build(); + assertWithMessage(diff.toString()).that(diff.hasDifferences()).isFalse(); + } +} diff --git a/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.iso.xml b/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.iso.xml new file mode 100644 index 0000000000..85f270d2a3 --- /dev/null +++ b/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.iso.xml @@ -0,0 +1,152 @@ + + + + + eng + + + UTF8 + + + dataset + + + + 2023-09-20 + + + ISO 19115-2 Geographic Information - Metadata Part 2 Extensions for imagery and gridded data + + + ISO 19115-2:2009(E) + + + + + + + + + + + + + + + eng + + + climatologyMeteorologyAtmosphere + + + + + + + 1 + + + -15.0 + + + -1.0 + + + 17.0 + + + 23.0 + + + + + + + + + + + + + + + + + var + + + + + double + + + + + + + + + + + + + + lat + + + + + float + + + + + + + + + + + + + + lon + + + + + float + + + + + + + + + + + + + + + This record was translated from NcML using UnidataDD2MI.xsl Version 2.3.4. (2023-09-20T09:43:59.594-06:00) + + + + diff --git a/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.ncml.xml b/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.ncml.xml new file mode 100644 index 0000000000..e92c4ebf09 --- /dev/null +++ b/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.ncml.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.uddc.html b/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.uddc.html new file mode 100644 index 0000000000..d088889a39 --- /dev/null +++ b/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.uddc.html @@ -0,0 +1,719 @@ + + + +

NetCDF Attribute Convention for Dataset Discovery Report

The Unidata Attribute Convention for Data Discovery provides recommendations for netCDF attributes that can be added to netCDF files to +facilitate discovery of those files using standard metadata searches. This tool tests conformance with those recommendations using this stylesheet. More Information on Convention and Tool.

Title:

+

Total Score: 8/46

+

General File Characteristics

+ + + + + + + + + + + + + + + + + + + + + +
Number of Global Attributes1
Number of Variables3
Number of Variable Attributes2
Number of Standard Names0
Number of Services0
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpiralNone1-33%34-66%67-99%All
+ Total + + X + + +
+ Identification + X + + + +
+ Text Search + X + + + +
+ Extent Search + + + X + +
+ Other Extent Information + + + X + +
+ Creator Search + X + + + +
+ Contributor Search + X + + + +
+ Publisher Search + X + + + +
+ Other Attributes + X + + + +
+Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes + +

Identification / Metadata Reference Score: 0/4

+

As metadata are shared between national and international repositories it is becoming increasing important to be able to unambiguously identify and refer to specific records. This is facilitated by including an identifier in + the metadata. Some mechanism must exist for ensuring that these identifiers are unique. This is accomplished by specifying the naming authority or namespace for the identifier. It is the responsibility of the manager of the + namespace to ensure that the identifiers in that namespace are unique. Identifying the Metadata Convention being used in the file and providing a link to more complete metadata, possibly using a different convention, are + also important.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 + id +
+
The combination of the "naming authority" and the "id" should be a globally unique identifier for the dataset.
+
dataset@id/gmi:MI_Metadata/gmd:fileIdentifier/gco:CharacterString
+
0 + naming_authority +
+
+ /gmi:MI_Metadata/gmd:fileIdentifier/gco:CharacterString
+
0Metadata_ConventionsThis attribute should be set to "Unidata Dataset Discovery v1.0" for NetCDF files that follow this convention. + +
0Metadata_Link or metadata_linkThis attribute provides a link to a complete metadata record for this dataset or the collection that contains this dataset. This attribute is not included in Version 1 of the Unidata Attribute + Convention for Data Discovery. It is recommended here because a complete metadata collection for a dataset will likely contain more information than can be included in granule formats. This attribute contains a + link to that information. + + +
+
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes + +

Text Search Score: 0/7

+

Text searches are a very important mechanism for data discovery. This group includes attributes that contain descriptive text that could be the target of these searches. Some of these attributes, for example title and + summary, might also be displayed in the results of text searches.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 + title +
+
A short description of the dataset.
+
dataset@name
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString
+
0 + summary +
+
A paragraph describing the dataset.
+
metadata/documentation[@type="summary"]
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString
+
0 + keywords +
+
A comma separated list of key words and phrases.
+
metadata/keyword
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString
+
0 + keywords_vocabulary +
+
If you are following a guideline for the words/phrases in your "keywords" attribute, put the name of that guideline here.
+
metadata/keyword@vocabulary/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString
+
0 + standard_name_vocabulary +
+
The name of the controlled vocabulary from which variable standard names are taken.
+
metadata/variables@vocabulary/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString
+
0 + history +
+
Provides an audit trail for modifications to the original data. + /gmi:MI_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString
0 + comment +
+
Miscellaneous information about the data.metadata/documentation
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:supplementalInformation
+
+
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes + +

Extent Search Score: 4/8

+

This basic extent information supports spatial/temporal searches that are increasingly important as the number of map based search interfaces increases. Many of the attributes included in this spiral can be calculated from + the data if the file is compliant with the NetCDF Climate and Forecast (CF) Metadata Convention.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ScoreAttributeDescriptionTHREDDSISO 19115-2
1 + geospatial_lat_min +
+
Describes a simple latitude, longitude, vertical and temporal bounding box. For a more detailed geospatial coverage, see the suggested geospatial attributes.
Further refinement of the geospatial bounding box can + be provided by using these units and resolution attributes.
+
+ Many of these extent attributes are calculated using the CF-Conventions. +
metadata/geospatialCoverage/northsouth/start
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal
+
1 + geospatial_lat_max + metadata/geospatialCoverage/northsouth/size/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal
+
1 + geospatial_lon_min + metadata/geospatialCoverage/eastwest/start/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal
+
1 + geospatial_lon_max + metadata/geospatialCoverage/eastwest/size/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal
+
0 + time_coverage_start + metadata/timeCoverage/start/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition
0 + time_coverage_end + metadata/timeCoverage/end/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition
0 + geospatial_vertical_min +
+
metadata/geospatialCoverage/updown/start/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:minimumValue/gco:Real
0 + geospatial_vertical_max + metadata/geospatialCoverage/updown/size/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:maximumValue/gco:Real
+Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes + +

Other Extent Information Score: 4/10

+

This information provides more details on the extent attributes than the basic information included in the Extent Spiral. Many of the attributes included in this spiral can be calculated from the data if the file is compliant + with the NetCDF Climate and Forecast (CF) Metadata Convention .

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ScoreAttributeDescriptionTHREDDSISO 19115-2
1 + geospatial_lon_units +
+
metadata/geospatialCoverage/eastwest/units/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure/@uom
1 + geospatial_lon_resolution + metadata/geospatialCoverage/eastwest/resolution/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure
1 + geospatial_lat_units +
+
metadata/geospatialCoverage/northsouth/units/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure/@uom
1 + geospatial_lat_resolution + metadata/geospatialCoverage/northsouth/resolution/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure
0 + geospatial_vertical_units +
+
metadata/geospatialCoverage/updown/units/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS
0 + geospatial_vertical_resolution +
+
metadata/geospatialCoverage/updown/resolution
+
0 + geospatial_vertical_positive +
+
metadata/geospatialCoverage@zpositive
+
0 + time_coverage_units + This attribute is calculated using the CF Conventions/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_GridSpatialRepresentation/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure/@uom.
0 + time_coverage_duration + metadata/timeCoverage/duration/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition provides an ISO8601 + compliant description of the time period covered by the dataset. This standard supports descriptions of durations.
0 + time_coverage_resolution + metadata/timeCoverage/resolution +
+Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes + +

Creator Search Score: 0/9

+

This group includes attributes that could support searches for people/institutions/projects that are responsible for datasets. This information is also critical for the correct attribution of the people and institutions that + produce datasets.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 + creator_name +
+
The data creator's name, URL, and email. The "institution" attribute will be used if the "creator_name" attribute does not exist.
+
metadata/creator/name
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString
+ CI_RoleCode="originator"
0 + creator_url +
+
metadata/creator/contact@url
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL
+
0 + creator_email +
+
metadata/creator/contact@email/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString
0 + institution +
+
metadata/creator/name/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString
0 + date_created + The date on which the data was created.
+
metadata/date[@type="created"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date
/gmd:dateType/gmd:CI_DateTypeCode="creation"
0 + date_modified +
+
The date on which this data was last modified.
+
metadata/date[@type="modified"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date
/gmd:dateType/gmd:CI_DateTypeCode="revision"
0 + date_issued +
+
The date on which this data was formally issued.
+
metadata/date[@type="issued"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date
/gmd:dateType/gmd:CI_DateTypeCode="publication"
0 + project +
+
The scientific project that produced the data.
+
metadata/project
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:aggregationInfo/gmd:MD_AggregateInformation/gmd:aggregateDataSetName/gmd:CI_Citation/gmd:title/gco:CharacterString
+ DS_AssociationTypeCode="largerWorkCitation" and DS_InitiativeTypeCode="project"
and/or
+ /gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString with gmd:MD_KeywordTypeCode="project"
0 + acknowledgment + A place to acknowledge various type of support for the project that produced this data.
+
metadata/documentation[@type="funding"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:credit/gco:CharacterString
+
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes + +

Contributor Search Score: 0/2

+

This section allows a data provider to include information about those that contribute to a data product in the metadata for the product. This is important for many reasons.

+ + + + + + + + + + + + + + + + + + + + + +
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 + contributor_name +
+
The name and role of any individuals or institutions that contributed to the creation of this data.
+
metadata/contributor
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString
+
0 + contributor_role +
+
metadata/contributor@role/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode
="principalInvestigator" | + "author"
+
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes + +

Publisher Search Score: 0/3

+

This section allows a data provider to include contact information for the publisher of a data product in the metadata for the product.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 + publisher_name +
+
The data publisher's name, URL, and email. The publisher may be an individual or an institution.metadata/publisher/name
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString
+ CI_RoleCode="publisher"
and/or
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString with + gmd:MD_KeywordTypeCode="dataCenter"
0 + publisher_url +
+
metadata/publisher/contact@url
+
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL
+ CI_RoleCode="publisher"
0 + publisher_email +
+
metadata/publisher/contact@email/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString
+ CI_RoleCode="publisher"
+
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes + +

Other Attributes Score: 0/3

+

This group includes attributes that don't seem to fit in the other categories.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 + processing_level + A textual description of the processing (or quality control) level of the data.
+
metadata/documentation[@type="processing_level"]
0 + license + Describe the restrictions to data access and distribution. metadata/documentation[@type="rights"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:useLimitation/gco:CharacterString
+
0 + cdm_data_type +
+
The THREDDS data type appropriate for this dataset.metadata/dataType/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode
May need some extensions to this codelist. Current values: + vector, grid, textTable, tin, stereoModel, video.
+
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes +
Rubric Version: 2.0
+More Information + From f54667e19e5163e73594bca44ffd9d78d4e11ef0 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 20 Sep 2023 11:10:04 -0600 Subject: [PATCH 017/120] Rename test and package --- .../TestThreddsIsoServices.java} | 4 ++-- .../thredds/server/{metadata => threddsIso}/testgrid1.iso.xml | 0 .../server/{metadata => threddsIso}/testgrid1.ncml.xml | 0 .../server/{metadata => threddsIso}/testgrid1.uddc.html | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename tds/src/integrationTests/java/thredds/server/{metadata/TestMetadataServices.java => threddsIso/TestThreddsIsoServices.java} (95%) rename tds/src/integrationTests/resources/thredds/server/{metadata => threddsIso}/testgrid1.iso.xml (100%) rename tds/src/integrationTests/resources/thredds/server/{metadata => threddsIso}/testgrid1.ncml.xml (100%) rename tds/src/integrationTests/resources/thredds/server/{metadata => threddsIso}/testgrid1.uddc.html (100%) diff --git a/tds/src/integrationTests/java/thredds/server/metadata/TestMetadataServices.java b/tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java similarity index 95% rename from tds/src/integrationTests/java/thredds/server/metadata/TestMetadataServices.java rename to tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java index 04f2d2d840..66de9cb1fc 100644 --- a/tds/src/integrationTests/java/thredds/server/metadata/TestMetadataServices.java +++ b/tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java @@ -1,4 +1,4 @@ -package thredds.server.metadata; +package thredds.server.threddsIso; import static com.google.common.truth.Truth.assertWithMessage; @@ -10,7 +10,7 @@ import thredds.test.util.TestOnLocalServer; import thredds.util.ContentType; -public class TestMetadataServices { +public class TestThreddsIsoServices { @Test public void shouldReturnNcml() { final String path = "ncml/scanLocal/testgrid1.nc"; diff --git a/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.iso.xml b/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.iso.xml similarity index 100% rename from tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.iso.xml rename to tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.iso.xml diff --git a/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.ncml.xml b/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.ncml.xml similarity index 100% rename from tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.ncml.xml rename to tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.ncml.xml diff --git a/tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.uddc.html b/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.uddc.html similarity index 100% rename from tds/src/integrationTests/resources/thredds/server/metadata/testgrid1.uddc.html rename to tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.uddc.html From 30e22a418bf5a1cae6109f42125221fe44e42e13 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 25 Sep 2023 11:42:48 -0600 Subject: [PATCH 018/120] Update tests to skip comparing dates in output --- .../threddsIso/TestThreddsIsoServices.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java b/tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java index 66de9cb1fc..89d7f4f8d9 100644 --- a/tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java +++ b/tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java @@ -4,9 +4,11 @@ import javax.servlet.http.HttpServletResponse; import org.junit.Test; +import org.w3c.dom.Node; import org.xmlunit.builder.DiffBuilder; import org.xmlunit.builder.Input; import org.xmlunit.diff.Diff; +import org.xmlunit.util.Predicate; import thredds.test.util.TestOnLocalServer; import thredds.util.ContentType; @@ -15,32 +17,36 @@ public class TestThreddsIsoServices { public void shouldReturnNcml() { final String path = "ncml/scanLocal/testgrid1.nc"; final String expectedOutput = "testgrid1.ncml.xml"; - compare(path, expectedOutput, ContentType.xml); + final Predicate filter = node -> !(node.hasAttributes() && node.getAttributes().getNamedItem("name") != null + && node.getAttributes().getNamedItem("name").getNodeValue().equals("metadata_creation")); + compare(path, expectedOutput, ContentType.xml, filter); } @Test public void shouldReturnIso() { final String path = "iso/scanLocal/testgrid1.nc"; final String expectedOutput = "testgrid1.iso.xml"; - compare(path, expectedOutput, ContentType.xml); + final Predicate filter = + node -> !node.getTextContent().startsWith("This record was translated from NcML using") + && !node.getNodeName().startsWith("gco:Date"); + compare(path, expectedOutput, ContentType.xml, filter); } @Test public void shouldReturnUddc() { final String path = "uddc/scanLocal/testgrid1.nc"; final String expectedOutput = "testgrid1.uddc.html"; - compare(path, expectedOutput, ContentType.html); + compare(path, expectedOutput, ContentType.html, node -> true); } - private void compare(String path, String expectedOutputFilename, ContentType expectedType) { + private void compare(String path, String expectedOutputFilename, ContentType expectedType, Predicate filter) { final String endpoint = TestOnLocalServer.withHttpPath(path); final byte[] response = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, expectedType); final Diff diff = DiffBuilder.compare(Input.fromStream(getClass().getResourceAsStream(expectedOutputFilename))) .withTest(Input.fromByteArray(response)).ignoreComments().normalizeWhitespace() - // don't compare iso element with version and current datetime in it - .withNodeFilter(node -> !node.getTextContent().startsWith("This record was translated from NcML using")) - .build(); + // don't compare elements with e.g. version/ current datetime + .withNodeFilter(filter).build(); assertWithMessage(diff.toString()).that(diff.hasDifferences()).isFalse(); } } From e69f5b251cae509c1fc0c2b0a024d1a66cab3258 Mon Sep 17 00:00:00 2001 From: haileyajohnson Date: Mon, 16 Oct 2023 08:46:04 -0700 Subject: [PATCH 019/120] upgrade json lib --- tds-platform/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle index 60226a7bb6..b413249d94 100644 --- a/tds-platform/build.gradle +++ b/tds-platform/build.gradle @@ -80,7 +80,7 @@ dependencies { runtime 'org.apache.logging.log4j:log4j-web' // tds - api 'org.json:json:20230227' + api 'org.json:json:20231013' api 'com.coverity.security:coverity-escapers:1.1.1' api 'org.thymeleaf:thymeleaf-spring5:3.1.2.RELEASE' api 'jakarta.validation:jakarta.validation-api' From 14414dbde924dfe8cd8907a04ea12e5126640937 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 12 Oct 2023 14:51:17 -0600 Subject: [PATCH 020/120] Revert creating threddsIso integration tests. Revert "Update tests to skip comparing dates in output" This reverts commit 30e22a418bf5a1cae6109f42125221fe44e42e13. Revert "Rename test and package" This reverts commit f54667e19e5163e73594bca44ffd9d78d4e11ef0. Revert "Add ncml, iso, and uddc service tests" This reverts commit 6d0f6015d86cc2dc55d80a8e21085c28702458f6. --- .../threddsIso/TestThreddsIsoServices.java | 52 -- .../server/threddsIso/testgrid1.iso.xml | 152 ---- .../server/threddsIso/testgrid1.ncml.xml | 27 - .../server/threddsIso/testgrid1.uddc.html | 719 ------------------ 4 files changed, 950 deletions(-) delete mode 100644 tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java delete mode 100644 tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.iso.xml delete mode 100644 tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.ncml.xml delete mode 100644 tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.uddc.html diff --git a/tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java b/tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java deleted file mode 100644 index 89d7f4f8d9..0000000000 --- a/tds/src/integrationTests/java/thredds/server/threddsIso/TestThreddsIsoServices.java +++ /dev/null @@ -1,52 +0,0 @@ -package thredds.server.threddsIso; - -import static com.google.common.truth.Truth.assertWithMessage; - -import javax.servlet.http.HttpServletResponse; -import org.junit.Test; -import org.w3c.dom.Node; -import org.xmlunit.builder.DiffBuilder; -import org.xmlunit.builder.Input; -import org.xmlunit.diff.Diff; -import org.xmlunit.util.Predicate; -import thredds.test.util.TestOnLocalServer; -import thredds.util.ContentType; - -public class TestThreddsIsoServices { - @Test - public void shouldReturnNcml() { - final String path = "ncml/scanLocal/testgrid1.nc"; - final String expectedOutput = "testgrid1.ncml.xml"; - final Predicate filter = node -> !(node.hasAttributes() && node.getAttributes().getNamedItem("name") != null - && node.getAttributes().getNamedItem("name").getNodeValue().equals("metadata_creation")); - compare(path, expectedOutput, ContentType.xml, filter); - } - - @Test - public void shouldReturnIso() { - final String path = "iso/scanLocal/testgrid1.nc"; - final String expectedOutput = "testgrid1.iso.xml"; - final Predicate filter = - node -> !node.getTextContent().startsWith("This record was translated from NcML using") - && !node.getNodeName().startsWith("gco:Date"); - compare(path, expectedOutput, ContentType.xml, filter); - } - - @Test - public void shouldReturnUddc() { - final String path = "uddc/scanLocal/testgrid1.nc"; - final String expectedOutput = "testgrid1.uddc.html"; - compare(path, expectedOutput, ContentType.html, node -> true); - } - - private void compare(String path, String expectedOutputFilename, ContentType expectedType, Predicate filter) { - final String endpoint = TestOnLocalServer.withHttpPath(path); - final byte[] response = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, expectedType); - - final Diff diff = DiffBuilder.compare(Input.fromStream(getClass().getResourceAsStream(expectedOutputFilename))) - .withTest(Input.fromByteArray(response)).ignoreComments().normalizeWhitespace() - // don't compare elements with e.g. version/ current datetime - .withNodeFilter(filter).build(); - assertWithMessage(diff.toString()).that(diff.hasDifferences()).isFalse(); - } -} diff --git a/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.iso.xml b/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.iso.xml deleted file mode 100644 index 85f270d2a3..0000000000 --- a/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.iso.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - eng - - - UTF8 - - - dataset - - - - 2023-09-20 - - - ISO 19115-2 Geographic Information - Metadata Part 2 Extensions for imagery and gridded data - - - ISO 19115-2:2009(E) - - - - - - - - - - - - - - - eng - - - climatologyMeteorologyAtmosphere - - - - - - - 1 - - - -15.0 - - - -1.0 - - - 17.0 - - - 23.0 - - - - - - - - - - - - - - - - - var - - - - - double - - - - - - - - - - - - - - lat - - - - - float - - - - - - - - - - - - - - lon - - - - - float - - - - - - - - - - - - - - - This record was translated from NcML using UnidataDD2MI.xsl Version 2.3.4. (2023-09-20T09:43:59.594-06:00) - - - - diff --git a/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.ncml.xml b/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.ncml.xml deleted file mode 100644 index e92c4ebf09..0000000000 --- a/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.ncml.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.uddc.html b/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.uddc.html deleted file mode 100644 index d088889a39..0000000000 --- a/tds/src/integrationTests/resources/thredds/server/threddsIso/testgrid1.uddc.html +++ /dev/null @@ -1,719 +0,0 @@ - - - -

NetCDF Attribute Convention for Dataset Discovery Report

The Unidata Attribute Convention for Data Discovery provides recommendations for netCDF attributes that can be added to netCDF files to -facilitate discovery of those files using standard metadata searches. This tool tests conformance with those recommendations using this stylesheet. More Information on Convention and Tool.

Title:

-

Total Score: 8/46

-

General File Characteristics

- - - - - - - - - - - - - - - - - - - - - -
Number of Global Attributes1
Number of Variables3
Number of Variable Attributes2
Number of Standard Names0
Number of Services0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpiralNone1-33%34-66%67-99%All
- Total - - X - - -
- Identification - X - - - -
- Text Search - X - - - -
- Extent Search - - - X - -
- Other Extent Information - - - X - -
- Creator Search - X - - - -
- Contributor Search - X - - - -
- Publisher Search - X - - - -
- Other Attributes - X - - - -
-Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Identification / Metadata Reference Score: 0/4

-

As metadata are shared between national and international repositories it is becoming increasing important to be able to unambiguously identify and refer to specific records. This is facilitated by including an identifier in - the metadata. Some mechanism must exist for ensuring that these identifiers are unique. This is accomplished by specifying the naming authority or namespace for the identifier. It is the responsibility of the manager of the - namespace to ensure that the identifiers in that namespace are unique. Identifying the Metadata Convention being used in the file and providing a link to more complete metadata, possibly using a different convention, are - also important.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 - id -
-
The combination of the "naming authority" and the "id" should be a globally unique identifier for the dataset.
-
dataset@id/gmi:MI_Metadata/gmd:fileIdentifier/gco:CharacterString
-
0 - naming_authority -
-
- /gmi:MI_Metadata/gmd:fileIdentifier/gco:CharacterString
-
0Metadata_ConventionsThis attribute should be set to "Unidata Dataset Discovery v1.0" for NetCDF files that follow this convention. - -
0Metadata_Link or metadata_linkThis attribute provides a link to a complete metadata record for this dataset or the collection that contains this dataset. This attribute is not included in Version 1 of the Unidata Attribute - Convention for Data Discovery. It is recommended here because a complete metadata collection for a dataset will likely contain more information than can be included in granule formats. This attribute contains a - link to that information. - - -
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Text Search Score: 0/7

-

Text searches are a very important mechanism for data discovery. This group includes attributes that contain descriptive text that could be the target of these searches. Some of these attributes, for example title and - summary, might also be displayed in the results of text searches.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 - title -
-
A short description of the dataset.
-
dataset@name
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString
-
0 - summary -
-
A paragraph describing the dataset.
-
metadata/documentation[@type="summary"]
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString
-
0 - keywords -
-
A comma separated list of key words and phrases.
-
metadata/keyword
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString
-
0 - keywords_vocabulary -
-
If you are following a guideline for the words/phrases in your "keywords" attribute, put the name of that guideline here.
-
metadata/keyword@vocabulary/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString
-
0 - standard_name_vocabulary -
-
The name of the controlled vocabulary from which variable standard names are taken.
-
metadata/variables@vocabulary/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString
-
0 - history -
-
Provides an audit trail for modifications to the original data. - /gmi:MI_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString
0 - comment -
-
Miscellaneous information about the data.metadata/documentation
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:supplementalInformation
-
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Extent Search Score: 4/8

-

This basic extent information supports spatial/temporal searches that are increasingly important as the number of map based search interfaces increases. Many of the attributes included in this spiral can be calculated from - the data if the file is compliant with the NetCDF Climate and Forecast (CF) Metadata Convention.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
1 - geospatial_lat_min -
-
Describes a simple latitude, longitude, vertical and temporal bounding box. For a more detailed geospatial coverage, see the suggested geospatial attributes.
Further refinement of the geospatial bounding box can - be provided by using these units and resolution attributes.
-
- Many of these extent attributes are calculated using the CF-Conventions. -
metadata/geospatialCoverage/northsouth/start
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal
-
1 - geospatial_lat_max - metadata/geospatialCoverage/northsouth/size/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal
-
1 - geospatial_lon_min - metadata/geospatialCoverage/eastwest/start/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal
-
1 - geospatial_lon_max - metadata/geospatialCoverage/eastwest/size/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal
-
0 - time_coverage_start - metadata/timeCoverage/start/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition
0 - time_coverage_end - metadata/timeCoverage/end/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition
0 - geospatial_vertical_min -
-
metadata/geospatialCoverage/updown/start/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:minimumValue/gco:Real
0 - geospatial_vertical_max - metadata/geospatialCoverage/updown/size/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:maximumValue/gco:Real
-Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Other Extent Information Score: 4/10

-

This information provides more details on the extent attributes than the basic information included in the Extent Spiral. Many of the attributes included in this spiral can be calculated from the data if the file is compliant - with the NetCDF Climate and Forecast (CF) Metadata Convention .

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
1 - geospatial_lon_units -
-
metadata/geospatialCoverage/eastwest/units/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure/@uom
1 - geospatial_lon_resolution - metadata/geospatialCoverage/eastwest/resolution/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure
1 - geospatial_lat_units -
-
metadata/geospatialCoverage/northsouth/units/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure/@uom
1 - geospatial_lat_resolution - metadata/geospatialCoverage/northsouth/resolution/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure
0 - geospatial_vertical_units -
-
metadata/geospatialCoverage/updown/units/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS
0 - geospatial_vertical_resolution -
-
metadata/geospatialCoverage/updown/resolution
-
0 - geospatial_vertical_positive -
-
metadata/geospatialCoverage@zpositive
-
0 - time_coverage_units - This attribute is calculated using the CF Conventions/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_GridSpatialRepresentation/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure/@uom.
0 - time_coverage_duration - metadata/timeCoverage/duration/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition provides an ISO8601 - compliant description of the time period covered by the dataset. This standard supports descriptions of durations.
0 - time_coverage_resolution - metadata/timeCoverage/resolution -
-Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Creator Search Score: 0/9

-

This group includes attributes that could support searches for people/institutions/projects that are responsible for datasets. This information is also critical for the correct attribution of the people and institutions that - produce datasets.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 - creator_name -
-
The data creator's name, URL, and email. The "institution" attribute will be used if the "creator_name" attribute does not exist.
-
metadata/creator/name
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString
- CI_RoleCode="originator"
0 - creator_url -
-
metadata/creator/contact@url
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL
-
0 - creator_email -
-
metadata/creator/contact@email/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString
0 - institution -
-
metadata/creator/name/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString
0 - date_created - The date on which the data was created.
-
metadata/date[@type="created"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date
/gmd:dateType/gmd:CI_DateTypeCode="creation"
0 - date_modified -
-
The date on which this data was last modified.
-
metadata/date[@type="modified"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date
/gmd:dateType/gmd:CI_DateTypeCode="revision"
0 - date_issued -
-
The date on which this data was formally issued.
-
metadata/date[@type="issued"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date
/gmd:dateType/gmd:CI_DateTypeCode="publication"
0 - project -
-
The scientific project that produced the data.
-
metadata/project
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:aggregationInfo/gmd:MD_AggregateInformation/gmd:aggregateDataSetName/gmd:CI_Citation/gmd:title/gco:CharacterString
- DS_AssociationTypeCode="largerWorkCitation" and DS_InitiativeTypeCode="project"
and/or
- /gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString with gmd:MD_KeywordTypeCode="project"
0 - acknowledgment - A place to acknowledge various type of support for the project that produced this data.
-
metadata/documentation[@type="funding"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:credit/gco:CharacterString
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Contributor Search Score: 0/2

-

This section allows a data provider to include information about those that contribute to a data product in the metadata for the product. This is important for many reasons.

- - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 - contributor_name -
-
The name and role of any individuals or institutions that contributed to the creation of this data.
-
metadata/contributor
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString
-
0 - contributor_role -
-
metadata/contributor@role/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode
="principalInvestigator" | - "author"
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Publisher Search Score: 0/3

-

This section allows a data provider to include contact information for the publisher of a data product in the metadata for the product.

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 - publisher_name -
-
The data publisher's name, URL, and email. The publisher may be an individual or an institution.metadata/publisher/name
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString
- CI_RoleCode="publisher"
and/or
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString with - gmd:MD_KeywordTypeCode="dataCenter"
0 - publisher_url -
-
metadata/publisher/contact@url
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL
- CI_RoleCode="publisher"
0 - publisher_email -
-
metadata/publisher/contact@email/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString
- CI_RoleCode="publisher"
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Other Attributes Score: 0/3

-

This group includes attributes that don't seem to fit in the other categories.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
0 - processing_level - A textual description of the processing (or quality control) level of the data.
-
metadata/documentation[@type="processing_level"]
0 - license - Describe the restrictions to data access and distribution. metadata/documentation[@type="rights"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:useLimitation/gco:CharacterString
-
0 - cdm_data_type -
-
The THREDDS data type appropriate for this dataset.metadata/dataType/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode
May need some extensions to this codelist. Current values: - vector, grid, textTable, tin, stereoModel, video.
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes -
Rubric Version: 2.0
-More Information - From 63a6e124a77bd48071991023429c5a384c21f249 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 12 Oct 2023 15:19:26 -0600 Subject: [PATCH 021/120] Remove threddsIso xsl files from TDS --- .../classes/resources/xsl/nciso/README.txt | 4 - .../resources/xsl/nciso/UnidataDD2MI.xsl | 1847 ----------------- .../xsl/nciso/UnidataDDCount-HTML.xsl | 1362 ------------ 3 files changed, 3213 deletions(-) delete mode 100644 tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/README.txt delete mode 100755 tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/UnidataDD2MI.xsl delete mode 100755 tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/UnidataDDCount-HTML.xsl diff --git a/tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/README.txt b/tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/README.txt deleted file mode 100644 index 65f9519d8d..0000000000 --- a/tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/README.txt +++ /dev/null @@ -1,4 +0,0 @@ -XSL documents placed here will be found before those in the threddsIso-*.jar file. -E.g.: -- UnidataDD2MI.xsl -- UnidataDDCount-HTML.xsl \ No newline at end of file diff --git a/tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/UnidataDD2MI.xsl b/tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/UnidataDD2MI.xsl deleted file mode 100755 index dacb43cce0..0000000000 --- a/tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/UnidataDD2MI.xsl +++ /dev/null @@ -1,1847 +0,0 @@ - - - - - Recent Modifications - 2015-04-22. v2.3.4. concat naming_authority and id in fileIdentifier; change XSLT version to 1.0. - 2015-02-18. resolution value = missing when not available in NcML. - 2015-01-16. fixed date error to prevent replacement of all spaces (' ') with a 'T' in the dates certain cases. - 2014-11-25. fixed error that was outputting '::' at the end of a date. - 2014-09-24. 1) Change all gmd:protocol entries of "http" to the valid entry of "WWW:LINK". There is no "http" valid in the list of gmd:protocol valids maintained at https://github.com/OSGeo/Cat-Interop/blob/master/LinkPropertyLookupTable2.csv. 2) gmd:protocol was missing from the NCDC climate and weather toolkit. I have added this entry with a value of "WWW:LINK". - 2014-09-05. 1) Adds gmd:protocol elements to all service end points (srv:SV_ServiceIdentification) identifying them as either OPeNDAP:OPeNDAP, UNIDATA:NCSS, OGC:WMS, OGC:WCS, or OGC:SOS--the appropriate valids from this list: https://github.com/OSGeo/Cat-Interop/blob/master/LinkPropertyLookupTable2.csv. 2) Add GCMD Location Keywords from THREDDS catalog metadata: all "geospatialCoverage > name" entries. 3) Adds each "viewer" entry from the THREDDS catalog metadata as an additional gmd:distributorTransferOptions. John Maurer jmaurer@hawaii.edu - 2014-07-24. test for null date and fixed another seconds since.... input. Translates UTC dates to ISO dateTime and 8601 basic dates to 8601 extended. - 2014-07-17. updated dimensionResolution to handle many but not all ISO 8601 durations - 2014-07-16. updated uom units for time to display only seconds or days when includes "days since..." or "seconds since..." text. - 2014-04-19. Changed order to look in CFMetadata group first in *unit variables. Added normalize-space dimensionResolution param to fix vertical units error. - 2012-05-11. 2.3 (slight revision): Changed the attribute name from coverage_type to coverage_content_type to be more correct and directly comparable to ISO.... - May 10, 2012 version 2.3 authored by Ted Habermann - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 - - 9 - - - - - - - - - - - - - 9 - - - - - 2 - - - - - - 3 - - - - 14 - - - - - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ISO 19115-2 Geographic Information - Metadata Part 2 Extensions for imagery and gridded data - - - ISO 19115-2:2009(E) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Unidata Common Data Model - - - - - - - - - - - - - - - - - - - - - - - - - - - - eng - - - climatologyMeteorologyAtmosphere - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OPeNDAP - - - - - - - - - - - - - - - - - - WWW:LINK - - - File Information - - - This URL provides a standard OPeNDAP html interface for selecting data from this dataset. Change the extension to .info for a description of the dataset. - - - download - - - - - - - - - - - - - - - - - - WWW:LINK - - - Viewer Information - - - This URL provides an NCDC climate and weather toolkit view of an OPeNDAP resource. - - - mapDigital - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WWW:LINK - - - - - - - - - - - - - - - - This URL provides a viewer for this dataset. - - - download - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This record was translated from NcML using UnidataDD2MI.xsl Version . () - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : - - : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : - - : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WWW:LINK - - - web browser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - missing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - seconds - days - - - - - - - - - - missing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tight - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - download - - - - - - - - - - diff --git a/tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/UnidataDDCount-HTML.xsl b/tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/UnidataDDCount-HTML.xsl deleted file mode 100755 index b197a14212..0000000000 --- a/tds/src/main/webapp/WEB-INF/classes/resources/xsl/nciso/UnidataDDCount-HTML.xsl +++ /dev/null @@ -1,1362 +0,0 @@ - - - - - Created on: April 14, 2011 - Author:ted.habermann@noaa.gov - Modified on: May 26, 2011 - Author:david.neufeld@noaa.gov - Modified on: October 6, 2011 - Author:ted.habermann@noaa.gov - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - 4 - - - - - - - - - - - - - - X - - - - - - - - X - - - - - - - - X - - - - - - - - X - - - - - - - - X - - - - - - - - - - - - - - 0 - 4 - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - - 5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 - - - - - - - - - - - - - - - 2 - - - - - - - - - - - - - - - - - - - - - 3 - - - 14 - - - - - - - - - - - - - - - - - - - - - 3 - - - - - - - -

NetCDF Attribute Convention for Dataset Discovery Report

- The Unidata Attribute Convention for Data Discovery provides recommendations for netCDF attributes that can be added to netCDF files to - facilitate discovery of those files using standard metadata searches. This tool tests conformance with those recommendations using this stylesheet. More Information on Convention and Tool.

Title: -

-

Total Score: /

-

General File Characteristics

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Number of Global Attributes - -
Number of Variables - -
Number of Variable Attributes - -
Number of Standard Names - -
Number of Services -
Longitude Variable(s) - - - , - ( - , - - :) - -
Latitude Variable - - , - ( - , - - :) -
Time Variable - - - , - ( - , - - :) - -
Vertical Variable - - - , - ( - , - - :) - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpiralNone1-33%34-66%67-99%All
- Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Identification / Metadata Reference Score: /

-

As metadata are shared between national and international repositories it is becoming increasing important to be able to unambiguously identify and refer to specific records. This is facilitated by including an identifier in - the metadata. Some mechanism must exist for ensuring that these identifiers are unique. This is accomplished by specifying the naming authority or namespace for the identifier. It is the responsibility of the manager of the - namespace to ensure that the identifiers in that namespace are unique. Identifying the Metadata Convention being used in the file and providing a link to more complete metadata, possibly using a different convention, are - also important.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
- id -
-
The combination of the "naming authority" and the "id" should be a globally unique identifier for the dataset.
-
dataset@id/gmi:MI_Metadata/gmd:fileIdentifier/gco:CharacterString
- naming_authority -
-
- /gmi:MI_Metadata/gmd:fileIdentifier/gco:CharacterString
Metadata_ConventionsThis attribute should be set to "Unidata Dataset Discovery v1.0" for NetCDF files that follow this convention. - -
Metadata_Link or metadata_linkThis attribute provides a link to a complete metadata record for this dataset or the collection that contains this dataset. This attribute is not included in Version 1 of the Unidata Attribute - Convention for Data Discovery. It is recommended here because a complete metadata collection for a dataset will likely contain more information than can be included in granule formats. This attribute contains a - link to that information. - -
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Text Search Score: /

-

Text searches are a very important mechanism for data discovery. This group includes attributes that contain descriptive text that could be the target of these searches. Some of these attributes, for example title and - summary, might also be displayed in the results of text searches.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
- title -
-
A short description of the dataset.
dataset@name
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString
- summary -
-
A paragraph describing the dataset.
-
metadata/documentation[@type="summary"]
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString
-
- keywords -
-
A comma separated list of key words and phrases.
-
metadata/keyword
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString
-
- keywords_vocabulary -
-
If you are following a guideline for the words/phrases in your "keywords" attribute, put the name of that guideline here.
-
metadata/keyword@vocabulary/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString
-
- standard_name_vocabulary -
-
The name of the controlled vocabulary from which variable standard names are taken.
-
metadata/variables@vocabulary/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString
- history -
-
Provides an audit trail for modifications to the original data. - /gmi:MI_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString
- comment -
-
Miscellaneous information about the data.metadata/documentation
-
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:supplementalInformation
-
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Extent Search Score: /

-

This basic extent information supports spatial/temporal searches that are increasingly important as the number of map based search interfaces increases. Many of the attributes included in this spiral can be calculated from - the data if the file is compliant with the NetCDF Climate and Forecast (CF) Metadata Convention.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
- geospatial_lat_min -
-
Describes a simple latitude, longitude, vertical and temporal bounding box. For a more detailed geospatial coverage, see the suggested geospatial attributes.
Further refinement of the geospatial bounding box can - be provided by using these units and resolution attributes.

Many of these extent attributes are calculated using the CF-Conventions. -
metadata/geospatialCoverage/northsouth/start
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal
- geospatial_lat_max - metadata/geospatialCoverage/northsouth/size/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal
- geospatial_lon_min - metadata/geospatialCoverage/eastwest/start/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal
- geospatial_lon_max - metadata/geospatialCoverage/eastwest/size/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal
- time_coverage_start - metadata/timeCoverage/start/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition
- time_coverage_end - metadata/timeCoverage/end/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition
- geospatial_vertical_min -
-
metadata/geospatialCoverage/updown/start/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:minimumValue/gco:Real
- geospatial_vertical_max - metadata/geospatialCoverage/updown/size/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:maximumValue/gco:Real
- Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Other Extent Information Score: /

-

This information provides more details on the extent attributes than the basic information included in the Extent Spiral. Many of the attributes included in this spiral can be calculated from the data if the file is compliant - with the NetCDF Climate and Forecast (CF) Metadata Convention .

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
- geospatial_lon_units -
-
metadata/geospatialCoverage/eastwest/units/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure/@uom
- geospatial_lon_resolution - metadata/geospatialCoverage/eastwest/resolution/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure
- geospatial_lat_units -
-
metadata/geospatialCoverage/northsouth/units/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure/@uom
- geospatial_lat_resolution - metadata/geospatialCoverage/northsouth/resolution/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_Georectified/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure
- geospatial_vertical_units -
-
metadata/geospatialCoverage/updown/units/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS
- geospatial_vertical_resolution -
-
metadata/geospatialCoverage/updown/resolution
- geospatial_vertical_positive -
-
metadata/geospatialCoverage@zpositive
- time_coverage_units - This attribute is calculated using the CF Conventions/gmi:MI_Metadata/gmd:spatialRepresentationInfo/gmd:MD_GridSpatialRepresentation/gmd:axisDimensionProperties/gmd:MD_Dimension/gmd:resolution/gco:Measure/@uom.
- time_coverage_duration - metadata/timeCoverage/duration/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition provides an ISO8601 - compliant description of the time period covered by the dataset. This standard supports descriptions of durations.
- time_coverage_resolution - metadata/timeCoverage/resolution -
- Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Creator Search Score: /

-

This group includes attributes that could support searches for people/institutions/projects that are responsible for datasets. This information is also critical for the correct attribution of the people and institutions that - produce datasets.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
- creator_name -
-
The data creator's name, URL, and email. The "institution" attribute will be used if the "creator_name" attribute does not exist.
metadata/creator/name
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString
- CI_RoleCode="originator"
- creator_url -
-
metadata/creator/contact@url
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL
- creator_email -
-
metadata/creator/contact@email/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString
- institution -
-
metadata/creator/name/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString
- date_created - The date on which the data was created.
metadata/date[@type="created"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date
/gmd:dateType/gmd:CI_DateTypeCode="creation"
- date_modified -
-
The date on which this data was last modified.
metadata/date[@type="modified"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date
/gmd:dateType/gmd:CI_DateTypeCode="revision"
- date_issued -
-
The date on which this data was formally issued.
metadata/date[@type="issued"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date
/gmd:dateType/gmd:CI_DateTypeCode="publication"
- project -
-
The scientific project that produced the data.
metadata/project
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:aggregationInfo/gmd:MD_AggregateInformation/gmd:aggregateDataSetName/gmd:CI_Citation/gmd:title/gco:CharacterString
- DS_AssociationTypeCode="largerWorkCitation" and DS_InitiativeTypeCode="project"
and/or
- /gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString with gmd:MD_KeywordTypeCode="project"
- acknowledgment - A place to acknowledge various type of support for the project that produced this data.
metadata/documentation[@type="funding"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:credit/gco:CharacterString
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Contributor Search Score: /

-

This section allows a data provider to include information about those that contribute to a data product in the metadata for the product. This is important for many reasons.

- - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
- contributor_name -
-
The name and role of any individuals or institutions that contributed to the creation of this data.
metadata/contributor
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString
- contributor_role -
-
metadata/contributor@role/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode
="principalInvestigator" | - "author"
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Publisher Search Score: /

-

This section allows a data provider to include contact information for the publisher of a data product in the metadata for the product.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
- publisher_name -
-
The data publisher's name, URL, and email. The publisher may be an individual or an institution.metadata/publisher/name
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString
- CI_RoleCode="publisher"
and/or
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString with - gmd:MD_KeywordTypeCode="dataCenter"
- publisher_url -
-
metadata/publisher/contact@url
/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL
- CI_RoleCode="publisher"
- publisher_email -
-
metadata/publisher/contact@email/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString
- CI_RoleCode="publisher"
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes - -

Other Attributes Score: /

-

This group includes attributes that don't seem to fit in the other categories.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScoreAttributeDescriptionTHREDDSISO 19115-2
- processing_level - A textual description of the processing (or quality control) level of the data.
metadata/documentation[@type="processing_level"]
- license - Describe the restrictions to data access and distribution. metadata/documentation[@type="rights"]/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:useLimitation/gco:CharacterString
- cdm_data_type -
-
The THREDDS data type appropriate for this dataset.metadata/dataType/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode
May need some extensions to this codelist. Current values: - vector, grid, textTable, tin, stereoModel, video.
-
Identification | Text Search | Extent Search | Other Extent Information | Creator Search | Contributor Search | Publisher Search | Other Attributes -
Rubric Version:
- More Information - -
- - - - 1 - 0 - - -
From e650ac18d18115789366ceb7351816f86dd3b329 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 12 Oct 2023 15:50:36 -0600 Subject: [PATCH 022/120] Remove threddsIso from gradle dependencies --- tds-platform/build.gradle | 6 +----- tds-testing-platform/build.gradle | 4 ---- tds/build.gradle | 7 ++----- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle index b413249d94..eeb1643374 100644 --- a/tds-platform/build.gradle +++ b/tds-platform/build.gradle @@ -88,6 +88,7 @@ dependencies { api "org.hibernate.validator:hibernate-validator-annotation-processor:${depVersion.hibernateValidator}" api 'jakarta.el:jakarta.el-api' runtime 'org.glassfish:javax.el:3.0.0' + runtime "jaxen:jaxen:${depVersion.jaxen}" // waterml stuff api 'org.apache.xmlbeans:xmlbeans' @@ -105,11 +106,6 @@ dependencies { // gwt version defined in gradle/any/shared-mvn-coords.gradle, accessible via gradle/any/dependencies.gradle api "com.google.gwt:gwt-dev:${depVersion.gwt}" api "com.google.gwt:gwt-user:${depVersion.gwt}" - - // threddsIso - runtime 'EDS:tds-plugin:2.4.6-SNAPSHOT' - runtime 'net.sf.saxon:Saxon-HE:9.7.0-8' - runtime "jaxen:jaxen:${depVersion.jaxen}" } } diff --git a/tds-testing-platform/build.gradle b/tds-testing-platform/build.gradle index ec36c75a3e..7f94373263 100644 --- a/tds-testing-platform/build.gradle +++ b/tds-testing-platform/build.gradle @@ -28,10 +28,6 @@ dependencies { // defined in tds-platform as well, but using runtime config api 'org.apache.logging.log4j:log4j-web' // api because of :dap4:d4tests) - // threddsIso - api 'EDS:tds-plugin:2.4.0-SNAPSHOT' // api because of :it - api 'net.sf.saxon:Saxon-HE:9.7.0-8' // api because of :it - // tds api "jaxen:jaxen:${depVersion.jaxen}" // api because of XPath operations in mock tests diff --git a/tds/build.gradle b/tds/build.gradle index ed0bcdb49e..1d07b94b79 100644 --- a/tds/build.gradle +++ b/tds/build.gradle @@ -66,6 +66,8 @@ dependencies { // Needed for XPath operations in mock tests testCompile 'jaxen:jaxen' + // Needed for XPaths in WmsDetailedConfig + runtime 'jaxen:jaxen' // edal ncwms related libs compile('uk.ac.rdg.resc:edal-common') @@ -74,11 +76,6 @@ dependencies { compile ('uk.ac.rdg.resc:edal-wms') compile('uk.ac.rdg.resc:edal-godiva') - // threddsIso related libs - runtime 'EDS:tds-plugin' - runtime 'net.sf.saxon:Saxon-HE' - runtime 'jaxen:jaxen' - // json writing 'org.json:json' From e9b8cbeb872ff212f246a44b467e8c763ce39408 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 12 Oct 2023 16:09:25 -0600 Subject: [PATCH 023/120] Turn off the iso services by default --- tds/src/main/webapp/WEB-INF/altContent/startup/catalog.xml | 3 --- .../webapp/WEB-INF/altContent/startup/threddsConfig.xml | 6 +++--- tds/src/main/webapp/WEB-INF/tdsGlobalConfig.xml | 6 +++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tds/src/main/webapp/WEB-INF/altContent/startup/catalog.xml b/tds/src/main/webapp/WEB-INF/altContent/startup/catalog.xml index 58d0782631..80f3c081ff 100644 --- a/tds/src/main/webapp/WEB-INF/altContent/startup/catalog.xml +++ b/tds/src/main/webapp/WEB-INF/altContent/startup/catalog.xml @@ -15,9 +15,6 @@ - - - diff --git a/tds/src/main/webapp/WEB-INF/altContent/startup/threddsConfig.xml b/tds/src/main/webapp/WEB-INF/altContent/startup/threddsConfig.xml index 4bfe9a9c32..df97bc007d 100644 --- a/tds/src/main/webapp/WEB-INF/altContent/startup/threddsConfig.xml +++ b/tds/src/main/webapp/WEB-INF/altContent/startup/threddsConfig.xml @@ -208,9 +208,9 @@ diff --git a/tds/src/main/webapp/WEB-INF/tdsGlobalConfig.xml b/tds/src/main/webapp/WEB-INF/tdsGlobalConfig.xml index f160691f29..d82e92aec2 100644 --- a/tds/src/main/webapp/WEB-INF/tdsGlobalConfig.xml +++ b/tds/src/main/webapp/WEB-INF/tdsGlobalConfig.xml @@ -16,9 +16,9 @@ - - - + + + From 9f4db8d6ff29c593d2d36140b409b61ecdfd435f Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 12 Oct 2023 15:19:59 -0600 Subject: [PATCH 024/120] Update docs about threddsIso not being packaged with TDS --- docs/userguide/src/site/index.md | 2 +- .../tds_tutorial/metadata/IsoMetadataRef.md | 23 ++++++------- .../tds_configuration/AddingOgcIsoServices.md | 33 ++++++++++++------- .../src/site/pages/thredds/TdsServices.md | 27 +++++++-------- .../site/pages/thredds/ThreddsConfigRef.md | 11 ++++--- 5 files changed, 53 insertions(+), 43 deletions(-) diff --git a/docs/userguide/src/site/index.md b/docs/userguide/src/site/index.md index 04f1faf72d..bdffe2f4ea 100644 --- a/docs/userguide/src/site/index.md +++ b/docs/userguide/src/site/index.md @@ -28,7 +28,7 @@ Some of the technology in the TDS: * An integrated server provides data access through the [OpenGIS Consortium (OGC) Web Coverage Service (WCS)](https://www.ogc.org/standards/wcs){:target="_blank"} protocol, for any gridded dataset whose coordinate system information is complete. * An integrated server provides data access through the [OpenGIS Consortium (OGC) Web Map Service (WMS)](http://www.opengeospatial.org/standards/wms){:target="_blank"} protocol, for any gridded dataset whose coordinate system information is complete. This software was developed by Jon Blower (University of Reading (UK) E-Science Center) as part of the [ESSC Web Map Service for environmental data](https://github.com/Reading-eScience-Centre/edal-java){:target="_blank"} (aka Godiva3). -* The integrated [ncISO server](iso_metadata.html) provides automated metadata analysis and ISO metadata generation. +* The optional [ncISO server](iso_metadata.html) provides automated metadata analysis and ISO metadata generation. * The integrated [NetCDF Subset Service](netcdf_subset_service_ref.html) allows subsetting certain CDM datasets in coordinate space, using a REST API. Gridded data subsets can be returned in [CF-compliant](http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html){:target="_blank"} netCDF-3 or netCDF-4. Point data subsets can be returned in CSV, XML, WaterML (with [assistance](https://github.com/Unidata/thredds/tree/5.0.0/waterml#waterml){:target="_blank"} diff --git a/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md b/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md index 63610ffb93..ea0b624f31 100644 --- a/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md +++ b/docs/userguide/src/site/pages/tds_tutorial/metadata/IsoMetadataRef.md @@ -6,30 +6,31 @@ toc: false permalink: iso_metadata.html --- -The TDS distribution includes the [ncISO](https://github.com/Unidata/threddsIso/){:target="_blank"} package from NOAA/Environmental Data Management (many thanks to Dave Neufeld and Ted Habermann). +The TDS can include ISO metadata services by using the [ncISO plugin](https://github.com/Unidata/threddsIso/){:target="_blank"} package from NOAA/Environmental Data Management (many thanks to Dave Neufeld and Ted Habermann). +See [enabling ncISO services](adding_ogc_iso_services.html) for more information on how to add these services to your TDS. -## `ncISO` Services -`ncISO` supports three new services for datasets: +## ncISO Services +The ncISO plugin provides three new services for datasets: * `NCML`: an NcML representation of the dataset's structure and metadata; * `ISO`: an ISO 19115 metadata representation of the dataset; and * `UDDC`: an evaluation of how well the metadata contained in the dataset conforms to the NetCDF Attribute Convention for Data Discovery (NACDD) (see the [NOAA/EDM page on NACDD](http://wiki.esipfed.org/index.php/Category:Attribute_Conventions_Dataset_Discovery){:target="_blank"}). -## Enabling `ncISO` Services +## Enabling ncISO Services -The `ncISO` services are enabled by default. -These services can be disabled for locally served datasets by including the following in the `threddsConfig.xml` file: +The ncISO services are disabled by default. +Provided that you have added the [ncISO plugin](adding_ogc_iso_services.html#nciso-configuration), these services can be enabled for locally served datasets by including the following in the `threddsConfig.xml` file: ~~~xml - false - false - false + true + true + true ~~~ -## Providing `ncISO` Services For Datasets +## Providing ncISO Services For Datasets -Once `ncISO` is enabled, datasets can be configured to have the three `ncISO` services in the TDS catalog configuration files similar to the way other services are configured. +Once ncISO is enabled, datasets can be configured to have the three ncISO services in the TDS catalog configuration files similar to the way other services are configured. The `service` element's `serviceType` and `base` attribute values must be as follows: ~~~xml diff --git a/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md b/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md index 806aec8ebd..48f1634e10 100644 --- a/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md +++ b/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md @@ -6,11 +6,12 @@ toc: false permalink: adding_ogc_iso_services.html --- -## Configure TDS To Allow WCS, WMS, and `ncISO` Access +## Configure TDS To Allow WCS, WMS, and ncISO Access -Out of the box, the TDS distribution will have `WCS`, `WMS`, and `ncISO` enabled. +Out of the box, the TDS distribution will have `WCS` and `WMS` enabled. If you do not wish to use these services, they must be explicitly allowed in the `threddsConfig.xml` file. -Please see the [threddsConfig.xml file](tds_config_ref.html#wcs-service) documentation for information on how to disable these services. +The ncISO services are disabled by default but can be enabled by adding the plugin and updating the `threddsConfig.xml` file. +Please see the [threddsConfig.xml file](tds_config_ref.html#wcs-service) documentation for information on how to enable/disable these services. The default `threddsConfig.xml` file (which should now be in your `${tds.content.root.path}/content/thredds` directory) contains commented out sections for each of these services. ### `WCS` Configuration @@ -41,19 +42,29 @@ The following section in the `threddsConfig.xml` file controls the WMS service: Additional `WMS` configuration options can be set in the `threddsConfig.xml` file, More details are available in the `WMS` section of the [threddsConfig.xml file](tds_config_ref.html#wms-service) documentation. -### `ncISO` Configuration +### ncISO Configuration -The following section in the `threddsConfig.xml` file controls the `ncIso` services: +#### Adding the plugin +To use the ncISO services, you must add the `tds-plugin-jar-with-dependencies.jar` artifact to your TDS for TDS versions >= 5.5. +For TDS versions prior to 5.5 this artifact was included in the TDS war file. +To see which versions of the plugin are compatible with your TDS version see the table [here](https://github.com/Unidata/threddsIso). +The plugin can be downloaded on the [TDS downloads page](https://downloads.unidata.ucar.edu/tds/){:target="_blank"}. +The downloaded ncISO plugin jar file should be placed in your `${tomcat_home}/webapps/thredds/WEB-INF/lib/` directory. + +#### Updating `threddsConfig.xml` +The following section in the `threddsConfig.xml` file controls the ncISO services: ~~~xml - true - true - true + false + false + false ~~~ -Each `*Allow` element allows one of the three `ncISO` services. +Each `*Allow` element allows one of the three ncISO services. + +After adding the ncISO plugin and updating your `threddsConfig.xml`, the TDS should be restarted. ### Adding `WCS` And `WMS` Services @@ -70,9 +81,9 @@ Adding them to an existing compound service would look something like this: ~~~ -### Adding `ncISO` Services +### Adding ncISO Services -Similar to above, as long as the `ncISO` services are enabled, all that is required for the TDS to provide `ncISO` services on datasets is for those datasets to reference the `ncISO` service elements. +Similar to above, as long as the ncISO services are enabled, all that is required for the TDS to provide ncISO services on datasets is for those datasets to reference the ncISO service elements. For instance, adding to the same compound service as above: ~~~xml diff --git a/docs/userguide/src/site/pages/thredds/TdsServices.md b/docs/userguide/src/site/pages/thredds/TdsServices.md index 0ce78168ed..c2e2b9cd62 100644 --- a/docs/userguide/src/site/pages/thredds/TdsServices.md +++ b/docs/userguide/src/site/pages/thredds/TdsServices.md @@ -21,10 +21,7 @@ The TDS has a set of **Standard Data Services** that are always available (unles * opendap * wcs * wms -* iso -* ncml -* uddc - + ### Available Services The TDS configures the appropriate set of standard data services for each dataType/featureType. @@ -71,20 +68,20 @@ Consult the [Configuration Catalogs](config_catalog.html) documentation and [TDS | Remote THREDDS Catalog Service | *Disabled* | `/thredds/remoteCatalogService` | -## `ncISO` Metadata Services +## ncISO Metadata Services + +The ncISO plugin adds the *ncISO Metadata Services*, which facilitate the generation of [ISO 19115 metadata representation](https://en.wikipedia.org/wiki/Geospatial_metadata){:target="_blank"} from data in [NetCDF](https://www.unidata.ucar.edu/software/netcdf/). -*`ncISO` Metadata Services* facilitate the generation of [ISO 19115 metadata representation](https://en.wikipedia.org/wiki/Geospatial_metadata){:target="_blank"} from data in [NetCDF](https://www.unidata.ucar.edu/software/netcdf/). + {% include note.html content=" + Learn how to [enable the ncISO services](adding_ogc_iso_services.html#nciso-configuration). + " %} -The three `ncISO` Metadata Services are: +The three ncISO Metadata Services are: * **ISO** The ISO Metadata Service provides [ISO 19115 metadata representation](https://www.ngdc.noaa.gov/wiki/index.php/NcISO){:target="_blank"} of a dataset's structure and metadata. - - {% include note.html content=" - Learn how to [enable NcISO](adding_ogc_iso_services.html) in the TDS Configuration file. - " %} - + * **NCML** The *NCML Metadata Service* provides NCML representation of a dataset. @@ -103,9 +100,9 @@ The three `ncISO` Metadata Services are: |-----------------|-------------------|-------------------------------| | Service Name | Default Availability | Access Point | |:----------------|:------------------|:------------------------------| -| ISO | Enabled | `/thredds/iso/*` | -| NCML | Enabled | `/thredds/ncml/*` | -| UDDC | Enabled | `/thredds/uddc/*` | +| ISO | Disabled | `/thredds/iso/*` | +| NCML | Disabled | `/thredds/ncml/*` | +| UDDC | Disabled | `/thredds/uddc/*` | #### Catalog Service Configuration: (These are the exact [required](services_ref.html#tds-requirements-for-thredds-catalog-service-elements) values to enable these service.) diff --git a/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md b/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md index 61752d71ac..9b5c45f34b 100644 --- a/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md +++ b/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md @@ -299,15 +299,16 @@ Here is the description of the various options: Optional; default is that there is no size limitation. If the file is > 2 GB, large format netCDF will be written. -### ncISO Service +### ncISO Services -By default, these services are enabled, and can be disabled by including the following in the `threddsConfig.xml` file: +By default, these services are disabled. +Provided that you have added the [ncISO plugin](adding_ogc_iso_services.html#nciso-configuration), these services can be enabled by including the following in the `threddsConfig.xml` file: ~~~xml - false - false - false + true + true + true ~~~ From 8d9e262439f25c6aa1ae84382f4f660fbcfb6b11 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 18 Oct 2023 14:51:50 -0600 Subject: [PATCH 025/120] Remove exclude threddsIso dependencies that no longer exist --- dap4/d4tests/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/dap4/d4tests/build.gradle b/dap4/d4tests/build.gradle index 52dcd0b15a..68447fce54 100644 --- a/dap4/d4tests/build.gradle +++ b/dap4/d4tests/build.gradle @@ -22,8 +22,6 @@ dependencies { exclude group: 'org.apache.logging.log4j' exclude group: 'org.apache.taglibs', module: 'taglibs-standard-spec' exclude group: 'org.apache.taglibs', module: 'taglibs-standard-impl' - exclude group: 'EDS', module: 'tds-plugin' - exclude group: 'net.sf.saxon', module: 'Saxon-HE' } testCompile 'javax.servlet:javax.servlet-api' From 790689046c50007b62a9a45bb8b875b91c4a43c5 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 18 Oct 2023 16:12:46 -0600 Subject: [PATCH 026/120] Update tests that expect a number of services since ISO services are removed by default --- .../java/thredds/server/catalog/TestServiceDefaults.java | 6 +++--- .../java/thredds/server/catalog/TestTdsGrib.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/server/catalog/TestServiceDefaults.java b/tds/src/integrationTests/java/thredds/server/catalog/TestServiceDefaults.java index 3492583da7..6346032894 100644 --- a/tds/src/integrationTests/java/thredds/server/catalog/TestServiceDefaults.java +++ b/tds/src/integrationTests/java/thredds/server/catalog/TestServiceDefaults.java @@ -39,7 +39,7 @@ public void testStandardServices() throws IOException { Service s = ds.getServiceDefault(); Assert.assertNotNull(s); Assert.assertTrue(s.getType() == ServiceType.Compound); - Assert.assertEquals(10, s.getNestedServices().size()); + Assert.assertEquals(7, s.getNestedServices().size()); } // Relies on: @@ -62,7 +62,7 @@ public void testStandardServicesDatasetScan() throws IOException { Assert.assertNotNull(s); Assert.assertTrue(s.getType() == ServiceType.Compound); - Assert.assertEquals(10, s.getNestedServices().size()); + Assert.assertEquals(7, s.getNestedServices().size()); } @Test @@ -72,7 +72,7 @@ public void testUserDefinedServices() throws IOException { Assert.assertEquals(3, cat.getServices().size()); check(cat, "all", 11); - check(cat, "GridServices", 10); + check(cat, "GridServices", 7); check(cat, "opendapOnly", 1); Service localServices = cat.findService("opendapOnly"); diff --git a/tds/src/integrationTests/java/thredds/server/catalog/TestTdsGrib.java b/tds/src/integrationTests/java/thredds/server/catalog/TestTdsGrib.java index 8c6afcbda2..7ba5429af8 100644 --- a/tds/src/integrationTests/java/thredds/server/catalog/TestTdsGrib.java +++ b/tds/src/integrationTests/java/thredds/server/catalog/TestTdsGrib.java @@ -89,7 +89,7 @@ public void testTPanalyis() throws IOException { Dataset full = cat.findDatasetByID("HRRR/analysis/TP"); Assert.assertNotNull(full); - Assert.assertEquals(9, full.getAccess().size()); + Assert.assertEquals(6, full.getAccess().size()); Assert.assertNull(full.getAccess(ServiceType.Resolver)); Assert.assertNull(full.getAccess(ServiceType.HTTPServer)); Assert.assertNotNull(full.getAccess(ServiceType.CdmRemote)); @@ -170,7 +170,7 @@ public void testDeclaredServicesInNestedDatasets() throws IOException { public void testDefaultGribServices() throws IOException { String catalog = "/catalog/grib.v5/NDFD/CONUS_5km/catalog.xml"; // no service name, should use GRID default Catalog cat = TdsLocalCatalog.open(catalog); - testCat(cat, 9, true, null, 0); + testCat(cat, 6, true, null, 0); Dataset top = cat.getDatasetsLocal().get(0); Assert.assertTrue(!top.hasAccess()); @@ -181,7 +181,7 @@ public void testDefaultGribServices() throws IOException { } else { CatalogRef catref = (CatalogRef) ds; Catalog cat2 = TdsLocalCatalog.openFromURI(catref.getURI()); - testCat(cat2, 9, false, "GridServices", 10); + testCat(cat2, 6, false, "GridServices", 7); break; } } From 7505ebf9f0a4bdbd4373537cd4a4945c084fac9f Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 23 Oct 2023 13:28:15 -0600 Subject: [PATCH 027/120] Improve error message when test fails --- .../ncss/controller/grid/GridDatasetControllerTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/GridDatasetControllerTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/GridDatasetControllerTest.java index 777fd5d544..ae1323ced1 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/GridDatasetControllerTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/GridDatasetControllerTest.java @@ -5,6 +5,7 @@ package thredds.server.ncss.controller.grid; import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; import static org.junit.Assume.assumeTrue; import java.io.FileNotFoundException; @@ -142,10 +143,11 @@ public void shouldCloseCacheResourcesWhenExceptionIsThrown() throws Exception { final FileCacheIF rafCache = RandomAccessFile.getGlobalFileCache(); rafCache.clearCache(true); - assertThat(rafCache.showCache()).isEmpty(); + assertWithMessage(rafCache.showCache().toString()).that(rafCache.showCache()).isEmpty(); mockMvc.perform(rb); - assertThat(rafCache.showCache().size()).isEqualTo(1); - assertThat(rafCache.showCache().get(0)).startsWith("false"); // file should not be locked + assertWithMessage(rafCache.showCache().toString()).that(rafCache.showCache().size()).isEqualTo(1); + // file should not be locked + assertWithMessage(rafCache.showCache().toString()).that(rafCache.showCache().get(0)).startsWith("false"); } private class FilenameMatcher extends BaseMatcher { From 08c39edb1f2fae059d40742aaebc558817aab111 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 23 Oct 2023 15:52:41 -0600 Subject: [PATCH 028/120] Add release_info.json file that is used for downloads page on website --- .../downloads-page/release_info.json | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 project-files/downloads-page/release_info.json diff --git a/project-files/downloads-page/release_info.json b/project-files/downloads-page/release_info.json new file mode 100644 index 0000000000..ddb5f87b26 --- /dev/null +++ b/project-files/downloads-page/release_info.json @@ -0,0 +1,66 @@ +{ + "package": "tds", + "packageName": "THREDDS Data Server", + "releases": [ + { + "version": "5.5", + "status": "beta", + "description": "This is the current version running at thredds.ucar.edu. It contains several bug fixes compared to version 5.4.", + "baseURL": "https://artifacts.unidata.ucar.edu/repository/downloads-tds/5.5/", + "resources": { + "tds_war": { + "type" : "web application", + "package": "thredds-5.5-SNAPSHOT.war", + "name": "TDS (Web Application Archive)", + "hash": { + "MD5": "thredds-5.5-SNAPSHOT.war.md5", + "SHA1": "thredds-5.5-SNAPSHOT.war.sha1", + "SHA256": "thredds-5.5-SNAPSHOT.war.sha256" + }, + "info": "THREDDS Data Server (TDS).
IMPORTANT: Before deploying, rename to thredds##5.5-SNAPSHOT.war or thredds.war" + }, + "tdm_jar": { + "type": "library", + "package": "tdm-5.5-SNAPSHOT.jar", + "name": "TDM (Jar file)", + "hash": { + "MD5": "tdm-5.5-SNAPSHOT.jar.md5", + "SHA1": "tdm-5.5-SNAPSHOT.jar.sha1", + "SHA256": "tdm-5.5-SNAPSHOT.jar.sha256" + }, + "info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) " + } + } + }, { + "version": "5.4", + "releaseDate": "2022-07-01", + "status": "current", + "description": "", + "baseURL": "https://artifacts.unidata.ucar.edu/repository/downloads-tds/5.4/", + "resources": { + "tds_war": { + "type" : "web application", + "package": "thredds-5.4.war", + "name": "TDS (Web Application Archive)", + "hash": { + "MD5": "thredds-5.4.war.md5", + "SHA1": "thredds-5.4.war.sha1", + "SHA256": "thredds-54.war.sha256" + }, + "info": "THREDDS Data Server (TDS).
IMPORTANT: Before deploying, rename to thredds##5.4.war or thredds.war" + }, + "tdm_jar": { + "type": "library", + "package": "tdm-5.4.jar", + "name": "TDM (Jar file)", + "hash": { + "MD5": "tdm-5.4.md5", + "SHA1": "tdm-5.4.jar.sha1", + "SHA256": "tdm-5.4.jar.sha256" + }, + "info": "THREDDS Data Manager (TDM) for the current release (version 5.4) " + } + } + } + ] +} From 3a45fb98e5df6bd5b32ccb721797dc8fd2f6cac6 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 23 Oct 2023 15:56:47 -0600 Subject: [PATCH 029/120] Add latest.xml version info to git --- project-files/startup/latest.xml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 project-files/startup/latest.xml diff --git a/project-files/startup/latest.xml b/project-files/startup/latest.xml new file mode 100644 index 0000000000..ff03d17ad0 --- /dev/null +++ b/project-files/startup/latest.xml @@ -0,0 +1,4 @@ + + + + From 1ba1726800f7fded744fb77ffd2aff3d48a1974f Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 24 Oct 2023 09:32:25 -0600 Subject: [PATCH 030/120] Update latest.xml --- project-files/startup/latest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project-files/startup/latest.xml b/project-files/startup/latest.xml index ff03d17ad0..66a13199cb 100644 --- a/project-files/startup/latest.xml +++ b/project-files/startup/latest.xml @@ -1,4 +1,4 @@ - - + + From 5e70a9ecf1f33970c717982677e7108bb9ca4667 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 24 Oct 2023 10:29:46 -0600 Subject: [PATCH 031/120] Clean up test and update stable/maintainence to release/development --- .../downloads-page/release_info.json | 12 +++++++ .../thredds/server/config/TdsContextTest.java | 35 ++++++------------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/project-files/downloads-page/release_info.json b/project-files/downloads-page/release_info.json index ddb5f87b26..835077711a 100644 --- a/project-files/downloads-page/release_info.json +++ b/project-files/downloads-page/release_info.json @@ -29,6 +29,18 @@ "SHA256": "tdm-5.5-SNAPSHOT.jar.sha256" }, "info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) " + }, + "thredds_iso_jar": { + "baseURL": "https://artifacts.unidata.ucar.edu/repository/downloads-tds/5.5/", + "type": "library", + "package": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar", + "name": "THREDDS ISO Plugin (Jar file)", + "hash": { + "MD5": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.md5", + "SHA1": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha1", + "SHA256": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha256" + }, + "info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) " } } }, { diff --git a/tds/src/test/java/thredds/server/config/TdsContextTest.java b/tds/src/test/java/thredds/server/config/TdsContextTest.java index 2f19ef7e28..bc6b895ce6 100644 --- a/tds/src/test/java/thredds/server/config/TdsContextTest.java +++ b/tds/src/test/java/thredds/server/config/TdsContextTest.java @@ -1,5 +1,7 @@ package thredds.server.config; +import static com.google.common.truth.Truth.assertThat; + import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; @@ -25,34 +27,19 @@ public class TdsContextTest { @Autowired private TdsContext tdsContext; - /* - * @Test - * public void testInit() { - * System.out.printf("%s%n", tdsContext); - * //All the initialization was done - * //serverInfo, htmlConfig, wmsConfig are initialized by TdsConfigMapper after ThreddConfig reads the - * threddsServer.xml file - * assertNotNull( tdsContext.getServerInfo() ); - * assertNotNull( tdsContext.getHtmlConfig() ); - * assertNotNull( tdsContext.getWmsConfig() ); - * } - */ - @Test public void testVersionRetrieval() { - String stableKey = "stable"; - String maintKey = "maintenance"; String version = tdsContext.getVersionInfo(); - Map latestVersionInfo = tdsUpdateConfig.getLatestVersionInfo(version); - // is not empty - assert (!latestVersionInfo.isEmpty()); - // contains the stable key and the stable version is not empty - assert (latestVersionInfo.containsKey(stableKey)); - assert (!latestVersionInfo.get(stableKey).isEmpty()); - // contains the dev key and the dev version is not empty - assert (latestVersionInfo.containsKey(maintKey)); - assert (!latestVersionInfo.get(maintKey).isEmpty()); + assertThat(latestVersionInfo).isNotEmpty(); + + String releaseKey = "release"; + assertThat(latestVersionInfo).containsKey(releaseKey); + assertThat(latestVersionInfo.get(releaseKey)).isNotEmpty(); + + String developmentKey = "development"; + assertThat(latestVersionInfo).containsKey(developmentKey); + assertThat(latestVersionInfo.get(developmentKey)).isNotEmpty(); } } From f2557244caff8deefbdf7b87f5c2831484f77031 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 24 Oct 2023 12:03:37 -0600 Subject: [PATCH 032/120] Move files --- project-files/{downloads-page => downloads}/release_info.json | 0 project-files/{ => downloads}/startup/latest.xml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename project-files/{downloads-page => downloads}/release_info.json (100%) rename project-files/{ => downloads}/startup/latest.xml (100%) diff --git a/project-files/downloads-page/release_info.json b/project-files/downloads/release_info.json similarity index 100% rename from project-files/downloads-page/release_info.json rename to project-files/downloads/release_info.json diff --git a/project-files/startup/latest.xml b/project-files/downloads/startup/latest.xml similarity index 100% rename from project-files/startup/latest.xml rename to project-files/downloads/startup/latest.xml From 92fdb72c2d525cadc8de60e61ebab49ca42e5fec Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 24 Oct 2023 12:06:55 -0600 Subject: [PATCH 033/120] Add gradle task to publish release_info.json and version.xml --- gradle/root/publishing.gradle | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gradle/root/publishing.gradle b/gradle/root/publishing.gradle index 4a780fd3d8..aeb477f4a2 100644 --- a/gradle/root/publishing.gradle +++ b/gradle/root/publishing.gradle @@ -113,6 +113,25 @@ def publishDownloadsTask = tasks.register('publishDownloads', PublishToRawRepoTa publish.dependsOn publishDownloadsTask +def publishReleaseInfoAndLatestTask = tasks.register('publishReleaseInfoAndLAtest', PublishToRawRepoTask) { + group = 'publishing' + description = 'Publish release_info.json and startup/latest.xml to Nexus downloads.' + host = 'https://artifacts.unidata.ucar.edu/' + repoName = 'downloads-tds' + + publishSrc = new File(rootProject.getProjectDir(), "project-files/downloads/") + + onlyIf { + // Will be evaluated at task execution time, not during configuration. + // Fails the build if the specified properties haven't been provided. + username = getPropertyOrFailBuild NEXUS_USERNAME_KEY + password = getPropertyOrFailBuild NEXUS_PASSWORD_KEY + return true + } +} + +publish.dependsOn publishReleaseInfoAndLatestTask + // The "publish" tasks require credentials for our Nexus server, which they look for in Gradle properties. // If those properties (i.e. NEXUS_USERNAME_KEY and NEXUS_PASSWORD_KEY) haven't been provided, the build will fail. // Therefore, we only want to configure credentials when a "publish" task is part of the execution plan. Otherwise, From 30967f0c8078f2cbbff0007da0dab89c5e8284ef Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 24 Oct 2023 13:42:22 -0600 Subject: [PATCH 034/120] Revert accidental addition of the thredds-iso-jar to release_info.json (still need to add this correctly to downloads page) --- project-files/downloads/release_info.json | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/project-files/downloads/release_info.json b/project-files/downloads/release_info.json index 835077711a..e4ee88cca7 100644 --- a/project-files/downloads/release_info.json +++ b/project-files/downloads/release_info.json @@ -29,21 +29,10 @@ "SHA256": "tdm-5.5-SNAPSHOT.jar.sha256" }, "info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) " - }, - "thredds_iso_jar": { - "baseURL": "https://artifacts.unidata.ucar.edu/repository/downloads-tds/5.5/", - "type": "library", - "package": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar", - "name": "THREDDS ISO Plugin (Jar file)", - "hash": { - "MD5": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.md5", - "SHA1": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha1", - "SHA256": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha256" - }, - "info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) " } } - }, { + }, + { "version": "5.4", "releaseDate": "2022-07-01", "status": "current", From d37d514224b9442269e4f3b7b1600eab91d9bf10 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 24 Oct 2023 14:09:32 -0600 Subject: [PATCH 035/120] Fix typo --- gradle/root/publishing.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/root/publishing.gradle b/gradle/root/publishing.gradle index aeb477f4a2..d49f107f2c 100644 --- a/gradle/root/publishing.gradle +++ b/gradle/root/publishing.gradle @@ -113,7 +113,7 @@ def publishDownloadsTask = tasks.register('publishDownloads', PublishToRawRepoTa publish.dependsOn publishDownloadsTask -def publishReleaseInfoAndLatestTask = tasks.register('publishReleaseInfoAndLAtest', PublishToRawRepoTask) { +def publishReleaseInfoAndLatestTask = tasks.register('publishReleaseInfoAndLatest', PublishToRawRepoTask) { group = 'publishing' description = 'Publish release_info.json and startup/latest.xml to Nexus downloads.' host = 'https://artifacts.unidata.ucar.edu/' From dce8bd2b39c71f7172fca1546ee716ab7a969930 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 24 Oct 2023 14:08:26 -0600 Subject: [PATCH 036/120] Add thredds iso plugin to downloads page --- project-files/downloads/release_info.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/project-files/downloads/release_info.json b/project-files/downloads/release_info.json index e4ee88cca7..5c0313bfc6 100644 --- a/project-files/downloads/release_info.json +++ b/project-files/downloads/release_info.json @@ -29,6 +29,17 @@ "SHA256": "tdm-5.5-SNAPSHOT.jar.sha256" }, "info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) " + }, + "thredds_iso_jar": { + "type": "library", + "package": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar", + "name": "THREDDS ISO Plugin (Jar file)", + "hash": { + "MD5": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.md5", + "SHA1": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha1", + "SHA256": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha256" + }, + "info": "THREDDS ISO Plugin for the latest snapshot release (version 2.4.6 SNAPSHOT) " } } }, From f0500b64452c19443aaf5eb9d7ea503a7980683b Mon Sep 17 00:00:00 2001 From: haileyajohnson Date: Mon, 31 Jul 2023 10:34:46 -0500 Subject: [PATCH 037/120] add test for applying enhancements in the TDS --- .../server/services/TestEnhancements.java | 67 +++++++++++++++++++ tds/src/test/content/thredds/catalog.xml | 12 ++++ 2 files changed, 79 insertions(+) create mode 100644 tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java diff --git a/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java b/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java new file mode 100644 index 0000000000..1e986e620a --- /dev/null +++ b/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java @@ -0,0 +1,67 @@ +package thredds.server.services; + +import org.junit.Ignore; +import org.junit.Test; +import thredds.test.util.TestOnLocalServer; +import thredds.util.ContentType; +import ucar.ma2.Array; +import ucar.nc2.NetcdfFile; +import ucar.nc2.NetcdfFiles; +import ucar.nc2.Variable; + +import javax.servlet.http.HttpServletResponse; + +import java.io.IOException; + +import static com.google.common.truth.Truth.assertThat; + +public class TestEnhancements { + + final static String ENHANCED_FILE = "localContent/testOffset.nc"; + final static String NCML_ENHANCED_FILE = "testOffsetWithNcml.nc"; + final static String ENHANCED_VAR_NAME = "variableWithOffset"; + final static String NOT_ENHANCED_VAR_NAME = "variableWithoutOffset"; + + @Test + public void testNCSSWithEnhancements() throws IOException { + // scale-offset set as variable attribute + final String endpoint = TestOnLocalServer + .withHttpPath("/ncss/grid/" + ENHANCED_FILE + "?var=" + ENHANCED_VAR_NAME + "&var=" + NOT_ENHANCED_VAR_NAME); + final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.netcdf); + + try (NetcdfFile netcdfFile = NetcdfFiles.openInMemory("test_data.nc", content)) { + final Variable enhancedVar = netcdfFile.findVariable(ENHANCED_VAR_NAME); + final Variable orgVar = netcdfFile.findVariable(NOT_ENHANCED_VAR_NAME); + assertThat(enhancedVar != null).isTrue(); + assertThat(orgVar != null).isTrue(); + assertThat(enhancedVar.findAttribute("add_offset")).isNull(); + final Array values1 = enhancedVar.read(); + final Array values2 = orgVar.read(); + for (int i = 0; i < values1.getSize(); i++) { + assertThat(values1.getDouble(i)).isEqualTo(values2.getDouble(i)); + } + } + } + + @Ignore("TODO: fix services to be consistent in how they apply ncml and enhancements") + @Test + public void testNCSSWithEnhancementsNcML() throws IOException { + // scale-offset set as variable attribute + final String endpoint = TestOnLocalServer.withHttpPath( + "/ncss/grid/" + NCML_ENHANCED_FILE + "?var=" + ENHANCED_VAR_NAME + "&var=" + NOT_ENHANCED_VAR_NAME); + final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.netcdf); + + try (NetcdfFile netcdfFile = NetcdfFiles.openInMemory("test_data.nc", content)) { + final Variable enhancedVar = netcdfFile.findVariable(ENHANCED_VAR_NAME); + final Variable orgVar = netcdfFile.findVariable(NOT_ENHANCED_VAR_NAME); + assertThat(enhancedVar != null).isTrue(); + assertThat(orgVar != null).isTrue(); + assertThat(orgVar.findAttribute("add_offset")).isNull(); + final Array values1 = enhancedVar.read(); + final Array values2 = orgVar.read(); + for (int i = 0; i < values1.getSize(); i++) { + assertThat(values1.getDouble(i)).isEqualTo(values2.getDouble(i) + 100); + } + } + } +} diff --git a/tds/src/test/content/thredds/catalog.xml b/tds/src/test/content/thredds/catalog.xml index 7b81721e7d..02522d1c23 100644 --- a/tds/src/test/content/thredds/catalog.xml +++ b/tds/src/test/content/thredds/catalog.xml @@ -49,6 +49,18 @@ + + + + all + + + + + + + From 4445a55acd18118fa15ad60a13401b52a8ba739e Mon Sep 17 00:00:00 2001 From: haileyajohnson Date: Tue, 5 Dec 2023 15:32:07 -0800 Subject: [PATCH 038/120] Update tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java Co-authored-by: Tara Drwenski --- .../java/thredds/server/services/TestEnhancements.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java b/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java index 1e986e620a..73f07ca179 100644 --- a/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java +++ b/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java @@ -37,9 +37,7 @@ public void testNCSSWithEnhancements() throws IOException { assertThat(enhancedVar.findAttribute("add_offset")).isNull(); final Array values1 = enhancedVar.read(); final Array values2 = orgVar.read(); - for (int i = 0; i < values1.getSize(); i++) { - assertThat(values1.getDouble(i)).isEqualTo(values2.getDouble(i)); - } + MAMath.nearlyEquals(values1, values2); } } From 102a84430b934172643a49914f0cf85b527e23b2 Mon Sep 17 00:00:00 2001 From: haileyajohnson Date: Tue, 5 Dec 2023 15:49:18 -0800 Subject: [PATCH 039/120] spotless --- .../java/thredds/server/services/TestEnhancements.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java b/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java index 73f07ca179..44a5e86073 100644 --- a/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java +++ b/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java @@ -5,6 +5,7 @@ import thredds.test.util.TestOnLocalServer; import thredds.util.ContentType; import ucar.ma2.Array; +import ucar.ma2.MAMath; import ucar.nc2.NetcdfFile; import ucar.nc2.NetcdfFiles; import ucar.nc2.Variable; @@ -37,7 +38,7 @@ public void testNCSSWithEnhancements() throws IOException { assertThat(enhancedVar.findAttribute("add_offset")).isNull(); final Array values1 = enhancedVar.read(); final Array values2 = orgVar.read(); - MAMath.nearlyEquals(values1, values2); + MAMath.nearlyEquals(values1, values2); } } From e979c71af83ab32489c25acb46d603e50337eb33 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 15 Dec 2023 14:45:37 -0700 Subject: [PATCH 040/120] Add ncss tests for ncml dataset and dataset scan --- tds/src/test/content/thredds/catalog.xml | 11 +- .../server/ncss/controller/grid/NcmlTest.java | 108 ++++++++++++++++++ 2 files changed, 116 insertions(+), 3 deletions(-) create mode 100644 tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java diff --git a/tds/src/test/content/thredds/catalog.xml b/tds/src/test/content/thredds/catalog.xml index 02522d1c23..bbd6796026 100644 --- a/tds/src/test/content/thredds/catalog.xml +++ b/tds/src/test/content/thredds/catalog.xml @@ -173,9 +173,8 @@ - - - odap + + all Grid @@ -185,6 +184,9 @@ + + + @@ -246,6 +248,9 @@ + + + diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java new file mode 100644 index 0000000000..c63aa39738 --- /dev/null +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java @@ -0,0 +1,108 @@ +package thredds.server.ncss.controller.grid; + +import java.util.List; +import java.util.Optional; +import org.jdom2.Document; +import org.jdom2.Element; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.web.WebAppConfiguration; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.MvcResult; +import org.springframework.test.web.servlet.RequestBuilder; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; +import org.springframework.test.web.servlet.result.MockMvcResultMatchers; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.springframework.web.context.WebApplicationContext; +import thredds.mock.web.MockTdsContextLoader; +import thredds.util.xml.XmlUtil; +import ucar.nc2.Attribute; +import ucar.nc2.NetcdfFile; +import ucar.nc2.NetcdfFiles; +import ucar.nc2.Variable; +import java.io.IOException; + +import static com.google.common.truth.Truth.assertThat; + +@RunWith(SpringJUnit4ClassRunner.class) +@WebAppConfiguration +@ContextConfiguration(locations = {"/WEB-INF/applicationContext.xml", "/WEB-INF/spring-servlet.xml"}, + loader = MockTdsContextLoader.class) +public class NcmlTest { + private static final String NCML_DATASET = "/ncss/grid/ExampleNcML/Modified.nc"; + private static final String NCML_DATASET_SCAN = "/ncss/grid/ModifyDatasetScan/example1.nc"; + + @Autowired + private WebApplicationContext wac; + + private MockMvc mockMvc; + + @Before + public void setUp() throws IOException { + mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); + } + + @Test + public void shouldShowNcmlModifiedVariableOnDatasetPage() throws Exception { + assertShowsNcmlModifiedVariableOnDatasetPage(NCML_DATASET + "/dataset.xml"); + } + + @Test + public void shouldShowNcmlModifiedVariableOnDatasetPageForDatasetScan() throws Exception { + assertShowsNcmlModifiedVariableOnDatasetPage(NCML_DATASET_SCAN + "/dataset.xml"); + } + + @Test + public void shouldReturnNcmlModifiedVariable() throws Exception { + assertReturnsNcmlModifiedVariable(NCML_DATASET); + } + + @Test + public void shouldReturnNcmlModifiedVariableForDatasetScan() throws Exception { + assertReturnsNcmlModifiedVariable(NCML_DATASET_SCAN); + } + + private void assertShowsNcmlModifiedVariableOnDatasetPage(String servletPath) throws Exception { + final RequestBuilder requestBuilder = MockMvcRequestBuilders.get(servletPath).servletPath(servletPath); + final MvcResult mvcResult = + mockMvc.perform(requestBuilder).andExpect(MockMvcResultMatchers.status().isOk()).andReturn(); + + final Document doc = XmlUtil.getStringResponseAsDoc(mvcResult.getResponse()); + final List grids = XmlUtil.evaluateXPath(doc, "//grid"); + assertThat(grids).isNotNull(); + + final Optional orgiVar = + grids.stream().filter(e -> e.getAttribute("name").getValue().equals("rh")).findFirst(); + assertThat(orgiVar.isPresent()).isFalse(); + + final Optional modifiedVar = + grids.stream().filter(e -> e.getAttribute("name").getValue().equals("ReletiveHumidity")).findFirst(); + assertThat(modifiedVar.isPresent()).isTrue(); + assertThat(modifiedVar.get().getAttribute("name").getValue()).isEqualTo("ReletiveHumidity"); + assertThat(modifiedVar.get().getAttribute("desc").getValue()).isEqualTo("relatively humid"); + } + + private void assertReturnsNcmlModifiedVariable(String servletPath) throws Exception { + final RequestBuilder requestBuilder = + MockMvcRequestBuilders.get(servletPath).servletPath(servletPath).param("var", "all"); + final MvcResult mvcResult = + mockMvc.perform(requestBuilder).andExpect(MockMvcResultMatchers.status().isOk()).andReturn(); + + try (NetcdfFile ncf = NetcdfFiles.openInMemory("ncmlTest.nc", mvcResult.getResponse().getContentAsByteArray())) { + final Variable origVar = ncf.findVariable("rh"); + assertThat((Object) origVar).isNull(); + + final Variable modifiedVar = ncf.findVariable("ReletiveHumidity"); + assertThat((Object) modifiedVar).isNotNull(); + + final Attribute att = modifiedVar.findAttribute("long_name"); + assertThat(att).isNotNull(); + assertThat(att.getStringValue()).isEqualTo("relatively humid"); + } + } +} + From 17a96056d4c8d3d3c827392fcef080f3e4c2502c Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 18 Dec 2023 11:11:54 -0700 Subject: [PATCH 041/120] Refactor large function into several smaller ones --- .../java/thredds/core/DatasetManager.java | 82 ++++++++++--------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/tds/src/main/java/thredds/core/DatasetManager.java b/tds/src/main/java/thredds/core/DatasetManager.java index 69d711f17a..412167a034 100644 --- a/tds/src/main/java/thredds/core/DatasetManager.java +++ b/tds/src/main/java/thredds/core/DatasetManager.java @@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; +import thredds.core.DataRootManager.DataRootMatch; import thredds.featurecollection.FeatureCollectionCache; import thredds.featurecollection.InvDatasetFeatureCollection; import thredds.server.admin.DebugCommands; @@ -174,7 +175,7 @@ public NetcdfFile openNetcdfFile(HttpServletRequest req, HttpServletResponse res } // look for a match - DataRootManager.DataRootMatch match = dataRootManager.findDataRootMatch(reqPath); + DataRootMatch match = dataRootManager.findDataRootMatch(reqPath); // look for a feature collection dataset if ((match != null) && (match.dataRoot.getFeatureCollection() != null)) { @@ -200,49 +201,12 @@ public NetcdfFile openNetcdfFile(HttpServletRequest req, HttpServletResponse res // common case - its a file if (match != null) { - org.jdom2.Element netcdfElem = null; // find ncml if it exists - if (match.dataRoot != null) { - DatasetScan dscan = match.dataRoot.getDatasetScan(); - // if (dscan == null) dscan = match.dataRoot.getDatasetRootProxy(); // no ncml possible in getDatasetRootProxy - if (dscan != null) - netcdfElem = dscan.getNcmlElement(); - } - String location = dataRootManager.getLocationFromRequestPath(reqPath); if (location == null) throw new FileNotFoundException(reqPath); - // if there's an ncml element, open it through NcMLReader, supplying the underlying file - // from NetcdfFiles.open(), therefore not being cached. - // This is safer given all the trouble we have with ncml and caching. - if (netcdfElem != null) { - String ncmlLocation = "DatasetScan#" + location; // LOOK some descriptive name - // open with openFile(), not acquireFile, so we skip the caches - NetcdfDataset ncd = null; - - // look for addRecords attribute on the netcdf element. The new API in netCDF-Java does not handle this, - // so we will handle it special here. - Attribute addRecordsAttr = netcdfElem.getAttribute("addRecords"); - boolean addRecords = false; - if (addRecordsAttr != null) { - addRecords = Boolean.valueOf(addRecordsAttr.getValue()); - } - - NetcdfFile ncf; - if (addRecords) { - DatasetUrl datasetUrl = DatasetUrl.findDatasetUrl(location); - // work around for presence of addRecords="true" on a netcdf element - ncf = NetcdfDatasets.openFile(datasetUrl, -1, null, NetcdfFile.IOSP_MESSAGE_ADD_RECORD_STRUCTURE); - } else { - ncf = NetcdfDatasets.openFile(location, null); - } - - NetcdfDataset.Builder modifiedDsBuilder = NcmlReader.mergeNcml(ncf, netcdfElem); - - // set new location to indicate this is a dataset from a dataset scan wrapped with NcML. - modifiedDsBuilder.setLocation(ncmlLocation); - ncd = modifiedDsBuilder.build(); - return ncd; + if (hasDatasetScanNcml(match)) { + return openNcmlDatasetScan(location, match); } DatasetUrl durl = DatasetUrl.findDatasetUrl(location); @@ -258,6 +222,44 @@ public NetcdfFile openNetcdfFile(HttpServletRequest req, HttpServletResponse res return ncfile; } + private boolean hasDatasetScanNcml(DataRootMatch match) { + return match.dataRoot != null && match.dataRoot.getDatasetScan() != null + && match.dataRoot.getDatasetScan().getNcmlElement() != null; + } + + private NetcdfFile openNcmlDatasetScan(String location, DataRootMatch match) throws IOException { + org.jdom2.Element netcdfElem = match.dataRoot.getDatasetScan().getNcmlElement(); + // if there's an ncml element, open it through NcMLReader, supplying the underlying file + // from NetcdfFiles.open(), therefore not being cached. + // This is safer given all the trouble we have with ncml and caching. + + String ncmlLocation = "DatasetScan#" + location; // LOOK some descriptive name + // open with openFile(), not acquireFile, so we skip the caches + + // look for addRecords attribute on the netcdf element. The new API in netCDF-Java does not handle this, + // so we will handle it special here. + Attribute addRecordsAttr = netcdfElem.getAttribute("addRecords"); + boolean addRecords = false; + if (addRecordsAttr != null) { + addRecords = Boolean.valueOf(addRecordsAttr.getValue()); + } + + NetcdfFile ncf; + if (addRecords) { + DatasetUrl datasetUrl = DatasetUrl.findDatasetUrl(location); + // work around for presence of addRecords="true" on a netcdf element + ncf = NetcdfDatasets.openFile(datasetUrl, -1, null, NetcdfFile.IOSP_MESSAGE_ADD_RECORD_STRUCTURE); + } else { + ncf = NetcdfDatasets.openFile(location, null); + } + + NetcdfDataset.Builder modifiedDsBuilder = NcmlReader.mergeNcml(ncf, netcdfElem); + + // set new location to indicate this is a dataset from a dataset scan wrapped with NcML. + modifiedDsBuilder.setLocation(ncmlLocation); + return modifiedDsBuilder.build(); + } + /** * Open a file as a GridDataset, using getNetcdfFile(), so that it gets wrapped in NcML if needed. */ From cac45ba95eaed6ea03d88c43c194d257bf1a0ced Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 18 Dec 2023 16:06:24 -0700 Subject: [PATCH 042/120] Handle opening datasetScan with NcML as a coverage --- .../java/thredds/core/DatasetManager.java | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tds/src/main/java/thredds/core/DatasetManager.java b/tds/src/main/java/thredds/core/DatasetManager.java index 412167a034..203d3f947d 100644 --- a/tds/src/main/java/thredds/core/DatasetManager.java +++ b/tds/src/main/java/thredds/core/DatasetManager.java @@ -223,7 +223,7 @@ public NetcdfFile openNetcdfFile(HttpServletRequest req, HttpServletResponse res } private boolean hasDatasetScanNcml(DataRootMatch match) { - return match.dataRoot != null && match.dataRoot.getDatasetScan() != null + return match != null && match.dataRoot != null && match.dataRoot.getDatasetScan() != null && match.dataRoot.getDatasetScan().getNcmlElement() != null; } @@ -422,8 +422,14 @@ public CoverageCollection openCoverageDataset(HttpServletRequest req, HttpServle } // otherwise, assume it's a local file with a datasetRoot in the urlPath. - // try to open as a FeatureDatasetCoverage. This allows GRIB to be handled specially String location = getLocationFromRequestPath(reqPath); + + // Ncml in datasetScan + if (location != null && hasDatasetScanNcml(match)) { + return openCoverageFromDatasetScanNcml(location, match, reqPath); + } + + // try to open as a FeatureDatasetCoverage. This allows GRIB to be handled specially if (location != null) { Optional opt = CoverageDatasetFactory.openCoverageDataset(location); // hack - CoverageDatasetFactory bombs out on an object store location string during the grib check, @@ -453,6 +459,20 @@ public CoverageCollection openCoverageDataset(HttpServletRequest req, HttpServle return null; } + private CoverageCollection openCoverageFromDatasetScanNcml(String location, DataRootMatch match, String reqPath) + throws IOException { + final NetcdfFile ncf = openNcmlDatasetScan(location, match); + final NetcdfDataset ncd = NetcdfDatasets.enhance(ncf, NetcdfDataset.getDefaultEnhanceMode(), null); + final DtCoverageDataset gds = new DtCoverageDataset(ncd); + + if (gds.getGrids().isEmpty()) { + throw new FileNotFoundException("Error opening grid dataset " + reqPath + ". err= no grids found."); + } + + final FeatureDatasetCoverage coverage = DtCoverageAdapter.factory(gds, new Formatter()); + return coverage.getSingleCoverageCollection(); + } + public SimpleGeometryFeatureDataset openSimpleGeometryDataset(HttpServletRequest req, HttpServletResponse res, String reqPath) throws IOException { // first look for a feature collection From 8fa61cd20328e56323909493cc77524f0ebef4fd Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 19 Dec 2023 09:54:22 -0700 Subject: [PATCH 043/120] Simplify code since DtCoverageAdapter.factory cannot return null --- tds/src/main/java/thredds/core/DatasetManager.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tds/src/main/java/thredds/core/DatasetManager.java b/tds/src/main/java/thredds/core/DatasetManager.java index 203d3f947d..71df3405b6 100644 --- a/tds/src/main/java/thredds/core/DatasetManager.java +++ b/tds/src/main/java/thredds/core/DatasetManager.java @@ -439,12 +439,8 @@ public CoverageCollection openCoverageDataset(HttpServletRequest req, HttpServle // and pass that to CoverageDataset DtCoverageDataset gds = new DtCoverageDataset(NetcdfDatasets.openDataset(location)); if (!gds.getGrids().isEmpty()) { - Formatter errlog = new Formatter(); - FeatureDatasetCoverage result = DtCoverageAdapter.factory(gds, errlog); - if (result != null) - opt = Optional.of(result); - else - opt = Optional.empty(errlog.toString()); + FeatureDatasetCoverage result = DtCoverageAdapter.factory(gds, new Formatter()); + opt = Optional.of(result); } } From 408fdeec89c967b5332df79f746e6edd64fe90b7 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 19 Dec 2023 11:27:38 -0700 Subject: [PATCH 044/120] Add NeedsCdmUnitTest category to test --- .../java/thredds/server/ncss/controller/grid/NcmlTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java index c63aa39738..a5d2ddddfc 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java @@ -6,6 +6,7 @@ import org.jdom2.Element; import org.junit.Before; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; @@ -25,10 +26,12 @@ import ucar.nc2.NetcdfFiles; import ucar.nc2.Variable; import java.io.IOException; +import ucar.unidata.util.test.category.NeedsCdmUnitTest; import static com.google.common.truth.Truth.assertThat; @RunWith(SpringJUnit4ClassRunner.class) +@Category(NeedsCdmUnitTest.class) @WebAppConfiguration @ContextConfiguration(locations = {"/WEB-INF/applicationContext.xml", "/WEB-INF/spring-servlet.xml"}, loader = MockTdsContextLoader.class) From ed6c5f68a3f3ca7dbe16851032ff55b8af94db2b Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 19 Dec 2023 12:20:06 -0700 Subject: [PATCH 045/120] Fix variable name --- .../java/thredds/server/ncss/controller/grid/NcmlTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java index a5d2ddddfc..772282bdc2 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/NcmlTest.java @@ -78,9 +78,9 @@ private void assertShowsNcmlModifiedVariableOnDatasetPage(String servletPath) th final List grids = XmlUtil.evaluateXPath(doc, "//grid"); assertThat(grids).isNotNull(); - final Optional orgiVar = + final Optional origVar = grids.stream().filter(e -> e.getAttribute("name").getValue().equals("rh")).findFirst(); - assertThat(orgiVar.isPresent()).isFalse(); + assertThat(origVar.isPresent()).isFalse(); final Optional modifiedVar = grids.stream().filter(e -> e.getAttribute("name").getValue().equals("ReletiveHumidity")).findFirst(); From 476ffe26ab5ad78d9073a430508a0858d090aca4 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 19 Dec 2023 11:44:42 -0700 Subject: [PATCH 046/120] Unignore test and make offset type float instead of string --- .../java/thredds/server/services/TestEnhancements.java | 1 - tds/src/test/content/thredds/catalog.xml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java b/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java index 44a5e86073..75fbb5e52c 100644 --- a/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java +++ b/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java @@ -42,7 +42,6 @@ public void testNCSSWithEnhancements() throws IOException { } } - @Ignore("TODO: fix services to be consistent in how they apply ncml and enhancements") @Test public void testNCSSWithEnhancementsNcML() throws IOException { // scale-offset set as variable attribute diff --git a/tds/src/test/content/thredds/catalog.xml b/tds/src/test/content/thredds/catalog.xml index bbd6796026..221c0de1f0 100644 --- a/tds/src/test/content/thredds/catalog.xml +++ b/tds/src/test/content/thredds/catalog.xml @@ -56,7 +56,7 @@ - + From ffe46f22cb6186c2641dbb18294e98f52c291c4e Mon Sep 17 00:00:00 2001 From: Megan Lerman Date: Wed, 20 Dec 2023 15:47:34 -0800 Subject: [PATCH 047/120] hide file paths in error messages --- tds/src/main/java/thredds/core/DatasetManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds/src/main/java/thredds/core/DatasetManager.java b/tds/src/main/java/thredds/core/DatasetManager.java index 71df3405b6..64d6b8b547 100644 --- a/tds/src/main/java/thredds/core/DatasetManager.java +++ b/tds/src/main/java/thredds/core/DatasetManager.java @@ -357,7 +357,7 @@ public FeatureDatasetPoint openPointDataset(HttpServletRequest req, HttpServletR if (featureDatasetPoint != null) { return featureDatasetPoint; } else { - throw new UnsupportedOperationException("Could not open as a PointDataset: " + errlog); + throw new UnsupportedOperationException("Could not open as a point dataset"); } } catch (Throwable t) { if (ncd == null) From 68cb9e871ab77319ed651d769d33acde12a6fbcf Mon Sep 17 00:00:00 2001 From: Megan Lerman Date: Wed, 20 Dec 2023 16:10:59 -0800 Subject: [PATCH 048/120] add null check for missing file --- tds/src/main/java/thredds/servlet/ServletUtil.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tds/src/main/java/thredds/servlet/ServletUtil.java b/tds/src/main/java/thredds/servlet/ServletUtil.java index e18a347817..5bb60aa68e 100644 --- a/tds/src/main/java/thredds/servlet/ServletUtil.java +++ b/tds/src/main/java/thredds/servlet/ServletUtil.java @@ -282,6 +282,12 @@ public static void writeMFileToResponse(HttpServletRequest request, HttpServletR final String ncmlLocation = TdsRequestedDataset.getLocationFromNcml(requestPath); final String location = ncmlLocation != null ? ncmlLocation : TdsRequestedDataset.getLocationFromRequestPath(requestPath); + + if (location == null) { + response.sendError(HttpServletResponse.SC_NOT_FOUND, "Could not find file with URL path: " + requestPath); + return; + } + final MFile file = MFiles.create(location); if (file == null) { From b15e15959eb0680b47db802162203c067e6a875a Mon Sep 17 00:00:00 2001 From: Megan Lerman Date: Thu, 21 Dec 2023 08:51:13 -0800 Subject: [PATCH 049/120] log error message --- tds/src/main/java/thredds/core/DatasetManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tds/src/main/java/thredds/core/DatasetManager.java b/tds/src/main/java/thredds/core/DatasetManager.java index 64d6b8b547..a22d2c160b 100644 --- a/tds/src/main/java/thredds/core/DatasetManager.java +++ b/tds/src/main/java/thredds/core/DatasetManager.java @@ -357,6 +357,7 @@ public FeatureDatasetPoint openPointDataset(HttpServletRequest req, HttpServletR if (featureDatasetPoint != null) { return featureDatasetPoint; } else { + log.error("Could not open as a PointDataset: " + errlog); throw new UnsupportedOperationException("Could not open as a point dataset"); } } catch (Throwable t) { From 9cddeab04ce9f5f6fd8c4173bb62bb71a280e2f4 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 22 Dec 2023 09:52:40 -0700 Subject: [PATCH 050/120] Update expected error message in test --- .../server/ncss/controller/point/TestPointFCExceptions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds/src/test/java/thredds/server/ncss/controller/point/TestPointFCExceptions.java b/tds/src/test/java/thredds/server/ncss/controller/point/TestPointFCExceptions.java index b37e3aff4b..5c97c7ee47 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/point/TestPointFCExceptions.java +++ b/tds/src/test/java/thredds/server/ncss/controller/point/TestPointFCExceptions.java @@ -99,7 +99,7 @@ public void invalidDataset() throws Exception { this.mockMvc.perform(rb).andExpect(MockMvcResultMatchers.status().isUnprocessableEntity()) .andExpect(MockMvcResultMatchers.content() - .string(new StringContains("UnsupportedOperationException: Could not open as a PointDataset"))); + .string(new StringContains("UnsupportedOperationException: Could not open as a point dataset"))); } } From 12070a83738e3f93355c5c195cfc82697eb75633 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 21 Dec 2023 11:33:04 -0700 Subject: [PATCH 051/120] Add tests for opening a ncml dataset on S3 --- .../java/thredds/tds/TestS3Ncml.java | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java diff --git a/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java b/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java new file mode 100644 index 0000000000..85855ed1a4 --- /dev/null +++ b/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java @@ -0,0 +1,53 @@ +package thredds.tds; + +import static com.google.common.truth.Truth.assertThat; + +import java.nio.charset.StandardCharsets; +import javax.servlet.http.HttpServletResponse; +import org.junit.Test; +import thredds.test.util.TestOnLocalServer; + +public class TestS3Ncml { + final private static String S3_NCML_PATH = "dodsC/s3-dataset-scan/ncml/"; + + @Test + public void shouldOpenNcmlOnS3() { + final String endpoint = TestOnLocalServer.withHttpPath(S3_NCML_PATH + "testStandalone.ncml.ascii?time"); + final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK); + final String stringContent = new String(content, StandardCharsets.UTF_8); + + assertThat(stringContent).contains("time[2]"); + assertThat(stringContent).contains("6, 18"); + } + + @Test + public void shouldOpenNcmlWithOtherExtensionOnS3() { + final String endpoint = TestOnLocalServer.withHttpPath(S3_NCML_PATH + "testStandaloneNcml.otherExt.ascii?time"); + final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK); + final String stringContent = new String(content, StandardCharsets.UTF_8); + + assertThat(stringContent).contains("time[2]"); + assertThat(stringContent).contains("6, 18"); + } + + @Test + public void shouldOpenAggregationWithRelativePathsOnS3() { + final String endpoint = TestOnLocalServer.withHttpPath(S3_NCML_PATH + "nc/namExtract/test_agg.ncml.ascii?time"); + final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK); + final String stringContent = new String(content, StandardCharsets.UTF_8); + + assertThat(stringContent).contains("time[8]"); + assertThat(stringContent).contains("3.0, 6.0, 9.0, 12.0, 15.0, 18.0, 21.0, 24.0"); + } + + @Test + public void shouldOpenAggregationWithAbsolutePathsOnS3() { + final String endpoint = + TestOnLocalServer.withHttpPath(S3_NCML_PATH + "nc/namExtract/test_agg_absolute_paths.ncml.ascii?time"); + final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK); + final String stringContent = new String(content, StandardCharsets.UTF_8); + + assertThat(stringContent).contains("time[8]"); + assertThat(stringContent).contains("3.0, 6.0, 9.0, 12.0, 15.0, 18.0, 21.0, 24.0"); + } +} From 3cf896474d36c85d380d01ee59b16a6968d44e49 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 27 Dec 2023 08:33:18 -0600 Subject: [PATCH 052/120] Add NeedsExternalResource category to test that uses the downloads page --- tds/src/test/java/thredds/server/config/TdsContextTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tds/src/test/java/thredds/server/config/TdsContextTest.java b/tds/src/test/java/thredds/server/config/TdsContextTest.java index bc6b895ce6..12c6f88de3 100644 --- a/tds/src/test/java/thredds/server/config/TdsContextTest.java +++ b/tds/src/test/java/thredds/server/config/TdsContextTest.java @@ -14,10 +14,11 @@ import ucar.unidata.util.test.category.NeedsContentRoot; import java.lang.invoke.MethodHandles; import java.util.Map; +import ucar.unidata.util.test.category.NeedsExternalResource; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"/WEB-INF/applicationContext.xml"}, loader = MockTdsContextLoader.class) -@Category(NeedsContentRoot.class) +@Category({NeedsContentRoot.class, NeedsExternalResource.class}) public class TdsContextTest { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); From 8c9f2f0bc56290b32280d68915ae963ff4ba70ea Mon Sep 17 00:00:00 2001 From: haileyajohnson Date: Tue, 9 Jan 2024 17:15:57 -0800 Subject: [PATCH 053/120] ignore dsgsubsetwriter tests --- .../java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java b/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java index 56378bb9bc..533efc9bd3 100644 --- a/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java +++ b/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java @@ -6,6 +6,7 @@ package thredds.server.ncss.view.dsg; import org.junit.Assert; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; @@ -39,6 +40,7 @@ * Created by cwardgar on 2014/05/27. */ @RunWith(Parameterized.class) +@Ignore ("TODO: fix to work with new cfpointwriters") public class DsgSubsetWriterTest { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @Rule From 675b337f6a07c46c9e007af2e23810d5a458acc9 Mon Sep 17 00:00:00 2001 From: haileyajohnson Date: Tue, 9 Jan 2024 17:20:19 -0800 Subject: [PATCH 054/120] spotless --- .../java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java b/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java index 533efc9bd3..4cd4aa0a0d 100644 --- a/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java +++ b/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java @@ -40,7 +40,7 @@ * Created by cwardgar on 2014/05/27. */ @RunWith(Parameterized.class) -@Ignore ("TODO: fix to work with new cfpointwriters") +@Ignore("TODO: fix to work with new cfpointwriters") public class DsgSubsetWriterTest { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @Rule From a6d8f77ec07c24e4539f7fdccf3ee21bd8c0662b Mon Sep 17 00:00:00 2001 From: haileyajohnson Date: Tue, 9 Jan 2024 17:39:10 -0800 Subject: [PATCH 055/120] merge changes from #440 --- .../java/thredds/tds/TestS3Ncml.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java b/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java index 85855ed1a4..c1e6c51385 100644 --- a/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java +++ b/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java @@ -21,8 +21,8 @@ public void shouldOpenNcmlOnS3() { } @Test - public void shouldOpenNcmlWithOtherExtensionOnS3() { - final String endpoint = TestOnLocalServer.withHttpPath(S3_NCML_PATH + "testStandaloneNcml.otherExt.ascii?time"); + public void shouldOpenNcmlWithXmlExtensionOnS3() { + final String endpoint = TestOnLocalServer.withHttpPath(S3_NCML_PATH + "testStandalone.xml.ascii?time"); final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK); final String stringContent = new String(content, StandardCharsets.UTF_8); @@ -31,13 +31,11 @@ public void shouldOpenNcmlWithOtherExtensionOnS3() { } @Test - public void shouldOpenAggregationWithRelativePathsOnS3() { - final String endpoint = TestOnLocalServer.withHttpPath(S3_NCML_PATH + "nc/namExtract/test_agg.ncml.ascii?time"); - final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK); - final String stringContent = new String(content, StandardCharsets.UTF_8); - - assertThat(stringContent).contains("time[8]"); - assertThat(stringContent).contains("3.0, 6.0, 9.0, 12.0, 15.0, 18.0, 21.0, 24.0"); + public void shouldOpenNcmlWithOtherExtensionOnS3() { + // Can't currently open an S3 NcML file with an extension other than xml or ncml. + // Peaking inside the file to check if it's ncml is too slow + final String endpoint = TestOnLocalServer.withHttpPath(S3_NCML_PATH + "testStandaloneNcml.otherExt.ascii?time"); + TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } @Test From 6bc6e64491c2e82a2732c90ebad29a72e3c64f08 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 9 Jan 2024 19:00:17 -0700 Subject: [PATCH 056/120] Add test for opening an ncml file with xml extension and change expected behavior for file with other extension (#440) Co-authored-by: haileyajohnson --- .../integrationTests/java/thredds/tds/TestS3Ncml.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java b/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java index c1e6c51385..ebf52f40af 100644 --- a/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java +++ b/tds/src/integrationTests/java/thredds/tds/TestS3Ncml.java @@ -38,6 +38,16 @@ public void shouldOpenNcmlWithOtherExtensionOnS3() { TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } + @Test + public void shouldOpenAggregationWithRelativePathsOnS3() { + final String endpoint = TestOnLocalServer.withHttpPath(S3_NCML_PATH + "nc/namExtract/test_agg.ncml.ascii?time"); + final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK); + final String stringContent = new String(content, StandardCharsets.UTF_8); + + assertThat(stringContent).contains("time[8]"); + assertThat(stringContent).contains("3.0, 6.0, 9.0, 12.0, 15.0, 18.0, 21.0, 24.0"); + } + @Test public void shouldOpenAggregationWithAbsolutePathsOnS3() { final String endpoint = From 8db9d6bc37aec6fb719ede687108ee050d9e0d71 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 10 Jan 2024 09:43:19 -0700 Subject: [PATCH 057/120] Fix test artifact name (#443) --- .github/workflows/tds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tds.yml b/.github/workflows/tds.yml index 49595b99a6..d4c26869e7 100644 --- a/.github/workflows/tds.yml +++ b/.github/workflows/tds.yml @@ -32,6 +32,6 @@ jobs: - uses: actions/upload-artifact@v2 if: failure() with: - name: tds_JUnit_Results_${{ github.sha }}_AdoptOpenJDK-HS-${{ matrix.java }}-matrix.servletcontainer }} + name: tds_JUnit_Results_${{ github.sha }}_AdoptOpenJDK-HS-${{ matrix.java }}-${{ matrix.servletcontainer }} path: build/reports/allTests From 7d859e4656cfa9012b7ceab9c6921dd0dcbe482e Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 11 Jan 2024 11:29:07 -0700 Subject: [PATCH 058/120] Test Opendap and WMS are applying enhancements correctly (#441) * Refactor tests to make reusable for new cases * Add opendap enhancements tests * Refactor test to helpers for use by new test cases * Add wms ncml enhancements test case * Update openday enhancements test and add enhance=none test case --- .../server/services/TestEnhancements.java | 69 +++++++++++++------ .../thredds/server/wms/TestWmsServer.java | 51 ++++++++++---- tds/src/test/content/thredds/catalog.xml | 9 +++ 3 files changed, 94 insertions(+), 35 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java b/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java index 75fbb5e52c..050553ebf1 100644 --- a/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java +++ b/tds/src/integrationTests/java/thredds/server/services/TestEnhancements.java @@ -1,11 +1,9 @@ package thredds.server.services; -import org.junit.Ignore; import org.junit.Test; import thredds.test.util.TestOnLocalServer; import thredds.util.ContentType; import ucar.ma2.Array; -import ucar.ma2.MAMath; import ucar.nc2.NetcdfFile; import ucar.nc2.NetcdfFiles; import ucar.nc2.Variable; @@ -13,13 +11,16 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import ucar.nc2.dataset.NetcdfDatasets; import static com.google.common.truth.Truth.assertThat; public class TestEnhancements { + private static final double TOLERANCE = 1.0e-5; final static String ENHANCED_FILE = "localContent/testOffset.nc"; final static String NCML_ENHANCED_FILE = "testOffsetWithNcml.nc"; + final static String NCML_ENHANCE_NONE_FILE = "testOffsetWithNcmlEnhanceNone.nc"; final static String ENHANCED_VAR_NAME = "variableWithOffset"; final static String NOT_ENHANCED_VAR_NAME = "variableWithoutOffset"; @@ -31,14 +32,7 @@ public void testNCSSWithEnhancements() throws IOException { final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.netcdf); try (NetcdfFile netcdfFile = NetcdfFiles.openInMemory("test_data.nc", content)) { - final Variable enhancedVar = netcdfFile.findVariable(ENHANCED_VAR_NAME); - final Variable orgVar = netcdfFile.findVariable(NOT_ENHANCED_VAR_NAME); - assertThat(enhancedVar != null).isTrue(); - assertThat(orgVar != null).isTrue(); - assertThat(enhancedVar.findAttribute("add_offset")).isNull(); - final Array values1 = enhancedVar.read(); - final Array values2 = orgVar.read(); - MAMath.nearlyEquals(values1, values2); + checkResultWithEnhancements(netcdfFile, 0, true); } } @@ -50,16 +44,51 @@ public void testNCSSWithEnhancementsNcML() throws IOException { final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.netcdf); try (NetcdfFile netcdfFile = NetcdfFiles.openInMemory("test_data.nc", content)) { - final Variable enhancedVar = netcdfFile.findVariable(ENHANCED_VAR_NAME); - final Variable orgVar = netcdfFile.findVariable(NOT_ENHANCED_VAR_NAME); - assertThat(enhancedVar != null).isTrue(); - assertThat(orgVar != null).isTrue(); - assertThat(orgVar.findAttribute("add_offset")).isNull(); - final Array values1 = enhancedVar.read(); - final Array values2 = orgVar.read(); - for (int i = 0; i < values1.getSize(); i++) { - assertThat(values1.getDouble(i)).isEqualTo(values2.getDouble(i) + 100); - } + checkResultWithEnhancements(netcdfFile, 100, true); + } + } + + @Test + public void testOpendapWithEnhancements() throws IOException { + final String endpoint = TestOnLocalServer.withHttpPath("/dodsC/" + ENHANCED_FILE); + + try (NetcdfFile netcdfFile = NetcdfDatasets.openFile(endpoint, null)) { + // Does not apply dataset attribute enhancements to data + checkResultWithEnhancements(netcdfFile, -100, true); + } + } + + @Test + public void testOpendapWithEnhancementsNcML() throws IOException { + final String endpoint = TestOnLocalServer.withHttpPath("/dodsC/" + NCML_ENHANCED_FILE); + + try (NetcdfFile netcdfFile = NetcdfDatasets.openFile(endpoint, null)) { + // Does apply NcML enhancements to data with enhance="all" + checkResultWithEnhancements(netcdfFile, 100, true); + } + } + + @Test + public void testOpendapWithEnhanceNoneNcML() throws IOException { + final String endpoint = TestOnLocalServer.withHttpPath("/dodsC/" + NCML_ENHANCE_NONE_FILE); + + try (NetcdfFile netcdfFile = NetcdfDatasets.openFile(endpoint, null)) { + // Does not apply NcML enhancements to data with enhance="none" + checkResultWithEnhancements(netcdfFile, -100, false); + } + } + + private void checkResultWithEnhancements(NetcdfFile netcdfFile, int expectedDiff, boolean shouldRemoveOffsetAtt) + throws IOException { + final Variable enhancedVar = netcdfFile.findVariable(ENHANCED_VAR_NAME); + final Variable orgVar = netcdfFile.findVariable(NOT_ENHANCED_VAR_NAME); + assertThat(enhancedVar != null).isTrue(); + assertThat(orgVar != null).isTrue(); + assertThat(orgVar.findAttribute("add_offset") == null).isEqualTo(shouldRemoveOffsetAtt); + final Array values1 = enhancedVar.read(); + final Array values2 = orgVar.read(); + for (int i = 0; i < values1.getSize(); i++) { + assertThat(values1.getDouble(i)).isWithin(TOLERANCE).of(values2.getDouble(i) + expectedDiff); } } } diff --git a/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java b/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java index c41f364957..126039b3dd 100644 --- a/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java +++ b/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java @@ -133,20 +133,41 @@ public void shouldGetCapabilitiesForDatasetScanWithNcml() { @Test public void shouldApplyOffsetToData() throws IOException, JDOMException { - final String[] variableNames = {"variableWithOffset", "variableWithoutOffset"}; - for (String variableName : variableNames) { - final String endpoint = TestOnLocalServer.withHttpPath("/wms/scanLocal/testOffset.nc?" + "LAYERS=" + variableName - + "&service=WMS&version=1.3.0&CRS=CRS:84&BBOX=0,0,10,10&WIDTH=100&HEIGHT=100" - + "&REQUEST=GetFeatureInfo&QUERY_LAYERS=" + variableName + "&i=0&j=0"); - final byte[] result = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.xmlwms); - - final Reader reader = new StringReader(new String(result, StandardCharsets.UTF_8)); - final Document doc = new SAXBuilder().build(reader); - final XPathExpression xpath = XPathFactory.instance().compile("//FeatureInfo/value", Filters.element()); - final Element element = xpath.evaluateFirst(doc); - - assertThat(element.getContentSize()).isEqualTo(1); - assertThat(Double.valueOf(element.getText())).isWithin(TOLERANCE).of(7.5); - } + final String datasetPath = "scanLocal/testOffset.nc"; + + final String withOffsetEndpoint = createGetFeatureInfoEndpoint(datasetPath, "variableWithOffset"); + checkValue(withOffsetEndpoint, 7.5); + + final String withoutOffsetEndpoint = createGetFeatureInfoEndpoint(datasetPath, "variableWithoutOffset"); + checkValue(withoutOffsetEndpoint, 7.5); + } + + @Test + public void shouldApplyNcmlOffsetToData() throws IOException, JDOMException { + final String datasetPath = "testOffsetWithNcml.nc"; + + final String withOffsetEndpoint = createGetFeatureInfoEndpoint(datasetPath, "variableWithOffset"); + checkValue(withOffsetEndpoint, 7.5); + + final String withoutOffsetEndpoint = createGetFeatureInfoEndpoint(datasetPath, "variableWithoutOffset"); + checkValue(withoutOffsetEndpoint, -92.5); + } + + private String createGetFeatureInfoEndpoint(String path, String variableName) { + return TestOnLocalServer.withHttpPath("/wms/" + path + "?LAYERS=" + variableName + + "&service=WMS&version=1.3.0&CRS=CRS:84&BBOX=0,0,10,10&WIDTH=100&HEIGHT=100" + + "&REQUEST=GetFeatureInfo&QUERY_LAYERS=" + variableName + "&i=0&j=0"); + } + + private void checkValue(String endpoint, double expectedValue) throws IOException, JDOMException { + final byte[] result = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.xmlwms); + + final Reader reader = new StringReader(new String(result, StandardCharsets.UTF_8)); + final Document doc = new SAXBuilder().build(reader); + final XPathExpression xpath = XPathFactory.instance().compile("//FeatureInfo/value", Filters.element()); + final Element element = xpath.evaluateFirst(doc); + + assertThat(element.getContentSize()).isEqualTo(1); + assertThat(Double.valueOf(element.getText())).isWithin(TOLERANCE).of(expectedValue); } } diff --git a/tds/src/test/content/thredds/catalog.xml b/tds/src/test/content/thredds/catalog.xml index 221c0de1f0..2d0aa77c6f 100644 --- a/tds/src/test/content/thredds/catalog.xml +++ b/tds/src/test/content/thredds/catalog.xml @@ -60,6 +60,15 @@ + + all + + + + + + Date: Thu, 11 Jan 2024 16:25:09 -0700 Subject: [PATCH 059/120] Fix javadoc warnings (#446) --- .../main/java/opendap/servers/SubClause.java | 2 +- .../java/opendap/servers/TopLevelClause.java | 2 +- .../opendap/servers/parsers/CeParser.java | 2 +- .../main/java/opendap/servlet/DummySink.java | 2 +- .../java/thredds/server/catalog/DataRoot.java | 2 +- .../thredds/util/ThreddsConfigReader.java | 2 +- .../thredds/test/util/TdsUnitTestCommon.java | 2 +- .../main/java/ucar/nc2/dt/UGridDatatype.java | 20 ++++++------- .../ucar/nc2/dt/ugrid/geom/LatLonPoint2D.java | 2 +- .../nc2/dt/ugrid/geom/LatLonRectangle2D.java | 1 - .../java/ucar/nc2/dt/ugrid/geom/Point3D.java | 5 ++-- .../ucar/nc2/dt/ugrid/geom/Polygon2D.java | 10 +++---- .../java/ucar/nc2/dt/ugrid/geom/Vector3D.java | 28 +++++++++---------- .../ugrid/rtree/IntProcedureEntriesList.java | 4 +-- .../ugrid/rtree/IntProcedureEntriesStack.java | 6 ++-- .../java/ucar/nc2/dt/ugrid/rtree/Node.java | 14 +++++----- .../java/ucar/nc2/dt/ugrid/rtree/RTree.java | 12 ++++---- .../java/ucar/nc2/dt/ugrid/utils/AsaMath.java | 16 +++++------ .../validation/NcssGridRequestValidator.java | 4 +-- .../thredds/server/opendap/NcSDArray.java | 6 ++-- .../thredds/server/opendap/NcSDCharArray.java | 2 +- .../java/thredds/server/opendap/NcSDGrid.java | 4 +-- .../java/thredds/server/viewer/Viewer.java | 2 +- .../server/viewer/ViewerLinkProvider.java | 2 +- .../server/wfs/WFSExceptionWriter.java | 1 - .../server/wms/config/WmsDetailedConfig.java | 2 +- .../servlet/filter/RequestPathFilter.java | 4 +-- .../servlet/filter/RequestQueryFilter.java | 4 +-- .../util/StringValidateEncodeUtils.java | 12 ++++---- .../main/java/ucar/util/prefs/XMLStore.java | 2 +- 30 files changed, 87 insertions(+), 90 deletions(-) diff --git a/opendap/server/src/main/java/opendap/servers/SubClause.java b/opendap/server/src/main/java/opendap/servers/SubClause.java index f0fbab9c6c..db88b26c95 100644 --- a/opendap/server/src/main/java/opendap/servers/SubClause.java +++ b/opendap/server/src/main/java/opendap/servers/SubClause.java @@ -45,7 +45,7 @@ * Represents a sub-clause of the selection portion of a constraint * expression. A sub-clause is any part of a constraint that * can be evaluated to a BaseType value. For instance, the constraint - * "var1>=function(var2,var3)" would have sub clauses "var1" and + * "{@code var1>=function(var2,var3)}" would have sub clauses "var1" and * "function(var2,var3)". The latter would in turn have the sub-clauses * "var2" and "var3". *

diff --git a/opendap/server/src/main/java/opendap/servers/TopLevelClause.java b/opendap/server/src/main/java/opendap/servers/TopLevelClause.java index 418c32039d..9e7f479e21 100644 --- a/opendap/server/src/main/java/opendap/servers/TopLevelClause.java +++ b/opendap/server/src/main/java/opendap/servers/TopLevelClause.java @@ -45,7 +45,7 @@ *

*

* A top-level clause is a boolean expression - * preceded by "&" in the CE, such as "lat>10.0", or "function(var1,var2)". + * preceded by "{@code &}" in the CE, such as "{@code lat>10.0}", or "{@code function(var1,var2)}". * The top-level clause may contain sub-clauses which can be evaluated * individually. *

diff --git a/opendap/server/src/main/java/opendap/servers/parsers/CeParser.java b/opendap/server/src/main/java/opendap/servers/parsers/CeParser.java index ef2d4242fe..236286fb6b 100644 --- a/opendap/server/src/main/java/opendap/servers/parsers/CeParser.java +++ b/opendap/server/src/main/java/opendap/servers/parsers/CeParser.java @@ -1398,7 +1398,7 @@ private static final byte yytranslate_(int t) { /** * Instantiates the Bison-generated parser. * - * @param yylexer The scanner that will supply tokens to the parser. + * @param factory The scanner that will supply tokens to the parser. */ public CeParser(BaseTypeFactory factory) { diff --git a/opendap/server/src/main/java/opendap/servlet/DummySink.java b/opendap/server/src/main/java/opendap/servlet/DummySink.java index 1e9f8d1f73..caf6acbbe8 100644 --- a/opendap/server/src/main/java/opendap/servlet/DummySink.java +++ b/opendap/server/src/main/java/opendap/servlet/DummySink.java @@ -62,7 +62,7 @@ public class DummySink extends DeflaterOutputStream { * * @param out the output stream * @param def the compressor ("deflater") - * @throws IllegalArgumentException if size is <= 0 + * @throws IllegalArgumentException if size is {@code <= 0} */ public DummySink(OutputStream out, Deflater def, int size) { super(out); diff --git a/tdcommon/src/main/java/thredds/server/catalog/DataRoot.java b/tdcommon/src/main/java/thredds/server/catalog/DataRoot.java index 41b9a6edc9..e410065a06 100644 --- a/tdcommon/src/main/java/thredds/server/catalog/DataRoot.java +++ b/tdcommon/src/main/java/thredds/server/catalog/DataRoot.java @@ -15,7 +15,7 @@ /** * A DataRoot matches URLs to the objects that can serve them. - * A DataRootPathMatcher manages a hash tree of path -> DataRoot + * A DataRootPathMatcher manages a hash tree of path {@literal ->} DataRoot *

* Possible design: * catKey : which catalog defined this? not present at the moment diff --git a/tdcommon/src/main/java/thredds/util/ThreddsConfigReader.java b/tdcommon/src/main/java/thredds/util/ThreddsConfigReader.java index e5500313c4..dcb2c6367a 100644 --- a/tdcommon/src/main/java/thredds/util/ThreddsConfigReader.java +++ b/tdcommon/src/main/java/thredds/util/ThreddsConfigReader.java @@ -21,7 +21,7 @@ /** * read threddsConfig.xml, make elements available - * used by Tds & Tdm + * used by Tds and Tdm * * @author caron * @since 5/15/13 diff --git a/tds-test-utils/src/main/java/thredds/test/util/TdsUnitTestCommon.java b/tds-test-utils/src/main/java/thredds/test/util/TdsUnitTestCommon.java index da8b47b67c..56df6f0a92 100644 --- a/tds-test-utils/src/main/java/thredds/test/util/TdsUnitTestCommon.java +++ b/tds-test-utils/src/main/java/thredds/test/util/TdsUnitTestCommon.java @@ -384,7 +384,7 @@ public static String canonicalpath(String path) { /** * return true if this path appears to start with a windows drive letter * - * @param path + * @param path to check * @return true, if path has drive letter */ diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/UGridDatatype.java b/tds-ugrid/src/main/java/ucar/nc2/dt/UGridDatatype.java index 758cef5208..baf36fb5e4 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/UGridDatatype.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/UGridDatatype.java @@ -255,12 +255,12 @@ public interface UGridDatatype extends ucar.nc2.dt.GridDatatype { * This reads an arbitrary data slice, returning the data in * canonical order (rt-e-t-z-y-x). If any dimension does not exist, ignore it. * - * @param rt_index if < 0, get all of runtime dim; if valid index, fix slice to that value. - * @param e_index if < 0, get all of ensemble dim; if valid index, fix slice to that value. - * @param t_index if < 0, get all of time dim; if valid index, fix slice to that value. - * @param z_index if < 0, get all of z dim; if valid index, fix slice to that value. - * @param y_index if < 0, get all of y dim; if valid index, fix slice to that value. - * @param x_index if < 0, get all of x dim; if valid index, fix slice to that value. + * @param rt_index if {@code < 0}, get all of runtime dim; if valid index, fix slice to that value. + * @param e_index if {@code < 0}, get all of ensemble dim; if valid index, fix slice to that value. + * @param t_index if {@code < 0}, get all of time dim; if valid index, fix slice to that value. + * @param z_index if {@code < 0}, get all of z dim; if valid index, fix slice to that value. + * @param y_index if {@code < 0}, get all of y dim; if valid index, fix slice to that value. + * @param x_index if {@code < 0}, get all of x dim; if valid index, fix slice to that value. * @return data[rt,e,t,z,y,x], eliminating missing or fixed dimension. * @throws java.io.IOException on io error */ @@ -272,10 +272,10 @@ public Array readDataSlice(int rt_index, int e_index, int t_index, int z_index, * canonical order (t-z-y-x). If any dimension does not exist, ignore it. * For backwards compatibility for grids with no runtime or ensemble dimensions. * - * @param t_index if < 0, get all of time dim; if valid index, fix slice to that value. - * @param z_index if < 0, get all of z dim; if valid index, fix slice to that value. - * @param y_index if < 0, get all of y dim; if valid index, fix slice to that value. - * @param x_index if < 0, get all of x dim; if valid index, fix slice to that value. + * @param t_index if {@code < 0}, get all of time dim; if valid index, fix slice to that value. + * @param z_index if {@code < 0}, get all of z dim; if valid index, fix slice to that value. + * @param y_index if {@code < 0}, get all of y dim; if valid index, fix slice to that value. + * @param x_index if {@code < 0}, get all of x dim; if valid index, fix slice to that value. * @return data[rt,e,t,z,y,x], eliminating missing or fixed dimension. * @throws java.io.IOException on io error */ diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonPoint2D.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonPoint2D.java index e311202d9b..dbb546f7f9 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonPoint2D.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonPoint2D.java @@ -420,7 +420,7 @@ public Double(double lat, double lon) { * latitude * @param lon * longitude. - * @param isRadians + * @param isRadian true if in radians, false if in degrees * true of values are radians. */ public Double(double lat, double lon, boolean isRadian) { diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonRectangle2D.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonRectangle2D.java index fd795c6fa5..db730a104d 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonRectangle2D.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonRectangle2D.java @@ -344,7 +344,6 @@ public void extend(LatLonPoint2D point) { * arrangement of LLy, LLx, * URy, URx. * - * @param rect * @param bounds */ public void extend(double[] bounds) { diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java index fabc6753a2..d90999deb6 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java @@ -258,8 +258,9 @@ public String toString() { * instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor * methods below. * - * @see java.awt.geom.Point3D.Float - * @see java.awt.geom.Point3D.Double + * see java.awt.geom.Point3D.Float + * see java.awt.geom.Point3D.Double + * * @see java.awt.Point */ protected Point3D() {} diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Polygon2D.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Polygon2D.java index 4b6cd64e4a..30b8f699d1 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Polygon2D.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Polygon2D.java @@ -1145,9 +1145,8 @@ public Float(float x, float y) { } /** - * Create a new polygon with the provided x & y locations. If the two arrays are of unequal length, an empty polygon - * is created. NaN - * values are ignored + * Create a new polygon with the provided x and y locations. If the two arrays are of unequal length, an empty + * polygon is created. NaN values are ignored * * @param xlocs * the array of x locations. @@ -1504,9 +1503,8 @@ public Double(double x, double y) { } /** - * Create a new polygon with the provided x & y locations. If the two arrays are of unequal length, an empty polygon - * is created. NaN - * values are ignored + * Create a new polygon with the provided x and y locations. If the two arrays are of unequal length, an empty + * polygon is created. NaN values are ignored * * @param xlocs * the array of x locations. diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Vector3D.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Vector3D.java index 0304992231..890776133b 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Vector3D.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Vector3D.java @@ -34,7 +34,7 @@ public Vector3D() { } /** - * Creates a new instance of Vector3D with an origin of (0, 0, 0) and the specified u, v & w magnitudes. + * Creates a new instance of Vector3D with an origin of (0, 0, 0) and the specified u, v, and w magnitudes. * * @param u * The double u-component of the vector. @@ -50,7 +50,7 @@ public Vector3D(double u, double v, double w) { } /** - * Creates a new instance of Vector3D with the specified origin and u, v & w magnitudes. + * Creates a new instance of Vector3D with the specified origin and u, v, and w magnitudes. * * @param origin * the Point3D origin of the vector. @@ -209,28 +209,28 @@ public static Vector3D sub(Vector3D v1, Vector3D v2) { } /** - * Multiplies the numerical value of each component of the first vector with the values in the second vector. + * Multiplies the numerical value of each component of the vector by a given scalar. * - * @param v1 - * the first Vector3D - * @param v2 - * the second Vector3D + * @param v + * the Vector3D + * @param d + * the value to multiply the vector by * - * @return a Vector3D representing the product of the two vectors + * @return a Vector3D representing the rescaled vector */ public static Vector3D mult(Vector3D v, double d) { return (new Vector3D(v.getU() * d, v.getV() * d, v.getW() * d)); } /** - * Divides the numerical value of each component of the first vector by the values in the second vector. + * Divides the numerical value of each component of the vector by a given scalar. * - * @param v1 - * the first Vector3D - * @param v2 - * the second Vector3D + * @param v + * the Vector3D + * @param d + * the value to divide the vector by * - * @return a Vector3D representing the quotient of the two vectors + * @return a Vector3D representing the rescaled vector */ public static Vector3D div(Vector3D v, double d) { return (new Vector3D(v.getU() / d, v.getV() / d, v.getW() / d)); diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/IntProcedureEntriesList.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/IntProcedureEntriesList.java index 282f18bfb2..018808a819 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/IntProcedureEntriesList.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/IntProcedureEntriesList.java @@ -21,7 +21,7 @@ *
* Simply pass an instance of this class to an rtree search and access the retrieved nodes' indices with * {@link #get(int)} and - * {@link #getValues())}. These indices are returned as Integer objects. + * {@link #getValues()}. These indices are returned as Integer objects. * * * @author TPL @@ -76,7 +76,7 @@ public void clear() { * @return the int value of the entry at the given index * * @throws IndexOutOfBoundsException - * if index is out of range (index < 0 || index >= size()) + * if index is out of range ({@code index < 0 || index >= size()}) */ public int get(int index) throws IndexOutOfBoundsException { return entryList.get(index); diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/IntProcedureEntriesStack.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/IntProcedureEntriesStack.java index 7efa9d8520..465c60f504 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/IntProcedureEntriesStack.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/IntProcedureEntriesStack.java @@ -135,13 +135,13 @@ public Integer peek() { /** * Retrieves the value of the top-most item on this stack * - * @param indices - * an integer indices + * @param index + * an integer index * * @return an Integer value * * @throws IndexOutOfBoundsException - * if the indices is out of range (indices < 0 || indices >= size()) + * if the indices is out of range ({@code indices < 0 || indices >= size()}) */ public Integer peek(int index) throws IndexOutOfBoundsException { return this.indices.get(index); diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/Node.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/Node.java index a5417242fa..5ddd862179 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/Node.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/Node.java @@ -183,7 +183,7 @@ void recalculateMBR(LatLonPolygon2D deletedRectangle) { /** - * Adds the the given poly to mbr as if mbr were a rectangle. Neither objects are modified. + * Adds the given poly to mbr as if mbr were a rectangle. Neither objects are modified. * * @param mbr * the minimum bounding rectangle @@ -201,12 +201,12 @@ public static LatLonRectangle2D expandMBR(final LatLonRectangle2D mbr, final Lat /** - * Adds the the given rect to mbr as if mbr were a rectangle. Neither objects are modified. + * Adds the given rect to mbr as if mbr were a rectangle. Neither objects are modified. * * @param mbr * the minimum bounding rectangle - * @param poly - * a polygon to be fit inside the mbr + * @param rect + * a rectangle to be fit inside the mbr * * @return the bounding rectangle of the union between mbr and poly as polgon2d object */ @@ -218,12 +218,12 @@ public static LatLonRectangle2D expandMBR(final LatLonRectangle2D mbr, final Lat /** - * Adds the the given rect to mbr as if mbr were a rectangle. Neither objects are modified. + * Adds the given rect to mbr as if mbr were a rectangle. Neither objects are modified. * * @param mbr * the minimum bounding rectangle - * @param poly - * a polygon to be fit inside the mbr + * @param latLons + * lat/lon array with a length of 4 which contains lat/lon coords in the arrangement of LLy, LLx, URy, URx. * * @return the bounding rectangle of the union between mbr and poly as polgon2d object */ diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/RTree.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/RTree.java index f825a9bfab..2131149493 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/RTree.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/rtree/RTree.java @@ -189,7 +189,7 @@ public RTree(Properties props) { * *

* - * @see com.asascience.data.rtree.SpatialIndex#init(Properties) + * see com.asascience.data.rtree.SpatialIndex#init(Properties) */ public void init(Properties props) { maxNodeEntries = Integer.parseInt(props.getProperty("MaxNodeEntries", "0")); @@ -228,7 +228,7 @@ public void init(Properties props) { } /** - * @see com.asascience.data.rtree.SpatialIndex#add(Rectangle2D, int) + * see com.asascience.data.rtree.SpatialIndex#add(Rectangle2D, int) */ public void add(LatLonPolygon2D r, int id) { // if (log.isDebugEnabled()) { @@ -621,7 +621,7 @@ public IntArrayList contains(LatLonPolygon2D r) { /** - * @see com.asascience.data.rtree.SpatialIndex#contains(LatLonRectangle2D, IntProcedure) + * see com.asascience.data.rtree.SpatialIndex#contains(LatLonRectangle2D, IntProcedure) */ public void contains(LatLonPolygon2D r, IntProcedure v) { // find all rectangles in the tree that are contained by the passed @@ -678,14 +678,14 @@ public void contains(LatLonPolygon2D r, IntProcedure v) { /** - * @see com.asascience.data.rtree.SpatialIndex#size() + * see com.asascience.data.rtree.SpatialIndex#size() */ public int size() { return size; } /** - * @see com.asascience.data.rtree.SpatialIndex#getBounds() + * see com.asascience.data.rtree.SpatialIndex#getBounds() */ public LatLonRectangle2D getBounds() { LatLonRectangle2D bounds = null; @@ -698,7 +698,7 @@ public LatLonRectangle2D getBounds() { } /** - * @see com.asascience.data.rtree.SpatialIndex#getVersion() + * see com.asascience.data.rtree.SpatialIndex#getVersion() */ public String getVersion() { return "RTree-" + VERSION; diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/utils/AsaMath.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/utils/AsaMath.java index 398a8a3bc1..7c37f0e6d5 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/utils/AsaMath.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/utils/AsaMath.java @@ -50,7 +50,7 @@ public class AsaMath { private final double THREE_QUARTER_RAD_CIRCLE = (3 * Math.PI) * 0.5; /** - * Calculates speed from U & V + * Calculates speed from U and V * * @param u * the u component @@ -63,7 +63,7 @@ public static double calcSpeed(double u, double v) { } /** - * Calculates direction from U & V + * Calculates direction from U and V * * @param u * the u component @@ -77,7 +77,7 @@ public static double calcDirection(double u, double v) { } /** - * Calculates both speed and direction from U & V + * Calculates both speed and direction from U and V * * @param u * the u component @@ -90,7 +90,7 @@ public static double[] calcSpeedDirection(double u, double v) { } /** - * Calculates speeds and directions from an array of U & V pairs. The arrays MUST be of the same length. + * Calculates speeds and directions from an array of U and V pairs. The arrays MUST be of the same length. * * @param us * the array of u components @@ -136,7 +136,7 @@ public static double[] calcUVFromSpeedDir(double speed, double direction) { } /** - * Calculates Us & Vs from arrays of speeds and directions. Arrays MUST be the same length. + * Calculates Us and Vs from arrays of speeds and directions. Arrays MUST be the same length. * * @param speeds * @param directions @@ -422,10 +422,10 @@ public static float[] calculateModes(float[] numbers, Float fillVal) { /** * Rounds value to the closest multiple of {@code nearest}. The {@code roundDirection} parameter - * indicates which direction + * {@literal indicates which direction * to force rounding. A '0' rounds naturally (up for values > 0.5, down for values < 0.5). A number > 0 forces a round * up, while < 0 - * forces a round down. + * forces a round down.} *

* Examples: *

@@ -444,7 +444,7 @@ public static float[] calculateModes(float[] numbers, Float fillVal) { * @param nearest * the value of the nearest number to round to * @param roundDirection - * the direction to force rounding. 0 uses natural rounding, <0 always rounds up, >0 + * the direction to force rounding. {@code 0} uses natural rounding, {@code <0} always rounds up, {@code >0} * always rounds down. * * @return the rounded number diff --git a/tds/src/main/java/thredds/server/ncss/validation/NcssGridRequestValidator.java b/tds/src/main/java/thredds/server/ncss/validation/NcssGridRequestValidator.java index 434bafd0ed..d206bdbfb7 100644 --- a/tds/src/main/java/thredds/server/ncss/validation/NcssGridRequestValidator.java +++ b/tds/src/main/java/thredds/server/ncss/validation/NcssGridRequestValidator.java @@ -11,10 +11,10 @@ import javax.validation.ConstraintValidatorContext; /** - * Validator for ncss GridRequest + * {@literal Validator for ncss GridRequest * 1) if has either latitude or longitude, has both * 2) if has any of latlon bb, has all. north > south, east > west - * 3) if has any of projection bb, has all. min < max + * 3) if has any of projection bb, has all. min < max} *

* Messages in WEB-INF/classes/ValidationMessages.properties * diff --git a/tds/src/main/java/thredds/server/opendap/NcSDArray.java b/tds/src/main/java/thredds/server/opendap/NcSDArray.java index f2876ff579..682bf78ac0 100644 --- a/tds/src/main/java/thredds/server/opendap/NcSDArray.java +++ b/tds/src/main/java/thredds/server/opendap/NcSDArray.java @@ -19,9 +19,9 @@ import java.util.List; /** - * Wraps a netcdf variable with rank > 0 as an SDArray. - * For char arrays, use NcSDString (rank 0 or 1) or NcSDCharArray (rank > 1). - * + * {@literal Wraps a netcdf variable with rank > 0 as an SDArray. + * For char arrays, use NcSDString (rank 0 or 1) or NcSDCharArray (rank > 1).} + * * @author jcaron * @see NcSDCharArray */ diff --git a/tds/src/main/java/thredds/server/opendap/NcSDCharArray.java b/tds/src/main/java/thredds/server/opendap/NcSDCharArray.java index 839d55bbee..219b94235f 100644 --- a/tds/src/main/java/thredds/server/opendap/NcSDCharArray.java +++ b/tds/src/main/java/thredds/server/opendap/NcSDCharArray.java @@ -18,7 +18,7 @@ import java.util.*; /** - * Wraps a netcdf char variable with rank > 1 as an SDArray. + * {@literal Wraps a netcdf char variable with rank > 1 as an SDArray.} * * @author jcaron */ diff --git a/tds/src/main/java/thredds/server/opendap/NcSDGrid.java b/tds/src/main/java/thredds/server/opendap/NcSDGrid.java index 52ddea5c5b..2d19b9ab23 100644 --- a/tds/src/main/java/thredds/server/opendap/NcSDGrid.java +++ b/tds/src/main/java/thredds/server/opendap/NcSDGrid.java @@ -16,8 +16,8 @@ import java.util.ArrayList; /** - * Wraps a netcdf variable with rank > 0, whose dimensions all - * have coordinate variables, as an SDGrid. + * {@literal Wraps a netcdf variable with rank > 0, whose dimensions all + * have coordinate variables, as an SDGrid.} * * @author jcaron */ diff --git a/tds/src/main/java/thredds/server/viewer/Viewer.java b/tds/src/main/java/thredds/server/viewer/Viewer.java index 66de43eac8..37464f89af 100644 --- a/tds/src/main/java/thredds/server/viewer/Viewer.java +++ b/tds/src/main/java/thredds/server/viewer/Viewer.java @@ -10,7 +10,7 @@ /** * Interface for plugging in Viewers. * Generally, these are implemented with jnlp files in /content/thredds/view/views/*.jnlp - * You can customize by adding parameters to the jnlp file, eg parm=subst&name=value. + * You can customize by adding parameters to the jnlp file, eg {@code parm=subst&name=value}. * Then all instances of "{param}" will be replaced by subst, and * all instances of "{name}" will be replaced by value, etc. * diff --git a/tds/src/main/java/thredds/server/viewer/ViewerLinkProvider.java b/tds/src/main/java/thredds/server/viewer/ViewerLinkProvider.java index cf5dcbadb3..c4189981ec 100644 --- a/tds/src/main/java/thredds/server/viewer/ViewerLinkProvider.java +++ b/tds/src/main/java/thredds/server/viewer/ViewerLinkProvider.java @@ -11,7 +11,7 @@ /** * Interface for plugging in Viewers. * Generally, these are implemented with jnlp files in /content/thredds/view/views/*.jnlp - * You can customizing by adding parameters to the jnlp file, eg parm=subst&name=value. + * You can customizing by adding parameters to the jnlp file, eg {@code parm=subst&name=value}. * Then all instances of "{param}" will be replaced by subst, and * all instances of "{name}" will be replaced by value, etc. */ diff --git a/tds/src/main/java/thredds/server/wfs/WFSExceptionWriter.java b/tds/src/main/java/thredds/server/wfs/WFSExceptionWriter.java index b3d283649d..33c02bb669 100644 --- a/tds/src/main/java/thredds/server/wfs/WFSExceptionWriter.java +++ b/tds/src/main/java/thredds/server/wfs/WFSExceptionWriter.java @@ -45,7 +45,6 @@ public void write(HttpServletResponse hsr) throws IOException { * @param text the text associated with the exception * @param locator the locator associated with the exception * @param ExceptionCode the standardized exception code - * @param hsr http response to write to */ public WFSExceptionWriter(String text, String locator, String ExceptionCode) { this.text = text; diff --git a/tds/src/main/java/thredds/server/wms/config/WmsDetailedConfig.java b/tds/src/main/java/thredds/server/wms/config/WmsDetailedConfig.java index 9b43101197..c8db222bd3 100644 --- a/tds/src/main/java/thredds/server/wms/config/WmsDetailedConfig.java +++ b/tds/src/main/java/thredds/server/wms/config/WmsDetailedConfig.java @@ -49,7 +49,7 @@ * allowFeatureInfo, settings can be overridden by matching on the variable name. The order of precedence on which * settings are determined is as follows: * - * default < standard_name match < url path match < variable name match + * {@literal default < standard_name match < url path match < variable name match} * */ public class WmsDetailedConfig { diff --git a/tds/src/main/java/thredds/servlet/filter/RequestPathFilter.java b/tds/src/main/java/thredds/servlet/filter/RequestPathFilter.java index dbd8f6386c..366b6a2286 100644 --- a/tds/src/main/java/thredds/servlet/filter/RequestPathFilter.java +++ b/tds/src/main/java/thredds/servlet/filter/RequestPathFilter.java @@ -23,9 +23,9 @@ *

*

* Note: - * Currently also rejecting strings that contain any less than ("<"), + * {@literal Currently also rejecting strings that contain any less than ("<"), * greater than (">"), or backslash ("\") characters. [May loosen this - * restriction later.] + * restriction later.]} * * @author edavis * @see thredds.util.StringValidateEncodeUtils#validPath(String) diff --git a/tds/src/main/java/thredds/servlet/filter/RequestQueryFilter.java b/tds/src/main/java/thredds/servlet/filter/RequestQueryFilter.java index 0fc7857e09..f21f7d0b88 100644 --- a/tds/src/main/java/thredds/servlet/filter/RequestQueryFilter.java +++ b/tds/src/main/java/thredds/servlet/filter/RequestQueryFilter.java @@ -21,9 +21,9 @@ *

*

* Note: - * Currently also rejecting strings that contain any less than ("<"), + * {@literal Currently also rejecting strings that contain any less than ("<"), * greater than (">"), or backslash ("\") characters. [May loosen this - * restriction later.] + * restriction later.]} *

*

* Note: diff --git a/tds/src/main/java/thredds/util/StringValidateEncodeUtils.java b/tds/src/main/java/thredds/util/StringValidateEncodeUtils.java index 1d495684f2..e3b3debd29 100644 --- a/tds/src/main/java/thredds/util/StringValidateEncodeUtils.java +++ b/tds/src/main/java/thredds/util/StringValidateEncodeUtils.java @@ -160,11 +160,11 @@ public static boolean validIdString(String id) { private final static Pattern INVALID_CHARACTERS_FOR_ID_STRING_PATTERN = Pattern.compile("[\\p{Zs}]"); /** - * Return true if the given String contains any less than ("<") or - * greater than (">") characters; otherwise return false. + * {@literal Return true if the given String contains any less than ("<") or + * greater than (">") characters; otherwise return false.} * * @param string the String to check. - * @return true if the given String contains any less than ("<") or greater than (">") characters + * @return {@literal true if the given String contains any less than ("<") or greater than (">") characters} */ public static boolean containsAngleBracketCharacters(String string) { if (string == null) @@ -176,11 +176,11 @@ public static boolean containsAngleBracketCharacters(String string) { } /** - * Return true if the given String contains any ampersand ("&") - * characters; otherwise return false. + * {@literal Return true if the given String contains any ampersand ("&") + * characters; otherwise return false.} * * @param string the String to check. - * @return true if the given String contains any ampersand ("&") characters + * @return {@literal true if the given String contains any ampersand ("&") characters} */ public static boolean containsAmpersandCharacters(String string) { if (string == null) diff --git a/tds/src/main/java/ucar/util/prefs/XMLStore.java b/tds/src/main/java/ucar/util/prefs/XMLStore.java index ab282990a4..aa1fa1c2db 100644 --- a/tds/src/main/java/ucar/util/prefs/XMLStore.java +++ b/tds/src/main/java/ucar/util/prefs/XMLStore.java @@ -29,7 +29,7 @@ /** * This implements an XML-based backing store for PreferencesExt. * XMLStores can be chained together to provide independent collections of - * "stored defaults", eg store1 -> store2 -> store3. In this case, a call to getXXX( key) + * "stored defaults", eg {@literal store1 -> store2 -> store3}. In this case, a call to getXXX( key) * first looks in store1, and if not found, then in store2, etc. A call to * putXXX(key, value) first checks to see if the (key, value) pair already exists in any of * the chained stores; if not, then it is added to store1. From e779b59b860810ac7fe54051fd28d9e28a1579c1 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 12 Jan 2024 11:56:14 -0700 Subject: [PATCH 060/120] Add cdm-zarr to the TDS (#445) * Add zarr to tds and tds-platform * Add zarr test catalog and tests --- tds-platform/build.gradle | 1 + tds/build.gradle | 1 + .../java/thredds/tds/TestZarr.java | 39 ++++++++++++++++++ tds/src/test/content/thredds/catalog.xml | 1 + .../testdata/zarr/zarr_test_data.zarr/.zgroup | 3 ++ .../group_with_attrs/.zattrs | 3 ++ .../group_with_attrs/.zgroup | 3 ++ .../group_with_attrs/F_order_array/.zarray | 16 +++++++ .../group_with_attrs/F_order_array/.zattrs | 10 +++++ .../group_with_attrs/F_order_array/0.0 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/0.1 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/0.2 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/0.3 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/1.0 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/1.1 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/1.2 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/1.3 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/2.0 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/2.1 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/2.2 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/2.3 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/3.0 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/3.1 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/3.2 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/3.3 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/4.0 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/4.1 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/4.2 | Bin 0 -> 80 bytes .../group_with_attrs/F_order_array/4.3 | Bin 0 -> 80 bytes .../group_with_attrs/nested/.zarray | 17 ++++++++ .../group_with_attrs/nested/0/0 | Bin 0 -> 200 bytes .../group_with_attrs/nested/0/1 | Bin 0 -> 200 bytes .../group_with_attrs/nested/1/0 | Bin 0 -> 200 bytes .../group_with_attrs/nested/1/1 | Bin 0 -> 200 bytes .../group_with_attrs/partial_fill1/.zarray | 16 +++++++ .../group_with_attrs/partial_fill1/0.0 | Bin 0 -> 400 bytes .../group_with_attrs/partial_fill2/.zarray | 16 +++++++ .../group_with_attrs/partial_fill2/1.1 | Bin 0 -> 400 bytes .../group_with_attrs/uninitialized/.zarray | 16 +++++++ .../group_with_dims/.zgroup | 3 ++ .../group_with_dims/var1D/.zarray | 14 +++++++ .../group_with_dims/var1D/0 | Bin 0 -> 20 bytes .../group_with_dims/var1D/1 | Bin 0 -> 20 bytes .../group_with_dims/var1D/2 | Bin 0 -> 20 bytes .../group_with_dims/var1D/3 | Bin 0 -> 20 bytes .../group_with_dims/var2D/.zarray | 16 +++++++ .../group_with_dims/var2D/0.0 | Bin 0 -> 100 bytes .../group_with_dims/var2D/0.1 | Bin 0 -> 100 bytes .../group_with_dims/var2D/0.2 | Bin 0 -> 100 bytes .../group_with_dims/var2D/0.3 | Bin 0 -> 100 bytes .../group_with_dims/var2D/1.0 | Bin 0 -> 100 bytes .../group_with_dims/var2D/1.1 | Bin 0 -> 100 bytes .../group_with_dims/var2D/1.2 | Bin 0 -> 100 bytes .../group_with_dims/var2D/1.3 | Bin 0 -> 100 bytes .../group_with_dims/var2D/2.0 | Bin 0 -> 100 bytes .../group_with_dims/var2D/2.1 | Bin 0 -> 100 bytes .../group_with_dims/var2D/2.2 | Bin 0 -> 100 bytes .../group_with_dims/var2D/2.3 | Bin 0 -> 100 bytes .../group_with_dims/var2D/3.0 | Bin 0 -> 100 bytes .../group_with_dims/var2D/3.1 | Bin 0 -> 100 bytes .../group_with_dims/var2D/3.2 | Bin 0 -> 100 bytes .../group_with_dims/var2D/3.3 | Bin 0 -> 100 bytes .../group_with_dims/var3D/.zarray | 18 ++++++++ .../group_with_dims/var3D/0.0.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.0.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.0.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.0.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.1.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.1.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.1.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.1.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.2.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.2.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.2.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.2.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.3.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.3.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.3.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/0.3.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.0.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.0.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.0.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.0.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.1.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.1.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.1.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.1.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.2.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.2.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.2.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.2.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.3.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.3.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.3.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/1.3.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.0.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.0.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.0.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.0.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.1.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.1.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.1.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.1.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.2.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.2.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.2.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.2.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.3.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.3.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.3.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/2.3.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.0.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.0.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.0.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.0.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.1.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.1.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.1.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.1.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.2.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.2.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.2.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.2.3 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.3.0 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.3.1 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.3.2 | Bin 0 -> 500 bytes .../group_with_dims/var3D/3.3.3 | Bin 0 -> 500 bytes .../group_with_dims/var4D/.zarray | 20 +++++++++ .../group_with_dims/var4D/0.0.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.0.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.1.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.2.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/0.3.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.0.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.1.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.2.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/1.3.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.0.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.1.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.2.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/2.3.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.0.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.1.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.2.3.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.0.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.0.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.0.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.0.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.1.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.1.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.1.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.1.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.2.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.2.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.2.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.2.3 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.3.0 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.3.1 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.3.2 | Bin 0 -> 2500 bytes .../group_with_dims/var4D/3.3.3.3 | Bin 0 -> 2500 bytes .../public/testdata/zarr/zarr_test_data.zip | Bin 0 -> 745798 bytes tds/src/test/content/thredds/tds-zarr.xml | 12 ++++++ 386 files changed, 225 insertions(+) create mode 100644 tds/src/integrationTests/java/thredds/tds/TestZarr.java create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/.zgroup create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/.zattrs create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/.zgroup create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/.zarray create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/.zattrs create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/nested/.zarray create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/nested/0/0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/nested/0/1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/nested/1/0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/nested/1/1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/partial_fill1/.zarray create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/partial_fill1/0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/partial_fill2/.zarray create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/partial_fill2/1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/uninitialized/.zarray create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/.zgroup create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var1D/.zarray create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var1D/0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var1D/1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var1D/2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var1D/3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/.zarray create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var2D/3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/.zarray create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/0.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/1.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/2.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var3D/3.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/.zarray create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.0.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.1.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.2.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/0.3.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.0.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.1.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.2.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/1.3.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.0.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.1.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.2.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/2.3.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.0.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.1.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.2.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.0.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.0.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.0.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.0.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.1.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.1.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.1.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.1.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.2.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.2.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.2.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.2.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.3.0 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.3.1 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.3.2 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_dims/var4D/3.3.3.3 create mode 100644 tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zip create mode 100644 tds/src/test/content/thredds/tds-zarr.xml diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle index eeb1643374..59ba725af4 100644 --- a/tds-platform/build.gradle +++ b/tds-platform/build.gradle @@ -33,6 +33,7 @@ dependencies { api 'edu.ucar:cdm-misc' api 'edu.ucar:cdm-image' api 'edu.ucar:cdm-s3' + api 'edu.ucar:cdm-zarr' api 'edu.ucar:netcdf4' api 'edu.ucar:cdm-mcidas' api 'edu.ucar:waterml' diff --git a/tds/build.gradle b/tds/build.gradle index 1d07b94b79..298f16b894 100644 --- a/tds/build.gradle +++ b/tds/build.gradle @@ -19,6 +19,7 @@ dependencies { compile 'edu.ucar:cdm-misc' compile 'edu.ucar:cdm-image' compile 'edu.ucar:cdm-s3' + compile 'edu.ucar:cdm-zarr' compile 'edu.ucar:grib' compile 'edu.ucar:netcdf4' compile 'edu.ucar:httpservices' diff --git a/tds/src/integrationTests/java/thredds/tds/TestZarr.java b/tds/src/integrationTests/java/thredds/tds/TestZarr.java new file mode 100644 index 0000000000..c225900025 --- /dev/null +++ b/tds/src/integrationTests/java/thredds/tds/TestZarr.java @@ -0,0 +1,39 @@ +package thredds.tds; + +import static com.google.common.truth.Truth.assertThat; + +import java.nio.charset.StandardCharsets; +import javax.servlet.http.HttpServletResponse; +import org.junit.Ignore; +import org.junit.Test; +import thredds.test.util.TestOnLocalServer; + +public class TestZarr { + final private static String ZARR_DIR_PATH = "localContent/zarr/zarr_test_data.zarr"; + final private static String ZARR_ZIP_PATH = "localContent/zarr/zarr_test_data.zip"; + final private static String ZARR_S3_PATH = "s3-zarr/zarr_test_data.zarr"; + + @Test + public void shouldOpenZarrDirectory() { + checkWithOpendap(ZARR_DIR_PATH); + } + + @Test + public void shouldOpenZarrZip() { + checkWithOpendap(ZARR_ZIP_PATH); + } + + @Ignore("Still working on S3 Zarr") + @Test + public void shouldOpenObjectStoreZarrFile() { + checkWithOpendap(ZARR_S3_PATH); + } + + private static void checkWithOpendap(String path) { + final String endpoint = TestOnLocalServer.withHttpPath("dodsC/" + path + ".dds"); + final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK); + final String stringContent = new String(content, StandardCharsets.UTF_8); + + assertThat(stringContent).contains("Int32 /group_with_attrs/F_order_array[dim0 = 20][dim1 = 20];"); + } +} diff --git a/tds/src/test/content/thredds/catalog.xml b/tds/src/test/content/thredds/catalog.xml index 2d0aa77c6f..5c67dae062 100644 --- a/tds/src/test/content/thredds/catalog.xml +++ b/tds/src/test/content/thredds/catalog.xml @@ -311,6 +311,7 @@ + diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/.zgroup b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/.zgroup new file mode 100644 index 0000000000..3b7daf227c --- /dev/null +++ b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/.zgroup @@ -0,0 +1,3 @@ +{ + "zarr_format": 2 +} \ No newline at end of file diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/.zattrs b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/.zattrs new file mode 100644 index 0000000000..cf836337bf --- /dev/null +++ b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/.zattrs @@ -0,0 +1,3 @@ +{ + "group_attr": "foo" +} \ No newline at end of file diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/.zgroup b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/.zgroup new file mode 100644 index 0000000000..3b7daf227c --- /dev/null +++ b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/.zgroup @@ -0,0 +1,3 @@ +{ + "zarr_format": 2 +} \ No newline at end of file diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/.zarray b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/.zarray new file mode 100644 index 0000000000..4572daa603 --- /dev/null +++ b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/.zarray @@ -0,0 +1,16 @@ +{ + "chunks": [ + 4, + 5 + ], + "compressor": null, + "dtype": "O00dwFDF6Tf literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/0.1 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/0.1 new file mode 100644 index 0000000000000000000000000000000000000000..2e5d506d33d2c41448cd49524cb557d6f4da55dc GIT binary patch literal 80 fcmZQ&U|?WH!fZe`GG+(zkue95kBm8id}Is&6vzOL literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/0.2 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/0.2 new file mode 100644 index 0000000000000000000000000000000000000000..4fc0c650b5532e8db0e68c4d178a899cc543fdcd GIT binary patch literal 80 fcmd;LU|`@v!rVYMGUfsDkufijkBs?%d}Is&B`^T- literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/0.3 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/0.3 new file mode 100644 index 0000000000000000000000000000000000000000..47880e61ccedaff7521ee760dfa2d0c1c0e0ffb4 GIT binary patch literal 80 fcmd;QU|`@!!U8}xG8P2#k+BevkBo(Zd}Is&HJAZa literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.0 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.0 new file mode 100644 index 0000000000000000000000000000000000000000..0a190306b1a6cba0e874e673f1ce4d313714d815 GIT binary patch literal 80 ccmZQzKn09IE;42U@{ut!kdKU6fP7>O00dwFDF6Tf literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.1 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.1 new file mode 100644 index 0000000000000000000000000000000000000000..2e5d506d33d2c41448cd49524cb557d6f4da55dc GIT binary patch literal 80 fcmZQ&U|?WH!fZe`GG+(zkue95kBm8id}Is&6vzOL literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.2 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.2 new file mode 100644 index 0000000000000000000000000000000000000000..4fc0c650b5532e8db0e68c4d178a899cc543fdcd GIT binary patch literal 80 fcmd;LU|`@v!rVYMGUfsDkufijkBs?%d}Is&B`^T- literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.3 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/1.3 new file mode 100644 index 0000000000000000000000000000000000000000..47880e61ccedaff7521ee760dfa2d0c1c0e0ffb4 GIT binary patch literal 80 fcmd;QU|`@!!U8}xG8P2#k+BevkBo(Zd}Is&HJAZa literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.0 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.0 new file mode 100644 index 0000000000000000000000000000000000000000..0a190306b1a6cba0e874e673f1ce4d313714d815 GIT binary patch literal 80 ccmZQzKn09IE;42U@{ut!kdKU6fP7>O00dwFDF6Tf literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.1 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.1 new file mode 100644 index 0000000000000000000000000000000000000000..2e5d506d33d2c41448cd49524cb557d6f4da55dc GIT binary patch literal 80 fcmZQ&U|?WH!fZe`GG+(zkue95kBm8id}Is&6vzOL literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.2 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.2 new file mode 100644 index 0000000000000000000000000000000000000000..4fc0c650b5532e8db0e68c4d178a899cc543fdcd GIT binary patch literal 80 fcmd;LU|`@v!rVYMGUfsDkufijkBs?%d}Is&B`^T- literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.3 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/2.3 new file mode 100644 index 0000000000000000000000000000000000000000..47880e61ccedaff7521ee760dfa2d0c1c0e0ffb4 GIT binary patch literal 80 fcmd;QU|`@!!U8}xG8P2#k+BevkBo(Zd}Is&HJAZa literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.0 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.0 new file mode 100644 index 0000000000000000000000000000000000000000..0a190306b1a6cba0e874e673f1ce4d313714d815 GIT binary patch literal 80 ccmZQzKn09IE;42U@{ut!kdKU6fP7>O00dwFDF6Tf literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.1 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.1 new file mode 100644 index 0000000000000000000000000000000000000000..2e5d506d33d2c41448cd49524cb557d6f4da55dc GIT binary patch literal 80 fcmZQ&U|?WH!fZe`GG+(zkue95kBm8id}Is&6vzOL literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.2 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.2 new file mode 100644 index 0000000000000000000000000000000000000000..4fc0c650b5532e8db0e68c4d178a899cc543fdcd GIT binary patch literal 80 fcmd;LU|`@v!rVYMGUfsDkufijkBs?%d}Is&B`^T- literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.3 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/3.3 new file mode 100644 index 0000000000000000000000000000000000000000..47880e61ccedaff7521ee760dfa2d0c1c0e0ffb4 GIT binary patch literal 80 fcmd;QU|`@!!U8}xG8P2#k+BevkBo(Zd}Is&HJAZa literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.0 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.0 new file mode 100644 index 0000000000000000000000000000000000000000..0a190306b1a6cba0e874e673f1ce4d313714d815 GIT binary patch literal 80 ccmZQzKn09IE;42U@{ut!kdKU6fP7>O00dwFDF6Tf literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.1 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.1 new file mode 100644 index 0000000000000000000000000000000000000000..2e5d506d33d2c41448cd49524cb557d6f4da55dc GIT binary patch literal 80 fcmZQ&U|?WH!fZe`GG+(zkue95kBm8id}Is&6vzOL literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.2 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.2 new file mode 100644 index 0000000000000000000000000000000000000000..4fc0c650b5532e8db0e68c4d178a899cc543fdcd GIT binary patch literal 80 fcmd;LU|`@v!rVYMGUfsDkufijkBs?%d}Is&B`^T- literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.3 b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/F_order_array/4.3 new file mode 100644 index 0000000000000000000000000000000000000000..47880e61ccedaff7521ee760dfa2d0c1c0e0ffb4 GIT binary patch literal 80 fcmd;QU|`@!!U8}xG8P2#k+BevkBo(Zd}Is&HJAZa literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/nested/.zarray b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/nested/.zarray new file mode 100644 index 0000000000..337cc66c01 --- /dev/null +++ b/tds/src/test/content/thredds/public/testdata/zarr/zarr_test_data.zarr/group_with_attrs/nested/.zarray @@ -0,0 +1,17 @@ +{ + "chunks": [ + 10, + 10 + ], + "compressor": null, + "dtype": "U3XGuO zs3-y|4vXvxh$xGoILNLJjv|XFn?hU|6sPX1KHcwB-lX!@bVw7>HeO-mT|9fM;_8Qd)}Onjaq)J`_pq|Z(rY( zgJ<_0);qUntFg^d%OAa``gZpngMY@jzqP-4$`Lc>PM^{{cWz(*c>T{GIqO@;uI>I= z{(3{Ve?IQW_P2?=pDzEBQ|~!=_UxWT-a%&o#*{BRqIJ5x#hs_j?wdNTZ;D%)-UUH? z&#gLg-6z~P<*yBjzu85bPa@GCG=1KzL;GE%`}x(+9hkW3(BC)rf8BrJOFak8K5S0k zwEq6t`RdG?H*==^4^!tZm@_S3v8`uJ?2#`XJY(j}Df4@0&ddLo2_0XZJFPDl?VO+; zVLrjmgWujiy|+DQ$9rqaEcqL4P6*yz(bn1W$5Wr2<<=;FrL9%Ip=7NN>}_v}-Z^t- zPU|0hlLz)5>E3n6TWk!(*?xx|e{XgCePZy&^KG`(*olj7_Pgg@y5yej-R7?z_gZAL z>#Z?i+ywWJ)SnS<)cIP%jXPf>-MI6$q#Jj>^l3V4-n`RGy`RQXZobaf(r(=O$}>Rc zYgsq$d@bk3oiF`-BEj`O@#FMM zf0`BBKh28mpJv7OPpe}4r&Y22)2i71X;p0hOsv@cnOL#?GqGa(XX3wm|G4I8@K4u| zYO|*G&z&|k_)N9ZK|LQ`!8OhKtLq1{f$vKAFxBY%z|sgmu%vvPY7TzXcv&B(b{zcn zSNd^EKEF+!aoDt3{WE6In$kaQPH$iD-1djTp7D!*P##=*_m}+B{vw}V2G(&xu>SME zdH5Z-yMLd*){1`L1oywbCjRKQJ$(ThuZieg5PAVRql)dE#>?C}jq$^L=QPF-gPqeg zce|7|cSi5bDS0*xx6i4Y%|756xA*c_*9%1Yn-@p^KiIgOw&j*vj+5Hb<6?G=^LzUmlY$Jn@-FATbeH?L`76I88NOlvJqgaf3OD8o zx`^PGR?)q8`bC-?GYYQ{}g&^pU&mE7xCAJW=~TLVn*V zzt@!CU&`+(>4^^8?k7hTPt?8vkl!%MZxZDe5zZX z{I!OAbvcA?i3VELaPzr;-@c!k-$RuR`AWW~9p7gDeIrxeTG#EI-)0TB_$&FEerw14 zdEp;Z-dfiKlHYL+56vt2ntp35y#I{TQ{GzFBbVQN4Ugd~`I>%fX?tzpzH1ft+Q2Q? zf91aFwkP$frR}wWyRrYuebsGG>bI7**9LCP{ww!Yw>_!fTH0P4xJO&Xy*6;Wwu*ag z;LdFo_u9Zs+$!$1f%~~t+-n23cB{D82JZ4!ajy;B@LjxnEpM;nkI@FV!Z!H9hn{_4 zgxh!d%V>k$_mpjeJG#z_x5ORqv~+*`$&_s)ShKAU1^~Q%2%K| zJ&@iksXfbLy7twrZt}Id^(>3&YGk*%$=B-Evn;0T!`Ww`ZEdb6bVEN;8xB^%y$c&&lnEU7&UJWKn>e(70?u}Zg9=vnd~ z?WSi*+br}f^ejm~H{|jPJqy=aQhOG77J8P+sn=QHS=x`Ip=U|yS>RdPj~wDUOUh<} zXK6orYq(u&dU@Ab;92Ndl6w|-7J8P+srQE9S?F0Nr`;QJS6R5u!gZFk>n!-%+}!L+#7O$0@qpcU%kV1mXzx(@GRULO1w9eXBMurxXc32 zl9E~AS>RbFr(S1)XW=?a@^uz?7J8QCo&}zT>nw@aSzO1$br$XorS&ZNW`SqnI!n^; z8_G8e_lDeN;pc{mKRV}|h3hO_XG!8&+y`fR7J8P{o&}zT>nw@aS@O(6&qB|V#Ixj^ zg`S0;C9!9LXW`yZ;=Lhvv7hTK@GNQ1XUR7UJqtZcV$TB4!o8v7dqeKBoI6-BxWjA> zUJirn?m5%5(6glWEbuJwEQvfzo>{og;!4o)W^nUHMEdQpG+*A1S!#Z|ieWiP73it_(*$M`i0tO5HVUjg<3YtY^X z>m%^f`f2J9v+4@SeAW|u?87y;LZX2fHhdAM*Bdwf9dQWkI{sK zaN8UnhBX+)KFC;uj5ToQfPKIktXQLcpxeK6_Kyc+zor-fxE{D3xSrP**Tb3SOmn6= z)30;wsI?Dt`fo&9T#<9GhLtqyC!8kAuz*e~oC z_6xi$yezzI6?j?Q{-v{jt#SO$U)TP@TCfIXSPS+G`-S}iFAFaVFIxp(R=0oY>|bjf zzw_6%f3Pa70j$d6V^uhBoHx!J=PmXuJ90#Nj?nF2D*NYt<1g$V%oofToJ)N;7x!tc zcF*PFJ?ATcZ>&Lk8*qOA#b-gcf2r(W-u}VhBi;U`vVVE|2m9yRKR5%{02T=r z2^J~KSOeBzjH`+4gZiw2ZvWERKi2>{r@0r;8syu6eZU&9585lhS;&{6Zom7K_v|+> zz74OvtJ}YH_OAi^SLPl&Oa@E_`vpc2Mi532Mlj1*gKDgSZvWERzXt4InS1Oo888{_ z7Z^bpK^Q?8!7O79s<8&T{Yz*68nAybUoc;AF7@GD;B?`1$=T#=a`sTp*6m+9``3j1 zFi$<_79c|mJ5~(mJ5!l8XOaRHGDNSxm-=w?O!_k*M$9pBY`7COK1ODuzzp{*wZvWERzZUEtoIyFx05%6Uhcm;OftQ7sg_o@cFRRO&=K|+aAI=3f5jK&WP0l7~59Ms#{-v^i?x}yUf3SbBf3SbBf3SbBf3SbBe|2OD zb^Djf{^jjo1C|Sx3ziF(3ziF(3zn-IEEhGInp~zP>-H~|{ma|GCM*{$7c3Vn7c3Vn z7c5sbST1TZHMvYp*6m*^`XTf9dR>`{9o|-s|Q)=PLlG!5Xx;K?bwLS>P;i7U0;2C&#Yazx3z+ zHDUi?xnQ|qxnQ}f!0^Bp!xmGIs7Gb%k#7Ie*}o?2A1oIv7c3VnR}~l@*kagX>Jjy* zY(3KLUpo8Og#Cl1fu#|K0=5pej(k8qARi2IW#q)_=S1E9rL%u6*gtrQ;mJ$DO2JBT z_Bs1J^OI+O*8Q2Ey8TOM|5~truokcuWmyXtEf_8G26=~j>>Fi$%_7Bzq z)}kzH0iy+@McyE9kT+n4tH2EF_Aj0NYr+1(`oQ|Y`oQ{hK1U1QsrtMV9^nzS+t+U0 z{-v^ij{JlDga3j5f&YR3sXPAz%L>a%EgPP-Ot*ij>|fsgHQ<=wnBbV;nBbV;n5w`r zQIDuc)T46sNVk8f>|fsgHQ|`xnBbV;nBbV;n5w`rQIDuc)T46sNVk8f>|fsgwO}Y< zC}1eyAK@S2AK@Rfj5S~lMmvt6PWwQ&f9dRB1NIMIVtDcruu`y6oPEwd+%Md3-ML@g z{-v{j4cI?8gL0e!Yz}M=XNEHaD+((LE1G3hSOeYurL%tx*grUfa-0Ed4r~r*hBE^z z3M&dLnq^g31Ks|mvwscPKe#uzH@G*rw>q&t@Y?X&)Gg|k)GgiqrL%uc*gyCm_#gNm z_@BD-Kd`K@tkkmMS<7_$m(Kn*VgKNm;F#c;;Fzkw@W9o=)l!eBM`i1gZvWERzb5P- z91|Q991|Q<6&N14TDV&35%s8SJ<{!8I{Vjz{ez)^p%8`wrV6Htd_X=RAHV|Fi3Qf} zUpo8e9{db50y6?LGCY|P&OT?Kv(MRweXckAtlPhI_OAu|2WtUqQI@rU(Sp$;Z;&_0 z8!*FFV1{-3m(KpRVEWB+{n*Mwt&V}fIXV}fIXW2yqjL_MM& zQIE>iBi;U`v46h(Yr&Dgk-(9_kqAdZJ|G{E56B1PgZl8$y8TOM|6B_QGXgULGcr7x z5zanmpR>=|hx@HJ_p95#boQ^obN}EB%5es;Ij}jL8O{u>D6A-~XqHuB4RrgL&i*xc z?jM{%InDq!2R4T@!QUKxq}#uA_OA*12gd}*1jhu&R0W0yt`@GAdPF@cTaR@6m(Kn*VgKMr;7H&| zhBy+~I@mgLA~}(qSf8Az+rM=7uLb)DGXgU*T$vG=IhZ-}ANh~`S8w)Nw}0vEUkmmR z)&ka|ENcOy1*1jYAa9U2V1}!}4D0qUo&9UU{=r(nT9joiV6-H~|{d2$Z7xoYK1@;B@rQYld3?mF9 zd7L~xT=TeY|5Dk%y!~syF~KpxF~KpxF~Koafn%Z`QIDucMW0c;Lz4rhil11kzE z3M-mrRagVv{-v{j4cI?8gL0e!Yz}M=XNEHaD+((LE1G3hSOeYurL%tx*gqH#7>~Lz z9x!PzY2+*N75NHIcZ_2;WFP4EFP;5s!v4X1z|Yc14~_|r362SlsR|4aTrFHJ^@w^@ zwjSyBFP;5s!v4Y1z|sgq0b2)KM?N4QkPn8qGIC<|bE0nl(%HWj>>u0=+zi~z@a1M; zCt)Y40n~sx*8tuArL%u6*gsecSc|f(1&kJq7I}lbLEeBFt^zZx+rM=7uLb)DYXNIf zmbHMIh+~J46G=u zD6D9fRbdTu`K z)(1uvMwPln-IBVc+rL!y&yjzyf3PpGFR(B5W?x_!VHnBd&W?)5OMPWs=tO{$O+rM=7uL1i9XHbqa zfX#u;;mmMmU`1g?VMVj73TvR-zjXGm0s9B%0_OtfQXkF*HW4mW>Fi$<_79E;jtPzlj;RU^4_qx=E%k_cRJI=J_Aj0NYr_7)k-(9_kqmJpuywF? z-I05{cFMg!CJstlw~bov|zNz8{`f02F!33m|@-irL%u6 z*grTII2SmV`fx6=iLi;}Y;ra^dnjk?_Aib7bI<(C|AT#jeSv*}eW^41LJlK`k;BMg z!!?KL_Aib7^X*>)jtPzljtPzljtP#b3LF#lhMW0c;Lz4rhil11kzE3M-mrRagVv{-v{j4W9c4;{oGQ7sdl7 z4JM6zMZO|m!Rd~1+=}c2-TtMsf9}UW;D6wM;D6wM;D74P|B%PY>vCO{7;>^4;V%mMsgTAj2u>Pe(#m!aozriBi;U`vVVE|*Mwt&V}fIXV}fIXW2yqjL_MM&QIE>iBi;U`vVVE| z*Mgydp@5-)e}sR8e}sR`GS+}K813%F)@dK;_Aj0Na}D4tx#!IH<|~k8BiyU*&kiDv zdMW0c;Lz4rhil11kzE3M-mrRagVv{-v{j4cI@pH@G*rH@LStu|DwH z@Y>WZ>Xy_k-TtMse@)mwo|(lnvv_9K@O@@h)wv$tUmL-L#dOO6hsYXq%LlssOK1O@ zuzzq&a7=Jaa7`v+3e2!>|I*pN7VICa1*}C` z)&fQgMvJ^b-XL$l3|D~}*6m+9``3c~gY|*+f%Sp)sT1o1qY9%+-J)(u-O}w}D*NZ2 z`Um?5`v?06`v?06`v?06`v?11b|X=+5B3lC5B3lC5B3lC5B3lCuNzxe^{?snFP;5s z!2ZD*l;aFwb6|5gGn^S%QCLw}(JZUN8tC>fo&9UT{=pfP;|ySPU~@P#oEcbASW#Hf zEUUsA==Lw2{cFJf!MVV>z`4|ibAe5SO(bWNv&q>*Ia{}X>Fl5T;g71{*XI4@D*%(h z8nm}T2A{-P;4E+!VAf&Qg<03_Upo8Og#CkKf@6YXf@7)z!vj|fS4%yj9+j;}y8TOM z|C+FWa7=Jaa7=JaRbY7FYT;_BN7SRT^+>mW>Fi$<_79E(js%Wmh$DfmgRLVck`u{^ z^~s64{Yz*6TCjgG6fhLRP{35dRFMzJ2jl~u16rr&fa>-yo&9UU{=r(nT9joiV6Fk z0_Rd6&IL9RHj$i7&L(FMIh+~J46G=uD6D9fRbdTu`JYYQP!g#=>!K9I|$XDbm zINdRh(~*6k+rM=7uL=7H>jUcp>jUdkC)Ni>6-Jf1MctCRrQ5%B_OA*12gd}*1jhu& zR0W0yt`@GAdPF@cTaR@6m(Kn*VgKNm;F#c;;Fzkw@W9o=)l!eBM`i1gZvWERzb5P- zEDbD;Fch$Luyy1E@&Wl^h$|x}RzD}|_Aj0Na}R!oBY`7WB+{n*Mgydp@5-)e}sR8 ze}sR`GS+}K812}CI_(49{-v{j4cI>z3K$AuC}65!s>lcA1M&eJY@L1wxNiT_*}n$Q z{ev?o#~Hxpz~*pfI5V)Ku%fV{SyqKL(CuG3``6&Pe{crnI0M)m*c{FbX9iXjRuon= z%c`&jy8TOM{~A2^5AF@_4ekx@txl{Dyf(Zxb&I+sbxXH@>Fi$<_7Bzv)(6%H)~8Oa z4~!~|Ds_vxC3Q=;f9dRB6ZQ{|362Sl367}>3=do_TrKs8dQ`R^>Gm(3{cFPh!7;%x z!7;%xRe|AwtA(qj9#N0V)+62irL%uc*gqHw7z$x1V5(rM$Oq&D@&PPxomgPq{-v{j z?$OV1Byc2fByc3ck&q9_2jm0t0r{XlJhX2A(%HWj>>sQJtVLPY0!9l)i@ZVJAaB47 zSAiMU?O!_k*Mj|nwScuK%UZx_!Dx{;$Q$GhnBgig!@B)TXa8ETf3QBVKCnKpK6PS! zU{qmLsaw=7sav}JOJ)DuZ~TS*gL8p%fpe)3=K`Aun@G+kXOpvsa<*>&QrW+}{cFH6 z!7;%x!7;%x!7){VW1=2WkEloG>XB~$QrW+}{cFN8!7;%x!7;%x!7){VW1=2WkEloG z>XB~$QrW+}{cFLIz>&a_z>x??LOviLkPpZQ>r#9oC};weK;4`MA$@fHaVM|J(RO` z`!K9I|$XDbmINc>&DwKVo+rM=7uL=7H#{|a&#{|bz1%?N% z7Os|hL_I27k97N&&i*xF|KOP5nBbV;n5w|=z}3RlQje%dW$Te{|I*pNChQ*^2^-H~|{c}(KgZ+c`f%Sp)f%WNp zjuyOA^?4^e!Xs+8uid)+OJ)D^_OAiQ1jhu&1jhu&1jkebj){6iJ)$0!t4F&1OJ)D^ z_OA)Y1jhu&1jhu&1jkebj){6iJ)$0!t4F&1OJ)D^_OAs?14{!-14{!-GsM!66Um9> zL~>$Xa-wek(%HWT>>vC9>>unO>>uo3mazt`!3c*GvJdLD2D<%AXa5?oe{crnI0M)m z*c{FbX9iXjRuon=%c`&jy8TOM{~EA=a0cZ#1K1qc9L@}9238bS6jn6Ls;~yS{Yz*6 z8nAyb9xxttVLV{cVA9A}~j>>Fi$%_7Bzq)}kzH0iy+@McyE9kT+n4tH2EF_Aj0NYr+1(`oQ|Y`oQ{hK1U1Q zsrtMV9^nzS+t+U0{-v^ij{JlDgZ+d3gZ+d3gZ+d3gL|tV_r|jiU+#1N^7gL*#{|a& z#{|a&#{|bz1&)b&L_MM&m8(bk>R&4Rm$!dSI3_qII3_qII3_rzDsW8HBkB?Ls9ZhL z?O!VUm$!c{7z!8)7z+4D_(%9h_{S_`4OoNG?v8Su_JMBy(%HWT>>unO>>unO>>unO z>>unO>|Y&OLf!tQKKIW(^$+$B&Y&D;0Gk7w!30(!ir{D71ltvf9dRB1NINj zpd4oan**D}nc>X9io%M*ie_0A)Fi$v_7Cn2?hWn@?yXL&54<+KHg$`-C3Q=; zf9dRB6ZQ}G5B3lC5B3lC5B3lC5B6_3v42h2KR6~hCO9TIrYbNzaJ6u?)FbLq*?Od} z{-v{jP1rv;CO9TICOD=lFg$RzaJAGU>QUKxq}#uA_OA*12SWivAq)jf6-*WRfP6qc zfCa7-3#{9}boS3Z__>bvx_Qs}3czWw2JLN-!7OnWI18KwIQHSmvFr9P{kebc$$#)B z@Fwsk@Frz>6Y>UmgS>sQJtVLPY0!9l)i@ZVJAaB47SAiMU z?O!_k*Mj|n^?~()^?~)N6YB$`3ZqKhqHamu+H=;_ zoOob{_Wv6*IC1_flDBiO_Ow%um@#+yl-{{>`})UsN<8|+Wo?O@d*Tw0ob|0^*LIWT zuQv=zjCG?~?zM=-xFg$Aok~C3(+Bg9v%Qjx!(cjBNh|%JyV4@dCNmc)x# z`!`EFZflX4cAhf3Z|bzZDZPDty$jSLp8V3K?M1w27a!WANBB^~(4Jd$Rydg!i(W#l;rsK3UpMH43&fPV4 zbKp;5oXu{U>x_D9`^?LG2;+SGv{hf~uK7@kX6xl>+J4S-cbyC3bic{GQ*))K{o1xB z`Z#4A#%cTc_Y_U#r)U&u+J1g|>4Z3ypX;yUbAxEgIE>Tw^NsH5H-&4f{1lDN_w#Ej z<51J~^WtJn_jKA$KU;72af+slLrvSyt=%2Vf;inH(O!{lQ%pu|k`mf;;!kIyf1J%Q*j=hu?9#n>l~2HK;Y#je4A*t)=pt zOn&^EwrKZRGENs;&t03c#neF%+ls_o2!nt0Dz5K7R9a#UwTjpF>s1u(^uRt8)l#b{ zlb^YhUquw6C?CbmGKz-nJAvFC(o! zs4&(kEa;-p<>K2*D}UQxe7nwjCgWHrs|^a}q1@g@Xnt>BW0E=tZ}_m+x%5RJkfpQo zF6X{U42ProX!&tSy#2bT^m0vizmjZ|OHJ>W~jhm4+p@@NwPy zuwOqJhwFFSSFXRLyU-q{kSYr@agoqr+x_II?n397LaMbCr$k7`VMHfh_uFH-3q5QK zseV!>estNlwfDG;Lm_9);2*v9HeRQzM@_x;PW$}j?JX`_&(gWA@3fImIHmlhx88?M zoi1B%y%YS7kg#MNhV{Z#BR@XXN#(CK)K34zSSzfcn#t79kM}Dm<4|gw`S*?NF7?KB zZ7H?=CSL5L5-AynQpfyx;UBw8T^o^78&IY$l3L;YXPn+$YVRI9Dzyc-yVpncj(zQ<50@>YQ6PsDdp83|K}G_q+}dQ z*Z3J z)&DLXm5jrvY_B$ci!G(RlBu`2(=VWmLn+&8`eN;tKwpRyiXhjuVxC^CZ z97bh(^hvSTPF<8Tc(>OJ*|?qdJFSxii&j2j-+k;ym|yL8u=w(c(W;`o@D+K4jw5j*&0 zlyNAw?OUhZ-(76OW=u?N#amXmqTQ*9n2bX)+p~Qp+G0ULmdWQ$_mRms6tg`$?yWH~ z<=MSWA6b!@?b&5-i-{@ELNOVKk=dR-v{g(@c_xz|f4W~r8HZxFXUlD4iv@-G*B|i9 zC}J`W#ca>s>R6GED-7)q-tJ?a%T*J`1^3-#@**+Yvx9bsi7C$(9_u4J^BTX5G7clN zJv(E^n3(cRCNC1RJ^S8HwpdW0m-?oU?6P0^$YdNwW_$LBcgDojIg`nY#B9%2e|Jnw zc{cj4w8(7FChZmzQ=W;~jZ1FTu4gh1m(lj@@ZBvjml<_ElgW$3Y|qZ!GbW}y8~Yc( zj3OrEFf!Y-pX?nIQ=ZA>w`}5 znf#u;ePl8Y#ca>^{yyPirJnWaBxgac_xz=iP@fgX1XmF)U*EY>d0gqMrM0<-A7_#$}^dK`j6*TovoFqzi7C(iYn+cv#AFMPjyR`+v$73+mZ(fAW!iX}S_?pypa$~Y9WJ$vrln3(cx;%PoI5tDH!W_z~Ic`-5N znM{89?mjXZhhny8yPY2sQ=aX7wU121WE_gwo-Mf077OZ`OkN~rd-nBj#Ke?m`#j_$ zyLp~pMj3~Z*`D2dQA|vECX*M5*`8$=$HbIpy(9gtpIg2ZkIeRLvrBEUpq_c?1gZBj8U-WIk zhp*`>Hc{UeoILf8c9H(y{5ZIm%sFF!Bwxdbh_LYl<6P;gI_}# zhjRLNSU5(Z{b#KEzaROICFhECSg617QNQy=PR5~}er9r~+>9T_<6dujHtkX^ z<4{gNqpwqL`kiq(wIMJ3ijPj@WE{%rXTo&K9r8e2PHjnKO-wE* z*f-tgqZ2t9hjO-e)BX^bQ{Kt+I~?GnlW{0#dpC7qTuym+$J0JKk&|&KXM1whPV!S16z+Rgxwf5EL{7$`ob6rj>*8|CJDGl`OMP@Q z4&`j`4tQf+PI>q6+kJE*C*x4g_HN1saXICkOuys(J~|nPa<+FLo)D7@3izK6^wAZ` z+1~BHRa{Pa7s|;vjL!D%LzCii%De1TAKgKJ_ls%C+1~BvevH1$RrrB};GU}0`NM{x zoQ%WhZ0|n!ep}9EO#Q)h^yNOfx$AA)E~1&pARhNfSim&IorGU9UGGi>fMBYdb#5d_t9B$ws-rS8kbYv zg>o_uqqDtx?^$s<<(*7_<~cq(8HaMVcazVJ%PH@+-QYXz0wi)W4&`j`_Wou}E~s}h z{gvPM(aAWJv%TBvinyHeZm;+F=tNG&p`7jAo;Sqhly@@yRge4VWE{%b-tBQ)Tuym+ z&|Dv#$jLaAv%TB>XEC{;-pTYgkJ_%CGi4mg+1|b9mvK4eUH=z-bRs9?P|o&lw@2f0 z$~&3<-ibas8HaMVce_3lms8$-@`pY;k&|&KXM6YVzu9u`)aiOB(?7ePk50y+obBB% zODthl^IT4Och>KHbRs9?P|o)5T`R`rly@@y5})+Z$vBj=y?f_saXIDPH%5QAoijyF z#-W_;-OgiUazVY5>6iSLk50y+obBCC8^`68ci-K@M<;SJ4&`j`CQXdXDeq+Z4es{Q z$vBj=z1wlyxSaCt<`4VmisWqX-tn%OTu|>s?ts7f=wuv5XM4B9-f=nQ-Q6en=!)cQ z@3#L?Tuyl>ayzWEeY+yaIE>ErZo7lya>_fIzDUmYZreFAxuD)Xe6e55Njv-KWE@6k zd$)~ypqKRts5vh9sSTOFNY3_d>*M2c%DZRo_0df|%tt5VFgn}2x1Sc5Q{Kt+MRK-x zTb*OeIp=h}8}Xu#Zsu7&IvI!2+1_pWwYZ!*cQSpEobBD)E{@A7@7~aJUAqAFU+<%n zaTuNL-4@rx<&<|aeUY5)-CJ*p$p!Up>@GgKbARijlW`cG?cL@-j>{?UWcngG+q;SP z#pRTD%{e~0uPnDiJ7>x`jL!D1^}lgB<(*7lBxifqd?F?n)Vm$e_R(EF!AB?KFgn}2 z#&dBw<(*7lBxid!;qP%d<=x~PeRMzA*GDJgFgn}2@k@_1D}wtqL;9MSOkX5tdpB-$ zOfIN*y^s0mZapR*o$cLbYsTf2ccGk&!^O0{+jRZ7obpblzvn_9os2^{+q+H1#pTqw zo3rBe?G!C?G7jZz?>2s$CD*>1sq39g|Hz#_IvIy@ws#x7BQB@BJErBM6FC`&a<+FH z?iQC*-pTX}pZC$pIFz%!d&~Rca>~2Ue$YoJaxxC(Z0|NWASM^oJDGl!wcgRL2r>@k zZ13Luk+_`l?yH~h(TSXlLpj^K_2yKNT_`8xFgn}2 zo|9v8LA`tEE+5_YGkkP14&`j`*8OZ;PI)KO7s=V)jr~$wPI>pszxe2OJi|vP<1jkg zyLG-Ems8%!^hI*EcW?T3OfIN*kFI?~J4Nqxt&dK|VRW{4YhM?aQ{Kt+MRK-xZ@eWg zr@UJ@$w&9z|Mk(yIE>ErZms{0%PH?<`XV{oyET7q%e5c_-5s$=TkmmMv+t zweFEG?mzV?s`an)(VZ~aM)Cj8ws)gG7?)Gt zg>o_u7t{7`#i?;Q<=vd4eRTJ)HmO|^EIHe|6=ucdly{+=jKk<`@0S0lE$2?1&Y3d( zBis1sWE{%b-Ys`rTuym+%msciMNY<{obBDRpN`8Z?_~OgQ+;$Y4&`j`mic^KPI-66 zPkeMDC*x4g_HOB~#^i!}C)1Dlw2w~4p`7jAQs0WpDeu1aoR3cAWE{%b-Yt1mTuyl> z)4%yjADxUtIorFDH^$|ZcUP`)W4i!}oQy*`+q)%hkI4n~PNrY~mp(cfhjO-eBkqaI zDerFI-bW{LG7jZz?=tuMM!Mf}YX9iF{^56-{=*}7YUfNDhjO-e|9mVir@VXM5Fee$ z$vBj=y?g1|m|RfrWcqzK^wG&Ul(W72#|v>e<=vyF`RGJW#-W_;-QPzp74fe9Tj+DJ z-#v27{n96yexE&jbTSU*Z0}wi6_-=qExg)CCvq|l&E4jcT4@sM<;SJ4&`j`{=Z|BS+ zIorFxY!{OY>Yd1)bc>Hp#$j}}cYod`E~mWf*~CXzBxifKaB^Huc_(rgKIx;AaTuNL z-Shj$<&<|5_V&>g$=TjLcSuYwsCOcF+3R+0R|FY{(b?Yp>F~Im@=m5NlC!=0(-+Cv-aU1GTuym+(2sm{51izqlW`cG?cI}?#O0KCGJTPp?cE=)wdC5L?sUED zf5u1m$fZ6y8Hdr?-u?auaXICkOkX5td-udo;&RHn6IZ>dU4Rze@1v7(7@h6i@9vMw zDeq+ZB01Z;$A2A@3+mk$xAxJE{)dlF#$j}}caQx(E~mVc>5JrS?;d?VE~mWv#z8*1 z@$0{{T@hp)MrV8X$Uow8$~&39NY3`|x63STbkX^_3+mnVr~2r|?dqeGaTuNL-NR$z za>_fIzDUmY?l)`2<&<}~Uhbot*yp2@aTuNL-LKyqms8%!^hI*EcmF#+CKuGZ2Y&9O zJMjxXIvI!2+1~wX%eb8KPNpxCv%Pz0$GDvG?#X}p=%(D{qmywMo$cNKyeBTFyp!pR z~1H|KJx>Ii;iJXi>IorD*|J9ajf5PkJRb=|#ud_?LBFH$Dv%R}x#4=`Eo69Nh z`lk5kL{7$`obBE1E5zlLcQXA8JNxKl9Lm|={b<#=obvAE6Mb|dC*x4g_U^WIVsb&f zlj)b4<)f2vC}(?j>qc=o<=vMr@zIH#j6*rwyIWduIpv*9zuxD3bTSU*Z0~N~CN8JE z`^J4fI+2rcC}(^3!*|Byf_f*@w{Gy!$vBj=z5BslaXIDPwJ-YUL{7$`obBCB`^Dvy zcQXAJkND_h9Lm|=eScb9PI-4r&&}YYqKZTWY%bEb?#IorGM zEr`o0@9x^gM<;SJ4&`j`Zun$ePI)KOAJXvA$vBj=y}SN1aXIDPZ|3;uL{7$`obBCp zXWMelIsN%grl0$MADxUtIorGMo)?!>-aT`+k51%d9Lm|=edoX8a>_fIe%{A@bTSU* zZ11kUIxeTY`{#{5I+2rcC}(?j&G%z+LA{gdKmTZLf_f*@e|@2k zPR5~}?cL>nipweQS`&SAA}8Ze&i3xxFUIARcQXAoYwg;u2r>@kZ0{~xYFV?3UgYQR zChg~=6FC`&a<+Gut{jsK>YYq~%R78@G7jZz?=D#*E~mWv&~ZLGk&|&KXM1;IXLPUK`9%Gut1bJw_>@=m5-c&(34#-W_;-8c4$%PH?p`KymkKEg3$~&2U^Y{AbWE{%b-hJi5xSaCt)-!!{A}8Ze&i3xy%VKgty_4xDeauHE z<514_?#the%PH^fzs^S|axxC(Z128wb6ie&C)1z&H6NXfLpj^KFa9(xr@VXYVIN(Q zobBCzK4{CijH&CL$o1XfqmywMo$cKh9*)Z?@BX&zZS9;{Bxief&XaLD<(-jq?9G zFMW^R*GG5Gwmv#b&i3xC*T?0QccGk&!{}`9&Rjb#r@WKtFPP?|lW{0#d-vJ5#N>i{ z_oid~Vv3xMLpj^K|7gVJly@@y9iR5m$vBj=y*uOWaXIDPxC?!BA}8Ze&i3x~o#JxJ zJDL98D}8h_4&`j`PTM0U7u37$@AT1$oQy*`+q=(vATFo8lj-mMrH@X=p`7jArw@wD zDev}rejvI5IT?p?ws)U8EH07$cz zC}(?j;#XpFLA^V6x{preWE{%b-koq!Tuyl>)31Akk50y+obBE5SH|U(cV9T&M<;SJ z4&`j`KKZ@4obpblAAhcoPR5~}?cH%dipd4_?xJgabVYKucb~XBE~mT`xrw*>=wuv5 zXM1<-|HS2#cUS+)M^_|gd-w6j;&RG6k=yGjADxWD=xpzfc{U~&)Vo`jyuF<>MNY<{ zobBDwFT~}PcQXAxuiv9x5o8?7+1?#Ba(T0@%^%mPynApHADzg_IFz%!``DSbG&`I2-|p?BE0VLlTd;0iPI)JCr}g^iWE@6kd-u^z;&RHn z=NI_sisWqXj@Uddr@RxnGf(!>$vBM8_HO=mF}a}Lt$3b~u1L=IZr(0&Ipv+mopYIw zPR3z$ws&(U$K{lFV{Z4+70KD&_3s~-Q{IW(6%Y96WE@6kd)IeJOfIN*GJTPp?cL#r z$K{lF>pbfh^X7l}=wuv5XL~p2V{tj + + + + + + + + + From 0393dfe2b77214ed156a9dc78b7784beac4d8c9d Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 17 Jan 2024 13:27:41 -0700 Subject: [PATCH 061/120] Unignore zarr s3 test and add trailing delimiter to path (#447) --- tds/src/integrationTests/java/thredds/tds/TestZarr.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/tds/TestZarr.java b/tds/src/integrationTests/java/thredds/tds/TestZarr.java index c225900025..a23200d3b1 100644 --- a/tds/src/integrationTests/java/thredds/tds/TestZarr.java +++ b/tds/src/integrationTests/java/thredds/tds/TestZarr.java @@ -4,14 +4,13 @@ import java.nio.charset.StandardCharsets; import javax.servlet.http.HttpServletResponse; -import org.junit.Ignore; import org.junit.Test; import thredds.test.util.TestOnLocalServer; public class TestZarr { final private static String ZARR_DIR_PATH = "localContent/zarr/zarr_test_data.zarr"; final private static String ZARR_ZIP_PATH = "localContent/zarr/zarr_test_data.zip"; - final private static String ZARR_S3_PATH = "s3-zarr/zarr_test_data.zarr"; + final private static String ZARR_S3_PATH = "s3-zarr/zarr_test_data.zarr/"; @Test public void shouldOpenZarrDirectory() { @@ -23,7 +22,6 @@ public void shouldOpenZarrZip() { checkWithOpendap(ZARR_ZIP_PATH); } - @Ignore("Still working on S3 Zarr") @Test public void shouldOpenObjectStoreZarrFile() { checkWithOpendap(ZARR_S3_PATH); From 909ac2ba38959788cfdc650654deb90c34c42b51 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 19 Jan 2024 09:07:56 -0700 Subject: [PATCH 062/120] Add apache dependency used in CatalogViewContextParser (#452) --- tds-platform/build.gradle | 1 + tds-testing-platform/build.gradle | 1 - tds/build.gradle | 1 + .../thredds/server/catalogservice/CatalogViewContextParser.java | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle index 59ba725af4..40b400f431 100644 --- a/tds-platform/build.gradle +++ b/tds-platform/build.gradle @@ -88,6 +88,7 @@ dependencies { api "org.hibernate.validator:hibernate-validator:${depVersion.hibernateValidator}" api "org.hibernate.validator:hibernate-validator-annotation-processor:${depVersion.hibernateValidator}" api 'jakarta.el:jakarta.el-api' + api'org.apache.commons:commons-lang3:3.4' runtime 'org.glassfish:javax.el:3.0.0' runtime "jaxen:jaxen:${depVersion.jaxen}" diff --git a/tds-testing-platform/build.gradle b/tds-testing-platform/build.gradle index 7f94373263..cf0f7c48c9 100644 --- a/tds-testing-platform/build.gradle +++ b/tds-testing-platform/build.gradle @@ -39,7 +39,6 @@ dependencies { api 'org.hamcrest:hamcrest-core:2.2' // only needed for it subproject - api 'org.apache.commons:commons-lang3:3.4' // replace? api 'org.xmlunit:xmlunit-core:2.7.0' // For comparing catalog XML. } diff --git a/tds/build.gradle b/tds/build.gradle index 298f16b894..4cc3f73db7 100644 --- a/tds/build.gradle +++ b/tds/build.gradle @@ -50,6 +50,7 @@ dependencies { compile 'com.google.code.findbugs:jsr305' compile 'com.google.guava:guava' compile 'joda-time:joda-time' + compile 'org.apache.commons:commons-lang3' // WaterML compile 'org.apache.xmlbeans:xmlbeans' diff --git a/tds/src/main/java/thredds/server/catalogservice/CatalogViewContextParser.java b/tds/src/main/java/thredds/server/catalogservice/CatalogViewContextParser.java index fca61d8d25..9f555d9967 100644 --- a/tds/src/main/java/thredds/server/catalogservice/CatalogViewContextParser.java +++ b/tds/src/main/java/thredds/server/catalogservice/CatalogViewContextParser.java @@ -1,6 +1,6 @@ package thredds.server.catalogservice; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.json.JSONArray; import org.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; From bd90df6ebcd0709efb299a38426450bdbf2e56a8 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 19 Jan 2024 09:37:34 -0700 Subject: [PATCH 063/120] Add extra test for zarr and caching (#450) --- tds/src/integrationTests/java/thredds/tds/TestZarr.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tds/src/integrationTests/java/thredds/tds/TestZarr.java b/tds/src/integrationTests/java/thredds/tds/TestZarr.java index a23200d3b1..d296de7a80 100644 --- a/tds/src/integrationTests/java/thredds/tds/TestZarr.java +++ b/tds/src/integrationTests/java/thredds/tds/TestZarr.java @@ -27,6 +27,13 @@ public void shouldOpenObjectStoreZarrFile() { checkWithOpendap(ZARR_S3_PATH); } + @Test + public void shouldOpenZarrTwice() { + // Test it works correctly with the netcdf file cache + checkWithOpendap(ZARR_DIR_PATH); + checkWithOpendap(ZARR_DIR_PATH); + } + private static void checkWithOpendap(String path) { final String endpoint = TestOnLocalServer.withHttpPath("dodsC/" + path + ".dds"); final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK); From 36fac5f3fcc2ca65ba849e55428805c719d04431 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 19 Jan 2024 09:40:46 -0700 Subject: [PATCH 064/120] Ignore tests until cfpointwriters are fixed (#451) --- .../java/thredds/server/ncss/TestGridAsPointP.java | 2 ++ .../java/thredds/server/services/ConsistentDatesTest.java | 1 + .../server/ncss/controller/gridaspoint/TestGridAsPointMisc.java | 2 ++ 3 files changed, 5 insertions(+) diff --git a/tds/src/integrationTests/java/thredds/server/ncss/TestGridAsPointP.java b/tds/src/integrationTests/java/thredds/server/ncss/TestGridAsPointP.java index 8a193b0f4f..cdd177d09f 100644 --- a/tds/src/integrationTests/java/thredds/server/ncss/TestGridAsPointP.java +++ b/tds/src/integrationTests/java/thredds/server/ncss/TestGridAsPointP.java @@ -13,6 +13,7 @@ import org.jdom2.xpath.XPathExpression; import org.jdom2.xpath.XPathFactory; import org.junit.Assert; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -176,6 +177,7 @@ public void checkGridAsPointNetcdf() throws JDOMException, IOException { checkGridAsPointNetcdfNew(content, varName); } + @Ignore("TODO: fix to work with new cfpointwriters") @Test public void checkGridAsPointNetcdf4Extended() throws JDOMException, IOException { String endpoint = TestOnLocalServer.withHttpPath(ds + "?var=" + varName + query + "&accept=netcdf4ext"); diff --git a/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java b/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java index 788a85541c..c2d7110ed3 100644 --- a/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java +++ b/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java @@ -158,6 +158,7 @@ public void checkNCSSDates() throws JDOMException, IOException { } // PF5_SST_Climatology: :units = "hour since 0000-01-01 00:00:00"; + @Ignore("TODO: fix to work with new cfpointwriters") @Test public void checkNCSSDatesInNetcdf() throws JDOMException, IOException { String endpoint = TestOnLocalServer.withHttpPath( diff --git a/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java b/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java index a74528b35e..85a78b888a 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java +++ b/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java @@ -6,6 +6,7 @@ import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; @@ -70,6 +71,7 @@ public void getGridAsPointSubsetAllSupportedFormats() throws Exception { } } + @Ignore("TODO: fix to work with new cfpointwriters") @Test public void getGridAsProfileSubsetAllSupportedFormats() throws Exception { for (SupportedFormat sf : SupportedOperation.GRID_AS_POINT_REQUEST.getSupportedFormats()) { From e016ab32afd6a00bb289394c22af88db046300a0 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 18 Jan 2024 13:21:15 -0700 Subject: [PATCH 065/120] Update from deprecated github action checkout v2 to v4 --- .github/workflows/deps.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/style.yml | 2 +- .github/workflows/tds.yml | 2 +- .github/workflows/update-docker.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml index 7a1af5faab..7936157b3f 100644 --- a/.github/workflows/deps.yml +++ b/.github/workflows/deps.yml @@ -5,7 +5,7 @@ jobs: name: Check fresh compile and assemble of TDS project runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK 11 uses: actions/setup-java@v2 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 433340d666..8c8dd9d9dc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,7 +9,7 @@ jobs: name: TDS Documentation Build Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Java 11 uses: actions/setup-java@v2 with: diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 44309a647f..e0596a296b 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -5,7 +5,7 @@ jobs: name: Code Style Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK 11 uses: actions/setup-java@v2 with: diff --git a/.github/workflows/tds.yml b/.github/workflows/tds.yml index d4c26869e7..5d9629e729 100644 --- a/.github/workflows/tds.yml +++ b/.github/workflows/tds.yml @@ -19,7 +19,7 @@ jobs: java-vendor: 'zulu' servletcontainer: 'tomcat9' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build and test with Gradle (${{ matrix.java-vendor }} ${{ matrix.java-version }}) uses: Unidata/thredds-test-action@v2 with: diff --git a/.github/workflows/update-docker.yml b/.github/workflows/update-docker.yml index ea7bc78e2d..9bcc930270 100644 --- a/.github/workflows/update-docker.yml +++ b/.github/workflows/update-docker.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout default branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Verify variables run: | From 03bcc7258e11557e0f8d0de1bf5d5f2ffcd482c4 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 19 Jan 2024 09:56:02 -0700 Subject: [PATCH 066/120] Update test nearlyEquals tolerance (#453) --- .../server/ncss/controller/grid/GridCoverageSubsettingTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/GridCoverageSubsettingTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/GridCoverageSubsettingTest.java index eb095757b3..0e0039f462 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/GridCoverageSubsettingTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/GridCoverageSubsettingTest.java @@ -188,6 +188,6 @@ public void shouldSubsetGrid() throws Exception { v = nf.getRootGroup().findVariableLocal(vars); assertArrayEquals(expect.shape, v.getShape()); - assertThat(expect.rect.nearlyEquals(prect)).isTrue(); + assertThat(expect.rect.nearlyEquals(prect, 1e-3)).isTrue(); } } From 65b90650e9dfa56aaf51cd098d18455d45d94a9e Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Mon, 22 Jan 2024 14:22:44 -0700 Subject: [PATCH 067/120] Cleanup the DAP4 support in the tds repository (#394) * ## Cleanup the DAP4 support in the tds repository ## Description of Changes WARNING: The merging of this PR needs to be synchronized with the following netcdf-java PR: https://github.com/Unidata/netcdf-java/pull/1211 So after both PRs are reviewed and approved, both need to be merged one right after the other. This PR make major changes to the DAP4 code. It also makes some small but necessary changes to non-DAP4 code, which will be described below. ### DAP4 Change Overview * Cleanup the D4TS server -- D4TS standing for Dap4 Test Server -- so that it properly operates in the remotetest.unidata.ucar.edu test server. * Remove all DAP4 tests; they all depended on using MockServlet, which basically does not work. The assumption is that we will test dap4 support in the process of testing DAP4 support in netcdf-java and netcdf-c. * The DAP4 service in TDS is left disabled until everything has been successfully merged. * Update gradle files to reflect the flattening of the netcdf-java/dap4 module from PR https://github.com/Unidata/netcdf-java/pull/1133. #### DAP4 Specific Changes * Remove all DSP types and replace with the *CDMWrap* class. * Move the Odometer classes from *netcdf-java* to *tds* since they are only used in that repo. * Remove the attempt to replace netcdf-c JNA system. Now relies only on CDM API. * Remove the synthetic test case generator and all supporting classes. * Remove the dap4/d4tests directory since there are no longer any tests. * Change the gradle "compile" action to the "implementation" to conform to the upcoming gradle version 7 (this change is only partially completed). * Move the various D4TS support files into the WEB-INF directory so the from() actions are no longer needed. * Create a new set of .nc files to be used for testing clients. These files come from and are consistent with those expected by netcdf-c. * Create a new D4TS server web page template (the so-called "FrontPage"). * Created DSR template files to support per-dataset creation of DSRs. * Rebuilt the handling of the *getResourcePath* function to make it dependent on the specific DAP4 Servlet/Controller (i.e. under d4ts vs under thredds). * Added an abstract *getWebContentRoot* function to *DapController* so that each servlet can provide specific locations for the template files. * When a zero-size dimension is encountered, now suppress that dimension and any variable that used it. Ideally this should be an error, but we have encountered too many instances in the wild, so it is better to suppress rather than cause an error. * A number of classes were renamed to more accurately reflect their semantics. Specifically: - *CDMCursor* -> *CDMData* * Convert DSP LRU cache to only cache the NetcdfFile instances. * Remove some now unused classes: - *URLMap* - *URLMapDefault* * *Dap4Controller* was modified to enable DAP4 as a service. * Properly handle checksums in the DMR and DAP. ### Non-DAP4 Specific Changes * Modify CatalogViewContextParser to map a request for file using the DAP4 service: change from *.dmr.xml* to *.dsr.html*. This may change again in the future if we try to emulate the DAP2 .ascii format. * Re-enable the Dap4Controller * Enable the DAP4 service in various test catalogs. * The changes to the intercept code in netcdf-java required changes to some tds tests; specificially *TestFormBuilder* (also converted to JUNIT4 parameterized test format). * Some constants and static utility functions were moved into the CDM class. Currently, this only affects one file outside of DAP4, namely the opendap file NcDAS.java. * Change occurrences of "static protected|public" to "protected|public static". ## PR Checklist - [X] Link to any issues that the PR addresses - [ ] Add labels - [X] Open as a [draft PR](https://github.blog/2019-02-14-introducing-draft-pull-requests/) until ready for review - [X] Make sure GitHub tests pass - [X] Mark PR as "Ready for Review" * Upgrade to latest master --------- Co-authored-by: haileyajohnson --- dap4/build.gradle | 14 - dap4/d4servlet/build.gradle | 7 +- .../src/main/java/dap4/servlet/CDMDMR.java | 84 ++ .../src/main/java/dap4/servlet/CDMData.java | 375 ++++++ .../src/main/java/dap4/servlet/CDMWrap.java | 1065 +++++++++++++++++ .../main/java/dap4/servlet/ChunkWriter.java | 51 +- .../main/java/dap4/servlet/DSPFactory.java | 27 - .../src/main/java/dap4/servlet/DapCache.java | 105 -- .../main/java/dap4/servlet/DapController.java | 382 +++--- .../src/main/java/dap4/servlet/DapDSR.java | 206 ++-- .../main/java/dap4/servlet/DapRequest.java | 252 ++-- .../main/java/dap4/servlet/DapSerializer.java | 87 +- .../main/java/dap4/servlet/FixedValue.java | 99 -- .../src/main/java/dap4/servlet/Generator.java | 274 ----- .../main/java/dap4/servlet/MultiOdometer.java | 155 +++ .../java/dap4/servlet/NullOutputStream.java | 24 + .../src/main/java/dap4/servlet/Odometer.java | 248 ++++ .../java/dap4/servlet/OdometerFactory.java | 52 + .../main/java/dap4/servlet/RandomValue.java | 252 ---- .../java/dap4/servlet/ScalarOdometer.java | 55 + .../main/java/dap4/servlet/SerialWriter.java | 32 +- .../src/main/java/dap4/servlet/SynDSP.java | 116 -- .../src/main/java/dap4/servlet/URLMap.java | 86 -- .../main/java/dap4/servlet/URLMapDefault.java | 137 --- .../src/main/java/dap4/servlet/Value.java | 12 +- dap4/d4tests/build.gradle | 69 -- .../baseline/test_anon_dim.syn.2.raw.txt | 12 - .../baseline/test_anon_dim.syn.raw.txt | 11 - .../baseline/test_atomic_array.nc.5.raw.txt | 30 - .../baseline/test_atomic_array.nc.8.raw.txt | 12 - .../baseline/test_atomic_array.nc.9.raw.txt | 12 - .../baseline/test_atomic_array.nc.raw.txt | 63 - .../baseline/test_atomic_array.syn.raw.txt | 63 - .../baseline/test_atomic_types.nc.raw.txt | 72 -- .../baseline/test_atomic_types.syn.raw.txt | 72 -- .../baseline/test_enum.nc.raw.txt | 14 - .../baseline/test_enum_2.nc.raw.txt | 17 - .../baseline/test_enum_array.nc.4.raw.txt | 16 - .../baseline/test_enum_array.nc.raw.txt | 17 - .../baseline/test_fill.nc.raw.txt | 19 - .../baseline/test_groups1.nc.raw.txt | 44 - .../baseline/test_one_var.nc.raw.txt | 10 - .../baseline/test_one_vararray.nc.1.raw.txt | 12 - .../baseline/test_one_vararray.nc.3.raw.txt | 14 - .../baseline/test_one_vararray.nc.raw.txt | 13 - .../baseline/test_opaque.nc.raw.txt | 11 - .../baseline/test_opaque_array.nc.7.raw.txt | 13 - .../baseline/test_opaque_array.nc.raw.txt | 16 - .../baseline/test_sequence_1.syn.raw.txt | 23 - .../baseline/test_struct_array.nc.6.raw.txt | 34 - .../baseline/test_struct_array.syn.raw.txt | 78 -- .../baseline/test_struct_nested.hdf5.raw.txt | 39 - .../baseline/test_struct_nested3.hdf5.raw.txt | 31 - .../baseline/test_struct_type.nc.raw.txt | 21 - .../baseline/test_utf8.nc.raw.txt | 12 - .../testinput/test_anon_dim.syn.2.raw | Bin 571 -> 0 bytes .../testinput/test_anon_dim.syn.raw | Bin 481 -> 0 bytes .../testinput/test_atomic_array.nc.5.raw | Bin 917 -> 0 bytes .../testinput/test_atomic_array.nc.8.raw | Bin 564 -> 0 bytes .../testinput/test_atomic_array.nc.9.raw | Bin 564 -> 0 bytes .../testinput/test_atomic_array.nc.raw | Bin 2206 -> 0 bytes .../testinput/test_atomic_array.syn.raw | Bin 2222 -> 0 bytes .../testinput/test_atomic_types.nc.raw | Bin 1897 -> 0 bytes .../testinput/test_atomic_types.syn.raw | Bin 1904 -> 0 bytes .../TestCDMClient/testinput/test_enum.nc.raw | Bin 1236 -> 0 bytes .../testinput/test_enum_2.nc.raw | Bin 1294 -> 0 bytes .../testinput/test_enum_array.nc.4.raw | Bin 1379 -> 0 bytes .../testinput/test_enum_array.nc.raw | Bin 1310 -> 0 bytes .../TestCDMClient/testinput/test_fill.nc.raw | Bin 598 -> 0 bytes .../testinput/test_groups1.nc.raw | Bin 1155 -> 0 bytes .../testinput/test_one_var.nc.raw | Bin 416 -> 0 bytes .../testinput/test_one_vararray.nc.1.raw | Bin 554 -> 0 bytes .../testinput/test_one_vararray.nc.3.raw | Bin 599 -> 0 bytes .../testinput/test_one_vararray.nc.raw | Bin 502 -> 0 bytes .../testinput/test_opaque.nc.raw | Bin 430 -> 0 bytes .../testinput/test_opaque_array.nc.7.raw | Bin 618 -> 0 bytes .../testinput/test_opaque_array.nc.raw | Bin 589 -> 0 bytes .../testinput/test_sequence_1.syn.raw | Bin 506 -> 0 bytes .../testinput/test_sequence_2.syn.raw | Bin 565 -> 0 bytes .../testinput/test_struct_array.nc.6.raw | Bin 678 -> 0 bytes .../testinput/test_struct_array.syn.raw | Bin 938 -> 0 bytes .../testinput/test_struct_nested.hdf5.raw | Bin 695 -> 0 bytes .../testinput/test_struct_nested3.hdf5.raw | Bin 608 -> 0 bytes .../testinput/test_struct_type.nc.raw | Bin 499 -> 0 bytes .../TestCDMClient/testinput/test_utf8.nc.raw | Bin 522 -> 0 bytes .../baseline/test_anon_dim.syn.2.raw.txt | 12 - .../baseline/test_atomic_array.nc.5.raw.txt | 30 - .../baseline/test_atomic_array.nc.8.raw.txt | 12 - .../baseline/test_atomic_array.nc.9.raw.txt | 12 - .../baseline/test_enum_array.nc.4.raw.txt | 16 - .../baseline/test_one_vararray.nc.1.raw.txt | 12 - .../baseline/test_one_vararray.nc.3.raw.txt | 14 - .../baseline/test_opaque_array.nc.7.raw.txt | 13 - .../baseline/test_struct_array.nc.6.raw.txt | 34 - .../baseline/test_anon_dim.syn.2.raw.txt | 19 - .../baseline/test_anon_dim.syn.raw.txt | 18 - .../baseline/test_atomic_array.nc.5.raw.txt | 33 - .../baseline/test_atomic_array.nc.8.raw.txt | 18 - .../baseline/test_atomic_array.nc.9.raw.txt | 18 - .../baseline/test_atomic_array.nc.raw.txt | 89 -- .../baseline/test_atomic_array.syn.raw.txt | 89 -- .../baseline/test_atomic_types.nc.raw.txt | 60 - .../baseline/test_atomic_types.syn.raw.txt | 60 - .../TestDSP/baseline/test_enum.nc.raw.txt | 28 - .../TestDSP/baseline/test_enum_2.nc.raw.txt | 30 - .../baseline/test_enum_array.nc.4.raw.txt | 34 - .../baseline/test_enum_array.nc.raw.txt | 34 - .../TestDSP/baseline/test_fill.nc.raw.txt | 18 - .../TestDSP/baseline/test_groups1.nc.raw.txt | 50 - .../TestDSP/baseline/test_one_var.nc.raw.txt | 10 - .../baseline/test_one_vararray.nc.1.raw.txt | 16 - .../baseline/test_one_vararray.nc.3.raw.txt | 17 - .../baseline/test_one_vararray.nc.raw.txt | 14 - .../TestDSP/baseline/test_opaque.nc.raw.txt | 10 - .../baseline/test_opaque_array.nc.7.raw.txt | 19 - .../baseline/test_opaque_array.nc.raw.txt | 17 - .../baseline/test_sequence_1.syn.raw.txt | 17 - .../baseline/test_sequence_2.syn.raw.txt | 33 - .../baseline/test_struct_array.nc.6.raw.txt | 34 - .../baseline/test_struct_array.syn.raw.txt | 77 -- .../baseline/test_struct_nested.hdf5.raw.txt | 28 - .../baseline/test_struct_nested3.hdf5.raw.txt | 22 - .../baseline/test_struct_type.nc.raw.txt | 16 - .../TestDSP/baseline/test_utf8.nc.raw.txt | 14 - .../data/resources/TestDSR/baseline/test1.dsr | 29 - .../baseline/test_sequence_1.syn.1.dap | 3 - .../baseline/test_sequence_1.syn.1.dmr | 11 - .../baseline/test_sequence_1.syn.2.dap | 3 - .../baseline/test_frontpage.html | 296 ----- .../data/resources/TestHyrax/dmr/DMR_0.1.xml | 27 - .../data/resources/TestHyrax/dmr/DMR_0.xml | 11 - .../data/resources/TestHyrax/dmr/DMR_1.xml | 8 - .../data/resources/TestHyrax/dmr/DMR_2.1.xml | 15 - .../data/resources/TestHyrax/dmr/DMR_2.xml | 13 - .../data/resources/TestHyrax/dmr/DMR_3.1.xml | 35 - .../data/resources/TestHyrax/dmr/DMR_3.2.xml | 9 - .../data/resources/TestHyrax/dmr/DMR_3.3.xml | 37 - .../data/resources/TestHyrax/dmr/DMR_3.4.xml | 16 - .../data/resources/TestHyrax/dmr/DMR_3.5.xml | 43 - .../data/resources/TestHyrax/dmr/DMR_3.xml | 13 - .../data/resources/TestHyrax/dmr/DMR_4.1.xml | 18 - .../data/resources/TestHyrax/dmr/DMR_4.xml | 29 - .../data/resources/TestHyrax/dmr/DMR_5.1.xml | 53 - .../data/resources/TestHyrax/dmr/DMR_5.xml | 30 - .../data/resources/TestHyrax/dmr/DMR_6.1.xml | 42 - .../data/resources/TestHyrax/dmr/DMR_6.2.xml | 48 - .../data/resources/TestHyrax/dmr/DMR_6.xml | 32 - .../data/resources/TestHyrax/dmr/DMR_7.1.xml | 46 - .../data/resources/TestHyrax/dmr/DMR_7.2.xml | 22 - .../data/resources/TestHyrax/dmr/DMR_7.3.xml | 38 - .../data/resources/TestHyrax/dmr/DMR_7.4.xml | 62 - .../data/resources/TestHyrax/dmr/DMR_7.5.xml | 23 - .../data/resources/TestHyrax/dmr/DMR_7.xml | 11 - .../data/resources/TestHyrax/dmr/DMR_8.xml | 17 - .../resources/TestHyrax/dmr/test_array_1.xml | 12 - .../resources/TestHyrax/dmr/test_array_10.xml | 18 - .../resources/TestHyrax/dmr/test_array_11.xml | 24 - .../resources/TestHyrax/dmr/test_array_2.xml | 13 - .../resources/TestHyrax/dmr/test_array_3.xml | 12 - .../resources/TestHyrax/dmr/test_array_4.xml | 64 - .../resources/TestHyrax/dmr/test_array_5.xml | 30 - .../resources/TestHyrax/dmr/test_array_6.xml | 15 - .../resources/TestHyrax/dmr/test_array_7.xml | 12 - .../resources/TestHyrax/dmr/test_array_8.xml | 12 - .../TestHyrax/dmr/test_escaped_paths.xml | 69 -- .../resources/TestHyrax/dmr/test_simple_1.dmr | 10 - .../resources/TestHyrax/dmr/test_simple_1.xml | 10 - .../TestHyrax/dmr/test_simple_10.xml | 8 - .../resources/TestHyrax/dmr/test_simple_2.xml | 27 - .../resources/TestHyrax/dmr/test_simple_3.xml | 13 - .../TestHyrax/dmr/test_simple_3_error_1.xml | 13 - .../TestHyrax/dmr/test_simple_3_error_2.xml | 13 - .../TestHyrax/dmr/test_simple_3_error_3.xml | 13 - .../resources/TestHyrax/dmr/test_simple_4.xml | 14 - .../resources/TestHyrax/dmr/test_simple_5.xml | 19 - .../resources/TestHyrax/dmr/test_simple_6.xml | 11 - .../resources/TestHyrax/dmr/test_simple_7.xml | 11 - .../resources/TestHyrax/dmr/test_simple_8.xml | 13 - .../TestHyrax/dmr/test_simple_9.1.xml | 23 - .../resources/TestHyrax/dmr/test_simple_9.xml | 14 - .../test/data/resources/TestHyrax/hyrax.html | 380 ------ .../baseline/test_atomic_array.nc.nc4.dap | 56 - .../baseline/test_atomic_array.nc.nc4.dmr | 31 - .../baseline/test_atomic_types.nc.nc4.dap | 57 - .../baseline/test_atomic_types.nc.nc4.dmr | 40 - .../TestIosp/baseline/test_enum.nc.nc4.dap | 13 - .../TestIosp/baseline/test_enum.nc.nc4.dmr | 11 - .../baseline/test_enum_array.nc.nc4.dap | 16 - .../baseline/test_enum_array.nc.nc4.dmr | 13 - .../TestIosp/baseline/test_one_var.nc.nc4.dap | 9 - .../TestIosp/baseline/test_one_var.nc.nc4.dmr | 7 - .../baseline/test_one_vararray.nc.nc4.dap | 12 - .../baseline/test_one_vararray.nc.nc4.dmr | 9 - .../baseline/test_struct_array.nc.nc4.dap | 67 -- .../baseline/test_struct_array.nc.nc4.dmr | 17 - .../baseline/test_struct_nested.nc.nc4.dap | 38 - .../baseline/test_struct_nested.nc.nc4.dmr | 24 - .../baseline/test_struct_type.nc.nc4.dap | 21 - .../baseline/test_struct_type.nc.nc4.dmr | 14 - .../TestIosp/baseline/test_vlen1.nc.nc4.dap | 11 - .../TestIosp/baseline/test_vlen1.nc.nc4.dmr | 8 - .../TestIosp/baseline/test_vlen2.nc.nc4.dap | 21 - .../TestIosp/baseline/test_vlen2.nc.nc4.dmr | 11 - .../TestIosp/baseline/test_vlen3.nc.nc4.dap | 17 - .../TestIosp/baseline/test_vlen3.nc.nc4.dmr | 11 - .../TestIosp/baseline/test_vlen4.nc.nc4.dap | 20 - .../TestIosp/baseline/test_vlen4.nc.nc4.dmr | 11 - .../TestIosp/baseline/test_vlen5.nc.nc4.dap | 23 - .../TestIosp/baseline/test_vlen5.nc.nc4.dmr | 13 - .../baseline/test_anon_dim.syn.dmp | 11 - .../baseline/test_atomic_array.nc.dmp | 57 - .../baseline/test_atomic_array.syn.dmp | 57 - .../baseline/test_atomic_types.nc.dmp | 44 - .../baseline/test_atomic_types.syn.dmp | 44 - .../TestParsers/baseline/test_enum.nc.dmp | 26 - .../TestParsers/baseline/test_enum_2.nc.dmp | 28 - .../baseline/test_enum_array.nc.dmp | 28 - .../TestParsers/baseline/test_fill.nc.dmp | 14 - .../TestParsers/baseline/test_groups1.nc.dmp | 29 - .../TestParsers/baseline/test_one_var.nc.dmp | 8 - .../baseline/test_one_vararray.nc.dmp | 11 - .../TestParsers/baseline/test_opaque.nc.dmp | 8 - .../baseline/test_opaque_array.nc.dmp | 12 - .../baseline/test_sequence_1.syn.dmp | 11 - .../baseline/test_sequence_2.syn.dmp | 13 - .../baseline/test_struct_array.nc.dmp | 15 - .../baseline/test_struct_array.syn.dmp | 21 - .../baseline/test_struct_nested.hdf5.dmp | 17 - .../baseline/test_struct_nested3.hdf5.dmp | 14 - .../baseline/test_struct_type.nc.dmp | 11 - .../TestParsers/baseline/test_utf8.nc.dmp | 11 - .../TestParsers/baseline/test_vlen1.nc.dmp | 10 - .../TestParsers/baseline/test_vlen2.nc.dmp | 14 - .../TestParsers/baseline/test_vlen3.hdf5.dmp | 12 - .../TestParsers/baseline/test_vlen5.hdf5.dmp | 14 - .../TestParsers/baseline/testall.dmp | 57 - .../dmrset/test_atomic_array.nc.dmr | 57 - .../dmrset/test_atomic_array.syn.dmr | 57 - .../dmrset/test_atomic_types.nc.dmr | 44 - .../dmrset/test_atomic_types.syn.dmr | 48 - .../TestParsers/dmrset/test_enum.nc.dmr | 26 - .../TestParsers/dmrset/test_enum_array.nc.dmr | 28 - .../TestParsers/dmrset/test_groups1.nc.dmr | 29 - .../TestParsers/dmrset/test_one_var.nc.dmr | 8 - .../dmrset/test_one_vararray.nc.dmr | 11 - .../dmrset/test_struct_array.nc.dmr | 15 - .../dmrset/test_struct_nested.hdf5.dmr | 17 - .../dmrset/test_struct_nested3.hdf5.dmr | 14 - .../dmrset/test_struct_type.nc.dmr | 11 - .../TestParsers/dmrset/test_utf8.nc.dmr | 11 - .../TestParsers/dmrset/test_vlen1.nc.dmr | 10 - .../TestParsers/dmrset/test_vlen2.nc.dmr | 14 - .../TestParsers/dmrset/test_vlen3.hdf5.dmr | 12 - .../TestParsers/dmrset/test_vlen5.hdf5.dmr | 14 - .../resources/TestParsers/dmrset/testall.dmr | 78 -- .../resources/TestParsers/testinput/ce1.txt | 8 - .../TestParsers/testinput/ce1_dmr.txt | 39 - .../TestParsers/testinput/test_misc1.xml | 18 - .../TestParsers/testinput/test_misc2.xml | 37 - .../TestParsers/testinput/test_simple_1.xml | 14 - .../TestParsers/testinput/test_simple_2.xml | 33 - .../TestParsers/testinput/testall.xml | 77 -- .../TestSerial/baseline/test_aaa.nc.dmp | 9 - .../baseline/test_atomic_array.nc.0.dmp | 24 - .../baseline/test_atomic_array.nc.1.dmp | 18 - .../baseline/test_atomic_array.nc.dmp | 83 -- .../baseline/test_atomic_array.nc.ncdump | 57 - .../baseline/test_atomic_types.nc.dmp | 53 - .../baseline/test_atomic_types.nc.ncdump | 61 - .../TestSerial/baseline/test_enum.nc.dmp | 21 - .../baseline/test_enum_array.nc.0.dmp | 27 - .../baseline/test_enum_array.nc.1.dmp | 23 - .../baseline/test_enum_array.nc.dmp | 27 - .../TestSerial/baseline/test_groups1.nc.dmp | 4 - .../baseline/test_groups1.nc.ncdump | 7 - .../TestSerial/baseline/test_one_var.nc.dmp | 5 - .../baseline/test_one_var.nc.ncdump | 9 - .../baseline/test_one_vararray.nc.0.dmp | 9 - .../baseline/test_one_vararray.nc.1.dmp | 7 - .../baseline/test_one_vararray.nc.dmp | 9 - .../baseline/test_struct_array.nc.0.dmp | 25 - .../baseline/test_struct_array.nc.dmp | 59 - .../baseline/test_struct_array.nc.ncdump | 26 - .../baseline/test_struct_nested.hdf5.dmp | 23 - .../baseline/test_struct_type.nc.dmp | 11 - .../baseline/test_struct_type.nc.ncdump | 18 - .../TestSerial/baseline/test_utf8.nc.dmp | 9 - .../TestSerial/baseline/test_vlen1.nc.dmp | 11 - .../TestSerial/baseline/test_vlen2.nc.dmp | 17 - .../TestSerial/baseline/test_vlen3.hdf5.dmp | 15 - .../TestSerial/baseline/test_vlen5.hdf5.dmp | 20 - .../baseline/test_anon_dim.syn.dap | 1 - .../baseline/test_anon_dim.syn.dmr | 12 - .../baseline/test_atomic_array.nc.dap | 8 - .../baseline/test_atomic_array.nc.dmr | 58 - .../baseline/test_atomic_array.syn.dap | 8 - .../baseline/test_atomic_array.syn.dmr | 58 - .../baseline/test_atomic_types.nc.dap | 15 - .../baseline/test_atomic_types.nc.dmr | 45 - .../baseline/test_atomic_types.syn.dap | 15 - .../baseline/test_atomic_types.syn.dmr | 45 - .../TestServlet/baseline/test_enum.nc.dap | 1 - .../TestServlet/baseline/test_enum.nc.dmr | 27 - .../TestServlet/baseline/test_enum_2.nc.dap | 1 - .../TestServlet/baseline/test_enum_2.nc.dmr | 29 - .../baseline/test_enum_array.nc.dap | 1 - .../baseline/test_enum_array.nc.dmr | 29 - .../TestServlet/baseline/test_fill.nc.dap | 3 - .../TestServlet/baseline/test_fill.nc.dmr | 15 - .../TestServlet/baseline/test_groups1.nc.dap | 4 - .../TestServlet/baseline/test_groups1.nc.dmr | 30 - .../TestServlet/baseline/test_one_var.nc.dap | 1 - .../TestServlet/baseline/test_one_var.nc.dmr | 9 - .../baseline/test_one_vararray.nc.dap | 1 - .../baseline/test_one_vararray.nc.dmr | 12 - .../TestServlet/baseline/test_opaque.nc.dap | 1 - .../TestServlet/baseline/test_opaque.nc.dmr | 9 - .../baseline/test_opaque_array.nc.dap | 1 - .../baseline/test_opaque_array.nc.dmr | 13 - .../baseline/test_sequence_1.syn.dap | 2 - .../baseline/test_sequence_1.syn.dmr | 12 - .../baseline/test_sequence_2.syn.dap | 5 - .../baseline/test_sequence_2.syn.dmr | 14 - .../baseline/test_struct_array.nc.dmr | 16 - .../baseline/test_struct_array.syn.dap | 15 - .../baseline/test_struct_array.syn.dmr | 22 - .../baseline/test_struct_nested.hdf5.dap | 1 - .../baseline/test_struct_nested.hdf5.dmr | 18 - .../baseline/test_struct_nested3.hdf5.dap | 1 - .../baseline/test_struct_nested3.hdf5.dmr | 15 - .../baseline/test_struct_type.nc.dap | 1 - .../baseline/test_struct_type.nc.dmr | 12 - .../TestServlet/baseline/test_utf8.nc.dap | 3 - .../TestServlet/baseline/test_utf8.nc.dmr | 12 - .../baseline/test_anon_dim.syn.2.dap | 1 - .../baseline/test_anon_dim.syn.2.dmr | 14 - .../baseline/test_atomic_array.nc.5.dap | 4 - .../baseline/test_atomic_array.nc.5.dmr | 26 - .../baseline/test_atomic_array.nc.8.dap | 1 - .../baseline/test_atomic_array.nc.8.dmr | 14 - .../baseline/test_atomic_array.nc.9.dap | 1 - .../baseline/test_atomic_array.nc.9.dmr | 14 - .../baseline/test_enum_array.nc.4.dap | 1 - .../baseline/test_enum_array.nc.4.dmr | 31 - .../baseline/test_one_vararray.nc.1.dap | 1 - .../baseline/test_one_vararray.nc.1.dmr | 14 - .../baseline/test_one_vararray.nc.3.dap | 1 - .../baseline/test_one_vararray.nc.3.dmr | 15 - .../baseline/test_opaque_array.nc.7.dap | 1 - .../baseline/test_opaque_array.nc.7.dmr | 15 - .../baseline/test_struct_array.nc.6.dap | 1 - .../baseline/test_struct_array.nc.6.dmr | 17 - .../test/data/resources/testfiles/Makefile | 75 -- .../resources/testfiles/dmr/test_aaa.nc.dmr | 11 - .../testfiles/dmr/test_atomic_array.nc.dmr | 55 - .../testfiles/dmr/test_atomic_types.nc.dmr | 44 - .../resources/testfiles/dmr/test_enum.nc.dmr | 24 - .../resources/testfiles/dmr/test_enum1.nc.dmr | 27 - .../resources/testfiles/dmr/test_enum2.nc.dmr | 26 - .../testfiles/dmr/test_enum_array.nc.dmr | 26 - .../testfiles/dmr/test_groups1.nc.dmr | 29 - .../testfiles/dmr/test_numeric_types.nc.dmr | 22 - .../testfiles/dmr/test_one_var.nc.dmr | 8 - .../testfiles/dmr/test_one_vararray.nc.dmr | 11 - .../testfiles/dmr/test_opaque_type.nc.dmr | 8 - .../testfiles/dmr/test_string_type.nc.dmr | 8 - .../testfiles/dmr/test_struct1.nc.dmr | 11 - .../testfiles/dmr/test_struct_array.nc.dmr | 15 - .../testfiles/dmr/test_struct_nested.hdf5.dmr | 17 - .../testfiles/dmr/test_struct_nested.nc.dmr | 17 - .../testfiles/dmr/test_struct_type.nc.dmr | 11 - .../resources/testfiles/dmr/test_utf8.nc.dmr | 11 - .../resources/testfiles/dmr/test_vlen1.nc.dmr | 11 - .../resources/testfiles/dmr/test_vlen2.nc.dmr | 15 - .../testfiles/dmr/test_vlen3.hdf5.dmr | 14 - .../resources/testfiles/dmr/test_vlen3.nc.dmr | 8 - .../testfiles/dmr/test_vlen4.hdf5.dmr | 14 - .../testfiles/dmr/test_vlen5.hdf5.dmr | 15 - .../src/test/data/resources/testfiles/doit | 0 .../resources/testfiles/test_anon_dim.syn | 11 - .../resources/testfiles/test_atomic_array.cdl | 39 - .../resources/testfiles/test_atomic_array.nc | Bin 14523 -> 0 bytes .../testfiles/test_atomic_array.ncdump | 48 - .../resources/testfiles/test_atomic_array.syn | 55 - .../resources/testfiles/test_atomic_types.cdl | 42 - .../testfiles/test_atomic_types.ncdump | 57 - .../resources/testfiles/test_atomic_types.syn | 40 - .../data/resources/testfiles/test_enum.cdl | 12 - .../data/resources/testfiles/test_enum.nc | Bin 1239 -> 0 bytes .../data/resources/testfiles/test_enum.ncdump | 13 - .../data/resources/testfiles/test_enum1.cdl | 12 - .../data/resources/testfiles/test_enum1.nc | Bin 1239 -> 0 bytes .../resources/testfiles/test_enum1.ncdump | 13 - .../data/resources/testfiles/test_enum_2.cdl | 15 - .../data/resources/testfiles/test_enum_2.nc | Bin 1428 -> 0 bytes .../resources/testfiles/test_enum_2.ncdump | 16 - .../resources/testfiles/test_enum_array.cdl | 14 - .../testfiles/test_enum_array.ncdump | 15 - .../data/resources/testfiles/test_fill.cdl | 11 - .../data/resources/testfiles/test_fill.nc | Bin 1271 -> 0 bytes .../data/resources/testfiles/test_fill.ncdump | 14 - .../data/resources/testfiles/test_groups1.cdl | 35 - .../data/resources/testfiles/test_groups1.nc | Bin 8469 -> 0 bytes .../resources/testfiles/test_groups1.ncdump | 35 - .../data/resources/testfiles/test_misc1.nc | Bin 22465 -> 0 bytes .../data/resources/testfiles/test_one_var.cdl | 6 - .../data/resources/testfiles/test_one_var.nc | Bin 603 -> 0 bytes .../resources/testfiles/test_one_var.ncdump | 7 - .../resources/testfiles/test_one_vararray.cdl | 8 - .../testfiles/test_one_vararray.ncdump | 9 - .../data/resources/testfiles/test_opaque.cdl | 8 - .../data/resources/testfiles/test_opaque.nc | Bin 711 -> 0 bytes .../resources/testfiles/test_opaque.ncdump | 9 - .../resources/testfiles/test_opaque_array.cdl | 12 - .../testfiles/test_opaque_array.ncdump | 13 - .../resources/testfiles/test_sequence_1.syn | 12 - .../resources/testfiles/test_sequence_2.syn | 13 - .../data/resources/testfiles/test_struct1.cdl | 11 - .../data/resources/testfiles/test_struct1.nc | Bin 805 -> 0 bytes .../resources/testfiles/test_struct1.ncdump | 12 - .../resources/testfiles/test_struct_array.cdl | 18 - .../testfiles/test_struct_array.ncdump | 19 - .../resources/testfiles/test_struct_array.syn | 25 - .../testfiles/test_struct_nested.cdl | 15 - .../testfiles/test_struct_nested.hdf5 | Bin 723 -> 0 bytes .../resources/testfiles/test_struct_nested.nc | Bin 1330 -> 0 bytes .../testfiles/test_struct_nested.ncdump | 16 - .../testfiles/test_struct_nested3.cdl | 16 - .../testfiles/test_struct_nested3.hdf5 | Bin 736 -> 0 bytes .../testfiles/test_struct_nested3.nc | Bin 1206 -> 0 bytes .../testfiles/test_struct_nested3.ncdump | 17 - .../resources/testfiles/test_struct_type.cdl | 11 - .../resources/testfiles/test_struct_type.nc | Bin 805 -> 0 bytes .../testfiles/test_struct_type.ncdump | 12 - .../data/resources/testfiles/test_test.cdl | 11 - .../data/resources/testfiles/test_test.nc | Bin 777 -> 0 bytes .../data/resources/testfiles/test_test.ncdump | 9 - .../data/resources/testfiles/test_unlim1.cdl | 27 - .../resources/testfiles/test_unlim1.ncdump | 34 - .../data/resources/testfiles/test_utf8.cdl | 8 - .../data/resources/testfiles/test_utf8.ncdump | 9 - .../data/resources/testfiles/test_vlen1.cdl | 11 - .../resources/testfiles/test_vlen1.ncdump | 9 - .../data/resources/testfiles/test_vlen10.cdl | 14 - .../resources/testfiles/test_vlen10.ncdump | 13 - .../data/resources/testfiles/test_vlen11.cdl | 13 - .../resources/testfiles/test_vlen11.ncdump | 10 - .../data/resources/testfiles/test_vlen2.cdl | 15 - .../data/resources/testfiles/test_vlen2.nc | Bin 6336 -> 0 bytes .../resources/testfiles/test_vlen2.ncdump | 15 - .../data/resources/testfiles/test_vlen3.cdl | 13 - .../resources/testfiles/test_vlen3.ncdump | 12 - .../data/resources/testfiles/test_vlen4.cdl | 13 - .../resources/testfiles/test_vlen4.ncdump | 12 - .../data/resources/testfiles/test_vlen5.cdl | 16 - .../resources/testfiles/test_vlen5.ncdump | 14 - .../data/resources/testfiles/test_vlen6.cdl | 16 - .../resources/testfiles/test_vlen6.ncdump | 11 - .../data/resources/testfiles/test_vlen7.cdl | 16 - .../resources/testfiles/test_vlen7.ncdump | 11 - .../data/resources/testfiles/test_vlen8.cdl | 19 - .../data/resources/testfiles/test_vlen8.nc | Bin 6304 -> 0 bytes .../resources/testfiles/test_vlen8.ncdump | 14 - .../data/resources/testfiles/test_vlen9.cdl | 16 - .../resources/testfiles/test_vlen9.ncdump | 15 - .../data/resources/testfiles/test_zerodim.cdl | 23 - .../data/resources/testfiles/test_zerodim.nc | Bin 14339 -> 0 bytes .../resources/testfiles/test_zerodim.ncdump | 28 - .../test/data/resources/testfiles/tst_fills.c | 51 - .../data/resources/testfiles/tst_fills.nc | Bin 1050 -> 0 bytes .../test/java/dap4/test/D4TSController.java | 69 -- .../test/java/dap4/test/DapTestCommon.java | 499 -------- dap4/d4tests/src/test/java/dap4/test/Diff.j | 794 ------------ .../d4tests/src/test/java/dap4/test/Dump.java | 232 ---- .../src/test/java/dap4/test/GenerateRaw.java | 400 ------- .../src/test/java/dap4/test/Synthesize.java | 105 -- .../test/java/dap4/test/TestCDMClient.java | 323 ----- .../test/java/dap4/test/TestConstraints.java | 310 ----- .../src/test/java/dap4/test/TestDSP.java | 365 ------ .../src/test/java/dap4/test/TestDSR.java | 100 -- .../src/test/java/dap4/test/TestFilters.java | 287 ----- .../test/java/dap4/test/TestFrontPage.java | 101 -- .../src/test/java/dap4/test/TestH5Iosp.java | 288 ----- .../src/test/java/dap4/test/TestHyrax.java | 396 ------ .../src/test/java/dap4/test/TestNc4Iosp.java | 290 ----- .../src/test/java/dap4/test/TestParserCE.java | 226 ---- .../test/java/dap4/test/TestParserDMR.java | 244 ---- .../src/test/java/dap4/test/TestPrinter.java | 116 -- .../src/test/java/dap4/test/TestSerial.java | 322 ----- .../src/test/java/dap4/test/TestServlet.java | 860 ------------- .../dap4/test/TestServletConstraints.java | 453 ------- .../src/test/resources/logback-test.xml | 43 - dap4/d4ts/build.gradle | 37 +- .../src/main/java/dap4/d4ts/D4TSServlet.java | 109 +- .../src/main/java/dap4/d4ts/FrontPage.java | 144 ++- dap4/d4ts/src/main/webapp/WEB-INF/README.md | 14 + .../src/main/webapp/WEB-INF}/favicon.ico | Bin .../WEB-INF/templates/dap4.dsr.html.template | 61 + .../WEB-INF/templates/dap4.dsr.xml.template | 28 + .../templates/dap4.frontpage.html.template | 18 + .../WEB-INF/testfiles/test_atomic_array.nc | Bin 0 -> 14477 bytes .../WEB-INF}/testfiles/test_atomic_types.nc | Bin 13136 -> 12685 bytes .../webapp/WEB-INF/testfiles/test_enum_1.nc | Bin 0 -> 989 bytes .../webapp/WEB-INF/testfiles/test_enum_2.nc | Bin 0 -> 1180 bytes .../webapp/WEB-INF/testfiles/test_enum_3.nc | Bin 0 -> 870 bytes .../WEB-INF}/testfiles/test_enum_array.nc | Bin 8293 -> 8197 bytes .../webapp/WEB-INF/testfiles/test_fill.nc | Bin 0 -> 1173 bytes .../webapp/WEB-INF/testfiles/test_fill_2.nc} | Bin 6534 -> 7247 bytes .../webapp/WEB-INF/testfiles/test_groups1.nc | Bin 0 -> 8321 bytes .../webapp/WEB-INF/testfiles/test_misc1.nc | Bin 0 -> 16155 bytes .../webapp/WEB-INF/testfiles/test_one_var.nc | Bin 0 -> 606 bytes .../WEB-INF}/testfiles/test_one_vararray.nc | Bin 6248 -> 6152 bytes .../webapp/WEB-INF/testfiles/test_opaque.nc | Bin 0 -> 659 bytes .../WEB-INF}/testfiles/test_opaque_array.nc | Bin 6272 -> 6176 bytes .../webapp/WEB-INF/testfiles/test_struct1.nc | Bin 0 -> 679 bytes .../WEB-INF/testfiles/test_struct_array.nc} | Bin 6272 -> 6240 bytes .../WEB-INF/testfiles/test_struct_nested.nc | Bin 0 -> 844 bytes .../WEB-INF/testfiles/test_struct_nested3.nc | Bin 0 -> 894 bytes .../WEB-INF/testfiles/test_struct_type.nc | Bin 0 -> 679 bytes .../webapp/WEB-INF/testfiles/test_test.nc | Bin 0 -> 666 bytes .../webapp/WEB-INF}/testfiles/test_unlim.nc | Bin 18392 -> 18251 bytes .../webapp/WEB-INF}/testfiles/test_unlim1.nc | Bin 10266 -> 10059 bytes .../webapp/WEB-INF}/testfiles/test_utf8.nc | Bin 6272 -> 6176 bytes .../webapp/WEB-INF}/testfiles/test_vlen1.nc | Bin 4863 -> 4765 bytes .../webapp/WEB-INF}/testfiles/test_vlen10.nc | Bin 5133 -> 4902 bytes .../webapp/WEB-INF}/testfiles/test_vlen11.nc | Bin 4944 -> 4850 bytes .../webapp/WEB-INF/testfiles/test_vlen2.nc} | Bin 4762 -> 6240 bytes .../webapp/WEB-INF}/testfiles/test_vlen3.nc | Bin 4982 -> 4855 bytes .../webapp/WEB-INF}/testfiles/test_vlen4.nc | Bin 4990 -> 4884 bytes .../webapp/WEB-INF/testfiles/test_vlen5.nc} | Bin 6224 -> 6176 bytes .../webapp/WEB-INF}/testfiles/test_vlen6.nc | Bin 6272 -> 6176 bytes .../webapp/WEB-INF}/testfiles/test_vlen7.nc | Bin 6256 -> 6160 bytes .../webapp/WEB-INF/testfiles/test_vlen8.nc} | Bin 4733 -> 6208 bytes .../webapp/WEB-INF/testfiles/test_vlen9.nc} | Bin 6272 -> 6176 bytes .../webapp/WEB-INF/testfiles/test_zerodim.nc | Bin 0 -> 14107 bytes dap4/git.sh | 16 - gradle/any/coverage.gradle | 2 +- gradle/root/testing.gradle | 5 +- settings.gradle | 6 +- tds-platform/build.gradle | 3 +- tds-testing-platform/build.gradle | 4 - tds/build.gradle | 6 +- .../ucar/nc2/util/net/TestFormBuilder.java | 208 ++-- .../CatalogViewContextParser.java | 2 +- .../thredds/server/dap4/Dap4Controller.java | 211 ++-- .../java/thredds/server/dap4/ThreddsDSP.java | 67 -- .../java/thredds/server/opendap/NcDAS.java | 2 +- .../WEB-INF/altContent/startup/catalog.xml | 2 +- .../WEB-INF/templates/dap4.dsr.html.template | 61 + .../WEB-INF/templates/dap4.dsr.xml.template | 28 + tds/src/test/content/thredds/catalog.xml | 2 +- 551 files changed, 3155 insertions(+), 17966 deletions(-) create mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/CDMDMR.java create mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/CDMData.java create mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java delete mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/DSPFactory.java delete mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/DapCache.java delete mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/FixedValue.java delete mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/Generator.java create mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/MultiOdometer.java create mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/NullOutputStream.java create mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/Odometer.java create mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/OdometerFactory.java delete mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/RandomValue.java create mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/ScalarOdometer.java delete mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/SynDSP.java delete mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/URLMap.java delete mode 100644 dap4/d4servlet/src/main/java/dap4/servlet/URLMapDefault.java delete mode 100644 dap4/d4tests/build.gradle delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_anon_dim.syn.2.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_anon_dim.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.5.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.8.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.9.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_types.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_types.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_2.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_array.nc.4.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_array.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_fill.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_groups1.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_var.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.1.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.3.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque_array.nc.7.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque_array.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_sequence_1.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_array.nc.6.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_array.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_nested.hdf5.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_nested3.hdf5.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_type.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_utf8.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_anon_dim.syn.2.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_anon_dim.syn.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.nc.5.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.nc.8.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.nc.9.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.syn.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_types.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_types.syn.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_enum.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_enum_2.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_enum_array.nc.4.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_enum_array.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_fill.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_groups1.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_one_var.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_one_vararray.nc.1.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_one_vararray.nc.3.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_one_vararray.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_opaque.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_opaque_array.nc.7.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_opaque_array.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_sequence_1.syn.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_sequence_2.syn.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_struct_array.nc.6.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_struct_array.syn.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_struct_nested.hdf5.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_struct_nested3.hdf5.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_struct_type.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_utf8.nc.raw delete mode 100644 dap4/d4tests/src/test/data/resources/TestConstraints/baseline/test_anon_dim.syn.2.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestConstraints/baseline/test_atomic_array.nc.5.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestConstraints/baseline/test_atomic_array.nc.8.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestConstraints/baseline/test_atomic_array.nc.9.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestConstraints/baseline/test_enum_array.nc.4.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestConstraints/baseline/test_one_vararray.nc.1.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestConstraints/baseline/test_one_vararray.nc.3.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestConstraints/baseline/test_opaque_array.nc.7.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestConstraints/baseline/test_struct_array.nc.6.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_anon_dim.syn.2.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_anon_dim.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.5.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.8.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.9.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_types.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_types.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_2.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_array.nc.4.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_array.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_fill.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_groups1.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_var.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.1.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.3.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque_array.nc.7.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque_array.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_sequence_1.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_sequence_2.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_array.nc.6.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_array.syn.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_nested.hdf5.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_nested3.hdf5.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_type.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_utf8.nc.raw.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestDSR/baseline/test1.dsr delete mode 100644 dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.1.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.1.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.2.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestFrontPage/baseline/test_frontpage.html delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_0.1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_0.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_2.1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_2.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.2.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.3.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.4.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.5.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_4.1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_4.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_5.1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_5.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.2.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.2.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.3.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.4.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.5.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_8.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_10.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_11.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_2.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_3.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_4.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_5.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_6.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_7.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_8.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_escaped_paths.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_1.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_10.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_2.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_2.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_3.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_4.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_5.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_6.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_7.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_8.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_9.1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_9.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestHyrax/hyrax.html delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_array.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_array.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_types.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_types.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum_array.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum_array.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_var.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_var.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_vararray.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_vararray.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_array.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_array.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_nested.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_nested.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_type.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_type.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen1.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen1.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen2.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen2.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen3.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen3.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen4.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen4.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen5.nc.nc4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen5.nc.nc4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_anon_dim.syn.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_array.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_array.syn.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_types.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_types.syn.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum_2.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum_array.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_fill.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_groups1.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_one_var.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_one_vararray.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_opaque.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_opaque_array.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_sequence_1.syn.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_sequence_2.syn.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_array.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_array.syn.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_nested.hdf5.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_nested3.hdf5.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_type.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_utf8.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen1.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen2.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen3.hdf5.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen5.hdf5.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/baseline/testall.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_array.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_array.syn.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_types.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_types.syn.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_enum.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_enum_array.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_groups1.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_one_var.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_one_vararray.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_array.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_nested.hdf5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_nested3.hdf5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_type.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_utf8.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen1.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen2.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen3.hdf5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen5.hdf5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/dmrset/testall.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/testinput/ce1.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/testinput/ce1_dmr.txt delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_misc1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_misc2.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_simple_1.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_simple_2.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestParsers/testinput/testall.xml delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_aaa.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.0.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.1.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_types.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_types.nc.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.0.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.1.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_groups1.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_groups1.nc.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_var.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_var.nc.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.0.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.1.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.0.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_nested.hdf5.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_type.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_type.nc.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_utf8.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen1.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen2.nc.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen3.hdf5.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen5.hdf5.dmp delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_anon_dim.syn.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_anon_dim.syn.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.syn.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.syn.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.syn.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.syn.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_2.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_2.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_array.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_array.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_fill.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_fill.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_groups1.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_groups1.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_var.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_var.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_vararray.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_vararray.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque_array.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque_array.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_1.syn.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_1.syn.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_2.syn.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_2.syn.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.syn.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.syn.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested.hdf5.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested.hdf5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested3.hdf5.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested3.hdf5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_type.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_type.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_utf8.nc.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_utf8.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_anon_dim.syn.2.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_anon_dim.syn.2.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.5.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.8.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.8.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.9.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.9.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_enum_array.nc.4.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_enum_array.nc.4.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.1.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.1.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.3.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.3.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_opaque_array.nc.7.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_opaque_array.nc.7.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_struct_array.nc.6.dap delete mode 100644 dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_struct_array.nc.6.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/Makefile delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_aaa.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_atomic_array.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_atomic_types.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum1.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum2.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum_array.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_groups1.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_numeric_types.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_one_var.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_one_vararray.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_opaque_type.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_string_type.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct1.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_array.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_nested.hdf5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_nested.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_type.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_utf8.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen1.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen2.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen3.hdf5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen3.nc.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen4.hdf5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen5.hdf5.dmr delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/doit delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_anon_dim.syn delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_atomic_array.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_atomic_array.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_atomic_array.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_atomic_array.syn delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.syn delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum1.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum1.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum1.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum_array.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_enum_array.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_fill.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_fill.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_fill.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_groups1.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_groups1.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_groups1.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_misc1.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_one_var.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_one_var.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_one_var.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_one_vararray.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_one_vararray.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_opaque.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_opaque.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_opaque.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_opaque_array.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_opaque_array.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_sequence_1.syn delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_sequence_2.syn delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct1.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct1.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct1.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.syn delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.hdf5 delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.hdf5 delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_test.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_test.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_test.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_unlim1.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_unlim1.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_utf8.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_utf8.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen1.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen1.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen10.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen10.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen11.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen11.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen2.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen2.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen2.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen3.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen3.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen4.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen4.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen5.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen5.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen6.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen6.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen7.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen7.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen8.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen8.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen8.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen9.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_vlen9.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_zerodim.cdl delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_zerodim.nc delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/test_zerodim.ncdump delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/tst_fills.c delete mode 100644 dap4/d4tests/src/test/data/resources/testfiles/tst_fills.nc delete mode 100644 dap4/d4tests/src/test/java/dap4/test/D4TSController.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/DapTestCommon.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/Diff.j delete mode 100644 dap4/d4tests/src/test/java/dap4/test/Dump.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/GenerateRaw.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/Synthesize.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestCDMClient.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestConstraints.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestDSP.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestDSR.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestFilters.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestFrontPage.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestH5Iosp.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestHyrax.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestNc4Iosp.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestParserCE.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestParserDMR.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestPrinter.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestSerial.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestServlet.java delete mode 100644 dap4/d4tests/src/test/java/dap4/test/TestServletConstraints.java delete mode 100644 dap4/d4tests/src/test/resources/logback-test.xml create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/README.md rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/favicon.ico (100%) create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.dsr.html.template create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.dsr.xml.template create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.frontpage.html.template create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_atomic_array.nc rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_atomic_types.nc (57%) create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_enum_1.nc create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_enum_2.nc create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_enum_3.nc rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_enum_array.nc (74%) create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_fill.nc rename dap4/{d4tests/src/test/data/resources/testfiles/test_struct_array.nc => d4ts/src/main/webapp/WEB-INF/testfiles/test_fill_2.nc} (53%) create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_groups1.nc create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_misc1.nc create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_one_var.nc rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_one_vararray.nc (78%) create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_opaque.nc rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_opaque_array.nc (76%) create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_struct1.nc rename dap4/{d4tests/src/test/data/resources/testfiles/test_vlen9.nc => d4ts/src/main/webapp/WEB-INF/testfiles/test_struct_array.nc} (67%) create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_struct_nested.nc create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_struct_nested3.nc create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_struct_type.nc create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_test.nc rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_unlim.nc (58%) rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_unlim1.nc (66%) rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_utf8.nc (76%) rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_vlen1.nc (85%) rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_vlen10.nc (78%) rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_vlen11.nc (80%) rename dap4/{d4tests/src/test/data/resources/testfiles/test_vlen4.hdf5 => d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen2.nc} (65%) rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_vlen3.nc (81%) rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_vlen4.nc (80%) rename dap4/{d4tests/src/test/data/resources/testfiles/test_vlen5.hdf5 => d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen5.nc} (77%) rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_vlen6.nc (75%) rename dap4/{d4tests/src/test/data/resources => d4ts/src/main/webapp/WEB-INF}/testfiles/test_vlen7.nc (75%) rename dap4/{d4tests/src/test/data/resources/testfiles/test_vlen3.hdf5 => d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen8.nc} (66%) rename dap4/{d4tests/src/test/data/resources/testfiles/test_vlen5.nc => d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen9.nc} (71%) create mode 100644 dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_zerodim.nc delete mode 100644 dap4/git.sh delete mode 100644 tds/src/main/java/thredds/server/dap4/ThreddsDSP.java create mode 100644 tds/src/main/webapp/WEB-INF/templates/dap4.dsr.html.template create mode 100644 tds/src/main/webapp/WEB-INF/templates/dap4.dsr.xml.template diff --git a/dap4/build.gradle b/dap4/build.gradle index fd4e9da1d7..18834c9aed 100644 --- a/dap4/build.gradle +++ b/dap4/build.gradle @@ -2,20 +2,6 @@ ext.title = 'Data Access Protocol (DAP) version 4.0' // Will be inherited by su // dap4 has no source code nor any artifacts to publish -// NON-TRANSITIVE Dependency graph: -// module depends on -// ---------------------------------------- -// common: -// d4core nothing -// d4lib d4core httpservices -// d4cdm d4lib cdm -// server: -// d4servletshared d4cdmshared netcdf4 -// d4ts d4servletshared -// d4tswar d4ts -// tests: -// d4tests d4servletshared d4ts - subprojects { // TODO: Give the subprojects real titles. ext.title = "DAP4: $name" diff --git a/dap4/d4servlet/build.gradle b/dap4/d4servlet/build.gradle index 406ccf6de3..e5c57fec19 100644 --- a/dap4/d4servlet/build.gradle +++ b/dap4/d4servlet/build.gradle @@ -4,9 +4,10 @@ apply from: "$rootDir/gradle/any/java-published.gradle" dependencies { implementation enforcedPlatform(project(':tds-platform')) - compile 'edu.ucar:dap4' - compile 'edu.ucar:httpservices' + implementation 'edu.ucar:dap4' + implementation 'edu.ucar:httpservices' + implementation 'edu.ucar:cdm-core' compileOnly 'jakarta.servlet:jakarta.servlet-api' - compile 'org.slf4j:slf4j-api' + compileOnly 'org.slf4j:slf4j-api' } diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/CDMDMR.java b/dap4/d4servlet/src/main/java/dap4/servlet/CDMDMR.java new file mode 100644 index 0000000000..78c179516f --- /dev/null +++ b/dap4/d4servlet/src/main/java/dap4/servlet/CDMDMR.java @@ -0,0 +1,84 @@ +/* + * Copyright 2012, UCAR/Unidata. + * See the LICENSE file for more information. + */ + +package dap4.servlet; + +import dap4.core.dmr.*; + +public class CDMDMR { + ////////////////////////////////////////////////// + + public static class CDMAttribute extends DapAttribute { + public CDMAttribute(String name, DapType basetype) { + super(name, basetype); + } + } + + public static class CDMAttributeSet extends DapAttributeSet { + public CDMAttributeSet(String name) { + super(name); + } + } + + public static class CDMDimension extends DapDimension { + public CDMDimension(String name, long size) { + super(name, size); + } + } + + public static class CDMMap extends DapMap { + public CDMMap(String target) { + super(target); + } + } + + public abstract static class CDMVariable extends DapVariable { + public CDMVariable(String name, DapType t) { + super(name, t); + } + } + + public static class CDMGroup extends DapGroup { + public CDMGroup(String name) { + super(name); + } + } + + public static class CDMDataset extends DapDataset { + public CDMDataset(String name) { + super(name); + } + } + + public static class CDMEnumeration extends DapEnumeration { + public CDMEnumeration(String name, DapType basetype) { + super(name, basetype); + } + } + + public static class CDMEnumConst extends DapEnumConst { + public CDMEnumConst(String name, long value) { + super(name, value); + } + } + + public static class CDMStructure extends DapStructure { + public CDMStructure(String name) { + super(name); + } + } + + public static class CDMSequence extends DapSequence { + public CDMSequence(String name) { + super(name); + } + } + + public static class CDMOtherXML extends DapOtherXML { + public CDMOtherXML(String name) { + super(name); + } + } +} diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/CDMData.java b/dap4/d4servlet/src/main/java/dap4/servlet/CDMData.java new file mode 100644 index 0000000000..7a3c5a40b8 --- /dev/null +++ b/dap4/d4servlet/src/main/java/dap4/servlet/CDMData.java @@ -0,0 +1,375 @@ +/* + * Copyright 2012, UCAR/Unidata. + * See the LICENSE file for more information. + */ + +package dap4.servlet; + +import dap4.core.dmr.*; +import dap4.core.interfaces.ArrayScheme; +import dap4.core.util.*; +import dap4.dap4lib.D4Index; +import dap4.dap4lib.cdm.CDMTypeFcns; +import dap4.dap4lib.cdm.CDMUtil; +import ucar.ma2.*; + +import java.util.List; + +/** + * Wrap a CDM Array and metadata to provide a DAP4 read API + */ + +public class CDMData { + + ////////////////////////////////////////////////// + // Instance variables + protected ArrayScheme scheme; + protected CDMWrap cdmwrap; + protected DapNode template; + protected CDMData container; + + protected ucar.ma2.Array array = null; + protected ucar.ma2.StructureData structdata = null; // scheme == STRUCTURE + ucar.ma2.StructureMembers.Member member = null; // for field cursors + + protected long recordindex = -1; + protected long recordcount = -1; + protected Index index = null; + + ////////////////////////////////////////////////// + // Constructor(s) + + public CDMData(ArrayScheme scheme, CDMWrap c4, DapNode template, CDMData container) throws DapException { + this.scheme = scheme; + this.cdmwrap = c4; + this.template = template; + this.container = container; + } + + public CDMData(CDMData c) { + assert false; + this.array = c.array; + this.structdata = c.structdata; + this.member = c.member; + + } + + ////////////////////////////////////////////////// + // Get/Set + + public ArrayScheme getScheme() { + return this.scheme; + } + + public CDMWrap getCDMWrap() { + return this.cdmwrap; + } + + public DapNode getTemplate() { + return this.template; + } + + public CDMData getContainer() { + return this.container; + } + + public long getRecordIndex() { + return this.recordindex; + } + + public long getRecordCount() { + return this.recordcount; + } + + public Index getIndex() { + return this.index; + } + + public CDMData setRecordIndex(long index) { + this.recordindex = index; + return this; + } + + public CDMData setRecordCount(long count) { + this.recordcount = count; + return this; + } + + public CDMData setIndex(Index count) { + this.index = count; + return this; + } + + ////////////////////////////////////////////////// + + public Object read(List slices) throws DapException { + switch (this.scheme) { + case ATOMIC: + return readAtomic(slices); + case STRUCTURE: + if (((DapVariable) this.getTemplate()).getRank() > 0 || DapUtil.isScalarSlices(slices)) + throw new DapException("Cannot slice a scalar variable"); + CDMData[] instances = new CDMData[1]; + instances[0] = this; + return instances; + case SEQUENCE: + if (((DapVariable) this.getTemplate()).getRank() > 0 || DapUtil.isScalarSlices(slices)) + throw new DapException("Cannot slice a scalar variable"); + instances = new CDMData[1]; + instances[0] = this; + return instances; + case STRUCTARRAY: + Odometer odom = OdometerFactory.factory(slices, ((DapVariable) this.getTemplate()).getDimensions()); + instances = new CDMData[(int) odom.totalSize()]; + for (int i = 0; odom.hasNext(); i++) { + instances[i] = readStructure(odom.next()); + } + return instances; + case SEQARRAY: + instances = readSequence(slices); + return instances; + default: + throw new DapException("Attempt to slice a scalar object"); + } + } + + public Object read(Index index) throws DapException { + return read(D4Index.indexToSlices(index)); + } + + public CDMData readField(int findex) throws DapException { + if (this.scheme != scheme.RECORD && this.scheme != scheme.STRUCTURE) + throw new DapException("Illegal cursor scheme for readfield()"); + DapVariable var = (DapVariable) getTemplate(); + DapStructure basetype = (DapStructure) var.getBaseType(); + if (findex < 0 || findex >= basetype.getFields().size()) + throw new DapException("Field index out of range: " + findex); + CDMData fieldcursor = null; + if (this.scheme == ArrayScheme.RECORD) { + DapSequence seq = (DapSequence) basetype; + DapVariable field = seq.getField(0); + DapType fieldtype = field.getBaseType(); + switch (fieldtype.getTypeSort()) { + default: // atomic + DataType cdmfieldtype = CDMTypeFcns.daptype2cdmtype(fieldtype); + if (cdmfieldtype == null) + throw new dap4.core.util.DapException("Unknown field type: " + fieldtype); + int ri = (int) this.recordindex; + Object o = array.getObject(ri); + Array fielddata = CDMTypeFcns.arrayify(cdmfieldtype, o); // not very efficient; should do conversion + fieldcursor = new CDMData(ArrayScheme.ATOMIC, getCDMWrap(), field, this); + fieldcursor.setArray(fielddata); + break; + case Sequence: + case Structure: + break; + } + } else { // scheme == STRUCTURE + assert this.structdata != null; + fieldcursor = getFieldCursor(this, findex); + } + return fieldcursor; + } + + protected CDMData getFieldCursor(CDMData container, int findex) throws DapException { + // Now, create a cursors for a field f this instance + DapVariable var = (DapVariable) getTemplate(); + DapStructure type = (DapStructure) var.getBaseType(); + DapVariable field = (DapVariable) type.getFields().get(findex); + DapType ftype = field.getBaseType(); + ArrayScheme scheme = schemeFor(field); + CDMData fc = new CDMData(scheme, (CDMWrap) getCDMWrap(), field, this); + StructureMembers.Member member = this.structdata.getStructureMembers().getMember(findex); + fc.setMember(member); + fc.setArray(this.structdata.getArray(fc.member)); + return fc; + } + + public boolean isScalar() { + if (getTemplate().getSort().isVar()) { + return ((DapVariable) getTemplate()).getRank() == 0; + } else + return false; + } + + + public boolean isField() { + return getTemplate().getContainer() != null; + } + + public boolean isAtomic() { + boolean is = this.scheme == ArrayScheme.ATOMIC; + assert !is || getTemplate().getSort() == DapSort.ATOMICTYPE || (getTemplate().getSort() == DapSort.VARIABLE + && ((DapVariable) getTemplate()).getBaseType().getTypeSort().isAtomic()); + return is; + } + + public boolean isCompound() { + boolean is = (this.scheme == ArrayScheme.SEQUENCE || this.scheme == ArrayScheme.STRUCTURE); + assert !is || getTemplate().getSort() == DapSort.SEQUENCE || getTemplate().getSort() == DapSort.STRUCTURE + || (getTemplate().getSort() == DapSort.VARIABLE + && ((DapVariable) getTemplate()).getBaseType().getTypeSort().isCompoundType()); + return is; + } + + public boolean isCompoundArray() { + boolean is = (this.scheme == ArrayScheme.SEQARRAY || this.scheme == ArrayScheme.STRUCTARRAY); + assert !is || getTemplate().getSort() == DapSort.SEQUENCE || getTemplate().getSort() == DapSort.STRUCTURE + || (getTemplate().getSort() == DapSort.VARIABLE + && ((DapVariable) getTemplate()).getBaseType().getTypeSort().isCompoundType()); + return is; + } + + protected static ArrayScheme schemeFor(DapVariable field) { + DapType ftype = field.getBaseType(); + ArrayScheme scheme = null; + boolean isscalar = field.getRank() == 0; + if (ftype.getTypeSort().isAtomic()) + scheme = ArrayScheme.ATOMIC; + else { + if (ftype.getTypeSort().isStructType()) + scheme = ArrayScheme.STRUCTARRAY; + else if (ftype.getTypeSort().isSeqType()) + scheme = ArrayScheme.SEQARRAY; + } + return scheme; + } + + public CDMData readRecord(long i) throws DapException { + if (this.scheme != scheme.SEQUENCE) + throw new DapException("Attempt to read record from non-sequence cursor"); + if (i < 0 || i >= this.recordcount) + throw new DapException("Record index out of bounds"); + DapVariable var = (DapVariable) getTemplate(); + CDMData c = new CDMData(ArrayScheme.RECORD, getCDMWrap(), var, this); + c.setArray(this.array); + c.setRecordIndex(i); + return c; + } + + public int fieldIndex(String name) throws DapException { + DapStructure ds; + if (getTemplate().getSort().isCompound()) + ds = (DapStructure) getTemplate(); + else if (getTemplate().getSort().isVar() && (((DapVariable) getTemplate()).getBaseType().getSort().isCompound())) + ds = (DapStructure) ((DapVariable) getTemplate()).getBaseType(); + else + throw new DapException("Attempt to get field name on non-compound object"); + int i = ds.indexByName(name); + if (i < 0) + throw new DapException("Unknown field name: " + name); + return i; + } + + + ////////////////////////////////////////////////// + // Support Methods + + protected Object readAtomic(List slices) throws DapException { + if (slices == null) + throw new DapException("CDMCursor.read: null set of slices"); + assert (this.scheme == scheme.ATOMIC); + DapVariable atomvar = (DapVariable) getTemplate(); + assert slices != null && ((atomvar.getRank() == 0 && slices.size() == 1) || (slices.size() == atomvar.getRank())); + return sliceAtomic(slices, this.array, atomvar); + } + + protected Object sliceAtomic(List slices, Array array, DapVariable var) throws DapException { + List dimset = var.getDimensions(); + DapType basetype = var.getBaseType(); + // If content.getDataType returns object, then we + // really do not know its true datatype. So, as a rule, + // we will rely on this.basetype. + DataType datatype = CDMTypeFcns.daptype2cdmtype(basetype); + if (datatype == null) + throw new dap4.core.util.DapException("Unknown basetype: " + basetype); + Object content = array.get1DJavaArray(datatype); // not very efficient; should do conversion + Odometer odom = OdometerFactory.factory(slices, dimset); + Object data = CDMTypeFcns.createVector(datatype, odom.totalSize()); + for (int dstoffset = 0; odom.hasNext(); dstoffset++) { + D4Index index = odom.next(); + long srcoffset = index.index(); + CDMTypeFcns.vectorcopy(basetype, content, data, srcoffset, dstoffset); + } + return data; + } + + + protected CDMData readStructure(Index index) throws DapException { + assert (index != null); + DapVariable var = (DapVariable) getTemplate(); + DapStructure type = (DapStructure) var.getBaseType(); + int pos = index.currentElement(); + if (pos < 0 || pos > var.getCount()) + throw new IndexOutOfBoundsException("read: " + index); + ArrayStructure sarray = (ArrayStructure) this.array; + CDMData instance; + assert (this.scheme == scheme.STRUCTARRAY); + ucar.ma2.StructureData sd = sarray.getStructureData((int) pos); + assert sd != null; + instance = new CDMData(ArrayScheme.STRUCTURE, getCDMWrap(), var, null).setStructureData(sd); + instance.setIndex(index); + return instance; + } + + protected CDMData[] readSequence(List slices) throws DapException { + assert (this.scheme == scheme.SEQARRAY); + DapVariable var = (DapVariable) getTemplate(); + DapSequence type = (DapSequence) var.getBaseType(); + // new CDMCursor(Scheme.SEQUENCE, (CDMDSP) this.dsp, var, this); + CDMData[] instances = new CDMData[(int) DapUtil.sliceProduct(slices)]; + Array seqarray = this.array; + if (var.getRank() == 0) {// scalar + if (!DapUtil.isScalarSlices(slices)) + throw new DapException("Non-scalar slice set applied to scalar variable"); + instances[0] = new CDMData(ArrayScheme.SEQUENCE, getCDMWrap(), var, this); + instances[0].setArray(seqarray); + instances[0].setRecordCount(seqarray.getSize()); + } else { + List rlist = CDMUtil.createCDMRanges(slices); + Array instancearray; + try { + instancearray = seqarray.section(rlist); + } catch (InvalidRangeException e) { + throw new DapException("Illegal slice set", e); + } + // extracted via List. IN theory, this should be an array of arrays, + // but if the sequence field basetype is atomic, thenit is an array + // of atomic values. + int slicecount = (int) DapUtil.sliceProduct(slices); + for (int i = 0; i < slicecount; i++) { + Array ao = (Array) instancearray.getObject(i); + CDMData c = new CDMData(ArrayScheme.SEQUENCE, getCDMWrap(), var, this); + c.setArray(ao); + long rcount = ao.getSize(); + c.setRecordCount(rcount); + instances[i] = c; + } + } + return instances; + } + + ////////////////////////////////////////////////// + // CDMCursor Extensions + + public CDMData setArray(ucar.ma2.Array a) { + this.array = a; + return this; + } + + public ucar.ma2.Array getArray() { + return this.array; + } + + public CDMData setStructureData(ucar.ma2.StructureData sd) { + this.structdata = sd; + return this; + } + + public CDMData setMember(ucar.ma2.StructureMembers.Member m) { + this.member = m; + return this; + } + + +} diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java b/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java new file mode 100644 index 0000000000..fe0dcea1ab --- /dev/null +++ b/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java @@ -0,0 +1,1065 @@ +/* + * Copyright (c) 2012-2018 University Corporation for Atmospheric Research/Unidata + * See LICENSE for license information. + */ + +package dap4.servlet; + +import dap4.core.interfaces.ArrayScheme; +import dap4.dap4lib.cdm.CDMTypeFcns; +import dap4.dap4lib.cdm.CDMUtil; +import dap4.dap4lib.cdm.NodeMap; +import dap4.core.dmr.*; +import dap4.core.util.*; +import ucar.ma2.Array; +import ucar.ma2.DataType; +import ucar.ma2.IndexIterator; +import ucar.nc2.*; +import ucar.nc2.constants.CDM; +import ucar.nc2.dataset.*; +import ucar.nc2.util.CancelTask; +import java.io.IOException; +import java.util.*; +import ucar.nc2.write.CDLWriter; + +/** + * Wrap CDM source (NetcdfDataset) to Provide a DAP4 API. + * More or less the inverse of a DSP. + * This basically means wrapping various (CDM)Array + * object to look like DataVariable objects. + */ + +public class CDMWrap { + + ////////////////////////////////////////////////// + // Constants + + protected static final boolean DEBUG = false; + protected static final boolean DUMPCDL = false; + + // NetcdfDataset enhancement to use: need only coord systems + protected static Set ENHANCEMENT = EnumSet.of(NetcdfDataset.Enhance.CoordSystems); + + protected static final String FILLVALUE = "_FillValue"; + + ////////////////////////////////////////////////// + // Class variables + + protected static boolean nc4loaded = false; + + ////////////////////////////////////////////////// + // Instance variables + + protected String location = null; + protected NetcdfDataset ncdfile = null; + protected boolean closed = false; + protected DapDataset dmr = null; + + protected DMRFactory dmrfactory = null; + + // Keep various context-dependent maps between + // CDMNode instances and DapNode instances + // package access + + // Variable map + protected NodeMap varmap = new NodeMap<>(); + + protected Map variables = new HashMap<>(); + + + // Variable <-> DapStructure (basetype) map; compound types only + protected NodeMap compoundmap = new NodeMap<>(); + + // Map Variable <-> DapSequence vlen type + protected NodeMap vlenmap = new NodeMap<>(); + + // Map All other kinds of CDMNode <-> DapNode + protected NodeMap nodemap = new NodeMap<>(); + + ////////////////////////////////////////////////// + // Constructor(s) + + public CDMWrap() {} + + + ////////////////////////////////////////////////// + // Get/Set + + public DapDataset getDMR() { + return this.dmr; + } + + public CDMWrap setDMR(DapDataset dmr) { + this.dmr = dmr; + if (getDMR() != null) { + // Add some canonical attributes to the + getDMR().setDataset(getDMR()); + getDMR().setDapVersion(DapConstants.X_DAP_VERSION); + getDMR().setDMRVersion(DapConstants.X_DMR_VERSION); + getDMR().setNS(DapConstants.X_DAP_NS); + } + return this; + } + + public String getLocation() { + return this.location; + } + + public CDMWrap setLocation(String path) { + this.location = path; + return this; + } + + public CDMData getVariableData(DapVariable var) throws DapException { + Variable cdmvar = this.varmap.get(var); + if (cdmvar == null) + throw new DapException("Unknown variable: " + var); + CDMData vardata = this.variables.get(var); + if (vardata == null) { + ArrayScheme scheme = ArrayScheme.schemeFor(var); + try { + vardata = new CDMData(scheme, this, var, null); + vardata.setArray(cdmvar.read()); + } catch (IOException e) { + throw new DapException(e); + } + addVariableData(var, vardata); + } + return vardata; + } + + public void addVariableData(DapVariable var, CDMData cursor) { + this.variables.put(var, cursor); + } + + + public NetcdfDataset getNetcdfDataset() { + return this.ncdfile; + } + + ////////////////////////////////////////////////// + // Open/Close + + /** + * @param filepath - absolute path to a file + * @return CDMDSP instance + * @throws DapException + */ + public CDMWrap open(String filepath) throws DapException { + try { + NetcdfFile ncfile = createNetcdfFile(filepath, null); + NetcdfDataset ncd = new NetcdfDataset(ncfile, ENHANCEMENT); + return open(ncd); + } catch (IOException ioe) { + throw new DapException("CDMDSP: cannot process: " + filepath, ioe); + } + } + + /** + * @param ncd netcdf dataset + * @return the cdmdsp + * @throws DapException + */ + public CDMWrap open(NetcdfDataset ncd) throws DapException { + this.dmrfactory = new DMRFactory(); + this.ncdfile = ncd; + setLocation(this.ncdfile.getLocation()); + buildDMR(); + return this; + } + + public void close() throws IOException { + if (this.ncdfile != null) + this.ncdfile.close(); + } + + + ////////////////////////////////////////////////// + // Nodemap Management + + /* + * Make sure that we use the proper + * object in order to avoid identity + * problems. + */ + + /** + * Track generic CDMNode <-> DapNode + */ + protected void recordNode(CDMNode cdm, DapNode dap) { + assert this.nodemap.get(cdm) == null && this.nodemap.get(dap) == null; + this.nodemap.put(cdm, dap); + } + + /** + * Track Variable <-> DapVariable + */ + protected void recordVar(Variable cdm, DapVariable dap) { + cdm = CDMUtil.unwrap(cdm); + assert varmap.get(cdm) == null && varmap.get(dap) == null; + varmap.put(cdm, dap); + } + + /** + * Track Variable <-> DapStructure + */ + protected void recordStruct(Variable cdm, DapStructure dap) { + cdm = CDMUtil.unwrap(cdm); + assert this.nodemap.get(cdm) == null && this.nodemap.get(dap) == null; + compoundmap.put(cdm, dap); + } + + /** + * Track Variable <-> DapSequence + */ + protected void recordSeq(Variable cdm, DapSequence dap) { + cdm = CDMUtil.unwrap(cdm); + assert this.vlenmap.get(cdm) == null && this.vlenmap.get(dap) == null; + vlenmap.put(cdm, dap); + } + + /** + * Lookup a cdmnode in the cdmnodemap. + * Make sure that we use the proper + * object in order to avoid identity + * problems. + * + * @param cdmnode The CMDNode (variable, dimension, etc) to record + * @return The DapNode to which the cdmnode is to be mapped or null. + */ + /* + * protected DapNode + * lookupNode(CDMNode cdmnode) + * { + * CDMSort sort = cdmnode.getSort(); + * if(sort == CDMSort.VARIABLE || sort == CDMSort.STRUCTURE) { + * Variable basev = CDMUtil.unwrap((Variable) cdmnode); + * assert (basev != null) : "Unwrap() failed"; + * cdmnode = (CDMNode) basev; + * } + * return this.nodemap.get(cdmnode); + * } + */ + + ////////////////////////////////////////////////// + + /** + * Extract the metadata from the NetcdfDataset + * and build the DMR. + */ + + public void buildDMR() throws DapException { + if (getDMR() != null) + return; + try { + if (DUMPCDL) { + System.out.println("writecdl:"); + CDLWriter.writeCDL(this.ncdfile, System.out, false); + System.out.flush(); + } + // Use the file path to define the dataset name + String name = this.ncdfile.getLocation(); + // Normalize the name + name = DapUtil.canonicalpath(name); + // Remove any path prefix + int index = name.lastIndexOf('/'); + if (index >= 0) + name = name.substring(index + 1, name.length()); + // Initialize the root dataset node + setDMR((DapDataset) this.dmrfactory.newDataset(name).annotate(NetcdfDataset.class, this.ncdfile)); + // Map the CDM root group to this group + recordNode(this.ncdfile.getRootGroup(), getDMR()); + getDMR().setBase(DapUtil.canonicalpath(this.ncdfile.getLocation())); + + // Now recursively build the tree. Start by + // Filling the dataset with the contents of the ncfile + // root group. + fillgroup(getDMR(), this.ncdfile.getRootGroup()); + + // Add an order index to the tree + getDMR().sort(); + + // Now locate the coordinate variables for maps + + /* Walk looking for VariableDS instances */ + processmappedvariables(this.ncdfile.getRootGroup()); + + // Now set the view + getDMR().finish(); + + } catch (DapException e) { + setDMR(null); + throw new DapException(e); + } + } + + ////////////////////////////////////////////////// + // Actions + + protected void fillgroup(DapGroup dapgroup, Group cdmgroup) throws DapException { + // Create decls in dap group for Dimensions + for (Dimension cdmdim : cdmgroup.getDimensions()) { + DapDimension dapdim = builddim(cdmdim); + } + // Create decls in dap group for Enumerations + for (EnumTypedef cdmenum : cdmgroup.getEnumTypedefs()) { + String name = cdmenum.getShortName(); + DapEnumeration dapenum = buildenum(cdmenum); + dapenum.setShortName(name); + dapgroup.addDecl(dapenum); + } + // Create decls in dap group for vlen induced Sequences + // Do this before building compound types + for (Variable cdmvar0 : cdmgroup.getVariables()) { + Variable cdmvar = CDMUtil.unwrap(cdmvar0); + buildseqtypes(cdmvar); + } + // Create decls in dap group for Compound Types + for (Variable cdmvar0 : cdmgroup.getVariables()) { + Variable cdmvar = CDMUtil.unwrap(cdmvar0); + if (cdmvar.getDataType() != DataType.STRUCTURE && cdmvar.getDataType() != DataType.SEQUENCE) + continue; + DapStructure struct = buildcompoundtype(cdmvar, dapgroup); + } + + // Create decls in dap group for Variables + for (Variable cdmvar0 : cdmgroup.getVariables()) { + Variable cdmvar = CDMUtil.unwrap(cdmvar0); + DapNode newvar = buildvariable(cdmvar, dapgroup, cdmvar.getDimensions()); + } + // Create decls in dap group for subgroups + for (Group subgroup : cdmgroup.getGroups()) { + DapGroup newgroup = buildgroup(subgroup); + dapgroup.addDecl(newgroup); + } + // Create decls in dap group for group-level attributes + buildattributes(dapgroup, cdmgroup.attributes()); + } + + ////////////////////////////////////////////////// + // Declaration Builders + + protected DapDimension builddim(Dimension cdmdim) throws DapException { + if (cdmdim.isVariableLength()) + throw new DapException("* dimensions not supported"); + DapDimension dapdim = null; + long cdmsize = dapsize(cdmdim); + String name = cdmdim.getShortName(); + if (name != null && name.length() == 0) + name = null; + boolean shared = cdmdim.isShared(); + if (!shared) { + // Unlike the parser, since we are working + // from a NetcdfDataset instance, there might + // be multiple anonymous dimension objects + // the same size. So, just go ahead and create + // multiple instances. + dapdim = (DapDimension) dmrfactory.newDimension(null, cdmsize); + getDMR().addDecl(dapdim); + } else { // Non anonymous; create in current group + dapdim = (DapDimension) dmrfactory.newDimension(name, cdmsize); + dapdim.setShared(true); + if (cdmdim.isUnlimited()) { + dapdim.setUnlimited(true); + } + Group cdmparent = cdmdim.getGroup(); + DapGroup dapparent = (DapGroup) this.nodemap.get(cdmparent); + assert dapparent != null; + assert (dapparent != null); + dapparent.addDecl(dapdim); + } + recordNode(cdmdim, dapdim); + return dapdim; + } + + protected DapEnumeration buildenum(EnumTypedef cdmenum) throws DapException { + // Set the enum's basetype + DapType base = null; + switch (cdmenum.getBaseType()) { + case ENUM1: + base = DapType.INT8; + break; + case ENUM2: + base = DapType.INT16; + break; + case ENUM4: + default: + base = DapType.INT32; + break; + } + DapEnumeration dapenum = (DapEnumeration) dmrfactory.newEnumeration(cdmenum.getShortName(), base); + recordNode(cdmenum, dapenum); + // Create the enum constants + Map ecvalues = cdmenum.getMap(); + for (Map.Entry entry : ecvalues.entrySet()) { + String name = entry.getValue(); + assert (name != null); + int value = (int) entry.getKey(); + dapenum.addEnumConst(dmrfactory.newEnumConst(name, new Long(value))); + } + return dapenum; + } + + protected DapStructure buildcompoundtype(Variable cdmvar, DapNode parent) throws DapException { + cdmvar = CDMUtil.unwrap(cdmvar); + DapStructure struct; + if (cdmvar.getDataType() == DataType.STRUCTURE) + struct = (DapStructure) dmrfactory.newStructure(cdmvar.getShortName()); + else if (cdmvar.getDataType() == DataType.SEQUENCE) + struct = (DapStructure) dmrfactory.newSequence(cdmvar.getShortName()); + else + throw new DapException("Internal error"); + struct.setParent(parent); + recordStruct(cdmvar, struct); + Structure cdmstruct = (Structure) cdmvar; + List fields = cdmstruct.getVariables(); + // recurse to create compound types of any fields c + for (CDMNode node : fields) { + Variable cdmfield = (Variable) node; + List dimset = cdmfield.getDimensions(); + // Recurse on any nested compound types + if (cdmfield.getDataType() == DataType.STRUCTURE || cdmfield.getDataType() == DataType.SEQUENCE) { + DapStructure fieldstruct = buildcompoundtype(cdmfield, struct); + } + } + // Add the fields to this compound type + for (CDMNode node : fields) { + Variable cdmfield = (Variable) node; + DapType basetype = null; + switch (cdmfield.getDataType()) { + default: + basetype = CDMTypeFcns.cdmtype2daptype(cdmfield.getDataType()); + break; + case STRUCTURE: + case SEQUENCE: + basetype = compoundmap.get(cdmfield);// since no forward references + break; + } + // build the field variable + List fielddims = cdmfield.getDimensions(); + DapVariable dapfield; + if (CDMUtil.hasVLEN(cdmfield)) { + // Get the fake sequence associated with this vlen + DapSequence seq = vlenmap.get(cdmfield); + List coredims = getCoreDimset(fielddims); + // We need to build a variable whose basetype is the + // fake sequence rather than the cdmfield type + // First, build a variable using the existing cdmfield + dapfield = buildvariable(cdmfield, struct, coredims); + // Now modify it to use the fake sequence + dapfield.setBaseType(seq); + } else { + dapfield = buildvariable(cdmfield, struct, fielddims); + } + struct.addField(dapfield); + } + return struct; + } + + protected DapVariable buildvariable(Variable cdmbasevar, DapNode parent, List cdmdims) + throws DapException { + DapVariable dapvar = null; + CDMSort sort = cdmbasevar.getSort(); + switch (sort) { + case VARIABLE: + switch (cdmbasevar.getDataType()) { + default: + dapvar = buildatomicvar(cdmbasevar, parent); + break; + case ENUM1: + case ENUM2: + case ENUM4: + dapvar = buildenumvar(cdmbasevar); + break; + case OPAQUE: + dapvar = buildopaquevar(cdmbasevar); + break; + case STRING: + dapvar = buildstringvar(cdmbasevar); + break; + case STRUCTURE: + case SEQUENCE: + assert false : "Internal error"; // How could this ever happen? + break; + + } + builddimrefs(dapvar, cdmdims); + break; + case STRUCTURE: + dapvar = buildstructvar(cdmbasevar); + builddimrefs(dapvar, cdmdims); + break; + case SEQUENCE: + default: + assert false : "Internal Error"; + } + if (parent != null) + addToParent(parent, dapvar); + return dapvar; + } + + protected DapVariable buildatomicvar(Variable cdmvar, DapNode parent) throws DapException { + // Atomic => not opaque and not enum + DapType basetype = CDMTypeFcns.cdmtype2daptype(cdmvar.getDataType()); + if (basetype == null) + throw new DapException("DapFile: illegal CDM variable base type: " + cdmvar.getDataType()); + DapVariable dapvar = (DapVariable) dmrfactory.newVariable(cdmvar.getShortName(), basetype); + recordVar(cdmvar, dapvar); + buildattributes(dapvar, cdmvar.attributes()); + if (CDMUtil.hasVLEN(cdmvar)) { + // Get the fake sequence associated with this vlen + DapSequence seq = vlenmap.get(cdmvar); + List coredims = getCoreDimset(cdmvar.getDimensions()); + // We need to build a variable whose basetype is the + // fake sequence rather than the cdmfield type + // First, build a variable using the existing cdmfield + // Now modify it to use the fake sequence + dapvar.setBaseType(seq); + } + return dapvar; + } + + protected DapVariable buildopaquevar(Variable cdmvar) throws DapException { + assert (cdmvar.getDataType() == DataType.OPAQUE) : "Internal error"; + DapVariable dapvar = (DapVariable) dmrfactory.newVariable(cdmvar.getShortName(), DapType.OPAQUE); + recordVar(cdmvar, dapvar); + buildattributes(dapvar, cdmvar.attributes()); + Object osize = cdmvar.annotation(DapAttribute.UCARTAGOPAQUE); + if (osize != null) { + dapvar.addXMLAttribute(DapAttribute.UCARTAGOPAQUE, osize.toString()); + } + return dapvar; + } + + protected DapVariable buildstringvar(Variable cdmvar) throws DapException { + assert (cdmvar.getDataType() == DataType.STRING) : "Internal error"; + DapVariable dapvar = (DapVariable) dmrfactory.newVariable(cdmvar.getShortName(), DapType.STRING); + recordVar(cdmvar, dapvar); + buildattributes(dapvar, cdmvar.attributes()); + return dapvar; + } + + protected DapVariable buildenumvar(Variable cdmvar) throws DapException { + assert (cdmvar.getDataType() == DataType.ENUM1 || cdmvar.getDataType() == DataType.ENUM2 + || cdmvar.getDataType() == DataType.ENUM4) : "Internal error"; + + // Now, we need to locate the actual enumeration decl + EnumTypedef enumdef = cdmvar.getEnumTypedef(); + EnumTypedef trueenumdef = findMatchingEnum(enumdef); + // Modify the cdmvar + cdmvar.setEnumTypedef(trueenumdef); + // Now, map to a DapEnumeration + DapEnumeration dapenum = (DapEnumeration) this.nodemap.get(trueenumdef); + assert (dapenum != null); + DapVariable dapvar = (DapVariable) dmrfactory.newVariable(cdmvar.getShortName(), dapenum); + recordVar(cdmvar, dapvar); + buildattributes(dapvar, cdmvar.attributes()); + return dapvar; + } + + protected DapVariable buildstructvar(Variable cdmvar) throws DapException { + assert (cdmvar.getDataType() == DataType.STRUCTURE) : "Internal error"; + // Find the DapStructure that is the basetype for this var + DapStructure struct = compoundmap.get(cdmvar); + assert struct != null : "Internal Error"; + DapVariable dapvar = (DapVariable) dmrfactory.newVariable(cdmvar.getShortName(), struct); + recordVar(cdmvar, dapvar); + buildattributes(dapvar, cdmvar.attributes()); + return dapvar; + } + + /* + * Create a sequence from a variable with a + * variable length last dimension. + * Suppose we have cdm equivalent to this: + * T var[d1]...[dn]][*] + * We convert to the following + * + * + * + * ... + * + * + */ + + protected DapSequence buildseqtype(Variable cdmvar) throws DapException { + cdmvar = CDMUtil.unwrap(cdmvar); + assert (CDMUtil.hasVLEN(cdmvar)); + DataType dt = cdmvar.getDataType(); + DapType daptype = CDMTypeFcns.cdmtype2daptype(dt); + DapSequence seq = (DapSequence) dmrfactory.newSequence(cdmvar.getShortName()); + // fill DapSequence with a single field; note that the dimensions + // are elided because they will attach to the sequence variable, + // not the field + DapVariable field = dmrfactory.newVariable(cdmvar.getShortName(), daptype); + seq.addField(field); + field.setParent(seq); + recordSeq(cdmvar, seq); + return seq; + } + + /** + * Walk this variable, including fields, to construct sequence types + * for any contained vlen dimensions + * + * @param cdmvar variable to walk + */ + + protected void buildseqtypes(Variable cdmvar) throws DapException { + if (CDMUtil.hasVLEN(cdmvar)) { + buildseqtype(cdmvar); + } + if (cdmvar.getDataType() == DataType.STRUCTURE || cdmvar.getDataType() == DataType.SEQUENCE) { + Structure struct = (Structure) cdmvar; + List fields = struct.getVariables(); + for (int i = 0; i < fields.size(); i++) { + Variable field = fields.get(i); + buildseqtypes(field); // recurse for inner vlen dims + } + } + } + + protected void buildattributes(DapNode node, AttributeContainer attributes) throws DapException { + for (Attribute attr : attributes) { + if (!suppress(attr.getShortName())) { + DapAttribute dapattr = buildattribute(attr); + node.addAttribute(dapattr); + } + } + } + + protected DapAttribute buildattribute(Attribute cdmattr) throws DapException { + DapType attrtype = CDMTypeFcns.cdmtype2daptype(cdmattr.getDataType()); + EnumTypedef cdmenum = cdmattr.getEnumType(); + boolean enumfillvalue = (cdmattr.getShortName().equals(FILLVALUE) && cdmenum != null); + DapEnumeration dapenum = null; + + // We need to handle _FillValue specially if the + // the variable is enum typed. + if (enumfillvalue) { + cdmenum = findMatchingEnum(cdmenum); + // Make sure the cdm attribute has type enumx + if (!cdmenum.getBaseType().isEnum()) + throw new DapException("CDM _FillValue attribute type is not enumX"); + // Modify the attr + cdmattr.setEnumType(cdmenum); + // Now, map to a DapEnumeration + dapenum = (DapEnumeration) this.nodemap.get(cdmenum); + if (dapenum == null) + throw new DapException("Illegal CDM variable attribute type: " + cdmenum); + attrtype = dapenum; + } + if (attrtype == null) + throw new DapException("DapFile: illegal CDM variable attribute type: " + cdmattr.getDataType()); + DapAttribute dapattr = (DapAttribute) dmrfactory.newAttribute(cdmattr.getShortName(), attrtype); + recordNode(cdmattr, dapattr); + // Transfer the values + Array values = cdmattr.getValues(); + if (!validatecdmtype(cdmattr.getDataType(), values.getElementType())) + throw new DapException("Attr type versus attribute data mismatch: " + values.getElementType()); + IndexIterator iter = values.getIndexIterator(); + String[] valuelist = null; + Object vec = CDMTypeFcns.createVector(cdmattr.getDataType(), values.getSize()); + for (int i = 0; iter.hasNext(); i++) { + java.lang.reflect.Array.set(vec, i, iter.next()); + } + valuelist = (String[]) Convert.convert(DapType.STRING, attrtype, vec); + dapattr.setValues(valuelist); + return dapattr; + } + + /** + * Assign dimensions to a variable + * + * @param dapvar The variable to which we wish to assign dimensions + * @param cdmdims The cdm dimensions from which we will find the dimension info + */ + protected void builddimrefs(DapVariable dapvar, List cdmdims) throws DapException { + if (cdmdims == null || cdmdims.size() == 0) + return; + // It is unfortunately the case that the dimensions + // associated with the variable are not + // necessarily the same object as those dimensions + // as declared, so we need to use a non-trivial + // matching algorithm. + for (Dimension cdmdim : cdmdims) { + DapDimension dapdim = null; + if (cdmdim.isShared()) { + Dimension declareddim = finddimdecl(cdmdim); + if (declareddim == null) + throw new DapException("Unprocessed cdm dimension: " + cdmdim); + dapdim = (DapDimension) this.nodemap.get(declareddim); + assert dapdim != null; + } else if (cdmdim.isVariableLength()) {// ignore + continue; + } else {// anonymous + dapdim = builddim(cdmdim); + } + assert (dapdim != null) : "Internal error"; + dapvar.addDimension(dapdim); + } + } + + protected void processmappedvariables(Group g) throws DapException { + for (Variable v0 : g.getVariables()) { + Variable cdmvar = CDMUtil.unwrap(v0); + if (cdmvar == null) + throw new DapException("NetcdfDataset synthetic variable: " + v0); + DapNode dapvar = this.varmap.get(cdmvar); + if (dapvar == null) + throw new DapException("Unknown variable: " + cdmvar); + if (!(dapvar instanceof DapVariable)) + throw new DapException("CDMVariable not mapping to dap variable: " + cdmvar); + buildmaps((DapVariable) dapvar, v0); + } + } + + + /** + * @param dapvar The variable to which we wish to assign maps + * @param var The NetcdfDataset variable from which to extract coord system + */ + protected void buildmaps(DapVariable dapvar, Variable var) throws DapException { + StructureDS sds = null; + // See if this cdm variable has one (or more) coordinate system + List css = null; + if (var.getSort() == CDMSort.VARIABLE) { + VariableDS vds = (VariableDS) var; + css = vds.getCoordinateSystems(); + } else { + sds = (StructureDS) var; + css = sds.getCoordinateSystems(); + } + if (css != null && css.size() > 0) { + // Not sure what to do with multiple coordinate systems + // For now, only use the first + CoordinateSystem coordsystems = css.get(0); + for (CoordinateAxis axis : coordsystems.getCoordinateAxes()) { + // First step is to find the dap variable + // corresponding to the map + VariableDS vds = (VariableDS) axis.getOriginalVariable(); + if (vds != null) { + Variable v = CDMUtil.unwrap(vds); + if (v != null) { + DapVariable mapvar = varmap.get(v); + if (mapvar == null) + throw new DapException("Illegal map variable:" + v.toString()); + if (!mapvar.isAtomic()) + throw new DapException("Non-atomic map variable:" + v.toString()); + // Ignore maps where the variable is a structure or sequence + // and the map variable is a field within that structure/sequence. + boolean ignoremap = false; + if (!mapvar.isTopLevel()) { + DapNode parenttype = mapvar.getContainer(); + assert (dapvar.getSort() == DapSort.VARIABLE); + DapVariable parent = (DapVariable) dapvar; + assert (parent.getSort() == DapSort.STRUCTURE || parent.getSort() == DapSort.SEQUENCE); + assert (parent.getBaseType() == parenttype); + Variable cdmparent = (Variable) varmap.get(parent); + if (cdmparent == CDMUtil.unwrap(sds)) + ignoremap = true; + } + if (!ignoremap) { + DapMap map = (DapMap) dmrfactory.newMap(mapvar.getShortName()); + dapvar.addMap(map); + } + } + } + } + } + } + + protected DapGroup buildgroup(Group cdmgroup) throws DapException { + DapGroup dapgroup = (DapGroup) dmrfactory.newGroup(cdmgroup.getShortName()); + recordNode(cdmgroup, dapgroup); + dapgroup.setShortName(cdmgroup.getShortName()); + fillgroup(dapgroup, cdmgroup); + return dapgroup; + } + + ////////////////////////////////////////////////// + // Utilities + + /** + * Unfortunately, the CDM Iosp does not + * actually use the declared enums. Rather, + * for every enum type'd variable, a new + * enum decl is defined. So, we need + * to find the original enum decl that matches + * the variable's enum. + */ + + protected EnumTypedef findMatchingEnum(EnumTypedef varenum) throws DapException { + List candidates = new ArrayList<>(); + for (Map.Entry entry : this.nodemap.getCDMMap().entrySet()) { + CDMNode cdmnode = entry.getValue(); + if (cdmnode.getSort() != CDMSort.ENUMERATION) + continue; + // Compare the enumeration (note names will differ) + EnumTypedef target = (EnumTypedef) cdmnode; + // Ideally, we should test the types of the enums, + // but, unfortunately, the var enum is always enum4. + // if(target.getBaseType() != varenum.getBaseType()) + // continue; + Map targetmap = target.getMap(); + Map varmap = varenum.getMap(); + if (targetmap.size() != varmap.size()) + continue; + boolean match = true; // until otherwise shown + for (Map.Entry tpair : targetmap.entrySet()) { + String tname = tpair.getValue(); + int value = (int) tpair.getKey(); + boolean found = false; + for (Map.Entry vpair : varmap.entrySet()) { + if (tname.equals(vpair.getValue()) && value == (int) vpair.getKey()) { + found = true; + break; + } + } + if (!found) { + match = false; + break; + } + } + if (!match) + continue; + + // Save it unless it is shadowed by a closer enum + boolean shadowed = false; + for (EnumTypedef etd : candidates) { + if (shadows(etd.getGroup(), target.getGroup())) { + shadowed = true; + break; + } + } + if (!shadowed) + candidates.add(target); + } + + switch (candidates.size()) { + case 0: + throw new DapException("CDMDSP: No matching enum type decl: " + varenum.getShortName()); + case 1: + break; + default: + throw new DapException("CDMDSP: Multiple matching enum type decls: " + varenum.getShortName()); + } + return candidates.get(0); + } + + protected boolean shadows(Group parent, Group child) { + if (child == parent) + return true; + Group candidate = child; + do { + candidate = candidate.getGroup(); + } while (candidate != null && candidate != parent); + return (candidate == parent); + } + + // Convert cdm size to DapDimension size + protected long dapsize(Dimension cdmdim) { + assert (!cdmdim.isVariableLength()); + return (long) cdmdim.getLength(); + } + + protected boolean validatecdmtype(DataType datatype, Class typeclass) { + switch (datatype) { + case CHAR: + return typeclass == char.class; + case BYTE: + case UBYTE: + return typeclass == byte.class; + case SHORT: + case USHORT: + return typeclass == short.class; + case INT: + case UINT: + return typeclass == int.class; + case LONG: + case ULONG: + return typeclass == long.class; + case FLOAT: + return typeclass == float.class; + case DOUBLE: + return typeclass == double.class; + case STRING: + return typeclass == String.class; + case OPAQUE: + return typeclass == Byte[].class; + // For these, return the integer basetype + case ENUM1: + return typeclass == byte.class; + case ENUM2: + return typeclass == short.class; + case ENUM4: + return typeclass == int.class; + + // Undefined + case SEQUENCE: + case STRUCTURE: + default: + break; + } + return false; + } + + + protected Dimension finddimdecl(Dimension dimref) { + // Search on the full name, but be careful, + // the rule is that the declared dimension's fqn + // must be a prefix of the dimension reference. + for (Map.Entry entry : this.nodemap.getCDMMap().entrySet()) { + if (entry.getValue().getSort() != CDMSort.DIMENSION) + continue; + Dimension d = (Dimension) entry.getValue(); + if (isDimDeclFor(d, dimref)) + return d; + } + return null; + } + + protected boolean isDimDeclFor(Dimension decl, Dimension ref) { + if (!decl.isShared()) + return false; // Has no name + // First check shortname and size + if (!decl.getShortName().equals(ref.getShortName())) + return false; + if (decl.getLength() != ref.getLength()) + return false; + // Make sure they are in the same group + String dprefix = decl.getGroup().getFullName(); + String rprefix = ref.getGroup().getFullName(); + return (dprefix.equals(rprefix)); + } + + /* + * protected String + * fixvalue(Object o, DapType datatype) + * { + * TypeSort atype = datatype.getTypeSort(); + * if(o instanceof Character) { + * long l = (long) ((Character) o).charValue(); + * if(atype.isUnsigned()) + * l = l & 0xffL; + * o = Long.valueOf(l); + * } else if(o instanceof Float || o instanceof Double) { + * if(atype == TypeSort.Float32) + * o = Float.valueOf(((Number) o).floatValue()); + * else if(atype == TypeSort.Float64) + * o = Double.valueOf(((Number) o).doubleValue()); + * else + * assert false : "Internal error"; + * } else if(o instanceof Number) { + * long l = ((Number) o).longValue(); + * switch (atype) { + * case Char: + * case UInt8: + * l = l & 0xffL; + * break; + * case UInt16: + * l = l & 0xffffL; + * break; + * case UInt32: + * l = l & 0xffffffffL; + * break; + * default: + * break; + * } + * o = Long.valueOf(l); + * } else if(o instanceof String) { + * o = o.toString(); + * } else if(o instanceof ByteBuffer) { + * // leave it unchanged + * } else if(o instanceof byte[]) { + * o = ByteBuffer.wrap((byte[]) o); + * } else if(o instanceof Byte[]) { + * Byte[] ob = (Byte[]) o; + * byte[] bb = new byte[ob.length]; + * for(int i = 0; i < bb.length; i++) { + * bb[i] = (byte) ob[i]; + * } + * o = ByteBuffer.wrap(bb); + * } //else { // leave it unchanged + * return o; + * } + */ + + ////////////////////////////////////////////////// + + protected NetcdfFile createNetcdfFile(String location, CancelTask canceltask) throws DapException { + try { + NetcdfFile ncfile = NetcdfFiles.open(location, -1, canceltask); + return ncfile; + } catch (DapException de) { + if (DEBUG) + de.printStackTrace(); + throw de; + } catch (Exception e) { + if (DEBUG) + e.printStackTrace(); + throw new DapException(e); + } + } + + ////////////////////////////////////////////////// + // Utilities + + /** + * Strip vlen dimensions from a set of dimensions + * + * @param dimset + * @return subset of dimset with (trailing) vlen removed + * @throws DapException + */ + static List getCoreDimset(List dimset) throws DapException { + if (dimset == null) + return null; + List core = new ArrayList<>(); + int pos = -1; + int count = 0; + for (int i = 0; i < dimset.size(); i++) { + if (dimset.get(i).isVariableLength()) { + pos = i; + count++; + } else + core.add(dimset.get(i)); + } + if ((pos != dimset.size() - 1) || count > 1) + throw new DapException("Unsupported use of (*) Dimension"); + return core; + } + + /** + * Some attributes that are added by the NetcdfDataset + * need to be kept out of the DMR. This function + * defines that set. + * + * @param attrname A non-escaped attribute name to be tested for suppression + * @return true if the attribute should be suppressed, false otherwise. + */ + protected boolean suppress(String attrname) { + if (attrname.startsWith("_Coord")) + return true; + if (attrname.equals(CDM.UNSIGNED)) + return true; + return false; + } + + protected void addToParent(DapNode parent, DapVariable dapvar) throws DapException { + assert (parent != null); + switch (parent.getSort()) { + case GROUP: + case DATASET: + ((DapGroup) parent).addDecl(dapvar); + break; + case SEQUENCE: + case STRUCTURE: + dapvar.setParent(parent); + break; + default: + assert (false) : "Internal error"; + } + } + +} diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/ChunkWriter.java b/dap4/d4servlet/src/main/java/dap4/servlet/ChunkWriter.java index c100df4a28..7fc0409640 100644 --- a/dap4/d4servlet/src/main/java/dap4/servlet/ChunkWriter.java +++ b/dap4/d4servlet/src/main/java/dap4/servlet/ChunkWriter.java @@ -5,14 +5,18 @@ package dap4.servlet; +import dap4.core.ce.CEConstraint; +import dap4.core.dmr.DMRPrinter; +import dap4.core.dmr.DapDataset; import dap4.core.dmr.ErrorResponse; +import dap4.core.util.DapConstants; +import dap4.core.util.DapContext; import dap4.core.util.DapException; import dap4.core.util.DapUtil; import dap4.dap4lib.DapCodes; import dap4.dap4lib.RequestMode; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.OutputStream; + +import java.io.*; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.nio.ByteOrder; @@ -21,9 +25,9 @@ public class ChunkWriter extends OutputStream { ////////////////////////////////////////////////// // Constants - static public boolean DEBUG = false; - static public boolean DUMPDATA = false; - static public boolean DEBUGHEADER = false; + public static boolean DEBUG = false; + public static boolean DUMPDATA = false; + public static boolean DEBUGHEADER = false; static final int MAXCHUNKSIZE = 0xFFFF; @@ -31,9 +35,7 @@ public class ChunkWriter extends OutputStream { static final int SIZEOF_INTEGER = 4; - static public final byte[] CRLF8 = DapUtil.extract(DapUtil.UTF8.encode(DapUtil.CRLF)); - - static public final String XMLDOCUMENTHEADER = ""; + public static final byte[] CRLF8 = DapUtil.extract(DapUtil.UTF8.encode(DapUtil.CRLF)); ////////////////////////////////////////////////// // Type declarations @@ -137,9 +139,6 @@ public void writeDSR(String dsr) throws IOException { dsr = dsr.substring(0, len) + DapUtil.CRLF; - // Add prefix - dsr = XMLDOCUMENTHEADER + "\n" + dsr; - // Convert the dsr to UTF-8 and then to byte[] byte[] dsr8 = DapUtil.extract(DapUtil.UTF8.encode(dsr)); sendDXR(dsr8); @@ -156,6 +155,19 @@ public void writeDSR(String dsr) throws IOException { * @throws IOException on IO related errors */ + public void cacheDMR(DapDataset dmr, DapContext cxt) throws IOException { + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + CEConstraint ce = (CEConstraint) cxt.get(CEConstraint.class); + DapRequest drq = (DapRequest) cxt.get(DapRequest.class); + // Get the DMR as a string + DMRPrinter dapprinter = new DMRPrinter(dmr, ce, pw, drq.getFormat(), cxt); + dapprinter.print(); + pw.close(); + sw.close(); + cacheDMR(sw.toString()); + } + public void cacheDMR(String dmr) throws IOException { if (state != State.INITIAL) throw new DapException("Attempt to write DMR twice"); @@ -176,9 +188,6 @@ public void cacheDMR(String dmr) throws IOException { dmr = dmr.substring(0, len) + DapUtil.CRLF; - // Prepend the prefix - dmr = XMLDOCUMENTHEADER + "\n" + dmr; - // Convert the dmr to UTF-8 and then to byte[] this.dmr8 = DapUtil.extract(DapUtil.UTF8.encode(dmr)); @@ -199,9 +208,9 @@ void sendDXR(byte[] dxr8) throws IOException { state = State.END; } else {// mode == DATA // Prefix with chunk header - int flags = DapUtil.CHUNK_DATA; + int flags = DapConstants.CHUNK_DATA; if (this.writeorder == ByteOrder.LITTLE_ENDIAN) - flags |= DapUtil.CHUNK_LITTLE_ENDIAN; + flags |= DapConstants.CHUNK_LITTLE_ENDIAN; chunkheader(dxr8.length, flags, this.header); // write the header output.write(DapUtil.extract(this.header)); @@ -236,7 +245,7 @@ public void writeError(int httpcode, String msg, String cxt, String other) throw // clear any partial chunk chunk.clear(); // create an error header - int flags = DapUtil.CHUNK_ERROR | DapUtil.CHUNK_END; + int flags = DapConstants.CHUNK_ERROR | DapConstants.CHUNK_END; chunkheader(errbody8.length, flags, header); output.write(DapUtil.extract(header)); output.write(errbody8); @@ -270,7 +279,7 @@ void writeChunk(int flags) throws IOException { } - static public void chunkheader(int length, int flags, ByteBuffer hdrbuf) throws DapException { + public static void chunkheader(int length, int flags, ByteBuffer hdrbuf) throws DapException { if (length > MAXCHUNKSIZE || length < 0) throw new DapException("Illegal chunk size: " + length); int hdr = ((flags << 24) | length); @@ -332,7 +341,7 @@ public void close() throws IOException { // but do not close the underlying output stream state = State.DATA; // pretend - int flags = DapUtil.CHUNK_END; + int flags = DapConstants.CHUNK_END; writeChunk(flags); state = State.END; this.output.flush(); // Do not close @@ -426,7 +435,7 @@ public void write(byte[] b, int off, int len) throws IOException { int avail = chunk.remaining(); do { if (avail == 0) { - writeChunk(DapUtil.CHUNK_DATA); + writeChunk(DapConstants.CHUNK_DATA); avail = chunk.remaining(); } int towrite = (left < avail ? left : avail); diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/DSPFactory.java b/dap4/d4servlet/src/main/java/dap4/servlet/DSPFactory.java deleted file mode 100644 index e58e3ecd43..0000000000 --- a/dap4/d4servlet/src/main/java/dap4/servlet/DSPFactory.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - -package dap4.servlet; - -/** - * Provide a factory for DSP instances - */ - -abstract public class DSPFactory { - - ////////////////////////////////////////////////// - // Constructor(s) - - public DSPFactory() { - // Subclasses should Register known DSP classes: order is important - // in event that two or more dsps can match a given file - // (e.q. FileDSP vs Nc4DSP). - // Only used in server - } - - - -} // DSPFactory - diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/DapCache.java b/dap4/d4servlet/src/main/java/dap4/servlet/DapCache.java deleted file mode 100644 index a73eb4dc10..0000000000 --- a/dap4/d4servlet/src/main/java/dap4/servlet/DapCache.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - -package dap4.servlet; - -import dap4.core.ce.CEConstraint; -import dap4.core.data.DSP; -import dap4.core.data.DSPRegistry; -import dap4.core.util.DapContext; -import dap4.core.util.DapException; -import dap4.dap4lib.DapCodes; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - - -/** - * Provide an LRU cache of DSPs. - * It is expected (for now) that this is only used on the server side. - * The cache key is assumed to be the DSP object. - * The cache is synchronized to avoid race conditions. - * Note that we do not have to release because Java - * uses garbage collection and entries will be purged - * if the LRU cache is full. - * Singleton class - */ - -abstract public class DapCache { - - ////////////////////////////////////////////////// - // Constants - - static final int MAXFILES = 100; // size of the cache - - static public final String MATCHMETHOD = "dspMatch"; - - ////////////////////////////////////////////////// - // Static variables - - /** - * Define a map of known DSP classes. - */ - static public DSPRegistry dspregistry = new DSPRegistry(); - - /** - * Define an lru cache of known DSP objects: oldest first. - */ - static protected List lru = new ArrayList(); - - // This should be set by any subclass - static protected DSPFactory factory = null; - - static public void setFactory(DSPFactory f) { - factory = f; - } - - static public DSPFactory getFactory() { - return factory; - } - - static public synchronized DSP open(String path, DapContext cxt) throws IOException { - assert cxt != null; - int lrusize = lru.size(); - for (int i = lrusize - 1; i >= 0; i--) { - DSP dsp = lru.get(i); - String dsppath = dsp.getLocation(); - if (dsppath.equals(path)) { - // move to the front of the queue to maintain LRU property - lru.remove(i); - lru.add(dsp); - CEConstraint.release(lru.get(0).getDMR()); - return dsp; - } - } - // No match found, create and initialize it. - // If cache is full, remove oldest entry - if (lrusize == MAXFILES) { - // make room - lru.remove(0); - CEConstraint.release(lru.get(0).getDMR()); - } - // Find dsp that can process this path - DSP dsp = dspregistry.findMatchingDSP(path, cxt); - if (dsp == null) - throw new DapException("Resource has no matching DSP: " + path).setCode(DapCodes.SC_FORBIDDEN); - dsp.setContext(cxt); - dsp.open(path); - lru.add(dsp); - return dsp; - } - - static synchronized public void flush() // for testing - throws Exception { - while (lru.size() > 0) { - DSP dsp = lru.get(0); - CEConstraint.release(dsp.getDMR()); - dsp.close(); - lru.remove(0); - } - } - - -} // DapCache diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java b/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java index 6ca67a28c8..413ddcfe87 100644 --- a/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java +++ b/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java @@ -7,73 +7,58 @@ package dap4.servlet; import dap4.core.ce.CEConstraint; -import dap4.core.data.ChecksumMode; -import dap4.core.data.DSP; -import dap4.core.dmr.DapAttribute; -import dap4.core.dmr.DapDataset; -import dap4.core.dmr.DapType; -import dap4.core.dmr.ErrorResponse; +import dap4.core.util.ChecksumMode; +import dap4.core.dmr.*; import dap4.core.util.*; import dap4.dap4lib.*; -import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; -import java.lang.reflect.Field; import java.net.MalformedURLException; import java.nio.ByteOrder; -import java.nio.charset.Charset; import java.util.Map; +import java.util.zip.Checksum; abstract public class DapController extends HttpServlet { - // Provide a way for test programs to pass info into the controller - static public boolean TESTING = false; ////////////////////////////////////////////////// // Constants - static public boolean DEBUG = false; - static public boolean DUMPDMR = false; - static public boolean DUMPDATA = false; + public static boolean DEBUG = false; - static public boolean PARSEDEBUG = false; - - static protected final String BIG_ENDIAN = "Big-Endian"; - static protected final String LITTLE_ENDIAN = "Little-Endian"; + protected static final String BIG_ENDIAN = "Big-Endian"; + protected static final String LITTLE_ENDIAN = "Little-Endian"; // Is this machine big endian? - static protected boolean IS_BIG_ENDIAN = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN); + protected static boolean IS_BIG_ENDIAN = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN); - static protected final String DMREXT = ".dmr"; - static protected final String DATAEXT = ".dap"; - static protected final String DSREXT = ".dsr"; - static protected final String[] ENDINGS = {DMREXT, DATAEXT, DSREXT}; + protected static final String DMREXT = ".dmr"; + protected static final String DATAEXT = ".dap"; + protected static final String DSREXT = ".dsr"; + protected static final String[] ENDINGS = {DMREXT, DATAEXT, DSREXT}; - static protected final String FAVICON = "favicon.ico"; // relative to resource dir + protected static final String FAVICON = "favicon.ico"; // relative to resource dir - static public final long DEFAULTBINARYWRITELIMIT = 100 * 1000000; // in bytes + public static final long DEFAULTBINARYWRITELIMIT = 100 * 1000000; // in bytes ////////////////////////////////////////////////// // static variables - // We need a singleton instance of a DapCache in order - // To avoid re-opening the same NetcdfFile instance. - // Assume: - // 1. This is subclassed only once and that class will fill in - // this DapCache instance. - - static protected DapCache cache = null; - ////////////////////////////////////////////////// // Static accessors - static protected void setCache(DapCache cache) { - DapController.cache = cache; - } - - static protected DapCache getCache() { - return DapController.cache; + public static String printDMR(DapDataset dmr) { + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + DMRPrinter printer = new DMRPrinter(dmr, pw); + try { + printer.print(); + pw.close(); + sw.close(); + } catch (IOException e) { + } + return sw.toString(); } ////////////////////////////////////////////////// @@ -81,12 +66,16 @@ static protected DapCache getCache() { protected boolean initialized = false; // Was initialize() called? + // Cache the value of getWebDontentRoot() + protected String webContentRoot = null; + + // Cache the value of getTestDataRoot() + protected String testDataRoot = null; + ////////////////////////////////////////////////// // Constructor(s) - public DapController() { - ChunkWriter.DUMPDATA = DUMPDATA; // pass it on - } + public DapController() {} ////////////////////////////////////////////////////////// // Abstract methods @@ -109,18 +98,6 @@ public DapController() { abstract protected void doCapabilities(DapRequest drq, DapContext cxt) throws IOException; - /** - * Convert a URL path into an absolute file path - * Note that it is assumed than any leading servlet prefix has been removed. - * - * @param drq dap request - * @param location suffix of url path - * @return - * @throws IOException - */ - - abstract public String getResourcePath(DapRequest drq, String location) throws DapException; - /** * Get the maximum # of bytes per request * @@ -135,6 +112,33 @@ public DapController() { */ abstract public String getServletID(); + /** + * The DAP4 code requires access to two absolute paths. + * 1. The path to a directory containing web content: + * - .template files + * - .ico files + * 2. The path to the directory containing the test data + */ + + /** + * Get the absolute address of the web-content directory + * + * @param drq dap request + * @return the web content directory absolute path + * @throws IOException + */ + abstract protected String getWebContentRoot(DapRequest drq) throws DapException; + + /** + * Convert a URL path for a dataset into an absolute file path + * + * @param drq dap request + * @param location suffix of url path + * @return path in a string builder so caller can extend. + * @throws IOException + */ + abstract protected String getResourcePath(DapRequest drq, String location) throws DapException; + ////////////////////////////////////////////////////////// public void init() { @@ -147,13 +151,12 @@ public void init() { * Initialize servlet/controller */ public void initialize() { + if (this.initialized) + return; this.initialized = true; } - ////////////////////////////////////////////////////////// - // Accessors - ////////////////////////////////////////////////////////// // Primary Controller Entry Point @@ -162,38 +165,20 @@ public void handleRequest(HttpServletRequest req, HttpServletResponse res) throw if (!this.initialized) initialize(); DapRequest daprequest = getRequestState(req, res); - String url = daprequest.getOriginalURL(); - StringBuilder info = new StringBuilder("doGet():"); - info.append(" dataset = "); - info.append(" url = "); - info.append(url); - if (DEBUG) { - System.err.println("DAP4 Servlet: processing url: " + daprequest.getOriginalURL()); - } - DapContext dapcxt = new DapContext(); - // Add entries to the context - dapcxt.put(HttpServletRequest.class, req); - dapcxt.put(HttpServletResponse.class, res); - dapcxt.put(DapRequest.class, daprequest); + DapContext dapcxt = buildDapContext(daprequest); - ByteOrder order = daprequest.getOrder(); - ChecksumMode checksummode = daprequest.getChecksumMode(); - dapcxt.put(Dap4Util.DAP4ENDIANTAG, order); - dapcxt.put(Dap4Util.DAP4CSUMTAG, checksummode); - // Transfer all other queries - Map queries = daprequest.getQueries(); - for (Map.Entry entry : queries.entrySet()) { - if (dapcxt.get(entry.getKey()) == null) { - dapcxt.put(entry.getKey(), entry.getValue()); - } + if (this.webContentRoot == null) { + this.webContentRoot = getWebContentRoot(daprequest); + this.webContentRoot = DapUtil.canonicalpath(this.webContentRoot); } + String url = daprequest.getURL(); if (url.endsWith(FAVICON)) { doFavicon(FAVICON, dapcxt); return; } - - String datasetpath = DapUtil.nullify(DapUtil.canonicalpath(daprequest.getDataset())); + String datasetpath = daprequest.getDatasetPath(); + datasetpath = DapUtil.nullify(DapUtil.canonicalpath(datasetpath)); try { if (datasetpath == null) { // This is the case where a request was made without a dataset; @@ -251,12 +236,12 @@ else if (t instanceof IOException) protected void doDSR(DapRequest drq, DapContext cxt) throws IOException { try { - DapDSR dsrbuilder = new DapDSR(); - String dsr = dsrbuilder.generate(drq.getURL()); + DapDSR dsrbuilder = new DapDSR(drq, cxt); + String dsr = dsrbuilder.generate(drq.getFormat(), drq.getDatasetPath(), drq.getDataset()); OutputStream out = drq.getOutputStream(); addCommonHeaders(drq);// Add relevant headers // Wrap the outputstream with a Chunk writer - ByteOrder order = (ByteOrder) cxt.get(Dap4Util.DAP4ENDIANTAG); + ByteOrder order = (ByteOrder) cxt.get(DapConstants.DAP4ENDIANTAG); ChunkWriter cw = new ChunkWriter(out, RequestMode.DSR, order); cw.writeDSR(dsr); cw.close(); @@ -273,31 +258,28 @@ protected void doDSR(DapRequest drq, DapContext cxt) throws IOException { protected void doDMR(DapRequest drq, DapContext cxt) throws IOException { // Convert the url to an absolute path - String realpath = getResourcePath(drq, drq.getDatasetPath()); - - DSP dsp = DapCache.open(realpath, cxt); - DapDataset dmr = dsp.getDMR(); - - /* Annotate with our endianness */ - ByteOrder order = (ByteOrder) cxt.get(Dap4Util.DAP4ENDIANTAG); - setEndianness(dmr, order); - - // Process any constraint view - CEConstraint ce = null; - String sce = drq.queryLookup(DapProtocol.CONSTRAINTTAG); - ce = CEConstraint.compile(sce, dmr); - setConstraint(dmr, ce); + String realpath = drq.getResourcePath(drq.getDatasetPath()); + + CDMWrap c4 = new CDMWrap().open(realpath); // Create the wrapper + DapDataset dmr = c4.getDMR(); + CEConstraint ce = constrainDapContext(cxt, dmr); + ChecksumMode csummode = (ChecksumMode) cxt.get(DapConstants.CHECKSUMTAG); + ByteOrder order = (ByteOrder) cxt.get(DapConstants.DAP4ENDIANTAG); + + // If the user calls for checksums, then we need to compute them + if (csummode == ChecksumMode.TRUE) { + Map checksummap = computeDMRChecksums(c4, cxt); + // Add to context + cxt.put("checksummap", checksummap); + } // Provide a PrintWriter for capturing the DMR. StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); // Get the DMR as a string - DMRPrinter dapprinter = new DMRPrinter(dmr, ce, pw, drq.getFormat()); - if (cxt.get(Dap4Util.DAP4TESTTAG) != null) - dapprinter.testprint(); - else - dapprinter.print(); + DMRPrinter dapprinter = new DMRPrinter(dmr, ce, pw, drq.getFormat(), cxt); + dapprinter.print(); pw.close(); sw.close(); @@ -307,11 +289,14 @@ protected void doDMR(DapRequest drq, DapContext cxt) throws IOException { addCommonHeaders(drq);// Add relevant headers - // Wrap the outputstream with a Chunk writer OutputStream out = drq.getOutputStream(); + // Wrap the outputstream with a Chunk writer ChunkWriter cw = new ChunkWriter(out, RequestMode.DMR, order); cw.cacheDMR(sdmr); cw.close(); + + c4.close(); + } /** @@ -326,45 +311,40 @@ protected void doDMR(DapRequest drq, DapContext cxt) throws IOException { protected void doData(DapRequest drq, DapContext cxt) throws IOException { // Convert the url to an absolute path - String realpath = getResourcePath(drq, drq.getDatasetPath()); - - DSP dsp = DapCache.open(realpath, cxt); - if (dsp == null) - throw new DapException("No such file: " + drq.getResourceRoot()); - DapDataset dmr = dsp.getDMR(); - if (DUMPDMR) { - printDMR(dmr); - System.err.println(printDMR(dmr)); - System.err.flush(); - } + String realpath = drq.getResourcePath(drq.getDatasetPath()); - /* Annotate with our endianness */ - ByteOrder order = (ByteOrder) cxt.get(Dap4Util.DAP4ENDIANTAG); - setEndianness(dmr, order); + CDMWrap c4 = new CDMWrap().open(realpath); + if (c4 == null) + throw new DapException("No such file: " + realpath); - // Process any constraint - CEConstraint ce = null; - String sce = drq.queryLookup(DapProtocol.CONSTRAINTTAG); - ce = CEConstraint.compile(sce, dmr); - setConstraint(dmr, ce); + DapDataset dmr = c4.getDMR(); + CEConstraint ce = constrainDapContext(cxt, dmr); + ChecksumMode csummode = (ChecksumMode) cxt.get(DapConstants.CHECKSUMTAG); + ByteOrder order = (ByteOrder) cxt.get(DapConstants.DAP4ENDIANTAG); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); + // If the user calls for checksums, then we need to compute them + // This, unfortunately, will require computation twice: one to insert + // into the DMR and one to insert into the serialized DAP stream. Sigh! + if (csummode == ChecksumMode.TRUE) { + Map checksummap = computeDMRChecksums(c4, cxt); + // Add to context + cxt.put("checksummap", checksummap); + } + // Get the DMR as a string - DMRPrinter dapprinter = new DMRPrinter(dmr, ce, pw, drq.getFormat()); + DMRPrinter dapprinter = new DMRPrinter(dmr, ce, pw, drq.getFormat(), cxt); dapprinter.print(); pw.close(); sw.close(); - String sdmr = sw.toString(); - if (DEBUG || DUMPDMR) - System.err.println("Sending: Data DMR:\n" + sdmr); - // Wrap the outputstream with a Chunk writer OutputStream out = drq.getOutputStream(); ChunkWriter cw = new ChunkWriter(out, RequestMode.DAP, order); cw.setWriteLimit(getBinaryWriteLimit()); + String sdmr = sw.toString(); cw.cacheDMR(sdmr); cw.flush(); @@ -384,43 +364,46 @@ protected void doData(DapRequest drq, DapContext cxt) throws IOException { */ case NONE: default: - DapSerializer writer = new DapSerializer(dsp, ce, cw, order, drq.getChecksumMode()); - writer.write(dsp.getDMR()); + DapSerializer writer = new DapSerializer(c4, ce, cw, order, drq.getChecksumMode()); + writer.write(c4.getDMR()); cw.flush(); cw.close(); break; } - // Should we dump data? - if (DUMPDATA) { - byte[] data = cw.getDump(); - if (data != null) - DapDump.dumpbytestream(data, cw.getWriteOrder(), "ChunkWriter.write"); - } + c4.close(); } ////////////////////////////////////////////////////////// // Utility Methods - protected void addCommonHeaders(DapRequest drq) throws IOException { + protected void addCommonHeaders(DapRequest drq) throws DapException { // Add relevant headers ResponseFormat format = drq.getFormat(); if (format == null) format = ResponseFormat.NONE; - DapProtocol.ContentType contentheaders = DapProtocol.contenttypes.get(drq.getMode()); - String header = contentheaders.getFormat(format); - if (header != null) { - header = header + "; charset=utf-8"; - drq.setResponseHeader("Content-Type", header); - } else - DapLog.error("Cannot determine response Content-Type"); - - // Not sure what this should be yet - // setHeader("Content-Description","?"); - - // Again, not sure what value to use - // setHeader("Content-Disposition","?"); - - // not legal drq.setResponseHeader("Content-Encoding", IS_BIG_ENDIAN ? BIG_ENDIAN : LITTLE_ENDIAN); + RequestMode mode = drq.getMode(); + if (mode == null) + mode = RequestMode.CAPABILITIES; + DapProtocol.ContentType contenttype = DapProtocol.contenttypes.get(DapProtocol.contentKey(mode, format)); + if (contenttype == null) + throw new DapException("Cannot find Content-Type for: " + mode.id() + "," + format.id()) + .setCode(DapCodes.SC_BAD_REQUEST); + // If we go by what OPeNDAP does, then the header rules are as follow: + // 1. Set the Content-Description to the application/vnd.opendap.dap4... + // 2. If the Response type is not-null, then use the appropriate mime type such as text/xml. + // 3. If the Response type is null, then use the same value as Content-Description. + // Unfortunately, my HTTP-foo is not good enough to handle rule 3; a web-browser does + // not seem to figure out the actual mime-type from the "application/vnd.opendap.dap4..." + // content type. So, we use a different rule: + // 3a. If the response type is null, then set Content-Type to the proper mime-type. + + // Rule 1. + drq.setResponseHeader("Content-Description", contenttype.contenttype); + + // Rules 2 and 3. + String header = contenttype.mimetype; + header = header + "; charset=utf-8"; + drq.setResponseHeader("Content-Type", header); } /** @@ -473,59 +456,64 @@ protected void senderror(DapRequest drq, int httpcode, Throwable t) throws IOExc } err.setContext(drq.getURL()); String errormsg = err.buildXML(); - drq.getResponse().sendError(httpcode, errormsg); + if (false) { + drq.getResponse().sendError(httpcode, errormsg); + } else { + OutputStream out = drq.getOutputStream(); + PrintWriter prw = new PrintWriter(new OutputStreamWriter(out, DapUtil.UTF8)); + prw.println(errormsg); + prw.flush(); + } } - /** - * Set special attribute: endianness : overwrite exiting value - * - * @param dmr - * @param order - * @throws DapException - */ - void setEndianness(DapDataset dmr, ByteOrder order) throws DapException { - DapAttribute a = dmr.findAttribute(DapUtil.LITTLEENDIANATTRNAME); - if (a == null) { - a = new DapAttribute(DapUtil.LITTLEENDIANATTRNAME, DapType.UINT8); - dmr.addAttribute(a); + public DapContext buildDapContext(DapRequest daprequest) throws DapException { + DapContext dapcxt = new DapContext(); + // Add entries to the context + dapcxt.put(DapRequest.class, daprequest); + ByteOrder order = daprequest.getOrder(); + if (order != null) { + dapcxt.put(DapConstants.DAP4ENDIANTAG, order); + ChecksumMode checksummode = daprequest.getChecksumMode(); + if (checksummode != null) + dapcxt.put(DapConstants.CHECKSUMTAG, ChecksumMode.asTrueFalse(checksummode)); + // Transfer all other queries + Map queries = daprequest.getQueries(); + for (Map.Entry entry : queries.entrySet()) { + if (dapcxt.get(entry.getKey()) == null) + dapcxt.put(entry.getKey(), entry.getValue()); + } } - // ByteOrder order = (ByteOrder) cxt.get(Dap4Util.DAP4ENDIANTAG); - String oz = (order == ByteOrder.BIG_ENDIAN ? "0" : "1"); - a.setValues(new String[] {oz}); + return dapcxt; } - /** - * Set special attribute: constraint : overwrite exiting value - * - * @param dmr dmr to annotate - * @param ce the new constraint - * @throws DapException - */ - void setConstraint(DapDataset dmr, CEConstraint ce) throws DapException { - if (ce == null) - return; - if (ce.isUniversal()) - return; - DapAttribute a = dmr.findAttribute(DapUtil.CEATTRNAME); - if (a == null) { - a = new DapAttribute(DapUtil.CEATTRNAME, DapType.STRING); - dmr.addAttribute(a); - } - String sce = ce.toConstraintString(); - a.setValues(new String[] {sce}); + public CEConstraint constrainDapContext(DapContext dapcxt, DapDataset dmr) throws DapException { + // Add additional entries to the context + // Process any constraint view + DapRequest drq = (DapRequest) dapcxt.get(DapRequest.class); + String sce = drq.queryLookup(DapConstants.CONSTRAINTTAG); + CEConstraint ce = CEConstraint.compile(sce, dmr); + dapcxt.put(CEConstraint.class, ce); + return ce; } - static public String printDMR(DapDataset dmr) { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - DMRPrinter printer = new DMRPrinter(dmr, pw); + protected Map computeDMRChecksums(CDMWrap c4, DapContext cxt) throws DapException { + ByteOrder order = (ByteOrder) cxt.get(DapConstants.DAP4ENDIANTAG); + ChecksumMode csum = (ChecksumMode) cxt.get(DapConstants.CHECKSUMTAG); + CEConstraint ce = (CEConstraint) cxt.get(CEConstraint.class); + OutputStream out = new NullOutputStream(); + DapDataset dmr = ce.getDMR(); try { - printer.print(); - pw.close(); - sw.close(); - } catch (IOException e) { + ChunkWriter cw = new ChunkWriter(out, RequestMode.DAP, order); + cw.cacheDMR(dmr, cxt); + cw.setWriteLimit(1000000000); + DapSerializer writer = new DapSerializer(c4, ce, cw, order, csum); + writer.write(dmr); + cw.flush(); + cw.close(); + return writer.getChecksums(); + } catch (IOException ioe) { + throw new DapException(ioe); } - return sw.toString(); } } diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/DapDSR.java b/dap4/d4servlet/src/main/java/dap4/servlet/DapDSR.java index 01509c36c4..35e1429c83 100644 --- a/dap4/d4servlet/src/main/java/dap4/servlet/DapDSR.java +++ b/dap4/d4servlet/src/main/java/dap4/servlet/DapDSR.java @@ -5,11 +5,17 @@ package dap4.servlet; -import dap4.core.util.IndentWriter; +import dap4.core.util.*; import dap4.dap4lib.DapProtocol; import dap4.dap4lib.RequestMode; + +import javax.servlet.http.HttpServletResponse; +import java.io.FileInputStream; import java.io.IOException; +import java.io.InputStream; import java.io.StringWriter; +import java.net.MalformedURLException; +import java.net.URL; /** * Generate the DSR for a dataset. @@ -23,105 +29,121 @@ public class DapDSR { static final boolean DEBUG = false; + static final String DSRXMLTEMPLATE = "/templates/dap4.dsr.xml.template"; + static final String DSRHTMLTEMPLATE = "/templates/dap4.dsr.html.template"; + + static final String URL_FORMAT = DapConstants.HTTPSCHEME + "//%s/%s/%s"; + ////////////////////////////////////////////////// - // Constructor(s) + // Static Variables - public DapDSR() {} + static private String dap4TestServerPropName = "d4ts"; + public static String dap4TestServer = null;; // mutable + protected static String servletprefix = null; + protected static String servletsuffix = null; + + static { + String d4ts = System.getProperty(dap4TestServerPropName); + if (d4ts != null && d4ts.length() > 0) + dap4TestServer = d4ts; + } ////////////////////////////////////////////////// - // Accessors + // Instance Variables + + DapRequest drq; + DapContext cxt; + + ////////////////////////////////////////////////// + // Constructor(s) + + public DapDSR(DapRequest drq, DapContext cxt) throws IOException { + this.drq = drq; + this.cxt = cxt; + + // Figure out the test server + if (this.dap4TestServer == null) { + try { + URL url = new URL(drq.getRequest().getRequestURL().toString()); + this.dap4TestServer = url.getHost(); + if (url.getPort() > 0) + this.dap4TestServer += ":" + url.getPort(); + this.servletprefix = drq.getRequest().getContextPath(); + this.servletprefix = DapUtil.relativize(this.servletprefix); + this.servletsuffix = drq.getRequest().getServletPath(); + + } catch (MalformedURLException mue) { + throw new DapException(mue).setCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + } + } + if (this.dap4TestServer == null) { + throw new DapException("Cannot determine test server host").setCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + } + if (this.servletprefix == null) { + throw new DapException("Cannot determine test servlet prefix") + .setCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + } + if (this.servletsuffix == null) { + throw new DapException("Cannot determine test servlet suffix") + .setCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + } + } ////////////////////////////////////////////////// // API - public String generate(String dataseturl) throws IOException { - StringWriter sw = new StringWriter(); - IndentWriter printer = new IndentWriter(sw); - printer.marginPrintln(""); - printer.outdent(); - printer.marginPrint(""); - printer.print(DapProtocol.X_DAP_VERSION); - printer.println(""); - printer.marginPrint(""); - printer.print(DapProtocol.X_DAP_SERVER); - printer.println(""); - - printer.marginPrintln(""); - printer.outdent(3); - printer.indent(); - printer.marginPrint(""); - printer.outdent(2); - printer.indent(); - printer.marginPrintln(""); - printer.outdent(); - printer.marginPrintln(""); - printer.marginPrintln(""); - printer.outdent(2); - printer.outdent(); - printer.marginPrintln(""); - - printer.marginPrintln(""); - printer.outdent(3); - printer.indent(); - printer.marginPrint(""); - printer.outdent(2); - printer.indent(); - printer.marginPrintln(""); - printer.outdent(); - printer.marginPrintln(""); - printer.marginPrintln(""); - printer.outdent(2); - printer.outdent(); - printer.marginPrintln(""); - - printer.marginPrintln(""); - printer.outdent(2); - printer.indent(); - printer.marginPrint(""); - printer.outdent(2); - printer.outdent(); - printer.marginPrintln(""); - printer.outdent(); - printer.marginPrintln(""); - - printer.flush(); - printer.close(); - sw.close(); - return sw.toString(); + public String generate(ResponseFormat format, String datasetpath, String dataset) throws IOException { + // Normalize to relative path + datasetpath = DapUtil.relativize(datasetpath); // Get the DSR template + String template = getTemplate(format); + StringBuilder dsr = new StringBuilder(template); + substitute(dsr, "DAP_VERSION", DapConstants.X_DAP_VERSION); + substitute(dsr, "DAP_SERVER", DapConstants.X_DAP_SERVER); + substitute(dsr, "DATASET", dataset); + // Compute the URL + String url = String.format(URL_FORMAT, this.dap4TestServer, this.servletprefix, datasetpath); + substitute(dsr, "URL", url); + return dsr.toString(); + } + + protected String getTemplate(ResponseFormat format) throws IOException { + StringBuilder buf = new StringBuilder(); + // Get template as resource stream + String template = null; + switch (format) { + case XML: + template = DSRXMLTEMPLATE; + break; + case NONE: + case HTML: + template = DSRHTMLTEMPLATE; + break; + default: + throw new IOException("Unsupported DSR Response Format: " + format.toString()); + } + String templatepath = drq.getWebContentPath(template); + try (InputStream stream = new FileInputStream(templatepath)) { + int ch; + while ((ch = stream.read()) >= 0) { + buf.append((char) ch); + } + } + return buf.toString(); + } + + protected void substitute(StringBuilder buf, String macro, String value) { + int from = 0; + String tag = "${" + macro + "}"; + int taglen = tag.length(); + int valuelen = value.length(); + for (;;) { + int index = buf.indexOf(tag, from); + if (index < 0) + break; + buf.replace(index, index + taglen, value); + from = index + valuelen; + } } + } // DapDSR diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/DapRequest.java b/dap4/d4servlet/src/main/java/dap4/servlet/DapRequest.java index 2474a65e73..811e7a0958 100644 --- a/dap4/d4servlet/src/main/java/dap4/servlet/DapRequest.java +++ b/dap4/d4servlet/src/main/java/dap4/servlet/DapRequest.java @@ -5,25 +5,14 @@ package dap4.servlet; -import dap4.core.data.ChecksumMode; -import dap4.core.util.DapException; -import dap4.core.util.DapUtil; -import dap4.core.util.ResponseFormat; -import dap4.dap4lib.Dap4Util; -import dap4.dap4lib.DapLog; +import dap4.core.util.*; import dap4.dap4lib.RequestMode; -import dap4.dap4lib.XURI; -import ucar.httpservices.HTTPUtil; -import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; -import java.net.MalformedURLException; import java.net.URISyntaxException; -import java.net.URL; import java.nio.ByteOrder; -import java.util.HashMap; import java.util.Map; /** @@ -42,67 +31,39 @@ public class DapRequest { static final boolean DEBUG = false; - static public final String WEBINFPATH = "/WEB-INF"; - static public final String RESOURCEDIRNAME = "resources"; - - static public final String CONSTRAINTTAG = "dap4.ce"; - - static public final ChecksumMode DEFAULTCSUM = ChecksumMode.DAP; + protected static final String WEBINFPATH = "WEB-INF"; + protected static final String RESOURCEDIRNAME = "resources"; ////////////////////////////////////////////////// // Instance variables - + protected DapController controller = null; protected HttpServletRequest request = null; protected HttpServletResponse response = null; - protected String url = null; // without any query and as with any modified dataset path - protected String querystring = null; - protected String server = null; // scheme + host + port - protected String controllerpath = null; // scheme + host + port + prefix of path thru servlet Notes - protected String datasetpath = null; // past controller path; char(0) != '/' + protected XURI xuri = null; // without any query and as with any modified dataset path protected RequestMode mode = null; // .dmr, .dap, or .dsr protected ResponseFormat format = null; // e.g. .xml when given .dmr.xml - protected Map queries = new HashMap(); - protected DapController controller = null; - protected ByteOrder order = ByteOrder.nativeOrder(); protected ChecksumMode checksummode = null; - protected String resourceroot = null; - protected ServletContext servletcontext = null; + // path from URL relative to the Servlet + protected String datasetpath = null; + + // The last path element from datasetpath + protected String dataset = null; ////////////////////////////////////////////////// // Constructor(s) public DapRequest(DapController controller, HttpServletRequest request, HttpServletResponse response) throws DapException { - this.controller = controller; this.request = request; this.response = response; - this.servletcontext = request.getServletContext(); - - // Figure out the absolute path to our resources directory - this.resourceroot = (String) this.request.getAttribute("RESOURCEDIR"); - if (this.resourceroot == null && this.servletcontext != null) { - try { - URL url = this.servletcontext.getResource(WEBINFPATH); - if (url == null) - this.resourceroot = null; - else { - if (!url.getProtocol().equals("file")) - throw new DapException("Cannot locate resource root"); - this.resourceroot = DapUtil.canonicalpath(url.getFile() + "/resources"); - } - } catch (MalformedURLException e) { - this.resourceroot = null; - } - if (this.resourceroot == null) - throw new DapException("Cannot locate resource root"); - } + this.controller = controller; try { - parse(); + parseURI(); // Pull Info from the URI } catch (IOException ioe) { throw new DapException(ioe); } @@ -136,83 +97,63 @@ public DapRequest(DapController controller, HttpServletRequest request, HttpServ * 7. The query part. */ - protected void parse() throws IOException { - this.url = request.getRequestURL().toString(); // does not include query - // The mock servlet code does not construct a query string, - // so if we are doing testing, construct from parametermap. - if (DapController.TESTING) { - this.querystring = makeQueryString(this.request); - } else { - this.querystring = request.getQueryString(); // raw (undecoded) - } - - XURI xuri; + protected void parseURI() throws IOException { try { - xuri = new XURI(this.url).parseQuery(this.querystring); + // Unfortunately getRequestURL does not include the query + StringBuffer fullurl = request.getRequestURL(); + if (request.getQueryString() != null) { + fullurl.append("?"); + fullurl.append(Escape.urlDecode(request.getQueryString())); + } + xuri = new XURI(fullurl.toString()); } catch (URISyntaxException e) { throw new IOException(e); } - // Now, construct various items - StringBuilder buf = new StringBuilder(); - buf.append(request.getScheme()); - buf.append("://"); - buf.append(request.getServerName()); - int port = request.getServerPort(); - if (port > 0) { - buf.append(":"); - buf.append(port); - } - this.server = buf.toString(); - - // There appears to be some inconsistency in how the url path is divided up - // depending on if this is a spring controller vs a raw servlet. - // Try to canonicalize so that context path always ends with id - // and servletpath does not start with it. - String id = controller.getServletID(); - String sp = DapUtil.canonicalpath(request.getServletPath()); - String cp = DapUtil.canonicalpath(request.getContextPath()); - if (!cp.endsWith(id)) // probably spring ; contextpath does not ends with id - cp = cp + "/" + id; - buf.append(cp); - this.controllerpath = buf.toString(); - sp = HTTPUtil.relpath(sp); - if (sp.startsWith(id)) // probably spring also - sp = sp.substring(id.length()); - - this.datasetpath = HTTPUtil.relpath(sp); - this.datasetpath = DapUtil.nullify(this.datasetpath); - - this.mode = null; + this.datasetpath = request.getServletPath(); + if (this.datasetpath.equals("/") || this.datasetpath.equals("")) + this.datasetpath = null; // canonical value if (this.datasetpath == null) { - // Presume mode is a capabilities request this.mode = RequestMode.CAPABILITIES; - this.format = ResponseFormat.HTML; } else { - // Decompose path by '.' - String[] pieces = this.datasetpath.split("[.]"); - // Search backward looking for the mode (dmr or dap) - // meanwhile capturing the format extension - int modepos = 0; - for (int i = pieces.length - 1; i >= 1; i--) {// ignore first piece - String ext = pieces[i]; - // We assume that the set of response formats does not interset the set of request modes - RequestMode mode = RequestMode.modeFor(ext); - ResponseFormat format = ResponseFormat.formatFor(ext); + String path = this.datasetpath; + // Break dataset path into prefix/ + dataset + int index = path.lastIndexOf('/'); + if (index < 0) + index = 0; + String prefix = path.substring(0, index); + String file = path.substring(index, path.length()); + file = DapUtil.relativize(file); + for (;;) { // Iterate until we find a non-mode|format extension or no extension + // Decompose dataset by '.' + index = file.lastIndexOf('.'); + if (index < 0) + index = file.length(); + String extension = file.substring(index, file.length()); + if (extension == null || extension.equals("")) + break; + // Figure out what this extension represents + int modepos = 0; + // We assume that the set of response formats does not intersect the set of request modes + RequestMode mode = RequestMode.modeFor(extension); + ResponseFormat format = ResponseFormat.formatFor(extension); + if (mode == null && format == null) + break; // stop here if (mode != null) { - // Stop here + if (this.mode != null) + throw new DapException("Multiple request modes specified: " + extension) + .setCode(HttpServletResponse.SC_BAD_REQUEST); this.mode = mode; - modepos = i; - break; } else if (format != null) { if (this.format != null) - throw new DapException("Multiple response formats specified: " + ext) + throw new DapException("Multiple response formats specified: " + extension) .setCode(HttpServletResponse.SC_BAD_REQUEST); this.format = format; } + file = file.substring(0, index); // Remove consumed extension } - // Set the datasetpath to the entire path before the mode defining extension. - if (modepos > 0) - this.datasetpath = DapUtil.join(pieces, ".", 0, modepos); + // Set the final global values + this.dataset = file; + this.datasetpath = prefix + "/" + this.dataset; } if (this.mode == null) @@ -220,12 +161,8 @@ protected void parse() throws IOException { if (this.format == null) this.format = ResponseFormat.NONE; - // Parse the query string into a Map - if (querystring != null && querystring.length() > 0) - this.queries = xuri.getQueryFields(); - // For testing purposes, get the desired endianness to use with replies - String p = queryLookup(Dap4Util.DAP4ENDIANTAG); + String p = queryLookup(DapConstants.DAP4ENDIANTAG); if (p != null) { Integer oz = DapUtil.stringToInteger(p); if (oz == null) @@ -234,19 +171,11 @@ protected void parse() throws IOException { this.order = (oz != 0 ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN); } - // Ditto for no checksum - p = queryLookup(Dap4Util.DAP4CSUMTAG); + // Ditto for checksum + p = queryLookup(DapConstants.CHECKSUMTAG); if (p != null) { this.checksummode = ChecksumMode.modeFor(p); } - if (this.checksummode == null) - this.checksummode = DEFAULTCSUM; - - if (DEBUG) { - DapLog.debug("DapRequest: controllerpath =" + this.controllerpath); - DapLog.debug("DapRequest: extension=" + (this.mode == null ? "null" : this.mode.extension())); - DapLog.debug("DapRequest: datasetpath=" + this.datasetpath); - } } ////////////////////////////////////////////////// @@ -256,10 +185,6 @@ public ByteOrder getOrder() { return this.order; } - public String getResourceRoot() { - return this.resourceroot; - } - public ChecksumMode getChecksumMode() { return this.checksummode; } @@ -272,36 +197,55 @@ public HttpServletResponse getResponse() { return response; } - public OutputStream getOutputStream() throws IOException { - return response.getOutputStream(); + public String getWebContentRoot() throws DapException { + return controller.getWebContentRoot(this); } - public String getURL() { - return this.url; + public String getServletID() throws DapException { + return controller.getServletID(); } - public String getOriginalURL() { - return (this.querystring == null ? this.url : this.url + "?" + this.querystring); + /** + * Convert a URL path for a dataset into an absolute file path + * + * @param location suffix of url path + * @return path in a string builder so caller can extend. + * @throws IOException + */ + public String getResourcePath(String location) throws DapException { + return controller.getResourcePath(this, location); } - public String getDataset() { - return this.datasetpath; + /** + * Convert a URL path for a web-content related file into an absolute file path + * + * @param location suffix of url path + * @return path in a string builder so caller can extend. + * @throws IOException + */ + public String getWebContentPath(String location) throws DapException { + String path = getWebContentRoot(); + path = DapUtil.canonicalpath(path); + location = DapUtil.relativize(location); + path += "/" + location; + return path; } - public String getServer() { - return this.server; + public OutputStream getOutputStream() throws IOException { + return response.getOutputStream(); } - public ServletContext getServletContext() { - return this.servletcontext; + public String getURL() { + return this.xuri.toString(); } - public String getControllerPath() { - return this.controllerpath; + public String getDatasetPath() { + return this.datasetpath; } - public String getURLPath() { - return this.controllerpath + (this.datasetpath == null ? "" : this.datasetpath); + public String getDataset() { + // Strip off any leading prefix + return this.dataset; } public RequestMode getMode() { @@ -323,19 +267,11 @@ public void setResponseHeader(String name, String value) { } public String queryLookup(String name) { - return queries.get(name.toLowerCase()); + return this.xuri.getQueryFields().get(name.toLowerCase()); } public Map getQueries() { - return this.queries; - } - - public String getResourcePath(String relpath) throws IOException { - return controller.getResourcePath(this, relpath); - } - - public String getDatasetPath() { - return this.datasetpath; + return this.xuri.getQueryFields(); } static String makeQueryString(HttpServletRequest req) { diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/DapSerializer.java b/dap4/d4servlet/src/main/java/dap4/servlet/DapSerializer.java index 48bda0470b..843b0cd7cd 100644 --- a/dap4/d4servlet/src/main/java/dap4/servlet/DapSerializer.java +++ b/dap4/d4servlet/src/main/java/dap4/servlet/DapSerializer.java @@ -6,18 +6,17 @@ package dap4.servlet; import dap4.core.ce.CEConstraint; -import dap4.core.data.ChecksumMode; -import dap4.core.data.DSP; -import dap4.core.data.DataCursor; import dap4.core.dmr.*; -import dap4.core.util.DapException; -import dap4.core.util.Index; -import dap4.core.util.Odometer; -import dap4.core.util.Slice; +import dap4.core.interfaces.ArrayScheme; +import dap4.core.util.*; +import ucar.ma2.Index; + import java.io.IOException; import java.io.OutputStream; import java.nio.ByteOrder; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * Given a DSP, serialize @@ -30,11 +29,13 @@ public class DapSerializer { protected OutputStream stream = null; protected SerialWriter writer = null; - protected DSP dsp = null; + protected CDMWrap cdmwrap = null; protected CEConstraint ce = null; protected ByteOrder order = null; protected ChecksumMode checksummode = null; + protected Map checksums = null; // record variable checkums + ////////////////////////////////////////////////// // Constructor(s) @@ -43,28 +44,38 @@ public DapSerializer() {} /** * Primary constructor * - * @param dsp The DSP to write + * @param c4 The DSP to write * @param constraint Any applicable constraint * @param stream Write to this stream * @param order The byte order to use */ - public DapSerializer(DSP dsp, CEConstraint constraint, OutputStream stream, ByteOrder order, ChecksumMode mode) + public DapSerializer(CDMWrap c4, CEConstraint constraint, OutputStream stream, ByteOrder order, ChecksumMode mode) throws IOException { - this.dsp = dsp; + this.cdmwrap = c4; this.order = order; this.checksummode = mode; this.stream = stream; this.ce = constraint; } + ////////////////////////////////////////////////// + // Accessors + + public Map getChecksums() { + return this.checksums; + } + + ////////////////////////////////////////////////// + // Writers + public void write(DapDataset dmr) throws IOException { writer = new SerialWriter(this.stream, this.order, this.checksummode); writer.flush(); // If stream is ChunkWriter, then dump DMR // Iterate over the top-level variables in the constraint for (DapVariable var : dmr.getTopVariables()) { - if (!this.ce.references(var)) + if (!this.ce.references(var) || var.getCount() == 0) continue; - DataCursor vardata = this.dsp.getVariableData(var); + CDMData vardata = this.cdmwrap.getVariableData(var); if (vardata == null) throw new dap4.core.util.DapException("DapSerializer: cannot find Variable data " + var.getFQN()); writeVariable(vardata, writer); @@ -79,7 +90,7 @@ public void write(DapDataset dmr) throws IOException { * @param dst - where to write * @throws IOException */ - protected void writeVariable(DataCursor data, SerialWriter dst) throws IOException { + protected void writeVariable(CDMData data, SerialWriter dst) throws IOException { DapVariable template = (DapVariable) data.getTemplate(); dst.startVariable(); switch (data.getScheme()) { @@ -98,6 +109,12 @@ protected void writeVariable(DataCursor data, SerialWriter dst) throws IOExcepti assert false : "Unexpected variable type: " + data.toString(); } dst.endVariable(); + if (this.checksummode == ChecksumMode.TRUE) { + if (this.checksums == null) + this.checksums = new HashMap<>(); + long checksum = dst.getLastChecksum(); + this.checksums.put(template, (Long) checksum); + } } /** @@ -107,7 +124,7 @@ protected void writeVariable(DataCursor data, SerialWriter dst) throws IOExcepti * @param dst * @throws dap4.core.util.DapException */ - protected void writeAtomicVariable(DataCursor data, SerialWriter dst) throws IOException { + protected void writeAtomicVariable(CDMData data, SerialWriter dst) throws IOException { DapVariable template = (DapVariable) data.getTemplate(); assert (this.ce.references(template)); DapType basetype = template.getBaseType(); @@ -127,15 +144,15 @@ protected void writeAtomicVariable(DataCursor data, SerialWriter dst) throws IOE * @throws dap4.core.util.DapException */ - protected void writeStructure(DataCursor data, SerialWriter dst) throws IOException { + protected void writeStructure(CDMData data, SerialWriter dst) throws IOException { DapVariable template = (DapVariable) data.getTemplate(); DapStructure ds = (DapStructure) template.getBaseType(); assert (this.ce.references(template)); List slices = ce.getConstrainedSlices(template); - Odometer odom = Odometer.factory(slices); + Odometer odom = OdometerFactory.factory(slices, template.getDimensions()); while (odom.hasNext()) { Index index = odom.next(); - DataCursor[] instance = (DataCursor[]) data.read(index); + CDMData[] instance = (CDMData[]) data.read(index); writeStructure1(instance[0], dst); } } @@ -148,8 +165,8 @@ protected void writeStructure(DataCursor data, SerialWriter dst) throws IOExcept * @throws dap4.core.util.DapException */ - protected void writeStructure1(DataCursor instance, SerialWriter dst) throws IOException { - assert instance.getScheme() == DataCursor.Scheme.STRUCTURE; + protected void writeStructure1(CDMData instance, SerialWriter dst) throws IOException { + assert instance.getScheme() == ArrayScheme.STRUCTURE; DapVariable template = (DapVariable) instance.getTemplate(); assert (this.ce.references(template)); DapStructure ds = (DapStructure) template.getBaseType(); @@ -159,7 +176,7 @@ protected void writeStructure1(DataCursor instance, SerialWriter dst) throws IOE DapVariable field = fields.get(i); if (!this.ce.references(field)) continue; // not in the view - DataCursor df = (DataCursor) instance.readField(i); + CDMData df = (CDMData) instance.readField(i); writeVariable(df, dst); } } @@ -172,28 +189,18 @@ protected void writeStructure1(DataCursor instance, SerialWriter dst) throws IOE * @throws dap4.core.util.DapException */ - protected void writeSequence(DataCursor data, SerialWriter dst) throws IOException { + protected void writeSequence(CDMData data, SerialWriter dst) throws IOException { DapVariable template = (DapVariable) data.getTemplate(); DapSequence ds = (DapSequence) template.getBaseType(); assert (this.ce.references(template)); List slices = ce.getConstrainedSlices(template); - Odometer odom = Odometer.factory(slices); - if (false) - while (odom.hasNext()) { - Index index = odom.next(); - DataCursor[] instance = (DataCursor[]) data.read(index); - writeSequence1(instance[0], dst); - } - else { - DataCursor[] instances = (DataCursor[]) data.read(slices); - for (int i = 0; i < instances.length; i++) { - writeSequence1(instances[i], dst); - } - + Odometer odom = OdometerFactory.factory(slices, template.getDimensions()); + CDMData[] instances = (CDMData[]) data.read(slices); + for (int i = 0; i < instances.length; i++) { + writeSequence1(instances[i], dst); } } - /** * Write out a single Sequence of records * (Eventually use any filter in the DapVariable) @@ -203,14 +210,14 @@ protected void writeSequence(DataCursor data, SerialWriter dst) throws IOExcepti * @throws dap4.core.util.DapException */ - protected void writeSequence1(DataCursor instance, SerialWriter dst) throws IOException { + protected void writeSequence1(CDMData instance, SerialWriter dst) throws IOException { DapVariable template = (DapVariable) instance.getTemplate(); DapSequence seq = (DapSequence) template.getBaseType(); assert (this.ce.references(template)); long nrecs = instance.getRecordCount(); dst.writeCount(nrecs); for (long i = 0; i < nrecs; i++) { - DataCursor record = instance.readRecord(i); + CDMData record = instance.readRecord(i); writeRecord(record, dst); } } @@ -223,7 +230,7 @@ protected void writeSequence1(DataCursor instance, SerialWriter dst) throws IOEx * @throws dap4.core.util.DapException */ - protected void writeRecord(DataCursor record, SerialWriter dst) throws IOException { + protected void writeRecord(CDMData record, SerialWriter dst) throws IOException { DapVariable template = (DapVariable) record.getTemplate(); DapSequence seq = (DapSequence) template.getBaseType(); List fields = seq.getFields(); @@ -231,7 +238,7 @@ protected void writeRecord(DataCursor record, SerialWriter dst) throws IOExcepti DapVariable field = fields.get(i); if (!this.ce.references(field)) continue; // not in the view - DataCursor df = (DataCursor) record.readField(i); + CDMData df = (CDMData) record.readField(i); writeVariable(df, dst); } } diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/FixedValue.java b/dap4/d4servlet/src/main/java/dap4/servlet/FixedValue.java deleted file mode 100644 index 176d3e35c6..0000000000 --- a/dap4/d4servlet/src/main/java/dap4/servlet/FixedValue.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - - -package dap4.servlet; - -import dap4.core.dmr.TypeSort; -import dap4.core.dmr.DapType; -import dap4.core.util.DapException; -import dap4.dap4lib.Dap4Util; - -public class FixedValue extends Value { - - ////////////////////////////////////////////////// - // constants - - // We generate integer values by number of bits - - static protected long[] intvalues = { - - }; - - static protected long[] ulongvalues = { - - }; - - static protected double[] doublevalues = { - - }; - - static protected char[] charvalues = { - - }; - - static protected byte[] opaquevalues = {}; - - static protected String[] stringvalues = {}; - - static protected String[] urlvalues = {}; - - ////////////////////////////////////////////////// - // Constructors - - public FixedValue() {} - - ////////////////////////////////////////////////// - // Value Interface - - public ValueSource source() { - return ValueSource.FIXED; - } - - public Object nextValue(DapType basetype) throws DapException { - TypeSort atomtype = basetype.getTypeSort(); - switch (atomtype) { - case Int8: - case UInt8: - case Int16: - case UInt16: - case Int32: - case UInt32: - case Int64: - case UInt64: - return null; - - case Float32: - case Float64: - return null; - - case Char: - return null; - - case String: - return null; - - case URL: - return null; - - case Opaque: - return null; - - case Enum: - return null; - - default: - throw new DapException("Unexpected type: " + basetype); - } - } - - - public int nextCount(int max) throws DapException { - return 0; - } - - -} - diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/Generator.java b/dap4/d4servlet/src/main/java/dap4/servlet/Generator.java deleted file mode 100644 index 1a6f94a263..0000000000 --- a/dap4/d4servlet/src/main/java/dap4/servlet/Generator.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - -package dap4.servlet; - -import dap4.core.ce.CEConstraint; -import dap4.core.data.ChecksumMode; -import dap4.core.dmr.*; -import dap4.core.util.DapException; -import dap4.core.util.Odometer; -import dap4.core.util.Slice; -import dap4.dap4lib.DMRPrinter; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.nio.ByteOrder; -import java.util.List; -import static dap4.servlet.Value.ValueSource; - -/** - * Given a DMR, return: - * 1. A byte array (byte[]) containing serialized data - * and (optionally) the DMR - *

- * Requirements: - * 1. repeatability: given the same DMR, return the same byte array - *

- * Notes: - * 1. Two options are provided for generating values: - * a. use of a random number generator with a fixed seed. - * b. use of a pre-defined sequence of values with repetition - * when the sequence is exhausted (not yet implemented). - *

- * Additionally, provide two options for generating data from a DMR. - * 1. Automated generation of the data from the whole DMR. - * 2. Selective generation by starting at some variable - * in the DMR. This is useful when one wants more detailed - * control over e.g. the number of tuples in a sequence. - */ - -public class Generator extends DapSerializer { - static final boolean DEBUG = false; - - static final String LBRACE = "{"; - static final String RBRACE = "}"; - - static final int DEFALTCACHELIMIT = 4; // max cache size - - static final ByteOrder DEFAULTORDER = ByteOrder.LITTLE_ENDIAN; - - static final String DATADIR = "d4tests/src/test/data"; // relative to dap4 root - static final String TESTSRC = DATADIR + "/resources/testfiles"; - - static final String SERIALEXT = ".ser"; - static final String SRCEXT = ".dmr" + SERIALEXT; - static final String DSTEXT = ".dap" + SERIALEXT; - - static final int MAXROWS = 5; - - static int rowcount = 0; - - ////////////////////////////////////////////////// - // static methods - protected static boolean asciionly = true; - - static public void setASCII(boolean tf) { - asciionly = tf; - } - - static public int getRowCount() { - return rowcount; - } - - static public void setRowCount(int count) { - if (count >= 0) - rowcount = count; - } - - ////////////////////////////////////////////////// - // Instance variables - - protected Value values = null; // Value generator - protected ByteArrayOutputStream stream = null; - protected ChunkWriter cw = null; - protected boolean withdmr = true; - protected DapDataset dmr = null; - - ////////////////////////////////////////////////// - // Constructor(s) - - public Generator(DapDataset dmr, ValueSource src) throws DapException { - super(); - this.dmr = dmr; - if (src == null) - src = ValueSource.RANDOM; // default - switch (src) { - case FIXED: - case RANDOM: - default: - values = new RandomValue(); - break; - } - values.setASCII(asciionly); - SerialWriter.DEBUG = DEBUG; - } - - ////////////////////////////////////////////////// - // Generator - - public void generate(CEConstraint ce, ChunkWriter cw, boolean withdmr, ChecksumMode mode) throws DapException { - begin(ce, cw, withdmr, mode); - if (this.withdmr) - generateDMR(this.dmr); - dataset(this.dmr); - end(); - } - - public void begin(CEConstraint ce, ChunkWriter cw, boolean withdmr, ChecksumMode mode) throws DapException { - this.cw = cw; - if (ce == null) - ce = CEConstraint.getUniversal(this.dmr); - this.ce = ce; - this.order = cw.getWriteOrder(); - this.checksummode = mode; - this.withdmr = withdmr; - writer = new SerialWriter(this.cw, this.order, this.checksummode); - } - - public void end() throws DapException {} - - public void generateDMR(DapDataset dmr) throws DapException { - try { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - DMRPrinter dp = new DMRPrinter(dmr, this.ce, pw, null); - dp.print(); - pw.close(); - sw.close(); - String tmp = sw.toString(); - this.cw.cacheDMR(tmp); - this.cw.flush(); - } catch (Exception e) { - throw new DapException(e); - } - } - - ////////////////////////////////////////////////// - // Node specific generators - - public void dataset(DapDataset dmr) throws DapException { - // Iterate over the variables in order - for (DapVariable var : this.dmr.getTopVariables()) { - if (!this.ce.references(var)) - continue; - variable(var); - } - } - - public void variable(DapVariable dapvar) throws DapException { - writer.startVariable(); - if (dapvar.isAtomic()) - atomicVariable(dapvar); - else if (dapvar.isStructure()) - structureVariable(dapvar); - else if (dapvar.isSequence()) - sequenceVariable(dapvar); - else - throw new DapException("generate var: not a variable:" + dapvar.getFQN()); - try { - writer.endVariable(); - } catch (IOException ioe) { - throw new DapException(ioe); - } - } - - public void atomicVariable(DapVariable dapvar) throws DapException { - DapType basetype = dapvar.getBaseType(); - Odometer odom = null; - if (dapvar.getRank() == 0) {// scalar - odom = Odometer.factoryScalar(); - } else {// dimensioned - // get the slices from the constraint - List slices = ce.getConstrainedSlices(dapvar); - // Create an odometer from the slices - odom = Odometer.factory(slices, dapvar.getDimensions()); - } - while (odom.hasNext()) { - Object value = values.nextValue(basetype); - if (DEBUG) { - System.err.printf("generate: %s = %s%n", dapvar.getFQN(), stringify(value)); - System.err.flush(); - } - try { - assert (writer != null); - writer.writeAtomicArray(basetype, value); - } catch (IOException ioe) { - throw new DapException(ioe); - } - odom.next(); - } - } - - public void structureVariable(DapVariable var) throws DapException { - DapStructure struct = (DapStructure) var.getBaseType(); - List fields = struct.getFields(); - Odometer odom = null; - if (var.getRank() == 0) {// scalar - odom = Odometer.factoryScalar(); - } else {// dimensioned - List slices = ce.getConstrainedSlices(var); - odom = Odometer.factory(slices, var.getDimensions()); - } - while (odom.hasNext()) { - // generate a value for each field recursively - for (int i = 0; i < fields.size(); i++) { - DapVariable field = fields.get(i); - variable(field); - } - odom.next(); - } - } - - public void sequenceVariable(DapVariable var) throws DapException { - DapSequence seq = (DapSequence) var.getBaseType(); - List fields = seq.getFields(); - Odometer odom = null; - if (var.getRank() == 0) {// scalar - odom = Odometer.factoryScalar(); - } else {// dimensioned - List slices = ce.getConstrainedSlices(var); - odom = Odometer.factory(slices, var.getDimensions()); - } - try { - while (odom.hasNext()) { - // Decide how many rows for this sequence - int nrows = (rowcount == 0 ? this.values.nextCount(MAXROWS) : rowcount); - writer.writeAtomicArray(DapType.INT64, new long[] {nrows}); - for (int i = 0; i < nrows; i++) { - for (int j = 0; j < fields.size(); j++) { - DapVariable field = fields.get(j); - variable(field); - } - } - odom.next(); - } - } catch (IOException ioe) { - throw new DapException(ioe); - } - } - - protected String stringify(Object v) { - if (v.getClass().isArray()) - return stringify(java.lang.reflect.Array.get(v, 0)); - if (v instanceof Float || v instanceof Double) - return v.toString(); - if (v instanceof Byte) - return String.format("%01d 0x%01x", v, v); - if (v instanceof Short) - return String.format("%02d 0x%02x", v, v); - if (v instanceof Integer) - return String.format("%04d 0x%04x", v, v); - if (v instanceof Long) - return String.format("%08d 0x%08x", v, v); - if (v instanceof Character) - return String.format("'%c' 0x%02x", v, (short) v); - return v.toString(); - } - - -} - diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/MultiOdometer.java b/dap4/d4servlet/src/main/java/dap4/servlet/MultiOdometer.java new file mode 100644 index 0000000000..a2a9d348d2 --- /dev/null +++ b/dap4/d4servlet/src/main/java/dap4/servlet/MultiOdometer.java @@ -0,0 +1,155 @@ +/* + * Copyright 2012, UCAR/Unidata. + * See the LICENSE file for more information. + */ + +package dap4.servlet; + +import dap4.core.dmr.DapDimension; +import dap4.core.util.DapException; +import dap4.core.util.PowerSet; +import dap4.core.util.Slice; +import dap4.dap4lib.D4Index; + +import java.util.ArrayList; +import java.util.List; +import java.util.NoSuchElementException; + +/** + * An odometer capable of dealing with a Multi-slices. + */ + +public class MultiOdometer extends Odometer { + + protected static boolean DEBUG = false; + + ////////////////////////////////////////////////// + // Instance variables + + protected int current; // pointers into multslice list + protected long[] sizes; // # of subslices in each slice + protected List> slicesets; // Set of all combinations of slices + protected List odomset; // Odometers created from slicesets + + ////////////////////////////////////////////////// + // Constructor(s) + + public MultiOdometer() {} + + public MultiOdometer(List set) throws DapException { + this(set, null); + } + + public MultiOdometer(List set, List dimset) throws DapException { + super(set, dimset); + this.sizes = new long[this.rank]; + this.odomset = new ArrayList<>(); + for (int i = 0; i < this.rank; i++) { + Slice sl = set.get(i); + List subslices = sl.getSubSlices(); + this.sizes[i] = subslices.size(); + } + int truerank = this.rank; + if (truerank == 0) { + this.slicesets = null; + this.odomset = null; + } else { + PowerSet ps = new PowerSet(this.sizes); + long pssize = ps.getTotalSize(); + long[][] setindices = ps.getPowerSet(); + assert setindices.length == pssize; + this.slicesets = new ArrayList<>(); + if (DEBUG) { + System.err.printf("Multi: |slicesets| = %d%n", setindices.length); + System.err.println(ps.toString()); + } + // Create set of slice sets comprising this MultiOdometer + for (int i = 0; i < pssize; i++) { + long[] indexset = setindices[i]; + assert indexset.length == truerank; + // Pick out the desired set of slices + List subset = new ArrayList<>(); + for (int j = 0; j < this.rank; j++) { + Slice s0 = set.get(j); + Slice ss = s0.getSubSlice((int) indexset[j]); + subset.add(ss); + } + this.slicesets.add(subset); + } + assert this.slicesets.size() == pssize; + // Create set of odometers comprising this MultiOdometer + for (int i = 0; i < pssize; i++) { + Odometer sslodom = OdometerFactory.factory(this.slicesets.get(i), dimset); + this.odomset.add(sslodom); + } + } + this.current = 0; + } + + ////////////////////////////////////////////////// + + @Override + public String toString() { + StringBuilder buf = new StringBuilder(); + for (int i = 0; i < rank; i++) { + Slice s = slice(i); + if (i == current) + buf.append("*"); + buf.append(s.toString()); + buf.append(String.format("(%d)", s.getCount())); + } + return buf.toString(); + } + + ////////////////////////////////////////////////// + // Iterator API Overrides + + @Override + public boolean hasNext() { + if (this.current >= odomset.size()) + return false; + Odometer ocurrent = odomset.get(this.current); + if (ocurrent.hasNext()) + return true; + // Try to move to next odometer + this.current++; + return hasNext(); + } + + @Override + public D4Index next() { + if (this.current >= odomset.size()) + throw new NoSuchElementException(); + Odometer ocurrent = odomset.get(this.current); + assert ocurrent.hasNext(); + return ocurrent.next(); + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + + /** + * Compute the total number of elements. + */ + @Override + public long totalSize() { + long size = 1; + for (int i = 0; i < this.rank; i++) { + size *= slice(i).getCount(); + } + return size; + } + + @Override + public List getSubOdometers() { + return this.odomset; + } + + @Override + public boolean isMulti() { + return true; + } + +} diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/NullOutputStream.java b/dap4/d4servlet/src/main/java/dap4/servlet/NullOutputStream.java new file mode 100644 index 0000000000..c0d96d5983 --- /dev/null +++ b/dap4/d4servlet/src/main/java/dap4/servlet/NullOutputStream.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 1998-2018 University Corporation for Atmospheric Research/Unidata + * See LICENSE for license information. + */ + +package dap4.servlet; + +import java.io.OutputStream; + +/** + * OutputStream that discards anything written to it. + * Roughly /dev/null + */ + +public class NullOutputStream extends OutputStream { + + @Override + public void write(byte[] b) {} + + @Override + public void write(byte[] b, int off, int len) {} + + public void write(int b) {} +} diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/Odometer.java b/dap4/d4servlet/src/main/java/dap4/servlet/Odometer.java new file mode 100644 index 0000000000..5414f3c0e8 --- /dev/null +++ b/dap4/d4servlet/src/main/java/dap4/servlet/Odometer.java @@ -0,0 +1,248 @@ +/* + * Copyright 2012, UCAR/Unidata. + * See the LICENSE file for more information. + */ + +package dap4.servlet; + +import dap4.core.dmr.DapDimension; +import dap4.core.util.DapException; +import dap4.core.util.Slice; +import dap4.dap4lib.D4Index; +import dap4.dap4lib.cdm.CDMUtil; +import ucar.ma2.Index; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.NoSuchElementException; + +/** + * A classic implementation of an odometer + * taken from the netcdf-c code. + * Extended to provide iterator interface + */ + +public class Odometer implements Iterator { + + ////////////////////////////////////////////////// + // Types + + protected static enum STATE { + INITIAL, STARTED, DONE; + } + + ////////////////////////////////////////////////// + // Instance variables + + protected STATE state = STATE.INITIAL; + + protected int rank = 0; + protected List slices = null; + protected List dimset = null; + + // The current odometer indices + protected D4Index index; + + // precompute this.slices[i].getLast() - this.slices[i].getStride() + protected long[] endpoint; + + ////////////////////////////////////////////////// + // Constructor(s) + + protected Odometer() {} + + public Odometer(List set, List dimset) throws DapException { + if (set == null) + throw new DapException("Null slice list"); + assert (set != null && dimset != null); + if (set.size() != dimset.size()) { + if (!(dimset.size() == 0 && set.size() == 1)) + throw new DapException("Rank mismatch"); + } + this.rank = set.size(); + assert (this.rank > 0); + this.slices = new ArrayList<>(); + this.slices.addAll(set); + if (dimset != null) { + this.dimset = new ArrayList<>(); + this.dimset.addAll(dimset); + } + this.endpoint = new long[this.rank]; + int[] shape = new int[rank]; + for (int i = 0; i < this.rank; i++) + shape[i] = slices.get(i).getMax(); + this.index = new D4Index(shape); + reset(); + } + + protected void reset() { + try { + int[] newcounter = new int[this.rank]; + for (int i = 0; i < this.rank; i++) { + slices.get(i).finish(); + newcounter[i] = this.slices.get(i).getFirst(); + this.endpoint[i] = this.slices.get(i).getLast() - this.slices.get(i).getStride(); + } + this.index.set(newcounter); + } catch (DapException de) { + throw new IllegalArgumentException(de); + } + } + + public String toString() { + StringBuilder buf = new StringBuilder(); + int[] current = null; + if (this.index != null) + current = this.index.getCurrentCounter(); + for (int i = 0; i < rank; i++) { + if (i > 0) + buf.append(","); + if (dimset != null) + buf.append(dimset.get(i) != null ? dimset.get(i).getShortName() : "null"); + buf.append(this.slices.get(i).toString()); + buf.append(String.format("(%d)", this.slices.get(i).getCount())); + if (this.index != null) { + buf.append(String.format("@%d", current[i])); + } + } + return buf.toString(); + } + + ////////////////////////////////////////////////// + // Odometer API + + /** + * Return odometer rank + */ + public int rank() { + return this.rank; + } + + /** + * Return ith slice + */ + public Slice slice(int i) { + if (i < 0 || i >= this.rank) + throw new IllegalArgumentException(); + return this.slices.get(i); + } + + + public List getSlices() { + return this.slices; + } + + /** + * Compute the linear index + * from the current odometer indices. + */ + public long index() { + return index.currentElement(); + } + + /** + * Return current set of indices + */ + public D4Index indices() { + return this.index; + } + + /** + * Compute the total number of elements. + */ + public long totalSize() { + long size = 1; + for (int i = 0; i < this.rank; i++) { + size *= this.slices.get(i).getCount(); + } + return size; + } + + ////////////////////////////////////////////////// + // Iterator API + + @Override + public boolean hasNext() { + int stop = this.rank; + switch (this.state) { + case INITIAL: + return true; + case STARTED: + int i; + int[] cur = this.index.getCurrentCounter(); + for (i = stop - 1; i >= 0; i--) { // walk backwards + if (cur[i] <= this.endpoint[i]) + return true; + } + this.state = STATE.DONE; + break; + case DONE: + } + return false; + } + + @Override + public D4Index next() { + int i; + int lastpos = this.rank; + int firstpos = 0; + switch (this.state) { + case INITIAL: + this.state = STATE.STARTED; + break; + case STARTED: + i = step(firstpos, lastpos); + if (i < 0) + this.state = STATE.DONE; + break; + case DONE: + break; + } + if (this.state == STATE.DONE) + throw new NoSuchElementException(); + return indices(); + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + + ////////////////////////////////////////////////// + + // on entry: indices are the last index set + // on exit, the indices are the next value + // return index of place where we have room to step; + // return -1 if we have completed. + public int step(int firstpos, int lastpos) { + int pos = -1; + int[] indices = this.index.getCurrentCounter(); + for (int i = lastpos - 1; i >= firstpos; i--) { // walk backwards + if (indices[i] > this.endpoint[i]) + indices[i] = this.slices.get(i).getFirst(); // reset this position + else { + indices[i] += this.slices.get(i).getStride(); // move to next indices + pos = i; + break; + } + } + this.index.set(indices); + return pos; + } + + public List getSubOdometers() { + List list = new ArrayList<>(); + list.add(this); + return list; + } + + public boolean isMulti() { + return false; + } + + public boolean isScalar() { + return false; + } + +} diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/OdometerFactory.java b/dap4/d4servlet/src/main/java/dap4/servlet/OdometerFactory.java new file mode 100644 index 0000000000..9bab179fe4 --- /dev/null +++ b/dap4/d4servlet/src/main/java/dap4/servlet/OdometerFactory.java @@ -0,0 +1,52 @@ +/* + * Copyright 2012, UCAR/Unidata. + * See the LICENSE file for more information. + */ + +package dap4.servlet; + +import dap4.core.dmr.DapDimension; +import dap4.core.util.DapException; +import dap4.core.util.DapUtil; +import dap4.core.util.Slice; + +import java.util.List; + +/** + * Factory class for Odometers + */ + +abstract public class OdometerFactory { + + public static Odometer factoryScalar() { + return new ScalarOdometer(); + } + + public static Odometer factory(List slices) throws DapException { + return factory(slices, null); + } + + public static Odometer factory(List slices, List dimset) throws DapException { + // check for scalar case + if (dimset != null && dimset.size() == 0) { + if (!DapUtil.isScalarSlices(slices)) + throw new DapException("Cannot build scalar odometer with non-scalar slices"); + return factoryScalar(); + } + boolean multi = false; + if (slices != null) { + for (int i = 0; i < slices.size(); i++) { + if (slices.get(i).getSort() == Slice.Sort.Multi) { + multi = true; + break; + } + } + } + if (slices == null || slices.size() == 0) + return factoryScalar(); + else if (multi) + return new MultiOdometer(slices, dimset); + else + return new Odometer(slices, dimset); + } +} diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/RandomValue.java b/dap4/d4servlet/src/main/java/dap4/servlet/RandomValue.java deleted file mode 100644 index 5eb629cd1e..0000000000 --- a/dap4/d4servlet/src/main/java/dap4/servlet/RandomValue.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - - -package dap4.servlet; - -import dap4.core.dmr.DapEnumConst; -import dap4.core.dmr.DapEnumeration; -import dap4.core.dmr.DapType; -import dap4.core.dmr.TypeSort; -import dap4.core.util.DapException; -import java.math.BigInteger; -import java.nio.ByteBuffer; -import java.util.List; -import java.util.Random; - -public class RandomValue extends Value { - ////////////////////////////////////////////////// - // Constants - - static final long SEED = 37L; - - ////////////////////////////////////////////////// - // Instance variables - - protected Random random = new Random(SEED); - - ////////////////////////////////////////////////// - // Constructor(s) - - public RandomValue() {} - - ////////////////////////////////////////////////// - // Accessors - - ////////////////////////////////////////////////// - // IValue Interface - - public ValueSource source() { - return ValueSource.RANDOM; - } - - public Object nextValue(DapType basetype) throws DapException { - Object value = null; - TypeSort atomtype = basetype.getTypeSort(); - if (atomtype.isIntegerType()) - value = nextInteger(basetype); - else if (atomtype.isFloatType()) - value = nextFloat(basetype); - else - switch (atomtype) { - case Char: - value = new char[] {nextString(random, 1, 32, 127).charAt(0)}; - break; - case String: - value = new String[] {nextString(random, MAXSTRINGSIZE, 32, 127)}; - break; - case URL: - value = new String[] {nextURL()}; - break; - case Opaque: - int length = 2 + (random.nextInt(MAXOPAQUESIZE) * 2); - byte[] bytes = new byte[length]; - random.nextBytes(bytes); - value = new ByteBuffer[] {ByteBuffer.wrap(bytes)};// order is irrelevant - break; - case Enum: - // Coverity[FB.BC_UNCONFIRMED_CAST] - value = nextEnum(((DapEnumeration) basetype)); - break; - case Int8: - case UInt8: - case Int16: - case UInt16: - case Int32: - case UInt32: - case Int64: - case UInt64: - case Float32: - case Float64: - default: - throw new DapException("Unexpected type: " + basetype); - } - if (DEBUG) { - System.err.printf("RandomValue.nextValue: (%s) %s", atomtype.toString(), value.toString()); - if (atomtype.isIntegerType()) { - Number nn = (Number) value; - System.err.printf(" 0x%x\n", nn.longValue()); - } else - System.err.println(); - } - return value; - } - - // return an integer type value (including long, but not floats) - public Object nextInteger(DapType basetype) throws DapException { - TypeSort atomtype = basetype.getTypeSort(); - if (!atomtype.isIntegerType()) - throw new DapException("Unexpected type: " + basetype); - boolean unsigned = atomtype.isUnsigned(); - switch (atomtype) { - case Int8: - return new byte[] {(byte) (random.nextInt(1 << 8) - (1 << 7))}; - case UInt8: - return new byte[] {(byte) (random.nextInt(1 << 8) & 0xFF)}; - case Int16: - return new short[] {(short) (random.nextInt(1 << 16) - (1 << 15))}; - case UInt16: - return new short[] {(short) (random.nextInt(1 << 16))}; - case Int32: - return new int[] {random.nextInt()}; - case UInt32: - long l = random.nextLong(); - l = l & 0xFFFFFFFF; - return new int[] {(int) l}; - case Int64: - return new long[] {random.nextLong()}; - case UInt64: - return new long[] {new BigInteger(64, random).longValue()}; - } - throw new DapException("Unexpected type: " + basetype); - } - - // return a float type value - public Object nextFloat(DapType basetype) throws DapException { - TypeSort atomtype = basetype.getTypeSort(); - switch (atomtype) { - case Float32: - return new float[] {random.nextFloat()}; - case Float64: - return new double[] {random.nextDouble()}; - default: - break; - } - throw new DapException("Unexpected type: " + basetype); - } - - Object nextEnum(DapEnumeration en) { - long l; - TypeSort basetype = en.getBaseType().getTypeSort(); - - // Collect the enum const values as BigIntegers - List ecnames = en.getNames(); - BigInteger[] econsts = new BigInteger[ecnames.size()]; - for (int i = 0; i < econsts.length; i++) { - DapEnumConst ec = en.lookup(ecnames.get(i)); - econsts[i] = BigInteger.valueOf(ec.getValue()); - if (basetype == TypeSort.UInt64) - econsts[i] = econsts[i].and(MASK); - } - - int index = random.nextInt(econsts.length); - l = econsts[index].longValue(); - Object val = null; - switch (basetype) { - case Int8: - val = new byte[] {(byte) l}; - break; - case UInt8: - val = new byte[] {(byte) (l & 0xFFL)}; - break; - case Int16: - val = new short[] {(short) l}; - break; - case UInt16: - val = new short[] {(short) (l & 0xFFFFL)}; - break; - case Int32: - val = new int[] {(int) l}; - break; - case UInt32: - val = new int[] {(int) (l & 0xFFFFFFFFL)}; - break; - case Int64: - val = new long[] {l}; - break; - case UInt64: - val = new long[] {l}; - break; - } - return val; - } - - String nextString(Random random, int maxlength, int min, int max) { - int length = random.nextInt(maxlength) + 1; - StringBuilder buf = new StringBuilder(); - if (asciionly && max > 127) - max = 127; - int range = (max + 1) - min; // min..max+1 -> 0..(max+1)-min - for (int i = 0; i < length; i++) { - int c = random.nextInt(range); // 0..(max+1)-min - c = c + min; // 0..(max+1)-min -> min..max+1 - buf.append((char) c); - } - return buf.toString(); - } - - static final String[] protocols = new String[] {"http", "https"}; - static final String legal = "abcdefghijklmnoqqrstuvwxyz" + "ABCDEFGHIJKLMNOQQRSTUVWXYZ" + "0123456789" + "_"; - - String nextURL() { - StringBuilder url = new StringBuilder(); - url.append(protocols[random.nextInt(protocols.length)]); - url.append("://"); - for (int i = 0; i < HOSTNSEG; i++) { - if (i > 0) - url.append("."); - for (int j = 0; j < MAXSEGSIZE; j++) { - int c; - do { - c = random.nextInt('z'); - } while (legal.indexOf(c) < 0); - url.append((char) c); - } - } - if (random.nextBoolean()) - url.append(String.format(":%d", random.nextInt(5000) + 1)); - for (int i = 0; i < PATHNSEG; i++) { - url.append("/"); - for (int j = 0; j < MAXSEGSIZE; j++) { - int c; - do { - c = random.nextInt('z'); - } while (legal.indexOf(c) < 0); - url.append((char) c); - } - } - return url.toString(); - } - - /** - * Return an integer in range 1..max inclusive. - * - * @param max - * @return random integer in range - * @throws DapException - */ - public int nextCount(int max) throws DapException { - int min = 1; - if (max < min || min < 1) - throw new DapException("bad range"); - int range = (max + 1) - min; // min..max+1 -> 0..(max+1)-min - int n = random.nextInt(range); // 0..(max+1)-min - n = n + min; // min..(max+1) - if (DEBUG) - System.err.println("RandomValue.nextCount: " + n); - return n; - } - -} diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/ScalarOdometer.java b/dap4/d4servlet/src/main/java/dap4/servlet/ScalarOdometer.java new file mode 100644 index 0000000000..b7b3508841 --- /dev/null +++ b/dap4/d4servlet/src/main/java/dap4/servlet/ScalarOdometer.java @@ -0,0 +1,55 @@ +/* + * Copyright 2012, UCAR/Unidata. + * See the LICENSE file for more information. + */ + +package dap4.servlet; + +import dap4.core.util.Slice; +import dap4.dap4lib.D4Index; + +import java.util.NoSuchElementException; + +/** + * A implementation of an odometer for scalar variables. + */ + +public class ScalarOdometer extends Odometer { + ////////////////////////////////////////////////// + // Constants + + public ScalarOdometer() { + this.state = STATE.INITIAL; + this.index = new D4Index(0); + this.slices = Slice.SCALARSLICES; + } + + public long index() { + return 0; + } + + public long totalSize() { + return 1; + } + + public boolean hasNext() { + return this.state != STATE.DONE; + } + + public D4Index next() { + if (this.state == STATE.DONE) + throw new NoSuchElementException(); + this.state = STATE.DONE; + return D4Index.SCALAR; + } + + public void remove() { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isScalar() { + return true; + } + +} diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/SerialWriter.java b/dap4/d4servlet/src/main/java/dap4/servlet/SerialWriter.java index c987537803..98db4feab0 100644 --- a/dap4/d4servlet/src/main/java/dap4/servlet/SerialWriter.java +++ b/dap4/d4servlet/src/main/java/dap4/servlet/SerialWriter.java @@ -5,11 +5,10 @@ package dap4.servlet; -import dap4.core.data.ChecksumMode; -import dap4.core.data.DataCursor; import dap4.core.dmr.DapType; -import dap4.core.dmr.DapVariable; import dap4.core.dmr.TypeSort; +import dap4.core.util.ChecksumMode; +import dap4.core.util.DapConstants; import dap4.core.util.DapException; import dap4.core.util.DapUtil; import java.io.IOException; @@ -30,9 +29,10 @@ */ public class SerialWriter { - static public boolean DEBUG = false; // make it mutable - static public boolean DUMPDATA = false; // make it mutable - static public boolean DUMPCSUM = false; // make it mutable + + public static boolean DEBUG = false; // make it mutable + public static boolean DUMPDATA = false; // make it mutable + public static boolean DUMPCSUM = false; // make it mutable ////////////////////////////////////////////////// // Constants @@ -59,7 +59,7 @@ public class SerialWriter { protected java.util.zip.Checksum checksum; protected ChecksumMode checksummode = null; protected boolean serialize = true; // false=>we do not need to actually serialize - protected String lastchecksum = null; // checksum from last variable + protected long lastchecksum = 0; // checksum from last variable protected ByteBuffer crcbuffer = null; protected ByteBuffer countbuffer = null; @@ -75,11 +75,11 @@ public SerialWriter(OutputStream output, ByteOrder order, ChecksumMode mode) { .order(order); this.crcbuffer = ByteBuffer.allocate(4) // 4==sizeof(crc32 digest) .order(order); - if ("CRC32".equalsIgnoreCase(DapUtil.DIGESTER)) { + if ("CRC32".equalsIgnoreCase(DapConstants.DIGESTER)) { // use the one from java.util.zip.CRC32 this.checksum = new java.util.zip.CRC32(); } else - assert (false) : "No such checksum algorithm: " + DapUtil.DIGESTER; + assert (false) : "No such checksum algorithm: " + DapConstants.DIGESTER; } @@ -90,8 +90,8 @@ public void noSerialize(boolean tf) { this.serialize = !tf; } - public String getLastChecksum() { - return this.lastchecksum.toString(); + public long getLastChecksum() { + return this.lastchecksum; } ////////////////////////////////////////////////// @@ -106,7 +106,7 @@ public String getLastChecksum() { * platform's native encoding. */ - static public ByteBuffer encodeArray(DapType vtype, Object values, ByteOrder order) throws IOException { + public static ByteBuffer encodeArray(DapType vtype, Object values, ByteOrder order) throws IOException { TypeSort atomtype = vtype.getAtomicType(); assert values != null && values.getClass().isArray(); int count = Array.getLength(values); @@ -225,7 +225,7 @@ public void startVariable() { public void endVariable() throws IOException { depth--; - if (depth == 0 && this.checksummode.enabled(ChecksumMode.DAP)) { + if (depth == 0 && this.checksummode == ChecksumMode.TRUE) { long crc = this.checksum.getValue(); // get the digest value crc = (crc & 0x00000000FFFFFFFFL); /* crc is 32 bits */ crcbuffer.clear(); @@ -233,14 +233,14 @@ public void endVariable() throws IOException { byte[] csum = crcbuffer.array(); assert csum.length == 4; // convert to a string; write as a signed integer - this.lastchecksum = String.format("%08x", crc); + this.lastchecksum = crc; if (DEBUG) { System.err.print("checksum = " + this.lastchecksum); System.err.println(); } // Write out the digest in binary form // Do not use writeBytes because checksum is not itself checksummed - outputBytes(csum, 0, DapUtil.CHECKSUMSIZE); + outputBytes(csum, 0, DapConstants.CHECKSUMSIZE); } } @@ -296,7 +296,7 @@ public void writeAtomicArray(DapType daptype, Object values) throws IOException */ public void writeBytes(byte[] bytes, int len) throws IOException { outputBytes(bytes, 0, len); - if (this.checksummode.enabled(ChecksumMode.DAP)) { + if (this.checksummode == ChecksumMode.TRUE) { this.checksum.update(bytes, 0, len); if (DUMPCSUM) { System.err.print("SSS "); diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/SynDSP.java b/dap4/d4servlet/src/main/java/dap4/servlet/SynDSP.java deleted file mode 100644 index d7a6eb171b..0000000000 --- a/dap4/d4servlet/src/main/java/dap4/servlet/SynDSP.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - -package dap4.servlet; - -import dap4.core.data.DSP; -import dap4.core.util.DapContext; -import dap4.core.util.DapDump; -import dap4.core.util.DapException; -import dap4.core.util.DapUtil; -import dap4.dap4lib.ChunkInputStream; -import dap4.dap4lib.DapCodes; -import dap4.dap4lib.RequestMode; -import dap4.dap4lib.XURI; -import dap4.dap4lib.serial.D4DSP; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.FileInputStream; -import java.io.IOException; -import java.net.URISyntaxException; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - -/** - * Provide a DSP interface to synthetic data (see Generator.java). - */ - -public class SynDSP extends D4DSP { - static final protected boolean DEBUG = false; - - static protected final String[] SYNEXTENSIONS = new String[] {".dmr", ".syn"}; - - ////////////////////////////////////////////////// - // Instance variables - - protected byte[] raw = null; // Complete serialized binary databuffer - - ////////////////////////////////////////////////// - // Constructor(s) - - public SynDSP() { - super(); - } - - ////////////////////////////////////////////////// - // DSP API - - - /** - * A path is a Synthetic path if it ends in .dmr or .syn - * - * @param path - * @param context Any parameters that may help to decide. - * @return true if this path appears to be processible by this DSP - */ - public boolean dspMatch(String path, DapContext context) { - for (String ext : SYNEXTENSIONS) { - if (path.endsWith(ext)) - return true; - } - return false; - } - - @Override - public void close() {} - - @Override - public SynDSP open(String filepath) throws DapException { - // convert the relative path to real path - assert this.context != null; - if (filepath.startsWith("file:")) - try { - XURI xuri = new XURI(filepath); - filepath = xuri.getPath(); - } catch (URISyntaxException use) { - throw new DapException("Malformed filepath: " + filepath).setCode(DapCodes.SC_NOT_FOUND); - } - setLocation(filepath); - // Read the .dmr/.syn file - String document; - try { - try (FileInputStream stream = new FileInputStream(filepath);) { - document = DapUtil.readtextfile(stream); - } - } catch (IOException ioe) { - throw new DapException(ioe); - } - // Parse the dmr. - this.dmr = parseDMR(document); - - // Use the Generator to generate synthetic data for this dmr. - try { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ChunkWriter cw = new ChunkWriter(bos, RequestMode.DAP, ByteOrder.nativeOrder()); - Generator generator = new Generator(dmr, Value.ValueSource.RANDOM); - generator.generate(null, cw, true, getChecksumMode()); - cw.close(); - bos.close(); - byte[] raw = bos.toByteArray(); - if (DEBUG) - DapDump.dumpbytes(ByteBuffer.wrap(raw).order(getOrder()), true); - ByteArrayInputStream bis = new ByteArrayInputStream(raw); - ChunkInputStream crdr = new ChunkInputStream(bis, RequestMode.DAP, getOrder()); - // Skip the dmr - crdr.readDMR(); - this.raw = DapUtil.readbinaryfile(crdr); - super.build(dmr, this.raw, getOrder()); - return this; - } catch (IOException ioe) { - throw new DapException(ioe); - } - } - -} diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/URLMap.java b/dap4/d4servlet/src/main/java/dap4/servlet/URLMap.java deleted file mode 100644 index a1bb317ce5..0000000000 --- a/dap4/d4servlet/src/main/java/dap4/servlet/URLMap.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - - -package dap4.servlet; - -import dap4.core.util.DapException; - -/** - * Provide a map from url path -> file system path. - * The idea is that the space of url paths forms a tree - * with the paths in the tree being of varying length. - * Each leaf in the tree is associated with - * a file path prefix. It is assumed that if the suffix - * of the url (the part after the prefix from the map) - * is appended to the path associated with the leaf, then - * we will have a full file system path leading to - * the file (or directory) to which we the full url refers. - */ - -public interface URLMap { - - ////////////////////////////////////////////////// - // Type Decls - - // The result of a map is to produce multiple values as defined here. - public class Result { - public String prefix = null; - public String suffix = null; - - public String toString() { - return prefix + "->" + suffix; - } - } - - ////////////////////////////////////////////////// - // API - - /** - * Use some maximal prefix of the url path - * to locate the associated file path prefix. - * Return a Pair specifying: - * 1. Pair.prefix: path specifying the file path associated with - * the url prefix - * 2. Pair.suffix: the suffix of the url path that was not used. - * - * @param urlpath a string specifying the url path to be mapped - * @return Pair returning items 1 an 2 above. - * @throws DapException if the map fails - *

- * Note that this map does not deal with the whole url, only the path part - * because as a rule, the host+port is unknown at the time the map is built - * and also because there might be multiple hosts using the same map. - */ - public Result mapURL(String urlpath) throws DapException; - - /** - * Inverse of mapURL; returns a url path and suffix: U,S - * such that mapURL(U)+S = path - * Return a Pair specifying: - * 1. Pair.prefix: path specifying the url path associated with - * the file prefix - * 2. Pair.suffix: the suffix of the file path that was not used. - * - * @param path a string specifying the file path to be mapped - * @return Pair returning items 1 an 2 above. - * @throws DapException if the map fails - *

- * This is an optional operation and if not supported, - * throw UnsupportedOperationException. - */ - public Result mapPath(String path) throws DapException; - - /** - * Add an entry into the map. Any trailing / on urlprefix - * or leading / on file prefix will be removed. - * - * @param urlprefix - * @param fileprefix - */ - public void addEntry(String urlprefix, String fileprefix) throws DapException; - -} - diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/URLMapDefault.java b/dap4/d4servlet/src/main/java/dap4/servlet/URLMapDefault.java deleted file mode 100644 index f75ea2d050..0000000000 --- a/dap4/d4servlet/src/main/java/dap4/servlet/URLMapDefault.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - - -package dap4.servlet; - -import dap4.core.util.DapException; -import dap4.core.util.DapUtil; -import dap4.dap4lib.XURI; -import java.io.*; -import java.net.URISyntaxException; -import java.util.*; -import dap4.servlet.URLMap.Result; - -/** - * Define a URL map that assumes that there some prefix - * of the urlpath that can be replaced by a path prefix - * and that everything else is the same. - * The mapping is carried out from a properties file - * that has lines of the form = - */ -public class URLMapDefault implements URLMap { - - ////////////////////////////////////////////////// - // Instance Variables - - SortedMap url2path = new TreeMap(); - SortedMap path2url = new TreeMap(); - - ////////////////////////////////////////////////// - // Constructor(s) - - public URLMapDefault() {} - - ////////////////////////////////////////////////// - // Accessors - - @Override - public void addEntry(String urlpath, String fileprefix) throws DapException { - // Canonicalize the urlpath - String urlprefix = DapUtil.canonicalpath(urlpath); - // Canonicalize the file path - fileprefix = DapUtil.canonicalpath(fileprefix); - url2path.put(urlprefix, fileprefix); // overwrite - path2url.put(fileprefix, urlprefix); // overwrite - } - - ////////////////////////////////////////////////// - // File loader - - public void load(String filepath) throws IOException { - String[] lines; - try (InputStream is = new FileInputStream(filepath);) { - String content = DapUtil.readtextfile(is); - lines = content.split("[\n]"); - } - for (String line : lines) { - String[] pieces = line.split("[=]"); - if (pieces.length != 2) - throw new IOException("File: " + filepath + "; malformed line: " + line); - addEntry(pieces[0], pieces[1]); - } - } - - ////////////////////////////////////////////////// - // URLMap API - - @Override - public Result mapURL(String urlpath) throws DapException { - // Canonicalize the urlpath - urlpath = DapUtil.canonicalpath(urlpath); - Result result = longestmatch(url2path, urlpath); - return result; - } - - @Override - public Result mapPath(String path) throws DapException { - // canonicalize path - path = DapUtil.canonicalpath(path); - Result result = longestmatch(path2url, path); - return result; - } - - protected Result longestmatch(SortedMap map, String prefix) { - Result result = new Result(); - List matches = new ArrayList<>(); - for (Map.Entry entry : map.entrySet()) { - if (prefix.startsWith(entry.getKey())) - matches.add(entry.getKey()); - } - String longestmatch = null; - if (map.get(prefix) != null) - longestmatch = prefix; - for (int i = 0; i < matches.size(); i++) { - String candidate = matches.get(i); - if (prefix.startsWith(candidate)) { - if (longestmatch == null || candidate.length() > longestmatch.length()) - longestmatch = candidate; - } - } - if (longestmatch != null) - result.prefix = map.get(longestmatch); - else - return null; - - /* - * // lastKey returns everything less than path, but - * // we need less-or-equal, so we have to do a separate - * // check for exact match - * result.prefix = map.get(prefix); - * if(result.prefix == null) { - * SortedMap submap = map.headMap(prefix); - * if(submap.size() == 0) - * return null; // prefix is not here in any form - * longestmatch = submap.lastKey(); - * result.prefix = (String) submap.get(longestmatch); - * } - */ - result.suffix = prefix.substring(longestmatch.length()); - if (result.prefix.endsWith("/")) - result.prefix = result.prefix.substring(0, result.prefix.length() - 1); - if (result.suffix.startsWith("/")) - result.suffix = result.suffix.substring(1); - return result; - } - - public String toString() { - StringBuilder buf = new StringBuilder(); - for (String url : url2path.keySet()) { - buf.append(url + " <=> " + url2path.get(url)); - } - return buf.toString(); - } -} - diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/Value.java b/dap4/d4servlet/src/main/java/dap4/servlet/Value.java index 90632b0238..c5c88cd4f9 100644 --- a/dap4/d4servlet/src/main/java/dap4/servlet/Value.java +++ b/dap4/d4servlet/src/main/java/dap4/servlet/Value.java @@ -20,15 +20,15 @@ abstract public class Value { static final BigInteger MASK = new BigInteger("FFFFFFFFFFFFFFFF", 16); // default max values - static public final int MAXSTRINGSIZE = 10; - static public final int MAXOPAQUESIZE = 8; + public static final int MAXSTRINGSIZE = 10; + public static final int MAXOPAQUESIZE = 8; // For URL generation - static public final int MAXSEGSIZE = 8; - static public final int HOSTNSEG = 3; - static public final int PATHNSEG = 4; + public static final int MAXSEGSIZE = 8; + public static final int HOSTNSEG = 3; + public static final int PATHNSEG = 4; - static public enum ValueSource { + public static enum ValueSource { RANDOM, FIXED; } diff --git a/dap4/d4tests/build.gradle b/dap4/d4tests/build.gradle deleted file mode 100644 index 68447fce54..0000000000 --- a/dap4/d4tests/build.gradle +++ /dev/null @@ -1,69 +0,0 @@ -apply from: "$rootDir/gradle/any/dependencies.gradle" -apply from: "$rootDir/gradle/any/java-test-only.gradle" - -dependencies { - compile enforcedPlatform(project(':tds-platform')) - compile enforcedPlatform(project(':tds-testing-platform')) - - // A lot of these dependencies should be in the testRuntime config, not testCompile. - testCompile 'edu.ucar:dap4' - testCompile project(':dap4:dap4-servlet') - - testCompile(project(':dap4:d4ts')) { - exclude group: 'org.apache.logging.log4j' - } - - testCompile 'edu.ucar:cdm-core' - testCompile 'edu.ucar:httpservices' - - testCompile(project(':tds')) { - // depending on TDS does not seem right. Need to break out the parts that are important - // to other services and make that a separate subproject. - exclude group: 'org.apache.logging.log4j' - exclude group: 'org.apache.taglibs', module: 'taglibs-standard-spec' - exclude group: 'org.apache.taglibs', module: 'taglibs-standard-impl' - } - - testCompile 'javax.servlet:javax.servlet-api' - testCompile 'org.slf4j:slf4j-api' - - compile 'org.slf4j:slf4j-api' - runtime 'org.apache.logging.log4j:log4j-slf4j-impl' - testCompile 'org.apache.logging.log4j:log4j-web' - testRuntime 'ch.qos.logback:logback-classic' - - // Spring - compile 'org.springframework:spring-test' - compile 'org.springframework:spring-core' - compile 'org.springframework:spring-context' - compile 'org.springframework:spring-beans' - compile 'org.springframework:spring-web' - compile 'org.springframework:spring-webmvc' - - testCompile 'junit:junit' - testCompile project(':tds-test-utils') - testCompile 'edu.ucar:cdm-test-utils' -} - -test { - systemProperties['testargs'] = System.getProperty('testargs', '') - - include 'dap4/test/TestCDMClient.class' - include 'dap4/test/TestConstraints.class' - include 'dap4/test/TestDSP.class' - include 'dap4/test/TestDSR.class' - include 'dap4/test/TestNc4Iosp.class' - include 'dap4/test/TestParserCE.class' - include 'dap4/test/TestParserDMR.class' - include 'dap4/test/TestServlet.class' - include 'dap4/test/TestServletConstraints.class' - include 'dap4/test/TestFrontPage.class' - //include 'dap4/test/TestFilters.class' - //include 'dap4/test/TestH5Iosp.class' - //include 'dap4/test/TestHyrax.class' - //include 'dap4/test/TestPrinter.class' - //include 'dap4/test/TestSerial.class' -} - -test.dependsOn(':dap4:d4ts:AppWarBeforeIntegrationTest') -test.finalizedBy(':dap4:d4ts:AppWarAfterIntegrationTest') diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_anon_dim.syn.2.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_anon_dim.syn.2.raw.txt deleted file mode 100644 index 3aec08b1c9..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_anon_dim.syn.2.raw.txt +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_anon_dim.syn.2 { - variables: - int vu32(4); - string vu32:_DAP4_Checksum_CRC32 = "0x417bc794"; - - // global attributes: - string :_dap4.ce = "/vu32[0:3]"; - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vu32 = - {-1169720286, -920699049, -2088732436, 1060190036} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_anon_dim.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_anon_dim.syn.raw.txt deleted file mode 100644 index 0819467d8f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_anon_dim.syn.raw.txt +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_anon_dim.syn { - variables: - int vu32(6); - string vu32:_DAP4_Checksum_CRC32 = "0x1aca2718"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vu32 = - {-1169720286, -920699049, -2088732436, 1060190036, -1123468835, 922940053} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.5.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.5.raw.txt deleted file mode 100644 index bfc1a9a698..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.5.raw.txt +++ /dev/null @@ -1,30 +0,0 @@ -netcdf test_atomic_array.nc.5 { - variables: - ubyte vu8(1, 2); - string vu8:_DAP4_Checksum_CRC32 = "0x1a9eb5b3"; - - double vd(1); - string vd:_DAP4_Checksum_CRC32 = "0x74c1a1f1"; - - string vs(1, 1); - string vs:_DAP4_Checksum_CRC32 = "0x15293f21"; - - opaque vo(1, 1); - string vo:_DAP4_Checksum_CRC32 = "0x225778dc"; - - // global attributes: - string :_dap4.ce = "/vu8[1][0:2:2];/vd[1];/vs[1][0];/vo[0][1]"; - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vu8 = - { - {3, 5} - } -vd = - {1024.8} -vs = - { "Καλημέα" - } -vo = 0xabcdef0000000000; - -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.8.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.8.raw.txt deleted file mode 100644 index 8c33c36312..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.8.raw.txt +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_atomic_array.nc.8 { - variables: - short v16(3); - string v16:_DAP4_Checksum_CRC32 = "0xb4fb7f89"; - - // global attributes: - string :_dap4.ce = "/v16[0:1,3]"; - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -v16 = - {1, 2, 4} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.9.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.9.raw.txt deleted file mode 100644 index 7137b40bd6..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.9.raw.txt +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_atomic_array.nc.9 { - variables: - short v16(3); - string v16:_DAP4_Checksum_CRC32 = "0xa0d9e652"; - - // global attributes: - string :_dap4.ce = "/v16[3,0:1]"; - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -v16 = - {4, 1, 2} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.raw.txt deleted file mode 100644 index 4aafbcac3b..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.nc.raw.txt +++ /dev/null @@ -1,63 +0,0 @@ -netcdf test_atomic_array { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - dimensions: - d1 = 1; - d2 = 2; - d3 = 3; - d4 = 4; - d5 = 5; - variables: - ubyte vu8(d2, d3); - string vu8:_DAP4_Checksum_CRC32 = "0xd42f6486"; - - short v16(d4); - string v16:_DAP4_Checksum_CRC32 = "0x92991416"; - - uint vu32(d2, d3); - string vu32:_DAP4_Checksum_CRC32 = "0x0c56f0f2"; - - double vd(d2); - string vd:_DAP4_Checksum_CRC32 = "0x7c09cbae"; - - char vc(d2); - string vc:_DAP4_Checksum_CRC32 = "0x63add807"; - - string vs(d2, d2); - string vs:_DAP4_Checksum_CRC32 = "0x672f70c4"; - - opaque vo(d1, d2); - string vo:_DAP4_Checksum_CRC32 = "0x2757560d"; - - enum cloud_class_t primary_cloud(d5); - string primary_cloud:_FillValue = "Missing"; - string primary_cloud:_DAP4_Checksum_CRC32 = "0xb58a627a"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vu8 = - { - {255, 1, 2}, - {3, 4, 5} - } -v16 = - {1, 2, 3, 4} -vu32 = - { - {5, 4, 3}, - {2, 1, 0} - } -vd = - {17.9, 1024.8} -vc = "@&" -vs = - { "hello world", "hello world", "hello world", "hello world" - } -vo = 0x0123456789abcdef, - 0x0123456789abcdef; - -primary_cloud = - {0, 2, 0, 1, 127} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.syn.raw.txt deleted file mode 100644 index e1388d3f78..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_array.syn.raw.txt +++ /dev/null @@ -1,63 +0,0 @@ -netcdf test_atomic_array.syn { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - dimensions: - d1 = 1; - d2 = 2; - d3 = 3; - d4 = 4; - d5 = 5; - variables: - ubyte vu8(d2, d3); - string vu8:_DAP4_Checksum_CRC32 = "0xd79bd598"; - - short v16(d4); - string v16:_DAP4_Checksum_CRC32 = "0xa40ee271"; - - uint vu32(d2, d3); - string vu32:_DAP4_Checksum_CRC32 = "0xa06ca308"; - - double vd(d2); - string vd:_DAP4_Checksum_CRC32 = "0x7ee0fb67"; - - char vc(d2); - string vc:_DAP4_Checksum_CRC32 = "0x7cee5238"; - - string vs(d2, d2); - string vs:_DAP4_Checksum_CRC32 = "0x9d474c4c"; - - opaque vo(d1, d2); - string vo:_DAP4_Checksum_CRC32 = "0xd4809521"; - - enum cloud_class_t primary_cloud(d5); - string primary_cloud:_FillValue = "Missing"; - string primary_cloud:_DAP4_Checksum_CRC32 = "0x94b74cf7"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vu8 = - { - {186, 201, 131}, - {63, 189, 55} - } -v16 = - {-341, -21899, -13413, -22144} -vu32 = - { - {2367803413, 3586730583, 511843988}, - {3754752863, 2950934681, 2366232135} - } -vd = - {0.21787008119279183, 0.6024507919967678} -vc = "CO" -vs = - { "{S", "{S", "{S", "{S" - } -vo = 0xa2177aa7287c04fa8bb57bcdf76ec80f, - 0xa2177aa7287c04fa8bb57bcdf76ec80f; - -primary_cloud = - {2, 9, 6, 8, 3} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_types.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_types.nc.raw.txt deleted file mode 100644 index a6cd1e1933..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_types.nc.raw.txt +++ /dev/null @@ -1,72 +0,0 @@ -netcdf test_atomic_types { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - variables: - byte v8; - string v8:_DAP4_Checksum_CRC32 = "0x3fba6cad"; - - ubyte vu8; - string vu8:_DAP4_Checksum_CRC32 = "0xff000000"; - - short v16; - string v16:_DAP4_Checksum_CRC32 = "0xac6191df"; - - ushort vu16; - string vu16:_DAP4_Checksum_CRC32 = "0xffff0000"; - - int v32; - string v32:_DAP4_Checksum_CRC32 = "0x12477cdf"; - - uint vu32; - string vu32:_DAP4_Checksum_CRC32 = "0xffffffff"; - - long v64; - string v64:_DAP4_Checksum_CRC32 = "0xccfc5c3c"; - - ulong vu64; - string vu64:_DAP4_Checksum_CRC32 = "0x2144df1c"; - - float vf; - string vf:_DAP4_Checksum_CRC32 = "0x8c2a1365"; - - double vd; - string vd:_DAP4_Checksum_CRC32 = "0xf2bacb72"; - - char vc; - string vc:_DAP4_Checksum_CRC32 = "0xa4deae1d"; - - string vs; - string vs:_DAP4_Checksum_CRC32 = "0x3691a6d4"; - - opaque vo; - string vo:_DAP4_Checksum_CRC32 = "0xd24ddadd"; - - enum cloud_class_t primary_cloud; - string primary_cloud:_FillValue = "Missing"; - string primary_cloud:_DAP4_Checksum_CRC32 = "0x3c0c8ea1"; - - enum cloud_class_t secondary_cloud; - string secondary_cloud:_FillValue = "Missing"; - string secondary_cloud:_DAP4_Checksum_CRC32 = "0x12b88320"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -v8 =-128 -vu8 =255 -v16 =-32768 -vu16 =65535 -v32 =2147483647 -vu32 =4294967295 -v64 =9223372036854775807 -vu64 =18446744073709551615 -vf =3.1415927 -vd =3.141592653589793 -vc =@ -vs = "hello world" -vo = 0x0123456789abcdef; - -primary_cloud =2 -secondary_cloud =127 -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_types.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_types.syn.raw.txt deleted file mode 100644 index 3c302ef4a6..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_atomic_types.syn.raw.txt +++ /dev/null @@ -1,72 +0,0 @@ -netcdf test_atomic_types.syn { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - variables: - byte v8; - string v8:_DAP4_Checksum_CRC32 = "0x140e363f"; - - ubyte vu8; - string vu8:_DAP4_Checksum_CRC32 = "0x30ba9599"; - - short v16; - string v16:_DAP4_Checksum_CRC32 = "0xe353db0e"; - - ushort vu16; - string vu16:_DAP4_Checksum_CRC32 = "0x31e23870"; - - int v32; - string v32:_DAP4_Checksum_CRC32 = "0xbad2143f"; - - uint vu32; - string vu32:_DAP4_Checksum_CRC32 = "0x32e54381"; - - long v64; - string v64:_DAP4_Checksum_CRC32 = "0x915dfe6e"; - - ulong vu64; - string vu64:_DAP4_Checksum_CRC32 = "0x9233006a"; - - float vf; - string vf:_DAP4_Checksum_CRC32 = "0x3d571922"; - - double vd; - string vd:_DAP4_Checksum_CRC32 = "0xffd91cad"; - - char vc; - string vc:_DAP4_Checksum_CRC32 = "0x09b9265b"; - - string vs; - string vs:_DAP4_Checksum_CRC32 = "0x81827ad8"; - - opaque vo; - string vo:_DAP4_Checksum_CRC32 = "0x2d29db8e"; - - enum cloud_class_t primary_cloud; - string primary_cloud:_FillValue = "Missing"; - string primary_cloud:_DAP4_Checksum_CRC32 = "0x4c667a2e"; - - enum cloud_class_t secondary_cloud; - string secondary_cloud:_FillValue = "Missing"; - string secondary_cloud:_DAP4_Checksum_CRC32 = "0x4b0bbe37"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -v8 =58 -vu8 =201 -v16 =896 -vu16 =16177 -v32 =-1123468835 -vu32 =2125143125 -v64 =3059391736915381031 -vu64 =11577488182652895291 -vf =0.5512972 -vd =0.7902673011288164 -vc =* -vs = "O,L?c8A%V" -vo = 0x46f169ef23cbaf9b1febd99e4e16cec9; - -primary_cloud =7 -secondary_cloud =3 -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum.nc.raw.txt deleted file mode 100644 index b666139c20..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum.nc.raw.txt +++ /dev/null @@ -1,14 +0,0 @@ -netcdf test_enum { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - variables: - enum cloud_class_t primary_cloud; - string primary_cloud:_FillValue = "Missing"; - string primary_cloud:_DAP4_Checksum_CRC32 = "0x3c0c8ea1"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -primary_cloud =2 -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_2.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_2.nc.raw.txt deleted file mode 100644 index 62ee4d281a..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_2.nc.raw.txt +++ /dev/null @@ -1,17 +0,0 @@ -netcdf test_enum_2 { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - - group: h { - variables: - enum cloud_class_t primary_cloud; - string primary_cloud:_FillValue = "Missing"; - string primary_cloud:_DAP4_Checksum_CRC32 = "0x3c0c8ea1"; - - } - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -h/primary_cloud =2 -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_array.nc.4.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_array.nc.4.raw.txt deleted file mode 100644 index 82933a50d3..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_array.nc.4.raw.txt +++ /dev/null @@ -1,16 +0,0 @@ -netcdf test_enum_array.nc.4 { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - variables: - enum cloud_class_t primary_cloud(2); - string primary_cloud:_FillValue = "Missing"; - string primary_cloud:_DAP4_Checksum_CRC32 = "0x04e840eb"; - - // global attributes: - string :_dap4.ce = "/primary_cloud[1:2:4]"; - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -primary_cloud = - {2, 1} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_array.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_array.nc.raw.txt deleted file mode 100644 index 0a2c146f56..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_enum_array.nc.raw.txt +++ /dev/null @@ -1,17 +0,0 @@ -netcdf test_enum_array { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - dimensions: - d5 = 5; - variables: - enum cloud_class_t primary_cloud(d5); - string primary_cloud:_FillValue = "Missing"; - string primary_cloud:_DAP4_Checksum_CRC32 = "0xb58a627a"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -primary_cloud = - {0, 2, 0, 1, 127} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_fill.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_fill.nc.raw.txt deleted file mode 100644 index 839f800bfe..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_fill.nc.raw.txt +++ /dev/null @@ -1,19 +0,0 @@ -netcdf test_fill { - variables: - ubyte uv8; - string uv8:_DAP4_Checksum_CRC32 = "0x6fbf1d91"; - - short v16; - string v16:_DAP4_Checksum_CRC32 = "0xc9139fe6"; - - uint uv32; - uv32:_FillValue = 17; - string uv32:_DAP4_Checksum_CRC32 = "0x8437b331"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -uv8 =240 -v16 =32700 -uv32 =111000 -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_groups1.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_groups1.nc.raw.txt deleted file mode 100644 index 253a698474..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_groups1.nc.raw.txt +++ /dev/null @@ -1,44 +0,0 @@ -netcdf test_groups1 { - dimensions: - dim1 = 5; - - group: g { - dimensions: - dim2 = 3; - - group: h { - dimensions: - dim3 = 7; - variables: - int v1(dim1); - string v1:_DAP4_Checksum_CRC32 = "0x1d1d272c"; - - float v2(dim2); - string v2:_DAP4_Checksum_CRC32 = "0x0fe72d43"; - - } - - group: i { - dimensions: - dim3 = 7; - variables: - int v1(dim1); - string v1:_DAP4_Checksum_CRC32 = "0xa9b4a0fb"; - - float v3(dim3); - string v3:_DAP4_Checksum_CRC32 = "0x29f1e312"; - - } - } - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -g/h/v1 = - {-876354855, -1761252264, 1723477387, -46827465, 1475147969} -g/h/v2 = - {12.0, -100.0, 9.96921E36} -g/i/v1 = - {2, 3, 5, 7, 11} -g/i/v3 = - {23.0, 29.0, 19.0, 31.0, 17.0, 37.0, 13.0} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_var.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_var.nc.raw.txt deleted file mode 100644 index 2b376e08ab..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_var.nc.raw.txt +++ /dev/null @@ -1,10 +0,0 @@ -netcdf test_one_var { - variables: - int t; - string t:_DAP4_Checksum_CRC32 = "0xc9e1efe6"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -t =17 -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.1.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.1.raw.txt deleted file mode 100644 index 4b380edb65..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.1.raw.txt +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_one_vararray.nc.1 { - variables: - int t(1); - string t:_DAP4_Checksum_CRC32 = "0xb6a88010"; - - // global attributes: - string :_dap4.ce = "/t[1]"; - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -t = - {37} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.3.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.3.raw.txt deleted file mode 100644 index 7e65c1a454..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.3.raw.txt +++ /dev/null @@ -1,14 +0,0 @@ -netcdf test_one_vararray.nc.3 { - dimensions: - d2 = 2; - variables: - int t(d2); - string t:_DAP4_Checksum_CRC32 = "0x42dfb1d0"; - - // global attributes: - string :_dap4.ce = "/t[0:1]"; - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -t = - {17, 37} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.raw.txt deleted file mode 100644 index f76c579e38..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_one_vararray.nc.raw.txt +++ /dev/null @@ -1,13 +0,0 @@ -netcdf test_one_vararray { - dimensions: - d2 = 2; - variables: - int t(d2); - string t:_DAP4_Checksum_CRC32 = "0x42dfb1d0"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -t = - {17, 37} -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque.nc.raw.txt deleted file mode 100644 index 54dcb52c2b..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque.nc.raw.txt +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_opaque { - variables: - opaque vo1; - string vo1:_DAP4_Checksum_CRC32 = "0xd24ddadd"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vo1 = 0x0123456789abcdef; - -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque_array.nc.7.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque_array.nc.7.raw.txt deleted file mode 100644 index 10d45fe22b..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque_array.nc.7.raw.txt +++ /dev/null @@ -1,13 +0,0 @@ -netcdf test_opaque_array.nc.7 { - variables: - opaque vo2(1, 2); - string vo2:_DAP4_Checksum_CRC32 = "0xcca386bf"; - - // global attributes: - string :_dap4.ce = "/vo2[1][0:1]"; - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vo2 = 0xfedcba9876543210, - 0xfedcba9876543210; - -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque_array.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque_array.nc.raw.txt deleted file mode 100644 index 0f2053e984..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_opaque_array.nc.raw.txt +++ /dev/null @@ -1,16 +0,0 @@ -netcdf test_opaque_array { - dimensions: - d2 = 2; - variables: - opaque vo2(d2, d2); - string vo2:_DAP4_Checksum_CRC32 = "0x91581cda"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vo2 = 0x0123456789abcdef, - 0x0123456789abcdef, - 0x0123456789abcdef, - 0x0123456789abcdef; - -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_sequence_1.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_sequence_1.syn.raw.txt deleted file mode 100644 index 8fd1eb64bf..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_sequence_1.syn.raw.txt +++ /dev/null @@ -1,23 +0,0 @@ -netcdf test_sequence_1.syn { - variables: - - Sequence { - int i1; - short sh1; - } s(*); - string s:_DAP4_Checksum_CRC32 = "0x4ac0ac5e"; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: - s = - { - i1 = - {-920699049 - } - sh1 = - {896 - } - } s -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_array.nc.6.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_array.nc.6.raw.txt deleted file mode 100644 index 5ca77032b5..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_array.nc.6.raw.txt +++ /dev/null @@ -1,34 +0,0 @@ -netcdf test_struct_array.nc.6 { - variables: - - Structure { - int x; - string x:_CoordinateAxisType = "GeoX"; - int y; - string y:_CoordinateAxisType = "GeoY"; - } s(2, 2); - string s:_DAP4_Checksum_CRC32 = "0x324d0ea6"; - - - // global attributes: - string :_dap4.ce = "/s[0:2:3][0:1]"; - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -s = - { - x =1 - y =-1 - } s(0) - { - x =17 - y =37 - } s(1) - { - x =-4 - y =12 - } s(2) - { - x =-8 - y =8 - } s(3) -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_array.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_array.syn.raw.txt deleted file mode 100644 index 76531f1451..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_array.syn.raw.txt +++ /dev/null @@ -1,78 +0,0 @@ -netcdf test_struct_array.syn { - dimensions: - dx = 4; - dy = 3; - variables: - float z(dx); - string z:_DAP4_Checksum_CRC32 = "0xbef06d05"; - - float t(dy); - string t:_DAP4_Checksum_CRC32 = "0x165934f0"; - - - Structure { - int x; - string x:_CoordinateAxisType = "GeoX"; - int y; - string y:_CoordinateAxisType = "GeoY"; - } s(dx, dy); - string s:_DAP4_Checksum_CRC32 = "0xd91a250e"; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -z = - {0.72765326, 0.785633, 0.513679, 0.24684471} -t = - {0.738422, 0.21488869, 0.49479842} -s = - { - x =712320147 - y =1268468519 - } s(0) - { - x =696298400 - y =989876086 - } s(1) - { - x =-1927163883 - y =-900795134 - } s(2) - { - x =-708236713 - y =1377500019 - } s(3) - { - x =511843988 - y =1699265896 - } s(4) - { - x =-540214433 - y =-914532520 - } s(5) - { - x =-1344032615 - y =-871416961 - } s(6) - { - x =-1928735161 - y =935744880 - } s(7) - { - x =-1509955773 - y =-1707460853 - } s(8) - { - x =1145911788 - y =-415231529 - } s(9) - { - x =-278269626 - y =-1682978013 - } s(10) - { - x =-1629885665 - y =-909240754 - } s(11) -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_nested.hdf5.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_nested.hdf5.raw.txt deleted file mode 100644 index fdd4aa1aad..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_nested.hdf5.raw.txt +++ /dev/null @@ -1,39 +0,0 @@ -netcdf test_struct_nested.hdf5 { - variables: - - Structure { - - Structure { - int x; - string x:_CoordinateAxisType = "GeoX"; - int y; - string y:_CoordinateAxisType = "GeoY"; - } field1; - - - Structure { - int x; - int y; - } field2; - - } x; - string x:_DAP4_Checksum_CRC32 = "0xdfa7461b"; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: - x = - { - field1 = - { - x = 1 - y = -2 - } field1(0) - field2 = - { - x = 255 - y = 90 - } field2(0) - } x(0) -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_nested3.hdf5.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_nested3.hdf5.raw.txt deleted file mode 100644 index a165d7033e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_nested3.hdf5.raw.txt +++ /dev/null @@ -1,31 +0,0 @@ -netcdf test_struct_nested3.hdf5 { - variables: - - Structure { - - Structure { - - Structure { - int field1; - } field2; - - } field3; - - } x; - string x:_DAP4_Checksum_CRC32 = "0xc9e1efe6"; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: - x = - { - field3 = - { - field2 = - { - field1 = 17 - } field2(0) - } field3(0) - } x(0) -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_type.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_type.nc.raw.txt deleted file mode 100644 index 64832f765e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_struct_type.nc.raw.txt +++ /dev/null @@ -1,21 +0,0 @@ -netcdf test_struct_type { - variables: - - Structure { - int x; - string x:_CoordinateAxisType = "GeoX"; - int y; - string y:_CoordinateAxisType = "GeoY"; - } s; - string s:_DAP4_Checksum_CRC32 = "0xcf8f9871"; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: - s = - { - x = 1 - y = -2 - } s(0) -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_utf8.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_utf8.nc.raw.txt deleted file mode 100644 index e99cf54c4a..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestCDMClient/baseline/test_utf8.nc.raw.txt +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_utf8 { - dimensions: - d2 = 2; - variables: - string vs(d2); - string vs:_DAP4_Checksum_CRC32 = "0xfce3cd28"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vs = "Καλημέα", "Καλημέα" -} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_anon_dim.syn.2.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_anon_dim.syn.2.raw deleted file mode 100644 index 02521f8b96f53a8fcbd4d41bbfad7f38a59d3431..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 571 zcma)(!AiqG6h*7JD!6msVO*POnt-Jw4TY)*E(F`U5D8;5)PdwBWL`_FE(CwUuki=O zfAJ%HX_HV8K2b5>f~womgfCeCtXivq^<=3AHUHc`X$wwj@dj z#^?8lSx*R>tTa;;D6`UhCcuc{;8M`K!yl#|UHX@?zrlIufKG>Pnk?o{hnGUp(HrW7 z8T~*dT`nqzSX-)TfSBvMIjV9;NC8}HsyM?{M#d|WVfJn7M8S5KhI5f!;*~m-XPuto^~(k~9>mB6#r7)?--BQWug*$WBTl9t5Akml65^ z`VPK`0+p5f5e;P+@qB5fs@OaHR;Y`7O5^5NGd^or`ZgXZ( zLMWpIl*bEYxZkzizC>vhR&7>3kTKz?3{te?Uw-LQv-y z(CzD(8U09Wo^r7QT(O{(T@NwScR8w+MnK`3!L>$=RB#TVmcSVnDQOIe*#4zIl2NYM zWM1hn$YNpbinS;mUaT%ph84@&=TDb!xBkKV*Yx>i(5m^LXFIdk@2%GE(Z}8o>!ydH diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.nc.5.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.nc.5.raw deleted file mode 100644 index 64f2028ca32159d15ab7689a7997a624c710f0da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 917 zcmbu8&uZI15XK$cLI||CTzXQrryi=cT~my^iW6`RftChZy9Z;$)>;yQw5w>x!tPV_ z+(RMfkb@~DhxC#MsGcD2Q2GWP{aNAQh7_^~X=lIP-+ZH4J*d^+vfexltVG1xSJEL( zyFn}=r^@r?kwbZpSnDb z`NEb{va-wL(a2yUCitCIEo(9-^AEVD`IzlByMFq)$bcMvEJFWZLf-3ey2 zJYop%A;zv4fW8xOt7S$DlmWks_{mHdu(}VpKpF5ppyf|9Fl-l_(YB|8Sg?rjD;73x zb7|b-k6W7p-CW9{>OV diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.nc.8.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.nc.8.raw deleted file mode 100644 index 9c55a80646cc2c44265ddcdc86e5add9ff446bbc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 564 zcma)(!AiqG5Qbyvso*;-<5jZ_4W)#nrBDUIgP`q2B&^9&7m`WHPJ{L0+4u47yf|%> z5>dgx24?^L=bL}G@AM#?z2upwb!AO~5qRzpgvO*u4Xz_t-d|lzKv+_ks;odA!B$(C zO$XsZk+Paj2crE@<*bvo6e}unlf)f4=#5drlXE*;}58jjpUIFa+Q0gU}ckiNQ34<>U3`7=$H-iOLGpA=KK! zZ0ZIJMapVAb49yQ<*bvo6e%il6Gy75RPA95C$|z+u3FlVX{SY^HB!46hVK)8|ZyK z$EMA}v2Gz8e;C~wqD)6um>7jEZ^_e*|Hk>hLIT-*FQ@7_j@xrOPS?5r`ux}eSL&O^ diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.nc.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.nc.raw deleted file mode 100644 index 9a6e30757570a5619e2f88ebbafe3ac8c6f425a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2206 zcmb7FJ8#rL5Z=o}A%RdKYRi$J;x_ll5h7n6x+D@3F9~v#)}C!Hmh83ht^*e#(IG*F z=-@A)Af-SQp`=5&qCldj1@Q-9*7n}{?quh(mF@YyZyq}{oVvy3)(i}gjsxXL6L_N7wp_(TqoRf zZ9^wPKze0rs2P+={I>K~2X9%E8}v;gkc;+v+8Q$Ky zhe2*>jI;)ziHPfoJ8j!`Eh?&^Bng=nD1dzksZ~^*3#v*`wE$F;pjrW_E*HG&q!%tvoI++!m# ziOS|P?m)U@ltv*%I2ldidLg4_2f>(=)zc}XUT&O9$<(z{eA~Be#$Y!LF1p&!LBp9A zl#{Y2dM)j$gK)U(VAN6zHV1PPH)Ph7nHC(&No|m>G^BQ=G1Spnfy^Y~m?H&*TCFM- z!df*~;tb){s#1Q}@d$6!rM@|Vx`tDd)M)LKKnfTW2?&N{!=S-sNj{r^KUV!g<{D1q zr1)K*JPs`>?&XRP_GY1YA}7T~E2YwYV7nyf!6JioCVo$$+f?!Ja!YAr4hH)%Hf?bz zNGIenYJJysoVM6%}YXCb>NaNk9;J(8i2S@n%+YC8P4>iR94bH~zm zsA&@_1Bp9*sHQ`{`wLdfdem_GUj~OIgiijIrlx0RUzqrN2~DACG=nZ*di!P;A$UUY zj^HaofQ--IKkW;T#Q9a(tcf%Idh^5A`DdF~=6)O*=Tp?abTb>G@&j)yMzi C=T}q! diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.syn.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_array.syn.raw deleted file mode 100644 index 30138ab7b145acb7a31342279540360956ea6b51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2222 zcmb7FOK1~87>>2r2lzNB-pY1Vkb>Rj(KM}_#*j9lkXo@15yfSaUDJi#*>rcdn6^mK zqx4omDT1gVRYVVpAc$9M6+KwJ2ugeLqSrzz;!JiY*(4;5d)nRq`@a7%|Nl>;r|Fvz zxuU7uv}~A)j>5p(*#$TmrFBU`nJ^e1i=PMq&cqN&P}Pwf207UTk^WX;0Ags$cyBAm z9t1UF$Fhka#i_kD&uG7pR;DSjoJHgxqhQGYTdeiOWQyL}nOFVw~;cdGgh% zXJrypwo^AUJTm!#=oy~K9jPGo5l~&ke%qZeplC9p<>2g$BrmCeGDC9n0=_E9$3VUs zAU^~7Yk&d_6sQ5}W}xmOXb@SNY(QKLJ+11NB&Jnpnj!{Vik?_5OEMWkI0T$r==lkh z8`F`Aoup%`3=P0dL)9YiF5;wc(3MzAvq*C&TFNpD6k4n5lu=CLbfIa{c0lWC>c+*P zHLT8wm7!@dtD~bT*3Gh*Xl1K2PLp&iD8ZT(>ZCl0o|=r9Vi*-pLOWB+z4Y!#an;pZ z`?QA@(QEPWhr~2ulh9xS>AD0c zgR#k=k;7tqvkrbm^^2Jcye-GXN3w9rl9{+(RlK-2Yl_=)Oq{loBb_xA4H`MJ$jCaQ z_micC0bjb@99o5g;(pAVqL>sUWnmVz7*|wvf^Ip$*{iX-ZeAddWqXm$f_qW$1sC@A zu!n+WRWLfKiR9i2h)D%wRTc-4q(H<1$#;55O-p*K%HqovjP<*D_34-S25UpUvXvbNZEtxep1|NZu}ji-q(Eep-})w@6cym{WS zu^RcPfc1D{Ba+$vaWys)I{SOB!DBzOqfO3RCKb9gGI+Gr`3yjQ>KN)h*?pebN+Kf N%bw=lo5`1p{{VWVbmRa4 diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_types.nc.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_types.nc.raw deleted file mode 100644 index 97ddca1028198188bc7933ec86decbc65ffcbc63..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1897 zcmdT_&ui2`6i!7%t0L5k2ZeNc6T0cP>sm{;KiF-hU{$c~NeI(qYy*>-n3+@yLJOXR zBJ@uX#EU=9(tkm{h+Y)!pCEWuSl?tbo9Qm5UY)~|yzhPU-uv?2+vC=W&+g2_h}xSZ z5g}&{RIQ95n=qdTAzN>tmF0!eNn{I&S%4{Lq=B}GKr_>WZVO8+h&(%J>%(vaxFkY) zSn??JJ-HPVQDHtZyaF7r>S#5HW-Eoo8u85-dRvyHk=+c^Y^=#X@)z*=wq9sH}k&nVdv9PpOb` zo16)mGn zIQ5$5)Kz;JoB~NrXn}HUM7mdyGNfPy1=8HWi4NlzW|#m_Q3Ij?ZpHY1N;JR=Kxvzs z<0Oo5vIUb3^R3oi8a0q}c-r%Fvgw|a5N$1$`dV)xq;yryHnKYl;qT<^g3MQM1Kk1U zPH?&*I*X#y3R+SlbwPX%>+e5GzFS!?z6Tq-=G_RTq{N$NL5P`FF>C5Wd-afT-JR%~ za=A|aj|6HBSk~^&Yq~$vwk)e{?HugkS8aH1tFwLZ==xChRQznacYnXvuNMzm!(Y!W z&XV(&cQ1^#mVXVOnoZvA|D3(_=KJ&0aHBdKgi?O$0Z(Y~>BV0CWXEa^jLfe;dHLbT Tw=YW{k3D;O#@)6bza9DmPJ}?( diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_types.syn.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_atomic_types.syn.raw deleted file mode 100644 index 906759bc74655efacc98fb00f3cbc036f191f49f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1904 zcmdUw&ui2`6vtO8N-HfMiXaq>Q-9E6H_h(4-PYZPW!r_)+KRRHAQGn8w2dT_n3-AJ z9;EdT5UhBRf_U;$)UyS>7eT~>Sc)DL58^@m2h_=KCYkPH>ebwKzVDOw-ZyXF9!wm1 zpI2|$mQ*!7Y&xg_l;j|g45T|16D<|M+?Db`4oH|lRDqU*i~^_`7^tHi`7uZ!Hb`fO z#2*B0rV|4b4HCyTb&b?q11E6}0U@jc-Fcoa!_tY8?S+zGi6F5m5iWpbLfjEqX1|h- zYp|l+q~k5g2+L!|OEP<1ZwoZSg8m5{ZKTVOBWfESB+L-0(UWdDw4&)2#8@LhTJRfZ ztrfroA~_Inz72J@3WlBxanb_!}MI78z)A?9pnzh@4WMdIONpllJu|&!Ayp|-n{gLJ@!}}tF zuS)#azG!01?pXApQ(+HzSr|b+mHwy&Lsj)l4~BJ4Jg0)d&Xp_&6yH&Sh!iSHj7g_B zllF&6U?PQz5@WI%&Sd@Z5SU1zqExmVC}diUpt=%Kl}ITqLyxD?qhodhn2TJ%kuc-J zo7CWf6A8Yz!LjR^HuP%jX0!Y4?>%Z4fV}s%2kq2vcagAc3zYEJYGu>1=KZ@3q{c${ zJ6wN3J(h0+J^|uRki!&>MbQ`qZmCc@Hgt!rzyGNCu(QB?jcx3VHf0iG8QM6im=JLn z>qEU~ukJA}+=+S7uDl%lB{8=SBogZ*YPPF;`{9GF!PT~|-PtdS>gGNxABWpts@?Cl z=6W`7ua&;0&Q5Mj-akeA(XZ?GE+l5EeXE;~ZzR&|Z%=lr;P}^Irz?0or?_e6RNZmiHMAcJ0?cw9v~7V0%1&rjEfBjQ*`Mk>% zXS`7`A|;nkzhY-vSt!Yw$vm?)GH68}0ew2%N1MBK zl*>5GaVs-h>mIgtPbFx(=INxBxW{oD$Z0E*i>wcE)=JETF%6N?W@KIEd?VtV>!AI% z?}W9uT0a+kRL|g3CxUJ&%TT38B+M)^kQmE+OS2>(^mj?vy;X=S<8G8`Em7pVn4q#=7b|_-)nRxm03;8uR4kaPj663s>X&xC4Zf@B S)AApLf?J)=?)K-$p8pNA0c;=u diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_enum_2.nc.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_enum_2.nc.raw deleted file mode 100644 index d38f5337ffd848e4b1c6f5b9ddb4f5f9df5bedab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1294 zcma)6%Wm5+5VVW>VzmDtFz1@F>n2VhIWU~0D9{uE(&Q@865$Y_NP%1i@lW(0`lnqz z!$^Q!oh0oJXJ$34kE6*ryn4-K@WPE1T18|&J0$^EiB5&uN96JM?Uxk^EHITasTGgN zfm?F5o`%;9nC0+!8Z?(;8Ph!u7 z$Gde>(0G`ygP3indpX#>k)Uly)3-syFSOf(oDD(>lCFvKLBv)V(<50OhjdvkjzYY- z&WFGDov;>{>+M4?S`Q)hBG{yI17O6?0k4x4W8jzZPXQo#e4|pq6bY(SKK5eyROGKo zVH>HCwue@+48I%g@|xhe7wo!_8<8<{zGwd(jd#>TiXVrK(2s r@B!r^?_4zV^ERq%>UyeP76WZ2NlTab6w>_dgyht|GQOn%(3)Fs!N~k+#UB*-;GinUoM=Hkwrl93*s}+M*SdykI`8I+Qw5V)~ ze>zt#2!X#ymkc^8BW>=8vShRRLg2U;1JVLO|3zHZa>+Gx&J1-h4OAP-g|3P$7u4F! zVYKtE_a!*}pxhicJU@d2cdeCm4Rb9RH5lDfQ33oClVvxoA-0kg44BJZWjo4rl=9U< zp8>Pr{lN%iCYT`_IS~=&O<_i2!^R_LRA_rso6syA(nnuE16=_4`~?64VTFBUl2f_ zkH@7-R?Zo|s~l?%&ThC6w?3;F)dBzasfV~9ux+|qM`6ZECs7B#w$^&;img7ZY8>UA zI>g(LC~Uc>NP3g_K3&Wf@sIY7l7aR>4&ID7`^cRWEW1_(r>gb69c*?_xZBE}NJ5$y R5gI<5OrAYC`}6+y`Cq>jm6rej diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_enum_array.nc.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_enum_array.nc.raw deleted file mode 100644 index 60a17c75246cb0254208ebbf3927302b80e03499..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1310 zcma)6O>fgc5Oon8sMP;pEoZV#Ng-5rt0-xuN(CW7d$l(9s;smh*6z3>y>RFM@c)>N zz3w(v9dfhgy?yg$-sE-i<|w=PrDXcRtrJG)WI8z}Dc7Z`guc(o?T@SXbCNn>x?<93 zo|6rCN865Yhr4S9n}+K@2PflwfIKyxpxE78G`186$hf&UQ2R$1_FC-YZ)03a<%cj4g-2vs} zD8-BHn)o!zSPE+gBJ=%}U6s#!DbZY~_$Q;=nWJI7F#B1k1Au!%9M!rwIQjJq0=<(0UQA@b^s zIjg%CkDL`vs#$Bff?_^>_sRzdqIKxZ>_HIV<;$z?NZjzMqdjqW8zI Om(J(*wPjdu!>1onCZ^{A diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_groups1.nc.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_groups1.nc.raw deleted file mode 100644 index fc6a4a66d70ee332ed888399ee93a3b114ce090b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmd6mzf0sm6vxL?IZ#A6><%H!6(YDhx4ViWS#@<)4lFGE)va@8j04FeB(sYi{sDr2 zfR?uQ7GkG1f`7raT6o13+6i)SZ)TId*>%Ay9e9Dvd++mQ*;@3j{0TJr?8XsUEvbC5@Tv>#@=$s1JF`Vp(yc zpc=-xtk}XvfkVT!bkHaaGE;ukNGT6S3jB$$-NM|R=){3fs;lB%3h;hm030Q1l%C10otS?nrtj8gvkK6NuiC)eCo2$aH)rx zB0Hvt&bARMq(b9OLb@D|QphKcYPnXmR52+anq7)aCDpQt7BP6}-32e8hIalfZC9!1 zUppj;kfCoA&A{9-q43sG?e4(4fKq66s>#78Oo6+ED=f`7pbq^lEdLAraSO-Fz zKku$@H@xnn!_39@`0m)B%je(gBSV9O2+foby17E=aeprJ(EkA;)CtiI@e!gI;^pM* a6rppd`vq|f@eFYQF))kJa_Q6k)9_#K&LQsr diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_one_var.nc.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_one_var.nc.raw deleted file mode 100644 index 8b29a0bd17c59a68418c251e6712dd9b89ad1063..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcma)2y=ucS5LTc=2z2Nhi0fRdKN&)h69Q?W(4j+;RVcAY1@>837t_2&U#pMNrE6cI z=hhB}F4Z8AzWaXeI}?L9J%257S-UFw5>vQIu0cB7m6^wV3hULw)dXZDiZL0d3RE|TF%Q`;)R9rOk=8#bNMn2q{SQJtVBLl5G77*lv53R9){ zm6XA8oRE~&USU+r#j|3$%Ri(k5B-Zc`?b@LNO!lg-2+tjy&$Um_CT(M3_Fg^lPAiZ zxyQ^~1WCuh+pk$-0xhvAMsI9>aI$W0u9roB3e)N&%3Z3qOy&)Q7+we=KEFQRzXAVT Bbt)YGtf0A>^KW!I^@jOf_U7Up?NOPdT$FA(eRvD&&o_ zd@-K{kwj?~9!*$(Ko*3fvKSLHuBDO2$i{_)k65X!*1elgZeyr01Jo`uf@n#wA%8`z zWMouL_#{xvxNu?ubiuP#{^hIidIV-V?rS^Z8SJuZ5> z*z)^oiD>l82302zle_OGiZg5~8hjuavR|renQs)U+dJd}pS))h-@a-f2Dz>=)V(~# q_TxK^n5+02QZ1o(TG3w9zm3`iyC#9?zLoOqInLpk<2c73pI_g+ESZA< diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_one_vararray.nc.3.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_one_vararray.nc.3.raw deleted file mode 100644 index 42ed5d734703ac0b80c211d8b225048e631219ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 599 zcma)3!AiqG5RKxg=)pf&Ry>+*Vh*JwE!8Lp9t3SKB4KTox{yr5?lc(x%0KZB{1qo{ z5-KVf*uc(vZ{Ez?184s-oWAB6tCX?2fQWnUkTV6#BGs^p`26AeY{Z#G38~BqP!X?{ z<aUj&uWf z?zaTwZM6xak+*e0%3dHgicUU5H2Qgss--40WZ*6pXIPiybWbp>zV%(mY^_+;{39;# zaX9v#sQo7XQ1lJkLVxcJD4!s?)rgr&t{~MCI>^ROT Josaj=i!WV(rKJD> diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_one_vararray.nc.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_one_vararray.nc.raw deleted file mode 100644 index 15ca928b3d1967bff89018d4abc90e5fa6bcbe65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 502 zcma)3%}T>S5Z;2Pq6gn#S@CFAV-KYyEtMz;J$SIaE^D*Yg=7+Tr@{DEzKL%j_#{r+ zBt*QpunRli_susyCv5Z`E#C5sSH^i;KrC*8Yrzd{i`2p{7VGDStEu1~HKaN#z{H|9 zUM%M0DAB0B!Lu>%4(Ob4G#(W(Ri&MFPS*i!#ekLSa?`m@$ZZJau7{dJ1`rhqJ{GTt znboOPBrll$>f1*|vF*E8OQma95tV=RolW_XWVWYFX j;Z^g}!pP#Vf=KpBX*;rA4;hXaJ3VKNUDEyh_`3T6a#@O5 diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_opaque.nc.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_opaque.nc.raw deleted file mode 100644 index 983427b98695498518a0017a43b933d5db437d61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 430 zcma)&!AiqG5QY=*AO&wez%o6Xwa`N;NlT#>1Vsc=a`W7B3zJ zpTSpf(j+C|#XT%6-~RLe^PhPBTR49ya#88hWdS6-Ik-|jf z26Y5`?O;9|giA%rX*wH-?w~4|lXesvtDbi{z%BH6qU@&g8M99x73C4t5qgN@p^M;& z$WEo?S75B>G&V40D$&X1;$HH&;UCeIKmAKMYwW_iLu%3NQJE3Qjx31E>~TlBg)y6s z7ysn;BT PxJqB&KYqTyZa;qktIv7} diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_opaque_array.nc.7.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_opaque_array.nc.7.raw deleted file mode 100644 index a7cfeb0f0c8e7f27669bd22ba154f89dce3ee060..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 618 zcma)3O-chX6duKe6aQ-LBY10Qij+GH87Kmlh?s|0MDRnZ{fxZ zcm&TPzUllhqJnP`c=_J@ev&Vs#-AGG^gBBkP5LUuLi&UjWj5tUOfl0*OS_UFb#m3c3+L#JOGON_OsMdtyw1#pc z4G2wY>(g6+q|X?3u1O?%N?en!n6_*@x?)Io^kb=yL;qSF6mtA>>zx#7GSi_YkjLa> z6%(r-FsDb^??9&pI4ig+<`F=uZq^`6@&K)M-KC@iHVIN*Bdk~7^kyPjOOoZMPZ_$I zdy9Fy?=4Vd`|_OCtmQ@BS1R~4-QYq2L^3$lp%S_hoStjw{jHZr{3*g&`SloU$8nDL WouWQJUZ1i_=djT~=k@mZ^8N*CTCMZ| diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_opaque_array.nc.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_opaque_array.nc.raw deleted file mode 100644 index 10aa455370590cd54f608cf44ec19b01807cf6ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 589 zcma)3O-jQ+6i&s36a)|8VwkSYXy~Gpq@|Dwf}o4GxC>)5)PZCsW?qB!1}@#{8N7ja z@B-o;yn*=gGbJL3Z!yfr_ulutpIv9CiQuEZUpRii4Db5~zrTboMr zEmbzsqOeJ20(t|G4H-k^>P%oynXB^^Q-+0;ONMg2UqwSq`d8tow(~=o3RP}{)C0vH zE7p92$tbi(8=~Arsn9SCi*3yxl+S8Ct3Cn9<@FjwBNO3t{pef*BqExs zSaL-PY%=U=ex_jX!+pV%wID_L;yuy6x{%MdqIf*kTn`O9juY-Vb#!{u)x*o%r^WcK W2#dcyUZ0AYchJJmWxO9=J$?fY_@M#- diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_sequence_1.syn.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_sequence_1.syn.raw deleted file mode 100644 index 6b83150005f083d141feb991f99ef16455386a54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 506 zcma)3!AiqG5KYlj!HYlOvYyQvEmBI-P^g09LD1HlVKqa$kW6BBQq0W{@*}+Z7k-M9 zHmOlB4(!76X5M?VZ`bL4`r%8Oh!qspWEe=#J(dFSDT@s*0y(?8I2uY}Nn@;&3?Yye zSQ(D{{#28;Kzn`B7V4C70!xvF=aN|<@?2Y?>@>wXpSNNI7VAQ3v4v_M9f&=m4djw2 zA1TEzH_L%7adu z@2s6#euKVhDO-sNQDGiSf~GrS_k-x#5G4?uV{9}^K~>JbIb+4)4-0dhlpt31&2h1X fbpXEFl5#ex35NxHjH%DN z01x3wMDVpuO063QX5jI?@8``cT7@s(ybl91l!;N1c4@`lr9|r6$XB}W((cvqPK^=+ zLi-|!v~=l68rp1>cw2xl63Qi#A1y+}K^pLkyh~9H&YqnX@>{y)qfz0!Y+N3Nn-NaImU(rT_xz9cf<) zO$m%*l<8uW+OKRq5u}m~CogUiU8b=)n~UPwShhDbELfIEnK}Rf diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_struct_array.nc.6.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_struct_array.nc.6.raw deleted file mode 100644 index f551cc102076e8e5ab81df60311debbdee7849c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 678 zcma)4(MrQG6s_We3>Ex?5cSb!>-I28x-po7pdje>BBR7M%tD)%p{Tqm$>`>pmq0gbGERD(TTe z8af=b_*j525>8vB8cHO{gEZh9(0Ks9&{`C>3TWe2D6(m#)mFSvU8);BzQW=lF z0c0*?xU;o%~Kg*D0AL zW&5aNml{V2G0_U!ky9@3mueD&ky{#d`H9 zGcRq|al12w&I~PVUX8OlZ+TGf%L;vLYtO%r0AlIis4x<$lAK^C`ui0-zlv~H{x(?H cfn{Cdw7zhhBVOVB#P1Wt55!}{_p=A*8y-WwmjD0& diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_struct_array.syn.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_struct_array.syn.raw deleted file mode 100644 index 06ce49201d7ab51e3591de55b25c5129bbf70e01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 938 zcmZQ!V3xA6ugJ|&C`&CW&dkrVRWj5wP*Ov(?Vo_0IrCwgL5|XNv z#DXxGZ6-k5kfm~q;8GxmAV~oonOAJ9lu=SrV5P4QV30Lz5Ly5m6fLAlBKqWag&kfkHz8;-QoZU;t!R0lj9Tq>ockB}|bqLXlfeeqxES z5!9S2C8%alc!6wzit7U{fSaoi)dRB!)rb@33m+I=vI6q~G4s-^Bd+k3(4 z2F)^m25Zp^ioHx<{Z55zoxEE7TPkRZT$5bJUXRrH-)HVegx8*&x#98pdTahO?$mnLMZtkao^Xg9o}M44qKwOL1W{xZ8BP~t!sDU!^n zi0+l6<57oC1qi3$yhG|`M2a{l2eAWNEFm`dRx;ek)gAQ$rN|dGVIK*7D76h#YVjb{ zX^ade>L&z1bbDst#)M~_I^Y71Ry zmB_9iQiVMjxa~Csm{*|%@2L-S*6@2tzti^qleR5{PXMfbE1;fCj6?6oj~XCR@x75+ z7)oHDqY>sffPpWMFGNx(vMo<^8unayhqIl+u|uedK~AD=(8 CpS5c4IIF!Ha=zw5f3hDhVLlD@Z-n|tOsrN~!J;t&&EDK)KB!Z;Fw zY8$d0KtARiS6-GYBn!XGt^o@0PSMGsoW xLNf}-9B*%lBqJ9wSc#-ibYH%4JP@n8@PM~PaTa(z3Bos30yP-m=@aTGeTWkexWh4C?hK~SuVbqAX;Y$#>6ml_`fi9MnV;DxA| zNy$GyFAQ5M{M>FNI=NcjOD=c%D{00-|4N)6aOz=iy|hLg`f<=IO`GZ#>FTmob|C+f zs$NpEFW3>5L^gRYsUw7JeiGg#M5zg{F-|msXhz5LXWsOOfwfLcBeu=U+hWXq{z~>m Xc{Q@#4FgA>cg)xOs_Xjo{q5r$LY$5V diff --git a/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_utf8.nc.raw b/dap4/d4tests/src/test/data/resources/TestCDMClient/testinput/test_utf8.nc.raw deleted file mode 100644 index b1518cf6b8a9bfdf99a74b0313a38397754a0cf3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 522 zcma)3%}T>S5KhrkL7!n+5xkhy(nBaoOQ8ya2SM9w*d}WYB$JSx6zik-4jy{)P+!4) z15dt&2Pfu-h!^Luu=CCLee<(#^*-FmV-mBq%5{{2$ItCE&J+Y`7{SWp^SjGahck^5 zLK&x^JibwyPsV+BCQ)jI2YuEA$b@iI8vO$A9UB7PK|`4>8kZrtbfF|~p|XJvM9qQr z_yb}#5`unqnknifv(tPfK#SS*Mv&amAJT}5{zV*DcJ3@n6qH+F)ga-329KU-qyZOA z(Jkh*n7U%Ed7Up;Pzuz5AZ|+$6{k^{B1tR@RCTRS6Ab<92r*Xv1%#0V&Tx~F@B9kT z`DL+?aiQ3{eCbx?@w0tbw4!tvQD24(dzN*4XjNgJ&DQM9t9dgoX1iBs - - - - - - - - -/vu32[0] = -1169720286 -/vu32[1] = -920699049 -/vu32[2] = -2088732436 -/vu32[3] = 1060190036 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_anon_dim.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_anon_dim.syn.raw.txt deleted file mode 100644 index f6dd09784a..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_anon_dim.syn.raw.txt +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - -/vu32[0] = -1169720286 -/vu32[1] = -920699049 -/vu32[2] = -2088732436 -/vu32[3] = 1060190036 -/vu32[4] = -1123468835 -/vu32[5] = 922940053 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.5.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.5.raw.txt deleted file mode 100644 index b4d1d6ce75..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.5.raw.txt +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -/vu8[0,0] = 3 -/vu8[0,1] = 5 -/vd[0] = 1024.800000 -/vs[0,0] = "Καλημέα" -/vo[0,0] = 0xABCDEF0000000000 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.8.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.8.raw.txt deleted file mode 100644 index 447e729347..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.8.raw.txt +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - -/v16[0] = 1 -/v16[1] = 2 -/v16[2] = 4 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.9.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.9.raw.txt deleted file mode 100644 index 769a4618ee..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.9.raw.txt +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - -/v16[0] = 4 -/v16[1] = 1 -/v16[2] = 2 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.raw.txt deleted file mode 100644 index 2e2bea3dd0..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.nc.raw.txt +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/vu8[0,0] = 255 -/vu8[0,1] = 1 -/vu8[0,2] = 2 -/vu8[1,0] = 3 -/vu8[1,1] = 4 -/vu8[1,2] = 5 -/v16[0] = 1 -/v16[1] = 2 -/v16[2] = 3 -/v16[3] = 4 -/vu32[0,0] = 5 -/vu32[0,1] = 4 -/vu32[0,2] = 3 -/vu32[1,0] = 2 -/vu32[1,1] = 1 -/vu32[1,2] = 0 -/vd[0] = 17.900000 -/vd[1] = 1024.800000 -/vc[0] = '@' -/vc[1] = '&' -/vs[0,0] = "hello\tworld" -/vs[0,1] = "\r\n" -/vs[1,0] = "Καλημέα" -/vs[1,1] = "abc" -/vo[0,0] = 0x0123456789ABCDEF -/vo[0,1] = 0xABCDEF0000000000 -/primary_cloud[0] = Clear -/primary_cloud[1] = Stratus -/primary_cloud[2] = Clear -/primary_cloud[3] = Cumulonimbus -/primary_cloud[4] = Missing - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.syn.raw.txt deleted file mode 100644 index 04ad7521e5..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_array.syn.raw.txt +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/vu8[0,0] = 186 -/vu8[0,1] = 201 -/vu8[0,2] = 131 -/vu8[1,0] = 63 -/vu8[1,1] = 189 -/vu8[1,2] = 55 -/v16[0] = -341 -/v16[1] = -21899 -/v16[2] = -13413 -/v16[3] = -22144 -/vu32[0,0] = 2367803413 -/vu32[0,1] = 3586730583 -/vu32[0,2] = 511843988 -/vu32[1,0] = 3754752863 -/vu32[1,1] = 2950934681 -/vu32[1,2] = 2366232135 -/vd[0] = 0.217870 -/vd[1] = 0.602451 -/vc[0] = 'C' -/vc[1] = 'O' -/vs[0,0] = "{S" -/vs[0,1] = "gb8^OE$" -/vs[1,0] = "4a/q%n9;5Y" -/vs[1,1] = "{fIl?T"\A[" -/vo[0,0] = 0xA2177AA7287C04FA8BB57BCDF76EC80F -/vo[0,1] = 0x34FA472AA9404DD543143CADED303A75 -/primary_cloud[0] = Stratus -/primary_cloud[1] = Cirrocumulus -/primary_cloud[2] = Nimbostratus -/primary_cloud[3] = Cirrostratus -/primary_cloud[4] = Stratocumulus - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_types.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_types.nc.raw.txt deleted file mode 100644 index cff7ae5f4d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_types.nc.raw.txt +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/v8 = -128 -/vu8 = 255 -/v16 = -32768 -/vu16 = 65535 -/v32 = 2147483647 -/vu32 = 4294967295 -/v64 = 9223372036854775807 -/vu64 = 18446744073709551615 -/vf = 3.141593 -/vd = 3.141593 -/vc = '@' -/vs = "hello\tworld" -/vo = 0x0123456789ABCDEF -/primary_cloud = Stratus -/secondary_cloud = Missing - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_types.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_types.syn.raw.txt deleted file mode 100644 index 6a7adb4fd4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_atomic_types.syn.raw.txt +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/v8 = 58 -/vu8 = 201 -/v16 = 896 -/vu16 = 16177 -/v32 = -1123468835 -/vu32 = 2125143125 -/v64 = 3059391736915381031 -/vu64 = 11577488182652895291 -/vf = 0.551297 -/vd = 0.790267 -/vc = '*' -/vs = "O,L?c8A%V" -/vo = 0x46F169EF23CBAF9B1FEBD99E4E16CEC9 -/primary_cloud = Altocumulus -/secondary_cloud = Stratocumulus - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum.nc.raw.txt deleted file mode 100644 index 8c8ce9ebb4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum.nc.raw.txt +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -/primary_cloud = Stratus - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_2.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_2.nc.raw.txt deleted file mode 100644 index f0402352be..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_2.nc.raw.txt +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -/h/primary_cloud = Stratus - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_array.nc.4.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_array.nc.4.raw.txt deleted file mode 100644 index 0217409df8..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_array.nc.4.raw.txt +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -/primary_cloud[0] = Stratus -/primary_cloud[1] = Cumulonimbus - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_array.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_array.nc.raw.txt deleted file mode 100644 index c23486baff..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_enum_array.nc.raw.txt +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -/primary_cloud[0] = Clear -/primary_cloud[1] = Stratus -/primary_cloud[2] = Clear -/primary_cloud[3] = Cumulonimbus -/primary_cloud[4] = Missing - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_fill.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_fill.nc.raw.txt deleted file mode 100644 index dd457986b4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_fill.nc.raw.txt +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - -/uv8 = 240 -/v16 = 32700 -/uv32 = 111000 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_groups1.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_groups1.nc.raw.txt deleted file mode 100644 index 431c26d8ea..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_groups1.nc.raw.txt +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -/g/h/v1[0] = -876354855 -/g/h/v1[1] = -1761252264 -/g/h/v1[2] = 1723477387 -/g/h/v1[3] = -46827465 -/g/h/v1[4] = 1475147969 -/g/h/v2[0] = 12.000000 -/g/h/v2[1] = -100.000000 -/g/h/v2[2] = 9969209968386869000000000000000000000.000000 -/g/i/v1[0] = 2 -/g/i/v1[1] = 3 -/g/i/v1[2] = 5 -/g/i/v1[3] = 7 -/g/i/v1[4] = 11 -/g/i/v3[0] = 23.000000 -/g/i/v3[1] = 29.000000 -/g/i/v3[2] = 19.000000 -/g/i/v3[3] = 31.000000 -/g/i/v3[4] = 17.000000 -/g/i/v3[5] = 37.000000 -/g/i/v3[6] = 13.000000 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_var.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_var.nc.raw.txt deleted file mode 100644 index c74172bddb..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_var.nc.raw.txt +++ /dev/null @@ -1,10 +0,0 @@ - - - -/t = 17 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.1.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.1.raw.txt deleted file mode 100644 index 18bedc8d51..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.1.raw.txt +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - -/t[0] = 37 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.3.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.3.raw.txt deleted file mode 100644 index 495c199edf..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.3.raw.txt +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - -/t[0] = 17 -/t[1] = 37 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.raw.txt deleted file mode 100644 index 1d2f858e48..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_one_vararray.nc.raw.txt +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - -/t[0] = 17 -/t[1] = 37 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque.nc.raw.txt deleted file mode 100644 index a0dbfd2e55..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque.nc.raw.txt +++ /dev/null @@ -1,10 +0,0 @@ - - - -/vo1 = 0x0123456789ABCDEF - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque_array.nc.7.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque_array.nc.7.raw.txt deleted file mode 100644 index 157a621f2a..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque_array.nc.7.raw.txt +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - -/vo2[0,0] = 0xFEDCBA9876543210 -/vo2[0,1] = 0xFEDCBA9999999999 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque_array.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque_array.nc.raw.txt deleted file mode 100644 index 91da77c407..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_opaque_array.nc.raw.txt +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - -/vo2[0,0] = 0x0123456789ABCDEF -/vo2[0,1] = 0xABCDEF0000000000 -/vo2[1,0] = 0xFEDCBA9876543210 -/vo2[1,1] = 0xFEDCBA9999999999 - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_sequence_1.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_sequence_1.syn.raw.txt deleted file mode 100644 index 0e347626ef..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_sequence_1.syn.raw.txt +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - -/s = { - [ - /s.i1 = -920699049 - /s.sh1 = 896 - ]} - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_sequence_2.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_sequence_2.syn.raw.txt deleted file mode 100644 index bc5c5110e6..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_sequence_2.syn.raw.txt +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - -/s[0] = { - [ - /s.i1 = -920699049 - /s.sh1 = 896 - ]} -/s[1] = { - [ - /s.i1 = -1123468835 - /s.sh1 = -18686 - ] [ - /s.i1 = 2125143125 - /s.sh1 = -21899 - ] [ - /s.i1 = 1268468519 - /s.sh1 = -22144 - ] [ - /s.i1 = 989876086 - /s.sh1 = 3361 - ]} - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_array.nc.6.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_array.nc.6.raw.txt deleted file mode 100644 index e142a33713..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_array.nc.6.raw.txt +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - -/s[0,0] = { - /s.x = 1 - /s.y = -1 -} -/s[0,1] = { - /s.x = 17 - /s.y = 37 -} -/s[1,0] = { - /s.x = -4 - /s.y = 12 -} -/s[1,1] = { - /s.x = -8 - /s.y = 8 -} - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_array.syn.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_array.syn.raw.txt deleted file mode 100644 index 0b856f51d9..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_array.syn.raw.txt +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - -/z[0] = 0.727653 -/z[1] = 0.785633 -/z[2] = 0.513679 -/z[3] = 0.246845 -/t[0] = 0.738422 -/t[1] = 0.214889 -/t[2] = 0.494798 -/s[0,0] = { - /s.x = 712320147 - /s.y = 1268468519 -} -/s[0,1] = { - /s.x = 696298400 - /s.y = 989876086 -} -/s[0,2] = { - /s.x = -1927163883 - /s.y = -900795134 -} -/s[1,0] = { - /s.x = -708236713 - /s.y = 1377500019 -} -/s[1,1] = { - /s.x = 511843988 - /s.y = 1699265896 -} -/s[1,2] = { - /s.x = -540214433 - /s.y = -914532520 -} -/s[2,0] = { - /s.x = -1344032615 - /s.y = -871416961 -} -/s[2,1] = { - /s.x = -1928735161 - /s.y = 935744880 -} -/s[2,2] = { - /s.x = -1509955773 - /s.y = -1707460853 -} -/s[3,0] = { - /s.x = 1145911788 - /s.y = -415231529 -} -/s[3,1] = { - /s.x = -278269626 - /s.y = -1682978013 -} -/s[3,2] = { - /s.x = -1629885665 - /s.y = -909240754 -} - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_nested.hdf5.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_nested.hdf5.raw.txt deleted file mode 100644 index 57c8557ac2..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_nested.hdf5.raw.txt +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - -/x = { - /x.field1 = { - /x.field1.x = 1 - /x.field1.y = -2 - } - /x.field2 = { - /x.field2.x = 255 - /x.field2.y = 90 - } -} - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_nested3.hdf5.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_nested3.hdf5.raw.txt deleted file mode 100644 index ed42456ce6..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_nested3.hdf5.raw.txt +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - -/x = { - /x.field3 = { - /x.field3.field2 = { - /x.field3.field2.field1 = 17 - } - } -} - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_type.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_type.nc.raw.txt deleted file mode 100644 index f15f61d6b3..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_struct_type.nc.raw.txt +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - -/s = { - /s.x = 1 - /s.y = -2 -} - diff --git a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_utf8.nc.raw.txt b/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_utf8.nc.raw.txt deleted file mode 100644 index 4df9309d37..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSP/baseline/test_utf8.nc.raw.txt +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - -/vs[0] = "Καλημέα" -/vs[1] = "abc" - diff --git a/dap4/d4tests/src/test/data/resources/TestDSR/baseline/test1.dsr b/dap4/d4tests/src/test/data/resources/TestDSR/baseline/test1.dsr deleted file mode 100644 index 125939c27c..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestDSR/baseline/test1.dsr +++ /dev/null @@ -1,29 +0,0 @@ - - - 4.0 - TDS-4 - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.1.dap b/dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.1.dap deleted file mode 100644 index f36a08093f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.1.dap +++ /dev/null @@ -1,3 +0,0 @@ -count=5 - -1169720286 18719 -2088732436 -16591 -1123468835 -18686 2125143125 -21899 1268468519 -22144 - checksum = 4aad97d4 diff --git a/dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.1.dmr b/dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.1.dmr deleted file mode 100644 index 29109a2c04..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.1.dmr +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.2.dap b/dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.2.dap deleted file mode 100644 index 7d7d18b90f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestFilters/baseline/test_sequence_1.syn.2.dap +++ /dev/null @@ -1,3 +0,0 @@ -count=3 - -1169720286 18719 -2088732436 -16591 -1123468835 -18686 - checksum = 6a9c6608 diff --git a/dap4/d4tests/src/test/data/resources/TestFrontPage/baseline/test_frontpage.html b/dap4/d4tests/src/test/data/resources/TestFrontPage/baseline/test_frontpage.html deleted file mode 100644 index 51e228d2dd..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestFrontPage/baseline/test_frontpage.html +++ /dev/null @@ -1,296 +0,0 @@ - - -DAP4 Test Files - - - -

DAP4 Test Files

-

http://remotetest.unidata.ucar.edu/d4ts/{testfiles}

-
-

netCDF Based Test Files

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
test_atomic_array.nc: DMR.XML DAP DSR.XML
test_atomic_types.nc: DMR.XML DAP DSR.XML
test_enum.nc: DMR.XML DAP DSR.XML
test_enum1.nc: DMR.XML DAP DSR.XML
test_enum_2.nc: DMR.XML DAP DSR.XML
test_enum_array.nc: DMR.XML DAP DSR.XML
test_fill.nc: DMR.XML DAP DSR.XML
test_groups1.nc: DMR.XML DAP DSR.XML
test_misc1.nc: DMR.XML DAP DSR.XML
test_one_var.nc: DMR.XML DAP DSR.XML
test_one_vararray.nc: DMR.XML DAP DSR.XML
test_opaque.nc: DMR.XML DAP DSR.XML
test_opaque_array.nc: DMR.XML DAP DSR.XML
test_struct1.nc: DMR.XML DAP DSR.XML
test_struct_array.nc: DMR.XML DAP DSR.XML
test_struct_nested.nc: DMR.XML DAP DSR.XML
test_struct_nested3.nc: DMR.XML DAP DSR.XML
test_struct_type.nc: DMR.XML DAP DSR.XML
test_test.nc: DMR.XML DAP DSR.XML
test_unlim.nc: DMR.XML DAP DSR.XML
test_unlim1.nc: DMR.XML DAP DSR.XML
test_utf8.nc: DMR.XML DAP DSR.XML
test_vlen1.nc: DMR.XML DAP DSR.XML
test_vlen10.nc: DMR.XML DAP DSR.XML
test_vlen11.nc: DMR.XML DAP DSR.XML
test_vlen2.nc: DMR.XML DAP DSR.XML
test_vlen3.nc: DMR.XML DAP DSR.XML
test_vlen4.nc: DMR.XML DAP DSR.XML
test_vlen5.nc: DMR.XML DAP DSR.XML
test_vlen6.nc: DMR.XML DAP DSR.XML
test_vlen7.nc: DMR.XML DAP DSR.XML
test_vlen8.nc: DMR.XML DAP DSR.XML
test_vlen9.nc: DMR.XML DAP DSR.XML
test_zerodim.nc: DMR.XML DAP DSR.XML
tst_fills.nc: DMR.XML DAP DSR.XML
-

HDF5 Based Test Files

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
test_struct_nested.hdf5: DMR.XML DAP DSR.XML
test_struct_nested3.hdf5: DMR.XML DAP DSR.XML
test_vlen3.hdf5: DMR.XML DAP DSR.XML
test_vlen4.hdf5: DMR.XML DAP DSR.XML
test_vlen5.hdf5: DMR.XML DAP DSR.XML
-

Synthetic Based Test Files

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
test_anon_dim.syn: DMR.XML DAP DSR.XML
test_atomic_array.syn: DMR.XML DAP DSR.XML
test_atomic_types.syn: DMR.XML DAP DSR.XML
test_sequence_1.syn: DMR.XML DAP DSR.XML
test_sequence_2.syn: DMR.XML DAP DSR.XML
test_struct_array.syn: DMR.XML DAP DSR.XML
-
- diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_0.1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_0.1.xml deleted file mode 100644 index 24f33b55bd..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_0.1.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - 1 - 2 - 3 - - - - some_large_hex_value - - - red - green - blue - - - 98.6 - - - barf - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_0.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_0.xml deleted file mode 100644 index e3d90ac6e0..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_0.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - 1 - 2 - 3 - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_1.xml deleted file mode 100644 index eb2ba2bd26..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_1.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_2.1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_2.1.xml deleted file mode 100644 index 14d9b2b378..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_2.1.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_2.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_2.xml deleted file mode 100644 index de25771186..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.1.xml deleted file mode 100644 index e2912f2f3c..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.1.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - 1 - 2 - 3 - - - - some_large_hex_value - - - red - green - blue - - - 98.6 - - - barf - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.2.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.2.xml deleted file mode 100644 index e4bd6ea48c..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.2.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.3.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.3.xml deleted file mode 100644 index b2e99a4064..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.3.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - 1 - 2 - 3 - - - - some_large_hex_value - - - red - green - blue - - - 98.6 - - - barf - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.4.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.4.xml deleted file mode 100644 index 98354ea298..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.4.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.5.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.5.xml deleted file mode 100644 index 822345c2e6..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.5.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.xml deleted file mode 100644 index 7675f27e56..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_4.1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_4.1.xml deleted file mode 100644 index e43ec4f81f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_4.1.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_4.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_4.xml deleted file mode 100644 index 7728abca32..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_4.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_5.1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_5.1.xml deleted file mode 100644 index 8ae88fff55..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_5.1.xml +++ /dev/null @@ -1,53 +0,0 @@ - - dapVersion="4.0" dmrVersion="1.0"> - - - - - - - - - - - - 1 - 2 - 3 - - - - some_large_hex_value - - - - - - - - - - - - - - - 1 - 2 - 3 - - - - some_large_hex_value - - - red - green - blue - - - 98.6 - - - -
diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_5.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_5.xml deleted file mode 100644 index 7900313c64..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_5.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.1.xml deleted file mode 100644 index 0585fd7a24..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.1.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - 1 - 2 - 3 - - - - - - - - - - - - - 1 - 2 - 3 - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.2.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.2.xml deleted file mode 100644 index 92960908f8..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.2.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - 1 - 2 - 3 - - - - - - - - - - - - - - - - - - - 1 - 2 - 3 - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.xml deleted file mode 100644 index a88b5bf47d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_6.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.1.xml deleted file mode 100644 index 588a1ee931..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.1.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.2.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.2.xml deleted file mode 100644 index 25b9b59c51..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.2.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.3.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.3.xml deleted file mode 100644 index 5d04405d3d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.3.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.4.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.4.xml deleted file mode 100644 index aef2e07583..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.4.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.5.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.5.xml deleted file mode 100644 index 2e5bcacfee..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.5.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.xml deleted file mode 100644 index d2e55307d7..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_7.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_8.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_8.xml deleted file mode 100644 index 29a93fe87f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/DMR_8.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_1.xml deleted file mode 100644 index da6d955ac4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_1.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - -
diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_10.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_10.xml deleted file mode 100644 index aac65a7955..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_10.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_11.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_11.xml deleted file mode 100644 index f661ce3517..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_11.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_2.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_2.xml deleted file mode 100644 index 45ab981649..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - -
diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_3.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_3.xml deleted file mode 100644 index 356785c0e4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_3.xml +++ /dev/null @@ -1,12 +0,0 @@ - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - -
diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_4.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_4.xml deleted file mode 100644 index e04b11ed9b..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_4.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_5.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_5.xml deleted file mode 100644 index de24f7fdfa..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_5.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_6.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_6.xml deleted file mode 100644 index 88a4209425..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_6.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_7.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_7.xml deleted file mode 100644 index 00a22b0c81..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_7.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_8.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_8.xml deleted file mode 100644 index 61919cb9d3..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_array_8.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_escaped_paths.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_escaped_paths.xml deleted file mode 100644 index afd82e7bf2..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_escaped_paths.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - 10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_1.dmr b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_1.dmr deleted file mode 100644 index 503b89e031..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_1.dmr +++ /dev/null @@ -1,10 +0,0 @@ - - - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_1.xml deleted file mode 100644 index 503b89e031..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_1.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_10.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_10.xml deleted file mode 100644 index e87a967368..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_10.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_2.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_2.xml deleted file mode 100644 index 78e6928d1e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_2.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3.xml deleted file mode 100644 index 5068261867..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_1.xml deleted file mode 100644 index 5686798376..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_1.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_2.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_2.xml deleted file mode 100644 index 6f28cd48ae..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_3.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_3.xml deleted file mode 100644 index c8d6f24d51..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_3_error_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_4.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_4.xml deleted file mode 100644 index 416f4597e5..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_4.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - x_axis_value - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_5.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_5.xml deleted file mode 100644 index 5c844638ef..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_5.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_6.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_6.xml deleted file mode 100644 index 20e14a6f6a..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_6.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_7.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_7.xml deleted file mode 100644 index d163b92912..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_7.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_8.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_8.xml deleted file mode 100644 index 4db2522603..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_8.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_9.1.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_9.1.xml deleted file mode 100644 index 0dacc20a66..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_9.1.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_9.xml b/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_9.xml deleted file mode 100644 index fd38d284d6..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/dmr/test_simple_9.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - xmlns="http://xml.opendap.org/ns/DAP/4.0#" - xmlns:dap="http://xml.opendap.org/ns/DAP/4.0#"> - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestHyrax/hyrax.html b/dap4/d4tests/src/test/data/resources/TestHyrax/hyrax.html deleted file mode 100644 index e92d923650..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestHyrax/hyrax.html +++ /dev/null @@ -1,380 +0,0 @@ - - -DAP4 Test Files - - - -

DAP4 Test Files

-

http://amazon.com/dap/reader/dap4/dap4.html

-
-

netCDF Based Test Files

- -
-

HDF5 Based Test Files

- -
-

Synthetic Based Test Files

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
test_simple_1.dmr: DMR (XML) DAP DSR
dmr-testsuite/test_array_10.xml: DMR (XML) DAP DSR
dmr-testsuite/test_array_11.xml: DMR (XML) DAP DSR
dmr-testsuite/test_array_1.xml: DMR (XML) DAP DSR
dmr-testsuite/test_array_2.xml: DMR (XML) DAP DSR
dmr-testsuite/test_array_3.xml: DMR (XML) DAP DSR
dmr-testsuite/test_array_4.xml: DMR (XML) DAP DSR
dmr-testsuite/test_array_5.xml: DMR (XML) DAP DSR
dmr-testsuite/test_array_6.xml: DMR (XML) DAP DSR
dmr-testsuite/test_array_7.xml: DMR (XML) DAP DSR
dmr-testsuite/test_array_8.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_10.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_1.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_2.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_3_error_1.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_3_error_2.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_3_error_3.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_3.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_4.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_5.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_6.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_7.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_8.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_9.1.xml: DMR (XML) DAP DSR
dmr-testsuite/test_simple_9.xml: DMR (XML) DAP DSR
dmr-testsuite/test_escaped_paths.xml: DMR (XML) DAP DSR
D4-xml/DMR_0.1.xml: DMR (XML) DAP DSR
D4-xml/DMR_0.xml: DMR (XML) DAP DSR
D4-xml/DMR_1.xml: DMR (XML) DAP DSR
D4-xml/DMR_2.1.xml: DMR (XML) DAP DSR
D4-xml/DMR_2.xml: DMR (XML) DAP DSR
D4-xml/DMR_3.1.xml: DMR (XML) DAP DSR
D4-xml/DMR_3.2.xml: DMR (XML) DAP DSR
D4-xml/DMR_3.3.xml: DMR (XML) DAP DSR
D4-xml/DMR_3.4.xml: DMR (XML) DAP DSR
D4-xml/DMR_3.5.xml: DMR (XML) DAP DSR
D4-xml/DMR_3.xml: DMR (XML) DAP DSR
D4-xml/DMR_4.1.xml: DMR (XML) DAP DSR
D4-xml/DMR_4.xml: DMR (XML) DAP DSR
D4-xml/DMR_5.1.xml: DMR (XML) DAP DSR
D4-xml/DMR_5.xml: DMR (XML) DAP DSR
D4-xml/DMR_6.1.xml: DMR (XML) DAP DSR
D4-xml/DMR_6.2.xml: DMR (XML) DAP DSR
D4-xml/DMR_6.xml: DMR (XML) DAP DSR
D4-xml/DMR_7.1.xml: DMR (XML) DAP DSR
D4-xml/DMR_7.2.xml: DMR (XML) DAP DSR
D4-xml/DMR_7.3.xml: DMR (XML) DAP DSR
D4-xml/DMR_7.4.xml: DMR (XML) DAP DSR
D4-xml/DMR_7.5.xml: DMR (XML) DAP DSR
D4-xml/DMR_7.xml: DMR (XML) DAP DSR
D4-xml/DMR_8.xml: DMR (XML) DAP DSR
-
- diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_array.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_array.nc.nc4.dap deleted file mode 100644 index a190c8fd5c..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_array.nc.nc4.dap +++ /dev/null @@ -1,56 +0,0 @@ -netcdf test_atomic_array { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - dimensions: - d1 = 1; - d2 = 2; - d3 = 3; - d4 = 4; - d5 = 5; - variables: - ubyte vu8(d2, d3); - - short v16(d4); - - uint vu32(d2, d3); - - double vd(d2); - - char vc(d2); - - String vs(d2, d2); - - opaque vo(d1, d2); - - enum cloud_class_t primary_cloud(d5); - string primary_cloud:_FillValue = "Missing"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vu8 = - { - {255, 1, 2}, - {3, 4, 5} - } -v16 = - {1, 2, 3, 4} -vu32 = - { - {5, 4, 3}, - {2, 1, 0} - } -vd = - {17.9, 1024.8} -vc = "@&" -vs = - { "hello world", " -", "Καλημέα", "abc" - } -vo = 0x0123456789abcdef, - 0xabcdef0000000000; - -primary_cloud = - {0, 2, 0, 1, 127} -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_array.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_array.nc.nc4.dmr deleted file mode 100644 index 822a30cbc9..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_array.nc.nc4.dmr +++ /dev/null @@ -1,31 +0,0 @@ -netcdf test_atomic_array { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - dimensions: - d1 = 1; - d2 = 2; - d3 = 3; - d4 = 4; - d5 = 5; - variables: - ubyte vu8(d2, d3); - - short v16(d4); - - uint vu32(d2, d3); - - double vd(d2); - - char vc(d2); - - String vs(d2, d2); - - opaque vo(d1, d2); - - enum cloud_class_t primary_cloud(d5); - string primary_cloud:_FillValue = "Missing"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_types.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_types.nc.nc4.dap deleted file mode 100644 index 205e48eb6d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_types.nc.nc4.dap +++ /dev/null @@ -1,57 +0,0 @@ -netcdf test_atomic_types { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - variables: - byte v8; - - ubyte vu8; - - short v16; - - ushort vu16; - - int v32; - - uint vu32; - - long v64; - - ulong vu64; - - float vf; - - double vd; - - char vc; - - String vs; - - opaque vo; - - enum cloud_class_t primary_cloud; - string primary_cloud:_FillValue = "Missing"; - - enum cloud_class_t secondary_cloud; - string secondary_cloud:_FillValue = "Missing"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -v8 =-128 -vu8 =255 -v16 =-32768 -vu16 =65535 -v32 =2147483647 -vu32 =4294967295 -v64 =9223372036854775807 -vu64 =18446744073709551615 -vf =3.1415927 -vd =3.141592653589793 -vc =@ -vs = "hello world" -vo = 0x0123456789abcdef; - -primary_cloud =2 -secondary_cloud =127 -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_types.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_types.nc.nc4.dmr deleted file mode 100644 index d771557b7f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_atomic_types.nc.nc4.dmr +++ /dev/null @@ -1,40 +0,0 @@ -netcdf test_atomic_types { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - variables: - byte v8; - - ubyte vu8; - - short v16; - - ushort vu16; - - int v32; - - uint vu32; - - long v64; - - ulong vu64; - - float vf; - - double vd; - - char vc; - - String vs; - - opaque vo; - - enum cloud_class_t primary_cloud; - string primary_cloud:_FillValue = "Missing"; - - enum cloud_class_t secondary_cloud; - string secondary_cloud:_FillValue = "Missing"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum.nc.nc4.dap deleted file mode 100644 index 7723b215c7..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum.nc.nc4.dap +++ /dev/null @@ -1,13 +0,0 @@ -netcdf test_enum { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - variables: - enum cloud_class_t primary_cloud; - string primary_cloud:_FillValue = "Missing"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -primary_cloud =2 -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum.nc.nc4.dmr deleted file mode 100644 index 0b98070c42..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum.nc.nc4.dmr +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_enum { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - variables: - enum cloud_class_t primary_cloud; - string primary_cloud:_FillValue = "Missing"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum_array.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum_array.nc.nc4.dap deleted file mode 100644 index 6bc8a7ac6d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum_array.nc.nc4.dap +++ /dev/null @@ -1,16 +0,0 @@ -netcdf test_enum_array { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - dimensions: - d5 = 5; - variables: - enum cloud_class_t primary_cloud(d5); - string primary_cloud:_FillValue = "Missing"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -primary_cloud = - {0, 2, 0, 1, 127} -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum_array.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum_array.nc.nc4.dmr deleted file mode 100644 index 0ba318f4b9..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_enum_array.nc.nc4.dmr +++ /dev/null @@ -1,13 +0,0 @@ -netcdf test_enum_array { - types: - byte enum cloud_class_t { Clear = 0, Cumulonimbus = 1, Stratus = 2, Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, Missing = 127}; - - dimensions: - d5 = 5; - variables: - enum cloud_class_t primary_cloud(d5); - string primary_cloud:_FillValue = "Missing"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_var.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_var.nc.nc4.dap deleted file mode 100644 index cf8dae631c..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_var.nc.nc4.dap +++ /dev/null @@ -1,9 +0,0 @@ -netcdf test_one_var { - variables: - int t; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -t =17 -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_var.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_var.nc.nc4.dmr deleted file mode 100644 index 2f331bc8d9..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_var.nc.nc4.dmr +++ /dev/null @@ -1,7 +0,0 @@ -netcdf test_one_var { - variables: - int t; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_vararray.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_vararray.nc.nc4.dap deleted file mode 100644 index 6c047673ba..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_vararray.nc.nc4.dap +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_one_vararray { - dimensions: - d2 = 2; - variables: - int t(d2); - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -t = - {17, 37} -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_vararray.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_vararray.nc.nc4.dmr deleted file mode 100644 index ff9f4f085d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_one_vararray.nc.nc4.dmr +++ /dev/null @@ -1,9 +0,0 @@ -netcdf test_one_vararray { - dimensions: - d2 = 2; - variables: - int t(d2); - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_array.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_array.nc.nc4.dap deleted file mode 100644 index b62c9b8688..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_array.nc.nc4.dap +++ /dev/null @@ -1,67 +0,0 @@ -netcdf test_struct_array { - dimensions: - dx = 4; - dy = 3; - variables: - - Structure { - int x; - string x:_CoordinateAxisType = "GeoX"; - int y; - string y:_CoordinateAxisType = "GeoY"; - } s(dx, dy); - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -s = - { - x =1 - y =-1 - } s(0) - { - x =17 - y =37 - } s(1) - { - x =-32767 - y =32767 - } s(2) - { - x =-1 - y =3 - } s(3) - { - x =-2 - y =2 - } s(4) - { - x =-3 - y =1 - } s(5) - { - x =-4 - y =12 - } s(6) - { - x =-8 - y =8 - } s(7) - { - x =-12 - y =4 - } s(8) - { - x =-5 - y =15 - } s(9) - { - x =-10 - y =10 - } s(10) - { - x =-15 - y =5 - } s(11) -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_array.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_array.nc.nc4.dmr deleted file mode 100644 index 8699a2aa57..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_array.nc.nc4.dmr +++ /dev/null @@ -1,17 +0,0 @@ -netcdf test_struct_array { - dimensions: - dx = 4; - dy = 3; - variables: - - Structure { - int x; - string x:_CoordinateAxisType = "GeoX"; - int y; - string y:_CoordinateAxisType = "GeoY"; - } s(dx, dy); - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_nested.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_nested.nc.nc4.dap deleted file mode 100644 index 19f3ca3f32..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_nested.nc.nc4.dap +++ /dev/null @@ -1,38 +0,0 @@ -netcdf test_struct_nested { - variables: - - Structure { - - Structure { - int x; - string x:_CoordinateAxisType = "GeoX"; - int y; - string y:_CoordinateAxisType = "GeoY"; - } field1; - - - Structure { - int x; - int y; - } field2; - - } x; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: - x = - { - field1 = - { - x = 1 - y = -2 - } x.field1(0) - field2 = - { - x = 255 - y = 90 - } x.field2(0) - } x(0) -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_nested.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_nested.nc.nc4.dmr deleted file mode 100644 index 8cb6375d5a..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_nested.nc.nc4.dmr +++ /dev/null @@ -1,24 +0,0 @@ -netcdf test_struct_nested { - variables: - - Structure { - - Structure { - int x; - string x:_CoordinateAxisType = "GeoX"; - int y; - string y:_CoordinateAxisType = "GeoY"; - } field1; - - - Structure { - int x; - int y; - } field2; - - } x; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_type.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_type.nc.nc4.dap deleted file mode 100644 index 084f785c8c..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_type.nc.nc4.dap +++ /dev/null @@ -1,21 +0,0 @@ -netcdf test_struct_type { - variables: - - Structure { - int x; - string x:_CoordinateAxisType = "GeoX"; - int y; - string y:_CoordinateAxisType = "GeoY"; - } s; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: - s = - { - x = 1 - y = -2 - } s(0) -} - diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_type.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_type.nc.nc4.dmr deleted file mode 100644 index 17f3955052..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_struct_type.nc.nc4.dmr +++ /dev/null @@ -1,14 +0,0 @@ -netcdf test_struct_type { - variables: - - Structure { - int x; - string x:_CoordinateAxisType = "GeoX"; - int y; - string y:_CoordinateAxisType = "GeoY"; - } s; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen1.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen1.nc.nc4.dap deleted file mode 100644 index 3c411cc3c6..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen1.nc.nc4.dap +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_vlen1 { - variables: - int x(*); - string x:_CoordinateAxisType = "GeoX"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -x = - {1, 3, 5, 7} -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen1.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen1.nc.nc4.dmr deleted file mode 100644 index 66e15af40f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen1.nc.nc4.dmr +++ /dev/null @@ -1,8 +0,0 @@ -netcdf test_vlen1 { - variables: - int x(*); - string x:_CoordinateAxisType = "GeoX"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen2.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen2.nc.nc4.dap deleted file mode 100644 index 8628cb9931..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen2.nc.nc4.dap +++ /dev/null @@ -1,21 +0,0 @@ -netcdf test_vlen2 { - dimensions: - d3 = 3; - d2 = 2; - variables: - int x(d3, d2, *); - string x:_CoordinateAxisType = "GeoX"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: - x = - { - {1, 3, 5, 7}, - {100, 200}, - {-1, -2}, - {1, 3, 5, 7}, - {100, 200}, - {-1, -2} - } -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen2.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen2.nc.nc4.dmr deleted file mode 100644 index a28e65320e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen2.nc.nc4.dmr +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_vlen2 { - dimensions: - d3 = 3; - d2 = 2; - variables: - int x(d3, d2, *); - string x:_CoordinateAxisType = "GeoX"; - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen3.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen3.nc.nc4.dap deleted file mode 100644 index aaef5daf73..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen3.nc.nc4.dap +++ /dev/null @@ -1,17 +0,0 @@ -netcdf test_vlen3 { - variables: - - Structure { - int f1(*); - } v1; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: - v1 = - { - f1 = - {1, 3, 5, 7} - } v1(0) -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen3.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen3.nc.nc4.dmr deleted file mode 100644 index ecef24cd25..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen3.nc.nc4.dmr +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_vlen3 { - variables: - - Structure { - int f1(*); - } v1; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen4.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen4.nc.nc4.dap deleted file mode 100644 index 0c62ce086b..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen4.nc.nc4.dap +++ /dev/null @@ -1,20 +0,0 @@ -netcdf test_vlen4 { - variables: - - Structure { - int f1(2, *); - } v1; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: - v1 = - { - f1 = - { - {1, 3, 5, 7}, - {100, 200} - } - } v1(0) -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen4.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen4.nc.nc4.dmr deleted file mode 100644 index 357edd6da2..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen4.nc.nc4.dmr +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_vlen4 { - variables: - - Structure { - int f1(2, *); - } v1; - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen5.nc.nc4.dap b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen5.nc.nc4.dap deleted file mode 100644 index 8e92721907..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen5.nc.nc4.dap +++ /dev/null @@ -1,23 +0,0 @@ -netcdf test_vlen5 { - dimensions: - d2 = 2; - variables: - - Structure { - int v(*); - } v1(d2); - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -v1 = - { - v = - {1, 3, 5, 7} - } v1(0) - { - v = - {100, 200} - } v1(1) -} diff --git a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen5.nc.nc4.dmr b/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen5.nc.nc4.dmr deleted file mode 100644 index 5785af6152..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestIosp/baseline/test_vlen5.nc.nc4.dmr +++ /dev/null @@ -1,13 +0,0 @@ -netcdf test_vlen5 { - dimensions: - d2 = 2; - variables: - - Structure { - int v(*); - } v1(d2); - - - // global attributes: - string :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; -} diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_anon_dim.syn.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_anon_dim.syn.dmp deleted file mode 100644 index 8bfb4671ca..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_anon_dim.syn.dmp +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_array.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_array.nc.dmp deleted file mode 100644 index 52f093929b..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_array.nc.dmp +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_array.syn.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_array.syn.dmp deleted file mode 100644 index 3519a327b0..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_array.syn.dmp +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_types.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_types.nc.dmp deleted file mode 100644 index aef3b9eda0..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_types.nc.dmp +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_types.syn.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_types.syn.dmp deleted file mode 100644 index f7a05c2e72..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_atomic_types.syn.dmp +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum.nc.dmp deleted file mode 100644 index 10841fbc27..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum.nc.dmp +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum_2.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum_2.nc.dmp deleted file mode 100644 index e29149a244..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum_2.nc.dmp +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum_array.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum_array.nc.dmp deleted file mode 100644 index bfa1765093..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_enum_array.nc.dmp +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_fill.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_fill.nc.dmp deleted file mode 100644 index 2d1ba264b4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_fill.nc.dmp +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_groups1.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_groups1.nc.dmp deleted file mode 100644 index 80f918edc6..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_groups1.nc.dmp +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_one_var.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_one_var.nc.dmp deleted file mode 100644 index 89016b1816..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_one_var.nc.dmp +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_one_vararray.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_one_vararray.nc.dmp deleted file mode 100644 index 8f199d1cb1..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_one_vararray.nc.dmp +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_opaque.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_opaque.nc.dmp deleted file mode 100644 index 1214eb28eb..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_opaque.nc.dmp +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_opaque_array.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_opaque_array.nc.dmp deleted file mode 100644 index b79939de67..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_opaque_array.nc.dmp +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_sequence_1.syn.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_sequence_1.syn.dmp deleted file mode 100644 index 29109a2c04..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_sequence_1.syn.dmp +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_sequence_2.syn.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_sequence_2.syn.dmp deleted file mode 100644 index 4194cf19d4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_sequence_2.syn.dmp +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_array.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_array.nc.dmp deleted file mode 100644 index 8dabe14882..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_array.nc.dmp +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_array.syn.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_array.syn.dmp deleted file mode 100644 index 909d78befa..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_array.syn.dmp +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_nested.hdf5.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_nested.hdf5.dmp deleted file mode 100644 index 376824981e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_nested.hdf5.dmp +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_nested3.hdf5.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_nested3.hdf5.dmp deleted file mode 100644 index 03ac53d23c..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_nested3.hdf5.dmp +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_type.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_type.nc.dmp deleted file mode 100644 index 4e2adb0c1d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_struct_type.nc.dmp +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_utf8.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_utf8.nc.dmp deleted file mode 100644 index 74115be967..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_utf8.nc.dmp +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen1.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen1.nc.dmp deleted file mode 100644 index b30754e1b2..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen1.nc.dmp +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen2.nc.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen2.nc.dmp deleted file mode 100644 index cea92859ec..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen2.nc.dmp +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen3.hdf5.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen3.hdf5.dmp deleted file mode 100644 index dbad545664..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen3.hdf5.dmp +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen5.hdf5.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen5.hdf5.dmp deleted file mode 100644 index 20cc09a17b..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/test_vlen5.hdf5.dmp +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/testall.dmp b/dap4/d4tests/src/test/data/resources/TestParsers/baseline/testall.dmp deleted file mode 100644 index 9b57107614..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/baseline/testall.dmp +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_array.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_array.nc.dmr deleted file mode 100644 index 29a61e7c8b..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_array.nc.dmr +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_array.syn.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_array.syn.dmr deleted file mode 100644 index 3519a327b0..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_array.syn.dmr +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_types.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_types.nc.dmr deleted file mode 100644 index aef3b9eda0..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_types.nc.dmr +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_types.syn.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_types.syn.dmr deleted file mode 100644 index ec5ed7d9f7..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_atomic_types.syn.dmr +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_enum.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_enum.nc.dmr deleted file mode 100644 index 10841fbc27..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_enum.nc.dmr +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_enum_array.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_enum_array.nc.dmr deleted file mode 100644 index bfa1765093..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_enum_array.nc.dmr +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_groups1.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_groups1.nc.dmr deleted file mode 100644 index 80f918edc6..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_groups1.nc.dmr +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_one_var.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_one_var.nc.dmr deleted file mode 100644 index 89016b1816..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_one_var.nc.dmr +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_one_vararray.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_one_vararray.nc.dmr deleted file mode 100644 index 8f199d1cb1..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_one_vararray.nc.dmr +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_array.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_array.nc.dmr deleted file mode 100644 index 8dabe14882..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_array.nc.dmr +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_nested.hdf5.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_nested.hdf5.dmr deleted file mode 100644 index 376824981e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_nested.hdf5.dmr +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_nested3.hdf5.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_nested3.hdf5.dmr deleted file mode 100644 index 03ac53d23c..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_nested3.hdf5.dmr +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_type.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_type.nc.dmr deleted file mode 100644 index 4e2adb0c1d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_struct_type.nc.dmr +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_utf8.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_utf8.nc.dmr deleted file mode 100644 index 74115be967..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_utf8.nc.dmr +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen1.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen1.nc.dmr deleted file mode 100644 index b30754e1b2..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen1.nc.dmr +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen2.nc.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen2.nc.dmr deleted file mode 100644 index cea92859ec..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen2.nc.dmr +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen3.hdf5.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen3.hdf5.dmr deleted file mode 100644 index dbad545664..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen3.hdf5.dmr +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen5.hdf5.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen5.hdf5.dmr deleted file mode 100644 index 20cc09a17b..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/test_vlen5.hdf5.dmr +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/testall.dmr b/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/testall.dmr deleted file mode 100644 index 0e2bf5de38..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/dmrset/testall.dmr +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - - - abcd "hello" "quoted" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/ce1.txt b/dap4/d4tests/src/test/data/resources/TestParsers/testinput/ce1.txt deleted file mode 100644 index 73b06f4c1f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/ce1.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Constraint tests for ce1_dmr.txt -/a[1] -/b[10:16] -/c[8:2:15] -/a[1];/b[10:16];/c[8:2:15] -/d[1][0:2:2];/a[1];/e[1][0];/f[0][1] -/s[0:3][0:2].x;/s[0:3][0:2].y - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/ce1_dmr.txt b/dap4/d4tests/src/test/data/resources/TestParsers/testinput/ce1_dmr.txt deleted file mode 100644 index e3b4d952be..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/ce1_dmr.txt +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_misc1.xml b/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_misc1.xml deleted file mode 100644 index 16d8b476e3..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_misc1.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_misc2.xml b/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_misc2.xml deleted file mode 100644 index e92d76698d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_misc2.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_simple_1.xml b/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_simple_1.xml deleted file mode 100644 index 985fb24ba0..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_simple_1.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_simple_2.xml b/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_simple_2.xml deleted file mode 100644 index 60a1956ff4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/test_simple_2.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/testall.xml b/dap4/d4tests/src/test/data/resources/TestParsers/testinput/testall.xml deleted file mode 100644 index dfe668a95c..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestParsers/testinput/testall.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - - - abcd \"hello\" "quoted" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_aaa.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_aaa.nc.dmp deleted file mode 100644 index 54fdf0828f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_aaa.nc.dmp +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - -vs(0) = "Καλημέα" ; -vs(1) = "abc" ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.0.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.0.dmp deleted file mode 100644 index 9ee80fe4bb..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.0.dmp +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - -vu8(0,0) = 3 ; -vu8(0,1) = 5 ; -vd(0) = 1024.800000 ; -vs(0,0) = " -" ; -vo(0,0) = 0xABCDEF0000000000 ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.1.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.1.dmp deleted file mode 100644 index e076c6ee23..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.1.dmp +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.dmp deleted file mode 100644 index bdea13973c..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.dmp +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -vu8(0,0) = 255 ; -vu8(0,1) = 1 ; -vu8(0,2) = 2 ; -vu8(1,0) = 3 ; -vu8(1,1) = 4 ; -vu8(1,2) = 5 ; -v16(0) = 1 ; -v16(1) = 2 ; -v16(2) = 3 ; -v16(3) = 4 ; -vu32(0,0) = 5 ; -vu32(0,1) = 4 ; -vu32(0,2) = 3 ; -vu32(1,0) = 2 ; -vu32(1,1) = 1 ; -vu32(1,2) = 0 ; -vd(0) = 17.900000 ; -vd(1) = 1024.800000 ; -vc(0) = '@' ; -vc(1) = '&' ; -vs(0,0) = "hello world" ; -vs(0,1) = "abc" ; -vs(1,0) = " -" ; -vs(1,1) = "Καλημέα" ; -vo(0,0) = 0x0123456789ABCDEF ; -vo(0,1) = 0xABCDEF0000000000 ; -primary_cloud(0) = Clear ; -primary_cloud(1) = Stratus ; -primary_cloud(2) = Clear ; -primary_cloud(3) = Cumulonimbus ; -primary_cloud(4) = Missing ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.ncdump b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.ncdump deleted file mode 100644 index b9507deedf..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_array.nc.ncdump +++ /dev/null @@ -1,57 +0,0 @@ -netcdf null { - types: - enum cloud_class_t { 'Clear' = 0, 'Cumulonimbus' = 1, 'Stratus' = 2, 'Stratocumulus' = 3, 'Cumulus' = 4, 'Altostratus' = 5, 'Nimbostratus' = 6, 'Altocumulus' = 7, 'Missing' = 127, 'Cirrostratus' = 8, 'Cirrocumulus' = 9, 'Cirrus' = 10}; - - dimensions: - d1 = 1; - d2 = 2; - d3 = 3; - d4 = 4; - d5 = 5; - variables: - byte vu8(d2=2, d3=3); - :_Unsigned = "true"; - - short v16(d4=4); - - int vu32(d2=2, d3=3); - :_Unsigned = "true"; - - double vd(d2=2); - - char vc(d2=2); - - String vs(d2=2, d2=2); - - opaque vo(d1=1, d2=2); - - String primary_cloud(d5=5); - :_FillValue = "Missing"; - - // global attributes: - :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -vu8 = - { - {-1, 1, 2}, - {3, 4, 5} - } -v16 = - {1, 2, 3, 4} -vu32 = - { - {5, 4, 3}, - {2, 1, 0} - } -vd = - {17.9, 1024.8} -vc = "@&" -vs = - { "hello world", "abc", " -", "Καλημέρα" - } -vo = 0x0123456789abcdef, - 0xabcdef0000000000, - -primary_cloud = "Clear", "Clear", "Clear", "Clear", "Clear" -} diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_types.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_types.nc.dmp deleted file mode 100644 index e26e76d516..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_types.nc.dmp +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -v8 = -128 ; -vu8 = 255 ; -v16 = -32768 ; -vu16 = 65535 ; -v32 = 2147483647 ; -vu32 = 4294967295 ; -v64 = 9223372036854775807 ; -vu64 = 18446744073709551615 ; -vf = 3.141593 ; -vd = 3.141593 ; -vc = '@' ; -vs = "hello world" ; -vo = 0x0123456789ABCDEF ; -primary_cloud = Stratus ; -secondary_cloud = Missing ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_types.nc.ncdump b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_types.nc.ncdump deleted file mode 100644 index 62a82936ef..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_atomic_types.nc.ncdump +++ /dev/null @@ -1,61 +0,0 @@ -netcdf null { - types: - enum cloud_class_t { 'Clear' = 0, 'Cumulonimbus' = 1, 'Stratus' = 2, 'Stratocumulus' = 3, 'Cumulus' = 4, 'Altostratus' = 5, 'Nimbostratus' = 6, 'Altocumulus' = 7, 'Missing' = 127, 'Cirrostratus' = 8, 'Cirrocumulus' = 9, 'Cirrus' = 10}; - - variables: - byte v8; - - byte vu8; - :_Unsigned = "true"; - - short v16; - - short vu16; - :_Unsigned = "true"; - - int v32; - - int vu32; - :_Unsigned = "true"; - - long v64; - - long vu64; - :_Unsigned = "true"; - - float vf; - - double vd; - - char vc; - - String vs; - - opaque vo; - - String primary_cloud; - :_FillValue = "Missing"; - - String secondary_cloud; - :_FillValue = "Missing"; - - // global attributes: - :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -v8 =-128 -vu8 =-1 -v16 =-32768 -vu16 =-1 -v32 =2147483647 -vu32 =-1 -v64 =9223372036854775807 -vu64 =-1 -vf =3.1415927 -vd =3.141592653589793 -vc =@ -vs = "hello world" -vo = 0x0123456789abcdef, - -primary_cloud = "Stratus" -secondary_cloud = "Unknown enum value=60" -} diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum.nc.dmp deleted file mode 100644 index 5708512c59..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum.nc.dmp +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -primary_cloud = Stratus ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.0.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.0.dmp deleted file mode 100644 index c08e20fe0f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.0.dmp +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -primary_cloud(0) = Clear ; -primary_cloud(1) = Stratus ; -primary_cloud(2) = Clear ; -primary_cloud(3) = Cumulonimbus ; -primary_cloud(4) = Missing ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.1.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.1.dmp deleted file mode 100644 index 02fa4ec7e5..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.1.dmp +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -primary_cloud(0) = Stratus ; -primary_cloud(1) = Cumulonimbus ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.dmp deleted file mode 100644 index b82a1e1091..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_enum_array.nc.dmp +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -primary_cloud(0) = Clear ; -primary_cloud(1) = Stratus ; -primary_cloud(2) = Clear ; -primary_cloud(3) = Cumulonimbus ; -primary_cloud(4) = Missing ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_groups1.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_groups1.nc.dmp deleted file mode 100644 index 2458e100dd..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_groups1.nc.dmp +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_groups1.nc.ncdump b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_groups1.nc.ncdump deleted file mode 100644 index d0ff04ed22..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_groups1.nc.ncdump +++ /dev/null @@ -1,7 +0,0 @@ -netcdf null { - dimensions: - dim1 = 5; - // global attributes: - :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -} diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_var.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_var.nc.dmp deleted file mode 100644 index 07327c9df8..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_var.nc.dmp +++ /dev/null @@ -1,5 +0,0 @@ - - - - -t = 17 ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_var.nc.ncdump b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_var.nc.ncdump deleted file mode 100644 index f9b96a90ca..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_var.nc.ncdump +++ /dev/null @@ -1,9 +0,0 @@ -netcdf null { - variables: - int t; - - // global attributes: - :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -t =17 -} diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.0.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.0.dmp deleted file mode 100644 index b42a52d67e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.0.dmp +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - -t(0) = 17 ; -t(1) = 37 ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.1.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.1.dmp deleted file mode 100644 index 5cd368ebb4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.1.dmp +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -t(0) = 37 ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.dmp deleted file mode 100644 index b42a52d67e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_one_vararray.nc.dmp +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - -t(0) = 17 ; -t(1) = 37 ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.0.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.0.dmp deleted file mode 100644 index d9cf704dcf..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.0.dmp +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - -Struct { -s.x = 1 ; -s.y = -1 ; -} s(0); -Struct { -s.x = 17 ; -s.y = 37 ; -} s(1); -Struct { -s.x = -4 ; -s.y = 12 ; -} s(2); -Struct { -s.x = -8 ; -s.y = 8 ; -} s(3); diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.dmp deleted file mode 100644 index 13448edf44..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.dmp +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - -Struct { -s.x = 1 ; -s.y = -1 ; -} s(0); -Struct { -s.x = 17 ; -s.y = 37 ; -} s(1); -Struct { -s.x = -32767 ; -s.y = 32767 ; -} s(2); -Struct { -s.x = -1 ; -s.y = 3 ; -} s(3); -Struct { -s.x = -2 ; -s.y = 2 ; -} s(4); -Struct { -s.x = -3 ; -s.y = 1 ; -} s(5); -Struct { -s.x = -4 ; -s.y = 12 ; -} s(6); -Struct { -s.x = -8 ; -s.y = 8 ; -} s(7); -Struct { -s.x = -12 ; -s.y = 4 ; -} s(8); -Struct { -s.x = -5 ; -s.y = 15 ; -} s(9); -Struct { -s.x = -10 ; -s.y = 10 ; -} s(10); -Struct { -s.x = -15 ; -s.y = 5 ; -} s(11); diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.ncdump b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.ncdump deleted file mode 100644 index 296e936377..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_array.nc.ncdump +++ /dev/null @@ -1,26 +0,0 @@ -netcdf null { - dimensions: - dx = 2; - variables: - - Structure { - int x; - :_CoordinateAxisType = "GeoX"; - int y; - :_CoordinateAxisType = "GeoY"; - } x(dx=2); - - - // global attributes: - :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -x = - { - x =1 - y =-2 - } x(0) - { - x =17 - y =37 - } x(1) -} diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_nested.hdf5.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_nested.hdf5.dmp deleted file mode 100644 index ab0a96abaa..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_nested.hdf5.dmp +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - -Struct { -Struct { -x.field1.x = 1 ; -x.field1.y = -2 ; -} x.field1; -Struct { -x.field2.x = 255 ; -x.field2.y = 90 ; -} x.field2; -} x; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_type.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_type.nc.dmp deleted file mode 100644 index 9bf70f993e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_type.nc.dmp +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - -Struct { -s.x = 1 ; -s.y = -2 ; -} s; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_type.nc.ncdump b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_type.nc.ncdump deleted file mode 100644 index a7a7e096a9..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_struct_type.nc.ncdump +++ /dev/null @@ -1,18 +0,0 @@ -netcdf null { - variables: - - Structure { - int x; - :_CoordinateAxisType = "GeoX"; - int y; - :_CoordinateAxisType = "GeoY"; - } x; - - - // global attributes: - :_CoordSysBuilder = "ucar.nc2.dataset.conv.DefaultConvention"; - data: -x = x =1 - y =-2 - -} diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_utf8.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_utf8.nc.dmp deleted file mode 100644 index 54fdf0828f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_utf8.nc.dmp +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - -vs(0) = "Καλημέα" ; -vs(1) = "abc" ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen1.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen1.nc.dmp deleted file mode 100644 index d341f2cefc..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen1.nc.dmp +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - -x(0) = 1 ; -x(1) = 3 ; -x(2) = 5 ; -x(3) = 7 ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen2.nc.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen2.nc.dmp deleted file mode 100644 index f530233504..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen2.nc.dmp +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - -x(0,0) = 1,3,5,7 ; -x(0,1) = 100,200 ; -x(1,0) = -1,-2 ; -x(1,1) = 1,3,5,7 ; -x(2,0) = 100,200 ; -x(2,1) = -1,-2 ; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen3.hdf5.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen3.hdf5.dmp deleted file mode 100644 index 1197da6c2f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen3.hdf5.dmp +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - -Struct { -v1.f1(0) = 1 ; -v1.f1(1) = 3 ; -v1.f1(2) = 5 ; -v1.f1(3) = 7 ; -} v1; diff --git a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen5.hdf5.dmp b/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen5.hdf5.dmp deleted file mode 100644 index 341c6ecfe9..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestSerial/baseline/test_vlen5.hdf5.dmp +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - -Struct { -v1.v(0) = 1 ; -v1.v(1) = 3 ; -v1.v(2) = 5 ; -v1.v(3) = 7 ; -} v1(0); -Struct { -v1.v(0) = 100 ; -v1.v(1) = 200 ; -} v1(1); diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_anon_dim.syn.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_anon_dim.syn.dap deleted file mode 100644 index 82d8047804..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_anon_dim.syn.dap +++ /dev/null @@ -1 +0,0 @@ - [0] -1169720286 [1] -920699049 [2] -2088732436 [3] 1060190036 [4] -1123468835 [5] 922940053 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_anon_dim.syn.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_anon_dim.syn.dmr deleted file mode 100644 index acfbb02341..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_anon_dim.syn.dmr +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.nc.dap deleted file mode 100644 index 59a60fbd3b..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.nc.dap +++ /dev/null @@ -1,8 +0,0 @@ - [0] 255 [1] 1 [2] 2 [3] 3 [4] 4 [5] 5 - [0] 1 [1] 2 [2] 3 [3] 4 - [0] 5 [1] 4 [2] 3 [3] 2 [4] 1 [5] 0 - [0] 17.9000 [1] 1024.80 - [0] '@' [1] '&' - [0] "hello\tworld" [1] "\r\n" [2] "Καλημέα" [3] "abc" - [0] 0x0123456789ABCDEF [1] 0xABCDEF0000000000 - [0] 0 [1] 2 [2] 0 [3] 1 [4] 127 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.nc.dmr deleted file mode 100644 index 2fbda80066..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.nc.dmr +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.syn.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.syn.dap deleted file mode 100644 index 8bc6508fd1..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.syn.dap +++ /dev/null @@ -1,8 +0,0 @@ - [0] 186 [1] 201 [2] 131 [3] 63 [4] 189 [5] 55 - [0] -341 [1] -21899 [2] -13413 [3] -22144 - [0] 2367803413 [1] 3586730583 [2] 511843988 [3] 3754752863 [4] 2950934681 [5] 2366232135 - [0] 0.217870 [1] 0.602451 - [0] 'C' [1] 'O' - [0] "{S" [1] "gb8^OE$" [2] "4a/q%n9;5Y" [3] "{fIl?T\"\\A[" - [0] 0xA2177AA7287C04FA8BB57BCDF76EC80F [1] 0x34FA472AA9404DD543143CADED303A75 - [0] 2 [1] 9 [2] 6 [3] 8 [4] 3 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.syn.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.syn.dmr deleted file mode 100644 index 4d46c86746..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_array.syn.dmr +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.nc.dap deleted file mode 100644 index 0b6fb8911a..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.nc.dap +++ /dev/null @@ -1,15 +0,0 @@ - -128 - 255 - -32768 - 65535 - 2147483647 - 4294967295 - 9223372036854775807 - 18446744073709551615 - 3.14159 - 3.14159 - '@' - "hello\tworld" - 0x0123456789ABCDEF - 2 - 127 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.nc.dmr deleted file mode 100644 index 760b27b8cc..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.nc.dmr +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.syn.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.syn.dap deleted file mode 100644 index 4fe0dfa020..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.syn.dap +++ /dev/null @@ -1,15 +0,0 @@ - 58 - 201 - 896 - 16177 - -1123468835 - 2125143125 - 3059391736915381031 - 11577488182652895291 - 0.551297 - 0.790267 - '*' - "O,L?c8A%V" - 0x46F169EF23CBAF9B1FEBD99E4E16CEC9 - 7 - 3 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.syn.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.syn.dmr deleted file mode 100644 index ad57f898be..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_atomic_types.syn.dmr +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum.nc.dap deleted file mode 100644 index 671900d5f1..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum.nc.dap +++ /dev/null @@ -1 +0,0 @@ - 2 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum.nc.dmr deleted file mode 100644 index c6b90cdbb6..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum.nc.dmr +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_2.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_2.nc.dap deleted file mode 100644 index 671900d5f1..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_2.nc.dap +++ /dev/null @@ -1 +0,0 @@ - 2 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_2.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_2.nc.dmr deleted file mode 100644 index 906e9bd87f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_2.nc.dmr +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_array.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_array.nc.dap deleted file mode 100644 index d13e008917..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_array.nc.dap +++ /dev/null @@ -1 +0,0 @@ - [0] 0 [1] 2 [2] 0 [3] 1 [4] 127 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_array.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_array.nc.dmr deleted file mode 100644 index 9566d108d1..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_enum_array.nc.dmr +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_fill.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_fill.nc.dap deleted file mode 100644 index 3bf1930073..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_fill.nc.dap +++ /dev/null @@ -1,3 +0,0 @@ - 240 - 32700 - 111000 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_fill.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_fill.nc.dmr deleted file mode 100644 index f42b2d3e1f..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_fill.nc.dmr +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_groups1.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_groups1.nc.dap deleted file mode 100644 index 0af89ec492..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_groups1.nc.dap +++ /dev/null @@ -1,4 +0,0 @@ - [0] -876354855 [1] -1761252264 [2] 1723477387 [3] -46827465 [4] 1475147969 - [0] 12.0000 [1] -100.000 [2] 9.96921e+36 - [0] 2 [1] 3 [2] 5 [3] 7 [4] 11 - [0] 23.0000 [1] 29.0000 [2] 19.0000 [3] 31.0000 [4] 17.0000 [5] 37.0000 [6] 13.0000 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_groups1.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_groups1.nc.dmr deleted file mode 100644 index 5932834dad..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_groups1.nc.dmr +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_var.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_var.nc.dap deleted file mode 100644 index d193859153..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_var.nc.dap +++ /dev/null @@ -1 +0,0 @@ - 17 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_var.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_var.nc.dmr deleted file mode 100644 index f48bc09fc3..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_var.nc.dmr +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_vararray.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_vararray.nc.dap deleted file mode 100644 index cef7e62967..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_vararray.nc.dap +++ /dev/null @@ -1 +0,0 @@ - 17 37 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_vararray.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_vararray.nc.dmr deleted file mode 100644 index 4e2b7d2430..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_one_vararray.nc.dmr +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque.nc.dap deleted file mode 100644 index 8fc9b352ad..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque.nc.dap +++ /dev/null @@ -1 +0,0 @@ - 0x0123456789ABCDEF diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque.nc.dmr deleted file mode 100644 index d094bcf790..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque.nc.dmr +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque_array.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque_array.nc.dap deleted file mode 100644 index 41b22527f4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque_array.nc.dap +++ /dev/null @@ -1 +0,0 @@ - [0] 0x0123456789ABCDEF [1] 0xABCDEF0000000000 [2] 0xFEDCBA9876543210 [3] 0xFEDCBA9999999999 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque_array.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque_array.nc.dmr deleted file mode 100644 index fca0f6e7e1..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_opaque_array.nc.dmr +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_1.syn.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_1.syn.dap deleted file mode 100644 index c8e824f78e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_1.syn.dap +++ /dev/null @@ -1,2 +0,0 @@ -count=1 - -920699049 896 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_1.syn.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_1.syn.dmr deleted file mode 100644 index bf34e35c7d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_1.syn.dmr +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_2.syn.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_2.syn.dap deleted file mode 100644 index 3d99a97450..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_2.syn.dap +++ /dev/null @@ -1,5 +0,0 @@ -count=1 - -920699049 896 -count=4 - -1123468835 -18686 2125143125 -21899 1268468519 -22144 989876086 3361 - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_2.syn.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_2.syn.dmr deleted file mode 100644 index c9d9a09ad3..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_sequence_2.syn.dmr +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.nc.dmr deleted file mode 100644 index ebb845e9e9..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.nc.dmr +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.syn.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.syn.dap deleted file mode 100644 index 9518dd1bd8..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.syn.dap +++ /dev/null @@ -1,15 +0,0 @@ - [0] 0.727653 [1] 0.785633 [2] 0.513679 [3] 0.246845 - [0] 0.738422 [1] 0.214889 [2] 0.494798 - [0] 712320147 1268468519 - [0] 696298400 989876086 - [0] -1927163883 -900795134 - [1] -708236713 1377500019 - [1] 511843988 1699265896 - [1] -540214433 -914532520 - [2] -1344032615 -871416961 - [2] -1928735161 935744880 - [2] -1509955773 -1707460853 - [3] 1145911788 -415231529 - [3] -278269626 -1682978013 - [3] -1629885665 -909240754 - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.syn.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.syn.dmr deleted file mode 100644 index 381b032492..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_array.syn.dmr +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested.hdf5.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested.hdf5.dap deleted file mode 100644 index 2e043ab8fe..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested.hdf5.dap +++ /dev/null @@ -1 +0,0 @@ - 1 -2 255 90 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested.hdf5.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested.hdf5.dmr deleted file mode 100644 index 945da2f1b4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested.hdf5.dmr +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested3.hdf5.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested3.hdf5.dap deleted file mode 100644 index d193859153..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested3.hdf5.dap +++ /dev/null @@ -1 +0,0 @@ - 17 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested3.hdf5.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested3.hdf5.dmr deleted file mode 100644 index 3dd3a8eb5a..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_nested3.hdf5.dmr +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_type.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_type.nc.dap deleted file mode 100644 index 6e0cb49e1d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_type.nc.dap +++ /dev/null @@ -1 +0,0 @@ - 1 -2 diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_type.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_type.nc.dmr deleted file mode 100644 index 691c85d70d..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_struct_type.nc.dmr +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_utf8.nc.dap b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_utf8.nc.dap deleted file mode 100644 index eb9b6ef983..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_utf8.nc.dap +++ /dev/null @@ -1,3 +0,0 @@ - [0] "Καλημέα" - [1] "abc" - diff --git a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_utf8.nc.dmr b/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_utf8.nc.dmr deleted file mode 100644 index 6330f7b085..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServlet/baseline/test_utf8.nc.dmr +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_anon_dim.syn.2.dap b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_anon_dim.syn.2.dap deleted file mode 100644 index a69de268a4..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_anon_dim.syn.2.dap +++ /dev/null @@ -1 +0,0 @@ - 3125247010 3374268247 2206234860 1060190036 diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_anon_dim.syn.2.dmr b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_anon_dim.syn.2.dmr deleted file mode 100644 index 058bb28134..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_anon_dim.syn.2.dmr +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.5.dap b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.5.dap deleted file mode 100644 index 7420b43453..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.5.dap +++ /dev/null @@ -1,4 +0,0 @@ - [0] 3 [1] 5 - [0] 1024.80 - [0] "Καλημέα" - [0] 0xABCDEF0000000000 diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.5.dmr b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.5.dmr deleted file mode 100644 index 83af129bb7..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.5.dmr +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.8.dap b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.8.dap deleted file mode 100644 index 9c060c2015..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.8.dap +++ /dev/null @@ -1 +0,0 @@ - [0] 1 [1] 2 [2] 4 diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.8.dmr b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.8.dmr deleted file mode 100644 index 97a6e53fa5..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.8.dmr +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.9.dap b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.9.dap deleted file mode 100644 index b7fc1fa5bd..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.9.dap +++ /dev/null @@ -1 +0,0 @@ - [0] 4 [1] 1 [2] 2 diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.9.dmr b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.9.dmr deleted file mode 100644 index b1cf68eac1..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_atomic_array.nc.9.dmr +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_enum_array.nc.4.dap b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_enum_array.nc.4.dap deleted file mode 100644 index 8277a7de56..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_enum_array.nc.4.dap +++ /dev/null @@ -1 +0,0 @@ - [0] 2 [1] 1 diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_enum_array.nc.4.dmr b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_enum_array.nc.4.dmr deleted file mode 100644 index 963404a513..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_enum_array.nc.4.dmr +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.1.dap b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.1.dap deleted file mode 100644 index e9082c0001..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.1.dap +++ /dev/null @@ -1 +0,0 @@ - 37 diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.1.dmr b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.1.dmr deleted file mode 100644 index 7909a15ec2..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.1.dmr +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.3.dap b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.3.dap deleted file mode 100644 index cef7e62967..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.3.dap +++ /dev/null @@ -1 +0,0 @@ - 17 37 diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.3.dmr b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.3.dmr deleted file mode 100644 index f8c3ff5ae3..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_one_vararray.nc.3.dmr +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_opaque_array.nc.7.dap b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_opaque_array.nc.7.dap deleted file mode 100644 index 2c0819195e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_opaque_array.nc.7.dap +++ /dev/null @@ -1 +0,0 @@ - [0] 0xFEDCBA9876543210 [1] 0xFEDCBA9999999999 diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_opaque_array.nc.7.dmr b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_opaque_array.nc.7.dmr deleted file mode 100644 index 049b37d03e..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_opaque_array.nc.7.dmr +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_struct_array.nc.6.dap b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_struct_array.nc.6.dap deleted file mode 100644 index af7758ecde..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_struct_array.nc.6.dap +++ /dev/null @@ -1 +0,0 @@ - 1 -1 17 37 -4 12 -8 8 diff --git a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_struct_array.nc.6.dmr b/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_struct_array.nc.6.dmr deleted file mode 100644 index 47626a73d0..0000000000 --- a/dap4/d4tests/src/test/data/resources/TestServletConstraints/baseline/test_struct_array.nc.6.dmr +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/Makefile b/dap4/d4tests/src/test/data/resources/testfiles/Makefile deleted file mode 100644 index fda8984011..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -NC=\ -test_one_var \ -test_one_vararray \ -test_atomic_types \ -test_atomic_array \ -test_enum \ -test_enum_2 \ -test_enum_array \ -test_groups1 \ -test_struct_type \ -test_struct_array \ -test_misc1 \ -test_vlen1 \ -test_vlen2 \ -test_opaque \ -test_opaque_array \ -test_fill \ -test_utf8 - -HDF5=\ -test_struct_nested \ -test_struct_nested3 \ -test_vlen3 \ -test_vlen4 \ -test_vlen5 - -C=tst_fills tst_h5fill - -BUGS= - -all:: all2 all3 - -all1: - for x in ${C} ; do \ - gcc -g -O0 -o $$x.exe $$x.c -L/usr/local/lib -lnetcdf -lcurl -lhdf5 -lhdf5_hl ; \ - ./$$x ; \ - done - -all2: - for x in ${NC} ${HDF5} ; do ncgen -k3 $${x}.cdl ; done - -all3: - for x in ${HDF5} ; do cp $${x}.nc $${x}.hdf5 ; done - -clean:: - rm -f *.nc; rm -f *.hdf5; rm -f *.h5 - for x in ${C} ; do rm -f $$x.exe ; done - rm -fr dump - - -verify: - rm -fr dump - mkdir dump - for x in ${NC} ; do ncdump $${x}.nc > dump/$${x}.cdl ; done - for x in ${HDF5} ; do ncdump $${x}.hdf5 > dump/$${x}.cdl ; done - for x in ${NC} ${HDF5} ; do \ - echo $${x}.cdl ; \ - diff -wBb $${x}.cdl dump/$${x}.cdl ; \ - done - -UI=f:/git/thredds/ui/target/toolsUI-4.4.0-SNAPSHOT.jar -F=test_test - -# note -vall fails -x:: - rm -f ${F}.hdf5 ${F}.nc - ncgen -k3 -o ${F}.nc ${F}.cdl - cp ${F}.nc ${F}.hdf5 - java -cp ${UI} ucar.nc2.NCdumpW ${F}.hdf5 - -# ncdump ${F}.hdf5 - -t:: - ncgen -k3 -o ${F}.nc ${F}.cdl - ncdump ${F}.nc diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_aaa.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_aaa.nc.dmr deleted file mode 100644 index a8d498be14..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_aaa.nc.dmr +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_atomic_array.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_atomic_array.nc.dmr deleted file mode 100644 index 9e0dd4e355..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_atomic_array.nc.dmr +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_atomic_types.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_atomic_types.nc.dmr deleted file mode 100644 index 88340335c2..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_atomic_types.nc.dmr +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum.nc.dmr deleted file mode 100644 index 7126f07378..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum.nc.dmr +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum1.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum1.nc.dmr deleted file mode 100644 index dca662dfc9..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum1.nc.dmr +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum2.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum2.nc.dmr deleted file mode 100644 index 6cfd3fa18c..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum2.nc.dmr +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum_array.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum_array.nc.dmr deleted file mode 100644 index dd8b966f98..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_enum_array.nc.dmr +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_groups1.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_groups1.nc.dmr deleted file mode 100644 index 80f918edc6..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_groups1.nc.dmr +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_numeric_types.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_numeric_types.nc.dmr deleted file mode 100644 index 57cb8ca453..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_numeric_types.nc.dmr +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_one_var.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_one_var.nc.dmr deleted file mode 100644 index 89016b1816..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_one_var.nc.dmr +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_one_vararray.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_one_vararray.nc.dmr deleted file mode 100644 index 8f199d1cb1..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_one_vararray.nc.dmr +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_opaque_type.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_opaque_type.nc.dmr deleted file mode 100644 index 298d5f9c8e..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_opaque_type.nc.dmr +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_string_type.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_string_type.nc.dmr deleted file mode 100644 index 4b7615450f..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_string_type.nc.dmr +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct1.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct1.nc.dmr deleted file mode 100644 index 9612148ceb..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct1.nc.dmr +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_array.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_array.nc.dmr deleted file mode 100644 index 8dabe14882..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_array.nc.dmr +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_nested.hdf5.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_nested.hdf5.dmr deleted file mode 100644 index 376824981e..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_nested.hdf5.dmr +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_nested.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_nested.nc.dmr deleted file mode 100644 index f42d82a6ba..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_nested.nc.dmr +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_type.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_type.nc.dmr deleted file mode 100644 index 4e2adb0c1d..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_struct_type.nc.dmr +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_utf8.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_utf8.nc.dmr deleted file mode 100644 index 74115be967..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_utf8.nc.dmr +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen1.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen1.nc.dmr deleted file mode 100644 index b8086d06d1..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen1.nc.dmr +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen2.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen2.nc.dmr deleted file mode 100644 index f5ebdb60b9..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen2.nc.dmr +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen3.hdf5.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen3.hdf5.dmr deleted file mode 100644 index 13041f5136..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen3.hdf5.dmr +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen3.nc.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen3.nc.dmr deleted file mode 100644 index b8729a4e15..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen3.nc.dmr +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen4.hdf5.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen4.hdf5.dmr deleted file mode 100644 index 09398765d6..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen4.hdf5.dmr +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen5.hdf5.dmr b/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen5.hdf5.dmr deleted file mode 100644 index 2cd00c88d1..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/dmr/test_vlen5.hdf5.dmr +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/doit b/dap4/d4tests/src/test/data/resources/testfiles/doit deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_anon_dim.syn b/dap4/d4tests/src/test/data/resources/testfiles/test_anon_dim.syn deleted file mode 100644 index 221f7ac725..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_anon_dim.syn +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_array.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_array.cdl deleted file mode 100644 index ea901a8db6..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_array.cdl +++ /dev/null @@ -1,39 +0,0 @@ -netcdf test_atomic_array { -types: - opaque(8) o_t; - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; -dimensions: - d1 = 1; - d2 = 2; - d3 = 3; - d4 = 4; - d5 = 5; -variables: - ubyte vu8(d2,d3); - short v16(d4); - uint vu32(d2,d3); - double vd(d2); - char vc(d2); - string vs(d2,d2); - o_t vo(d1,d2); - cloud_class_t primary_cloud(d5) ; - cloud_class_t primary_cloud:_FillValue = Missing ; - -data: - vu8 = - 255, 1, 2, - 3, 4, 5 ; - v16 = 1, 2, 3, 4 ; - vu32 = - 5, 4, 3, - 2, 1, 0 ; - vd = 17.9, 1024.8 ; - vc = '@', '&' ; - vs = "hello\tworld", "\r\n", "Καλημέα", "abc" ; - vo = - 0X0123456789ABCDEF, 0XABCDEF0000000000 ; - primary_cloud = Clear, Stratus, Clear, Cumulonimbus, _ ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_array.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_array.nc deleted file mode 100644 index 26cb578f8afe06fdcc560c4e6413ecfefb3ba07e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14523 zcmeHOeQX@X6@PoXc5KH^oDzS8R^%`w4U`z{*si4(;^gd$BRjV1vryF{*=OGwU%A{l z_tg)jO4UDFpsf;BrD{(oS;wcHX?5o%y{t@6FDPAL#B3R#jYIL6XYK$f0U=i_5G@&$Vj~@+cp{ z%>uN)yK~T2dC}LP%I(cY?5kD!X7eUZTMe!7ktLj(k8w+gY>V*1Vp@5h$XT?B%J|=K zUtl1WoQ$S2v1pq4*YPi)%K5@67fq#O$;6#aM-$P^SY$jN8wIPSv8AzjcO;sN#*>qW zqlwJXiO6_soBiR^37gwh!uK`&E6aPz;#Ny1UobqI zrj=ZMrSylWnuQez{8S(w4X2nF$R5tdlZn{j(X4cjLYY)J!?%hi$D~vhC^^2{7tbWq zMn>fO_{n^Rl+QiI^~X}F{Bo7g6Og>T;7}}`jwSBp2KsELq;x}BdBriQe|3^FmMXF= z1)*hW6!aCCuu*Ikc(&ZQU6}}xpX$n}PMT3tCM7CB& zk+Z0jHNZOP-4_aRUTjJRhpL=u=fOi=eW8Q>eZ!%^zTPgXRwL)nHWzV9XkxfWckAqn zhD$IK9u%Cz6@DqFgu?3y;R5jeevi`g)uHr}Hb$$8V7Yx>Chq@IZ0pYofRl zGFCYiDsF$H=I#Vsiz=?}+~t1-L!mDEyzyt&Lqzw&Z_V^b=zQP& zdNUSGE?wb(V}GU+^yaLI-nuvFw-oAa>#dsmiYB!9fD2C!3_);Z^jhg{4}Ip+fmi0& z8yp!0MOgoI7%wlNEhnuu}^63(i~;`>#rF-uS{!1*Gg|KboKt>9rNqWI36_# zkbbOGZ(9urYpb_uJy$I9lM}b=moH6k+eYsXs)fOl_;NT|ZoE>VPg6nFx=Fs70Ik zP4#(`lHP+M_G#O=Oj;n5SBayTRH3b)(ukL2rpihDM}8i0fatNH|36A(s z7N~)aTdW&cO(hl5CV@^k*4La;l~?xwuf>2@JYiS_yaDOSa={aDB;`|prv~#4x_q%~ z;Ke(C9USZ)APHYSr6VJb`6^ExRKi@swKwR@l;fMqWEUiit^1^Ixu1K`cn2OhapAS6 z_78P;vL9l(jm(bhnlkg4&1_ye9T~lPT1l0PlyF%}ER55f)Xh^TXM-WGi_nXFthBVg zIy69EB0p!e#Gvtp*Bc?wtEXFE-9OYDq>_dU4cqA*F0P>)n(Oz{jr?E@O}u_?l77M5 zTDthHo(%Oc*H3RWeDq1GR08%>f#>NW3)E4h?VD%RXIU-1{KgN?&=cz~C9=YqvKj{yATT8JQ%CC^PFhBk5hc{iJtP<$C`|ZT@Q3thbq?TD86(!YDtzh8VH9dO3QOM+TfW?r(!npdSV6p14RSh|JpfM1fhHnr2 zXo*-T9bd;C5IhT~Vl+1uBlI|8dJHU=p#4?vvFhy2s-sJ|y!q{ui35TDUgZ*vqSSrf zv*-wfqv9TW_$isC){%PYa;X}cPJe(=`s2_Py$iuxB^P&D?J{)c_ zAD*|E4;Ng_hc5>II|eY!f51mO4a_b+kl$i3hkU|xsMheIhbq${tS;mIGY`+4nt5*K znVHiwQ!}UL)-Mpy!lPrVCYj(%LjNbC@p!WQi^)_xq6^IR-{^1w*UNYacnEk1cnEk1 zcnEk1cnEk1cnEk1cnGXl1l+ZdUDAW%H8Om47E`@Ww2il=jt0zEf>o4pvx?He(vseP6-A$;xpb?RPiR79^2oj)ZN29&PtK18Rz!e7ao$$z zM6$Rn-|qi+rijID>nF=!4I7abFL$R2Z3LCJ0)J=;d9^|TRmjWS^!!kNi^gKRukdUY zR&hY>Y0>t2J&9Jhrgv;^P4Aetsqx!1Bsqf&Y|*#y!IZZ|)Z*2ZY2I8N4#wi~yTkEp zR9CQGal$4rEFYB5&^`32^Sx?s{da8U%3L$t@xiWO*I-v)plev~D%Y|-ils%unQ%Iq z(P%7k#qP6vw9Lq2acrSS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.cdl deleted file mode 100644 index d43301a201..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.cdl +++ /dev/null @@ -1,42 +0,0 @@ -netcdf test_atomic_types { -types: - opaque(8) o_t; - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; -variables: - byte v8; - ubyte vu8; - short v16; - ushort vu16; - int v32; - uint vu32; - int64 v64; - uint64 vu64; - float vf; - double vd; - char vc; - string vs; - o_t vo; - cloud_class_t primary_cloud; - cloud_class_t primary_cloud:_FillValue = Missing ; - cloud_class_t secondary_cloud; - cloud_class_t secondary_cloud:_FillValue = Missing ; -data: - v8 = -128; - vu8 = 255; - v16 = -32768; - vu16 = 65535; - v32 = 2147483647; - vu32 = 4294967295; - v64 = 9223372036854775807; - vu64 = 18446744073709551615; - vf = 3.1415926535897932384626433832795; - vd = 3.141592653589793238462643383279502884197169399375105820974944592; - vc = '@'; - vs = "hello\tworld"; - vo = 0x0123456789abcdef; - primary_cloud = Stratus; - secondary_cloud = _; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.ncdump deleted file mode 100644 index dd4d209c48..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.ncdump +++ /dev/null @@ -1,57 +0,0 @@ -netcdf test_atomic_types { -types: - opaque(8) o_t ; - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; -variables: - byte v8 ; - ubyte vu8 ; - short v16 ; - ushort vu16 ; - int v32 ; - uint vu32 ; - int64 v64 ; - uint64 vu64 ; - float vf ; - double vd ; - char vc ; - string vs ; - o_t vo ; - cloud_class_t primary_cloud ; - cloud_class_t primary_cloud:_FillValue = Missing ; - cloud_class_t secondary_cloud ; - cloud_class_t secondary_cloud:_FillValue = Missing ; -data: - - v8 = -128 ; - - vu8 = 255 ; - - v16 = -32768 ; - - vu16 = _ ; - - v32 = 2147483647 ; - - vu32 = _ ; - - v64 = 9223372036854775807 ; - - vu64 = 18446744073709551615 ; - - vf = 3.141593 ; - - vd = 3.14159265358979 ; - - vc = "@" ; - - vs = "hello\tworld" ; - - vo = 0X0123456789ABCDEF ; - - primary_cloud = Stratus ; - - secondary_cloud = _ ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.syn b/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.syn deleted file mode 100644 index d6f19ef663..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_atomic_types.syn +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_enum.cdl deleted file mode 100644 index 6cd1ceb34b..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_enum.cdl +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_enum { -types: - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; -variables: - cloud_class_t primary_cloud; - cloud_class_t primary_cloud:_FillValue = Missing ; -data: - primary_cloud = Stratus; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_enum.nc deleted file mode 100644 index 39a1db3688e7f306da4ca9ba5f6c4a3e31b8f9ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1239 zcmdT@y-OTH6n`^&cUdoY;YbLGv5;Wv!ih?n6k$a!h#w@x_FQjA9Wu9j%wB{^cnD(cTXx^q@6Eig{nc4qYSt&}K;-*SftC^7=ho6i zrL;KR`8S>L2w&?ge&LOO{Jrse+``;34|$yfBS_0+@y#pY>oy8%P5@|pCz-)3@bT%c zhU+>V2%Srjq5TcMq4DDfX;0`(rpd?lej@T-yshMxGtC8a!R$;d_Jm3YeUaq*yYcq? z2%sH&2-*uarFXW1pgfl{AUZzvP8rIiosa>^gCnRSA8(YXmhaF$gi1sjePPirRGP^C zRzYdQ*IY+AiiW2>@*0Q1q4Y`RX=X8mU&Y8#1NrZx@O-KDsNd)#0MhA#6`5r+*}(+4 zSE<%s_+$0qTG&~xP0=mP4j-V|Q)v-*dn(GZZoXU=4_DX!56qyOz!+BP>ck!#QA?g{ z2dZO~J?ETJp~Fg*R3n!A`N!^On{1ZOt}bKh+}la~m#_g09`3l)U2k1*bD(8E(m$}f z*yGQ3(SA=Z{G{{z*L1VT&h0E*)YJDgZYVVdFL58op}QoN+K5yk%7mZmY?ztJ{ieBo K4F4Vm)BFy!MK~h> diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_enum.ncdump deleted file mode 100644 index 7a7ca86e1b..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_enum.ncdump +++ /dev/null @@ -1,13 +0,0 @@ -netcdf test_enum { -types: - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; -variables: - cloud_class_t primary_cloud ; - cloud_class_t primary_cloud:_FillValue = Missing ; -data: - - primary_cloud = Stratus ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum1.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_enum1.cdl deleted file mode 100644 index da9c770a8b..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_enum1.cdl +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_enum1 { -types: - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; -variables: - cloud_class_t primary_cloud; - cloud_class_t primary_cloud:_FillValue = Missing ; -data: - primary_cloud = Stratus; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum1.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_enum1.nc deleted file mode 100644 index 39a1db3688e7f306da4ca9ba5f6c4a3e31b8f9ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1239 zcmdT@y-OTH6n`^&cUdoY;YbLGv5;Wv!ih?n6k$a!h#w@x_FQjA9Wu9j%wB{^cnD(cTXx^q@6Eig{nc4qYSt&}K;-*SftC^7=ho6i zrL;KR`8S>L2w&?ge&LOO{Jrse+``;34|$yfBS_0+@y#pY>oy8%P5@|pCz-)3@bT%c zhU+>V2%Srjq5TcMq4DDfX;0`(rpd?lej@T-yshMxGtC8a!R$;d_Jm3YeUaq*yYcq? z2%sH&2-*uarFXW1pgfl{AUZzvP8rIiosa>^gCnRSA8(YXmhaF$gi1sjePPirRGP^C zRzYdQ*IY+AiiW2>@*0Q1q4Y`RX=X8mU&Y8#1NrZx@O-KDsNd)#0MhA#6`5r+*}(+4 zSE<%s_+$0qTG&~xP0=mP4j-V|Q)v-*dn(GZZoXU=4_DX!56qyOz!+BP>ck!#QA?g{ z2dZO~J?ETJp~Fg*R3n!A`N!^On{1ZOt}bKh+}la~m#_g09`3l)U2k1*bD(8E(m$}f z*yGQ3(SA=Z{G{{z*L1VT&h0E*)YJDgZYVVdFL58op}QoN+K5yk%7mZmY?ztJ{ieBo K4F4Vm)BFy!MK~h> diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum1.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_enum1.ncdump deleted file mode 100644 index 7aea061a3b..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_enum1.ncdump +++ /dev/null @@ -1,13 +0,0 @@ -netcdf test_enum1 { -types: - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; -variables: - cloud_class_t primary_cloud ; - cloud_class_t primary_cloud:_FillValue = Missing ; -data: - - primary_cloud = Stratus ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.cdl deleted file mode 100644 index ef6ab50d1d..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.cdl +++ /dev/null @@ -1,15 +0,0 @@ -// Test cross group enum references -netcdf test_enum_2 { - types: - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; - group: h { - variables: - /cloud_class_t primary_cloud; - /cloud_class_t primary_cloud:_FillValue = Missing ; - data: - primary_cloud = Stratus; - } -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.nc deleted file mode 100644 index ff30729699a10af626b43d320fb36be76c818616..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1428 zcmdT^Pixdb6n`_xuIZZ9#VQmP6z>LBw#ADF$x>E|tyu6H)7_~ZoK2QVQWOe%k%At) z=qK^iqX$2Rhl;QuUOn}q?@eatvQj)sU&x#H=Qs1-y!Vo~gZ_HEb-e{dK>$8Qcnh(iq90rHdLsjO5#SnfIcg`Egf4U3Lms-#JjXnn;odP_TMIo~n zm>~E3M)N|j)S7O^gN^2Gio$&2MD3xEbuF-!5 zm}ogp^=k})fnM1GfH!sc|Ibg7<9Ae;Yd7&z!5*_SZ`iy_*)rc%g6%!Bvorhh{+lUR z`!Z)Z6mBf=xFedN^Exn%CCZ+2&gjllzd@=IgDbRp?1TM_kdf%$RSbU+j=@Fzm{uTJ bmr6ZLRVB!Jek;XHg--kK>M=dp4rlxi9>7yV diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.ncdump deleted file mode 100644 index b651551733..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_enum_2.ncdump +++ /dev/null @@ -1,16 +0,0 @@ -netcdf test_enum_2 { -types: - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; - -group: h { - variables: - cloud_class_t primary_cloud ; - cloud_class_t primary_cloud:_FillValue = Missing ; - data: - - primary_cloud = Stratus ; - } // group h -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum_array.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_enum_array.cdl deleted file mode 100644 index d395990b64..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_enum_array.cdl +++ /dev/null @@ -1,14 +0,0 @@ -netcdf test_enum_array { -types: - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; -dimensions: - d5 = 5; -variables: - cloud_class_t primary_cloud(d5); - cloud_class_t primary_cloud:_FillValue = Missing ; -data: - primary_cloud = Clear, Stratus, Clear, Cumulonimbus, _ ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum_array.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_enum_array.ncdump deleted file mode 100644 index 1c5944620a..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_enum_array.ncdump +++ /dev/null @@ -1,15 +0,0 @@ -netcdf test_enum_array { -types: - byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, - Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, - Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, - Missing = 127} ; -dimensions: - d5 = 5 ; -variables: - cloud_class_t primary_cloud(d5) ; - cloud_class_t primary_cloud:_FillValue = Missing ; -data: - - primary_cloud = Clear, Stratus, Clear, Cumulonimbus, _ ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_fill.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_fill.cdl deleted file mode 100644 index 7d2af998fc..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_fill.cdl +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_fill { -variables: - ubyte uv8; - short v16; - uint uv32; - uv32:_FillValue=17; -data: - uv8 = 240; - v16 = 32700; - uv32 = 111000; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_fill.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_fill.nc deleted file mode 100644 index 35e817fd5ae422791456a0d62ee34e54b4e34d03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1271 zcmdT@PfG$(5TCcZ%4Ql?R1zH|p<9Ax<|QZ;5rm8mbqTC=BWY9d&z^+3_6<4)LD(sx zYsWr8U!b6KV0eg5_U64eP(l*j9NGEvn|ZTue$Jj}QfZ%O)&nS}2?qFuORA^j!;lEY zl;0!g7n{qZwlwdHHZStJuF9xQzx8Oquw-hE-vmHs&|g8Z_ZaIKjDg92`Hkdetx~mW zjgnR8_#}UlBF_~U$Ewv!mGWw&Rkj+1;-OtSASf1&g`a3&4Mo>tboMEsxwa@lIE;v7$7{m`Q4{?DAJ2TuO7Cy1@uGo-gct(s*0$KBo27&3$YZQY5)chs=W%loH+T=J8$X%Jju({Qg48OMx?Y*IvgcGWGE z`OCMK;>~!gQSd?l^68RoZ|~bp3sJe-vR6>VOzgE>X#{94yb;7v{ZE1^=pvWI7j@B_ hP9m#b;+{d28MG@#(^-mMsc&{S5PI%BoL<~9_yU*SrTqW^ diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_fill.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_fill.ncdump deleted file mode 100644 index 5ca0494ef7..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_fill.ncdump +++ /dev/null @@ -1,14 +0,0 @@ -netcdf test_fill { -variables: - ubyte uv8 ; - short v16 ; - uint uv32 ; - uv32:_FillValue = 17U ; -data: - - uv8 = 240 ; - - v16 = 32700 ; - - uv32 = 111000 ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_groups1.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_groups1.cdl deleted file mode 100644 index bde2677083..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_groups1.cdl +++ /dev/null @@ -1,35 +0,0 @@ -netcdf test_groups1 { -dimensions: - dim1 = 5 ; - -group: g { - dimensions: - dim2 = 3 ; - - group: h { - dimensions: - dim3 = 7 ; - variables: - int v1(dim1); - float v2(dim2); - data: - - v1 = -876354855, -1761252264, 1723477387, -46827465, 1475147969; - - v2 = 12, -100, _ ; - } // group h - - group: i { - dimensions: - dim3 = 7 ; - variables: - int v1(dim1); - float v3(dim3); - data: - - v1 = 2, 3, 5, 7, 11 ; - - v3 = 23, 29, 19, 31, 17, 37, 13 ; - } // group i -} // group g -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_groups1.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_groups1.nc deleted file mode 100644 index b4fe34704f05f75be200f4349af89875af9af649..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8469 zcmeHMO-xi*6h8O8ndyjwVugZA;6Yc7Vd8*@8zbW|2oVRu5V4B}2ItY476-#jCtZ-# zRnzK5<4;Yhaixh1S1vThg+H+|>B^0Xo2D@_617cZYl4fWo^$U#!|*br1cBD(UAXVO z`}^+s?m6d9zWaSoS9fK_#tNY1_k#zjvX=V9MK5 z+4N*)M`$`@=ME&tC(>hFwKcdk*xHh`^Y+B#p@ViNH=Rn3w-{W;bAyE$@Ib2 zyLxHxshVh+o|jht-nm#+^|E!HJ zHA)W!u%Oltwcp?fub)~B!;l00AJQzQV7r%Qjy3Gsp7O4}g+>bSN!O0_h2wE7lS`8e z%E?i7_3n+v;=TQ`k$5EB7uEhbte2U=9+Z^Vu4`1K2TA})4Y}Zyvq!EB_eXm6u>Wzp z_^!M#w6fl@aU6gOa)BGCAp3J8E)vr( zN))!uT;gq836$DUht$>Mo0Wk(ar!`O$a1j;u06Pbl<^)S)d8bVUtC;ZAPA5VS7D4+ zhHrsa)=&VT8f-l5ks*Og7!t736n8BJxiciZ;j|y15dzj?2&gM^{l4D#5Wog(qtHOd z3mq98y4c5xWsCZ$Lkj`WHcqdlQuEBs^QEyU_>>-|ZN@4Q6z5?A@W=EVCRAcf9$IRu zfS!@V94;>k{^&*PI7Z-j!w>#3`CvhXNF)^M%axe1CnHR@B2 z&njGk=!tyZ!P862aVjqOiKfs04_t5uV%6Ze(OjC><4X>f=At>y$ClcZf0N^seA`<% z&h8xzniqFo{4gKR^4&SkR~i#1Q@)ZMr{o&TaGZZNA3ZB?ZtfvV{hy5j%&xNJTT*3j z0DP6mfh*RXvC^BK&un7_kZy$fI<{2HE!w`%|Z diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_groups1.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_groups1.ncdump deleted file mode 100644 index d351478dbe..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_groups1.ncdump +++ /dev/null @@ -1,35 +0,0 @@ -netcdf test_groups1 { -dimensions: - dim1 = 5 ; - -group: g { - dimensions: - dim2 = 3 ; - - group: h { - dimensions: - dim3 = 7 ; - variables: - int v1(dim1) ; - float v2(dim2) ; - data: - - v1 = -876354855, -1761252264, 1723477387, -46827465, 1475147969 ; - - v2 = 12, -100, _ ; - } // group h - - group: i { - dimensions: - dim3 = 7 ; - variables: - int v1(dim1) ; - float v3(dim3) ; - data: - - v1 = 2, 3, 5, 7, 11 ; - - v3 = 23, 29, 19, 31, 17, 37, 13 ; - } // group i - } // group g -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_misc1.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_misc1.nc deleted file mode 100644 index 36fbab844d79b152c6fbdb66d2601061cc96bbd4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22465 zcmeHNU1%It6uvXFn=WzkXWFJ(p_8V@wl-_hMvY)?;_l|Brb(I~@}h1h*@+q4%&s$& z7$i^;(Ta-rA}vDE2gN6!M5G8B9~9Jz??!zQ#0RzLgZLozoO|c&rpYeSS|};!Bs*vB zz32X%@0@#Q_Uw6SFx_8QdwZ=wN+d)~G|F4LT#jgUTGddQ+E39<6+Swc9@pzGSo&Tm zVAMo%G|om|s|yW98s#z$t6ri%>LsW`8Xr2ZJy% z0*nA7zz8q`i~u9R2rvSS03*N%FanGKBftnS0*nA7zz8q`i~u9R2rvSS03*N%FanIg z4Mo80##{gm5(qF`AaujL1M9&of$hL4OTbyS7m9hunk)F$(*^&@V7^dnpGv-_vKWM> z?Ls9qP03R-0&!zI4%B4rfh-CnOSB|J%W1fao7kf3x~5t#t;7;oLnW2%upDJOyefMO zvEvRYV8q47ED0)`ohV9LrH1<^CZOC5A54FM2_&V5PGm+VhDJxS6RE!8j4=0Mn`dNeio2(3)7x-z9v6U>CvE3b4}KJ?rej-q55 zj;i_}qGq%dCV|uoQ|5KZbdBz`yWr+PqA@|JSyG->iv_bo2m^X58!vipNSPpY&`Ody z=Lz3&f~;5Y!+9aH`9IE9HZOvKMEw7n_hbadD{9yqZQg>n$-LP!y?tfF{BoySXkWBm z#cFmU*J1>xkuP}hHr4h_^6#l~|6i|*VR0VwP&LDvxE3|JAj3L#0G@mLg^w>*wreC_ za$U0PF>p7eUeSGv=)P=F64JqT)#DAtL`-gGC5u((2NJku_i1109`R@PD!AowchnachN>S)RkX zq07lO84_!8|C1qOC9fe<6Th~jSRH}&`(X;8_Y{kg-@bZC6+e$^g|rYAHt@QaKe@kb zq0bJe=3`e#)u^Xe3_M#>e9_Ch3!g^r{ruja^EiTes+w>0LNBt(&H|fi)SlDlCaok{})2 zWFmS_Q@sNJ&AU~vvx?EP8azVDZG2WIcB7!7$7oob9EV16{E)90ReeQGtQ`blpi#wy z*`|Qs{P;q(NyYgwTh1aowVh0Vfi|N&x^gp>|ZkJABVS1F6wri3Y+2M93g&Nc7O4 zCkfS)L(<$-Px1s2)ze!A;Y0N_4sB#IX2b^3STm~EHjyWU12rvSS03*N% zFanGKBftnS0*nA7zz9@B0OJzzM*P~3VN?2+jd5`EBaFphge8Os%Xp?gGoBeqWwI*5 zvJ(OV7&6G&p&d97qW=$~NK7fR7|EAstUSP`pNOI$6vZisQyhjy`QXL(e?;99w_=T< zQQSyIvY=*bYDd~W*7a0i07Jd!w?G@tE3V#>_ i_5t<*_5t<*_5t<*_5t<*_5t<*_5t<*_JNzv2mS?u6iSf* diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_one_var.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_one_var.cdl deleted file mode 100644 index f5edd1268f..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_one_var.cdl +++ /dev/null @@ -1,6 +0,0 @@ -netcdf test_one_var { -variables: - int t; -data: - t = 17; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_one_var.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_one_var.nc deleted file mode 100644 index 4169d2d2966eebf8a0d68513a1bcbdc2fa6a0a0d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 603 zcmeD5aB<`1lHy_j0S*oZ76t(@6Gr@pf@mg)2#gPtPk=FS(Ec7SK}XkTOBfh{>d{re_&nJlqZk?Z7&w41-p@IpD8C@Js3bGB7$`0b#Li%O zAOQqrsYS(^`FXa6HF>Ee$th_$nMp7q6Fn0>Bi)qLvecaXg51=+lA4T^G*cu6hI$ry zhGqGnsxtJIjK`KRMfG%NRU}nUrk|!Iaj*)?nfddHR{hR}e@(WUnN-|T6f#SkI>uO#SC;8E08S;#2ipD5CskrUIs=+upmS~ z(5oCEqhM-T!8|4=Ca^Sz5J--haX-{@xM@3(j2&`JwuxN#{GC0#*~CCjX9UGJ7%=C@ hmv}>i1ttgOGBB6r8x})3HTPK97?oYqJ6E554**2IbWQ*O diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_opaque.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_opaque.ncdump deleted file mode 100644 index 97de1aedbf..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_opaque.ncdump +++ /dev/null @@ -1,9 +0,0 @@ -netcdf test_opaque { -types: - opaque(8) o_t ; -variables: - o_t vo1 ; -data: - - vo1 = 0X0123456789ABCDEF ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_opaque_array.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_opaque_array.cdl deleted file mode 100644 index bd33119964..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_opaque_array.cdl +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_opaque_array { -types: - opaque(8) o_t; -dimensions: - d2 = 2; -variables: - o_t vo2(d2,d2); -data: - vo2 = - 0X0123456789ABCDEF, 0XABCDEF0000000000, - 0XFEDCBA9876543210, 0XFEDCBA9999999999; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_opaque_array.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_opaque_array.ncdump deleted file mode 100644 index 4a7e2f1825..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_opaque_array.ncdump +++ /dev/null @@ -1,13 +0,0 @@ -netcdf test_opaque_array { -types: - opaque(8) o_t ; -dimensions: - d2 = 2 ; -variables: - o_t vo2(d2, d2) ; -data: - - vo2 = - 0X0123456789ABCDEF, 0XABCDEF0000000000, - 0XFEDCBA9876543210, 0XFEDCBA9999999999 ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_sequence_1.syn b/dap4/d4tests/src/test/data/resources/testfiles/test_sequence_1.syn deleted file mode 100644 index 355f652977..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_sequence_1.syn +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_sequence_2.syn b/dap4/d4tests/src/test/data/resources/testfiles/test_sequence_2.syn deleted file mode 100644 index 4aa6576faf..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_sequence_2.syn +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct1.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_struct1.cdl deleted file mode 100644 index 005f897c52..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct1.cdl +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_struct_type { - types: - compound c_t { - int x ; - int y ; - }; // c_t -variables: - c_t s; -data: - s = {1,-2}; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct1.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_struct1.nc deleted file mode 100644 index 2a988dc2fec9bb1390d3c8d9628de04edf075119..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 805 zcmeD5aB<`1lHy_j0S*oZ76t(@6Gr@p0##;+2#gPtPk=FS(Ec7SK}kP=ZDpi3ASm>C(+RlxW>*&ua{415e6Kp5}m98i>BkXlrdnOY1K7Y1Ty zuso0eg0j@2;>`R!Tf>^X)RN?sw4BT&n2?E{iJp;eN@`hZPJTgdYF+O#z5WZ?~{=fNW)AVgdyW1BVcZ$IK`T zO-x`1f+PY!1hs+3Gs&C&&K}-uVjz%4J|I21X+oc(woP K05Sgo6C42TEP5#b diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct1.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_struct1.ncdump deleted file mode 100644 index 1b2c36e6f7..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct1.ncdump +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_struct1 { -types: - compound c_t { - int x ; - int y ; - }; // c_t -variables: - c_t s ; -data: - - s = {1, -2} ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.cdl deleted file mode 100644 index bc5f723006..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.cdl +++ /dev/null @@ -1,18 +0,0 @@ -netcdf test_struct_array { -types: - compound c_t { - int x ; - int y ; - }; // c_t -dimensions: - dx = 4; - dy = 3; -variables: - c_t s(dx,dy); -data: - s = -/*[0][0..2]*/ {1, -1}, {17, 37}, {-32767, 32767}, -/*[1][0..2]*/ {-1, 3}, {-2, 2}, {-3, 1}, -/*[2][0..2]*/ {-4, 12}, {-8, 8}, {-12, 4}, -/*[3][0..2]*/ {-5, 15}, {-10, 10}, {-15, 5} ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.ncdump deleted file mode 100644 index c306c05595..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.ncdump +++ /dev/null @@ -1,19 +0,0 @@ -netcdf test_struct_array { -types: - compound c_t { - int x ; - int y ; - }; // c_t -dimensions: - dx = 4 ; - dy = 3 ; -variables: - c_t s(dx, dy) ; -data: - - s = - {1, -1}, {17, 37}, {-32767, 32767}, - {-1, 3}, {-2, 2}, {-3, 1}, - {-4, 12}, {-8, 8}, {-12, 4}, - {-5, 15}, {-10, 10}, {-15, 5} ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.syn b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.syn deleted file mode 100644 index dfe5cf7484..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.syn +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.cdl deleted file mode 100644 index 399d8954ef..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.cdl +++ /dev/null @@ -1,15 +0,0 @@ -netcdf test_struct_nested { - types: - compound s1_t { - int x ; - int y ; - }; // s1_t - compound s2_t { - s1_t field1 ; - s1_t field2 ; - }; // s2_t -variables: - s2_t x; -data: - x = {{1,-2}, {255, 90}}; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.hdf5 b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.hdf5 deleted file mode 100644 index f49856fa34ac8f533cb526c5dbf6860dd63e4786..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 723 zcmeD5aB<`1lHy|G;9!7(|4?w52_j+ul{ox%PnN%jOAr&!7A7UI7&9|e3Z?~}=3-)C z1Sw$?2a${{AQA*viVfpS-b2`MNw7+=q)~i{36#es0#e1u0(A=mW5sruIxVPvBB@y2 z%n-2i6&6c3gd<}uW;F&@GoTHiFsNW)5CGB;rz$X1GO!?Xtyzkdup5%WoB}aK0BA^B zW@=7~Ap-+(hJsZaF>ny4`r!KBB(M{B85kiU3JM#b?Z9vWnLum%S;2A2%*7!DvXPnb eFf?jF_JTngj6r*PZ@_FWP;&SON_apz3Wx!a9$rfT diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.nc deleted file mode 100644 index 42f2e6a7eaee2acb391213cdf1cc5b499ba8380d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1330 zcmeHH%}T>S5S~ra8fq&=tAcotdTt=0N-v_=B87q#k6tP@+ZwEGNkXa6qZd!!Jo_xZ zf%pP~@1f4@55&-3dvZc{_M827`F3V^pPG%cLT)DqWVQ_!6h&7zKgzs}jA*RKuXSgE zZ#Ns4M*h<%i*eIbG`&pP=L}#(+1y1X049SpL*x7%@ffUujbG=yei4qwJd6V#VSEGs zx){d>ZNkGS7!8ly*^tLKes2(Tb*So89k1f^2_KBc_k0-7ZvEatg5Wwe$329iNX)+4 z!KqxA6p%f3SKk=+2~9-=#lsjVYg-0pHW63D3tbV(w0VF%cu*{f6`13abF_{VDGhbh znASmi=mmV>yK@#vg_f;b=<;N)Qd0iFW$S9!n=M)VFI9$Ptw&}!yG@u`D&Js5UMK!g z=*2Jf#U&_&jL|U=XN0_2W5}W1{8xqYp-;W+&uf#XJY!QL4Z{$5w$}-ntgN0X{fNE4 rR{B&wT_U}z6}g?bC8h#oOB7}nRzet?a&^m}SK>aAzUkFLe}(@qUtf(6 diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.ncdump deleted file mode 100644 index 16c71d22bf..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested.ncdump +++ /dev/null @@ -1,16 +0,0 @@ -netcdf test_struct_nested { -types: - compound s1_t { - int x ; - int y ; - }; // s1_t - compound s2_t { - s1_t field1 ; - s1_t field2 ; - }; // s2_t -variables: - s2_t x ; -data: - - x = {{1, -2}, {255, 90}} ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.cdl deleted file mode 100644 index e52eba8179..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.cdl +++ /dev/null @@ -1,16 +0,0 @@ -netcdf test_struct_nested3 { - types: - compound s1_t { - int field1 ; - }; // s1_t - compound s2_t { - s1_t field2 ; - }; // s2_t - compound s3_t { - s2_t field3 ; - }; // s2_t -variables: - s3_t x; -data: - x = {{{17}}} ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.hdf5 b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.hdf5 deleted file mode 100644 index 7e0173c94a421bf3d943a88e5a71b2726e816493..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 736 zcmeD5aB<`1lHy|G;9!7(|4{IN2_j+umG~g*-Q@4#62!!_g-Ho4#>@hhf@wjgxtJIj zK}y)fK_nwgIRi_vVSLGZkQflaB*7|ye3oLP_!2EB4<-q93sBNHzN8c;DFV{Z$ifVw zfPk^$0?ZIzhzJsS<>0a7VCO3=mTm|~#tO_b46J5Aognw6Wv1q&7&0&j00RW#UIm5; zm*&J^*J{A5gQnGpfdQXUYql(K!fuoUvkjV2#%M+nFxq>{Yi+R6ybO$xpaumR&{Uw$ oP@F`fxvbzwWai=!0-40jcn2C6@Yw7_3gtn<+~Picx**Uk0FHTVlK=n! diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.nc deleted file mode 100644 index c8cc68e0d6f00b6381287f63b4bfebdda77e18d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1206 zcmeD5aB<`1lHy_j0S*oZ76t(@6Gr@pf^94i5f~pPp8#Xvp#42uf|z(7Fe!oMnW3gI zz>GnsxtJIjK`KRMfG%NRU}nUrk|!Iaj*)?nfddHR{hR}e@(WUnN-|T6f#SkI>@4^W^M&k4>LmnrnyFV41`Ki>JEQr4{t~ys4_#0L<RE~n<4e53mM}1|iGYL|S)i$mfw3YT%6!HA_r4%d4gkY6m9+o> diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.ncdump deleted file mode 100644 index a3a6cb40e2..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_nested3.ncdump +++ /dev/null @@ -1,17 +0,0 @@ -netcdf test_struct_nested3 { -types: - compound s1_t { - int field1 ; - }; // s1_t - compound s2_t { - s1_t field2 ; - }; // s2_t - compound s3_t { - s2_t field3 ; - }; // s3_t -variables: - s3_t x ; -data: - - x = {{{17}}} ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.cdl deleted file mode 100644 index 005f897c52..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.cdl +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_struct_type { - types: - compound c_t { - int x ; - int y ; - }; // c_t -variables: - c_t s; -data: - s = {1,-2}; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.nc deleted file mode 100644 index 2a988dc2fec9bb1390d3c8d9628de04edf075119..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 805 zcmeD5aB<`1lHy_j0S*oZ76t(@6Gr@p0##;+2#gPtPk=FS(Ec7SK}kP=ZDpi3ASm>C(+RlxW>*&ua{415e6Kp5}m98i>BkXlrdnOY1K7Y1Ty zuso0eg0j@2;>`R!Tf>^X)RN?sw4BT&n2?E{iJp;eN@`hZPJTgdYF+O#z5WZ?~{=fNW)AVgdyW1BVcZ$IK`T zO-x`1f+PY!1hs+3Gs&C&&K}-uVjz%4J|I21X+oc(woP K05Sgo6C42TEP5#b diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.ncdump deleted file mode 100644 index 6fc0c77b50..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_type.ncdump +++ /dev/null @@ -1,12 +0,0 @@ -netcdf test_struct_type { -types: - compound c_t { - int x ; - int y ; - }; // c_t -variables: - c_t s ; -data: - - s = {1, -2} ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_test.cdl b/dap4/d4tests/src/test/data/resources/testfiles/test_test.cdl deleted file mode 100644 index 684d1c5002..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_test.cdl +++ /dev/null @@ -1,11 +0,0 @@ -netcdf test_test { - -types: - byte enum enum_t {c1=1, c2=2, c3=3}; - -variables: - enum_t v1; - -data: - v1 = c1; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_test.nc b/dap4/d4tests/src/test/data/resources/testfiles/test_test.nc deleted file mode 100644 index 56638925f8351da0529450a8eb091b2cee33c3c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 777 zcmeD5aB<`1lHy_j0S*oZ76t(@6Gr@p0#0U#2#gPtPk=FS(Ec7SK}kP=ZDpi3ASm>C(+RlxW>*&ua{415e6Kp5}m98i>BkXlrdnOY1K7Y1Ty zuso0eg0j@2;>`R!Tf>^X)RN?sw4BT&n2?E{iJp;eN@`hZPJTgdYFAz)U2&2wazg><)eNiR*XSSY$%}df)QT}R7#62Hxt|9dqB0cqP4K{-FZBb5@RBX<_+wd{g|Dd`OVCd<<@v? zv^BUV$dC+!HL-TlrO&FO<&d1AF|FsR(}1VPV;QaGqt+|d^(G}oYS#0h#yE;}?E^~~ z(>Yr&LF1OoD970jX24G_WlmKqi+0s1+BKNp1vpNKxL}u^rFm=ixJMuwIT?wbVC@2!>%u(7`lMd80O{ad^eBfuj>0$r zq_Yrf2EH2_?rk@iaEc_-=J{K@v&2oeRj(E6Et(wF$lW_T&gc7C<~1r%YmjddV*5oC#%t zRDDS;pYkfa_B7a!8d~ybFNfe@>ZC>{<0yrmoQ6i8OwSi8T zXRbKma>ZF&su!xo!c57Igoy^(xi4dHH;$bGgAv#NFm{knf~Z*jPV62jD1VOKp>6W) z-;3SXhpTti(!E#3eOTEa=)w+fB0Mx}-~#0}uH0Vf_`Fqd8({acA5w1I4hzd<>9|!% zc9M%J)1T0z`4#!6PvE)o#4>fbO1s9};1E z2G@@;+5w|8@zHoDo-*S(X>>Q7h!==ea0)fs5j!{gkaKP|Dq$*yMtj%az61`rM4YTA zJqvH_`~R*NPrA%_o8D`+%p_3%=5BMhP&{_<*ViKfOf zW0}#je$Wb5>+5Sl7;UWh%jaVX*~~;HJI+!9m@PvZoRl4UfOPQUn{OP($k{jnWU?XF z4gGOwxHe@maVXLd&?Fh>0$R?cC1sycZyrOV{lll)Ytt4>Z-TvU3nhkOh=tY>m;%5E zAJ|L~A!&9-@*FC1mJmof`RP&#ctjArmR>QIn_Fc%e?Z^)6(XOafZPcnut3k#l8fA}4AH4q| zaCa4yKL>8-w*vQW=lOd?UIynY<~k4sCozB=@1jID{LwKJrxbb;jLp+je)p1dbJ*FJ?S z|L!U1RIj$)KBE);o&6Q3kQd%!G60e16jw?(sy3RZtAY}c=1HHDS(#;r!1ge-3(yvz zsmn-I46y7aZ150_sSB<>-w!hU8*u=YfXE*DiF>0RlEIKo^x;>NMnEH=5zq)|1T+E~ q0gZr0KqH_L&~SvoV_&LEPSCZ_K5eyUV>d zQ6!+yC#Alql@_sm@Ik?sBI4hJBBChxAojrr|3G}LrY})Jsprhh+1)0)NLoZvW|F<< z&Y3ea=X~eP&z^m5a%{Y*@#aQ`B_3xcYvHf-xGak?Bsf&3_G9!?hh`?n=5_0D{UC2Q z8l)Hvvz<2TOhb_tu0^B^@p0LUQFo|Y$C0VAW)_FP+-zztD3;tH^4t*kZSYC)c6dNp zcZ1L?`ojYoz8fv&mkZt^v6B7C{=vSyyY3c>rB&CDHdgY>_f-iD^bhq9+|R5ePN#tm zIAP>P1s4Wx14Y|`a;<^7PdTflf@?1q1N+Hha6DWomfm`~Bf)WKVw%?ibxpKvZkTc8P)z{#p#F}IJ_b|ntU+}S!A7^h~wH}hOX1PgaGD){bw$|1I@0rf@7cv0TOwuxXCd# zd~xVv#V^fL^@n*IJsLXkO*27rUQF!Wi^DT@PQ`%l!i)_CbRhrhF zz;hN0Zof?>ag{NHnos}w%bBv*A$~w7gS5gLE8jC{11A^JIZb>4^AGz(uhW9iSq%{( z8$UY2_6Wk-YPZkGRW6u_N8a!pQOSPLR*}4&OiU0KJK~qZDI~ z7vxHT8-{Cvn{%RE=sLLqUci3)eY(5s84+vpri2DyA;@UUt+5`(O{qTmZHNSHwHM^- zKrpIN*UFR7WJIkwR6%3=;d0c)Dwm>}sqBKV5HC%*$Z$E*C692grfYcYK;bK=RlIL| zK6r+{8i$rM z@o5~npUKl4P$GshaP!|ErOT=36 zYd@w<>DxEv!L9c(7lRp=2r?}5>GAY@dN!5Li44mDNC;rcAn!y@=t7GAUkYVn%9%we zUzxG?06Tsnl1V7aQxK&*42^Q=#H**!w)l<6F*M2>@k|zQ_NH}YZRV@Z2Wwd;lQ?_S zI?6G<{pEMBp>^mZ{6S%FL?C7RC;~5Roj<)WpHAaXI~09H`O+c5Dr($SRl!%8Mx$)n zwpLYD2q**;0tx|zfI{H9LEu^VU3X-JvCR$jQ5dKgP%)rlK*fNH0Tlx(22>2F7*H{w OVnD@!ih=7d2L1uwHAtWU diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_zerodim.ncdump b/dap4/d4tests/src/test/data/resources/testfiles/test_zerodim.ncdump deleted file mode 100644 index e13baa0d39..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/test_zerodim.ncdump +++ /dev/null @@ -1,28 +0,0 @@ -netcdf test_zerodim { -dimensions: - lat = 6 ; - lon = 4 ; - time = UNLIMITED ; // (0 currently) - unlim = UNLIMITED ; // (3 currently) -variables: - float lat(lat) ; - lat:units = "degrees_north" ; - float lon(lon) ; - lon:units = "degrees_east" ; - double time(time) ; - time:units = "seconds since 2009-01-01" ; - float pr(time, lat, lon) ; - pr:standard_name = "air_pressure_at_sea_level" ; - pr:units = "hPa" ; - float var(unlim) ; - -// global attributes: - :title = "example for workshop" ; -data: - - lat = _, _, _, _, _, _ ; - - lon = _, _, _, _ ; - - var = 0, 1, 3 ; -} diff --git a/dap4/d4tests/src/test/data/resources/testfiles/tst_fills.c b/dap4/d4tests/src/test/data/resources/testfiles/tst_fills.c deleted file mode 100644 index dd7844a837..0000000000 --- a/dap4/d4tests/src/test/data/resources/testfiles/tst_fills.c +++ /dev/null @@ -1,51 +0,0 @@ -/* This is part of the netCDF package. Copyright 2008 University - Corporation for Atmospheric Research/Unidata See COPYRIGHT file for - conditions of use. See www.unidata.ucar.edu for more info. - - Create a test file with default fill values for variables of each type. - - $Id: tst_fills.c,v 1.12 2009/03/17 01:22:42 ed Exp $ -*/ - -#include -#include -#include - -#define FILE_NAME "tst_fills.nc" -#define VAR1 "uv8" -# define TYPE1 NC_UBYTE -# define DATA1 240 -#define VAR2 "v16" -# define TYPE2 NC_SHORT -# define DATA2 32700 -#define VAR3 "uv32" -# define TYPE3 NC_INT -# define FILL3 17 -# define DATA3 111000 - -#define ERR abort() - - -int -main(int argc, char **argv) -{ - int ncid; - int varid1, varid2, varid3; - int fill3 = FILL3; - - printf("\n*** Testing fill values.\n"); - - if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR; - if (nc_def_var(ncid, VAR1, TYPE1, 0, NULL, &varid1)) ERR; - if (nc_def_var(ncid, VAR2, TYPE2, 0, NULL, &varid2)) ERR; - if (nc_def_var(ncid, VAR3, TYPE3, 0, NULL, &varid3)) ERR; - if (nc_def_var_fill(ncid, varid3, 0, &fill3)) ERR; - - if (nc_enddef(ncid)) ERR; - - {unsigned char data = DATA1; if (nc_put_var(ncid,varid1,&data)) ERR;} - {short data = DATA2; if (nc_put_var(ncid,varid2,&data)) ERR;} - {unsigned int data = DATA3; if (nc_put_var(ncid,varid3,&data)) ERR;} -} - - diff --git a/dap4/d4tests/src/test/data/resources/testfiles/tst_fills.nc b/dap4/d4tests/src/test/data/resources/testfiles/tst_fills.nc deleted file mode 100644 index f45e6600f6be1c4348e7a6ba6d31e21c788999ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1050 zcmeD5aB<`1lHy|G;9!7(|4<;s0ueEQO8j`qD(dgy62!!_g-Ho4#>@RAwHK3k85Ih?N`+tn45rvlfW|pF;@DVHAcs9ij**vlEDi zF1XzJ;cndJFazMfY#Aj@P1%?PTFkrF5uw&?k1OvlEsV*0MVFB^10s|`- zBrHIDK_G^Oh8Q$7pcI3s3= pieces.length) // not found - throw new IllegalArgumentException("DapTestCommon"); - prefix = DapUtil.join(pieces, "/", 0, i); - suffix = DapUtil.join(pieces, "/", i + 1, pieces.length); - } - this.req.setContextPath(DapUtil.absolutize(prefix)); - this.req.setPathInfo(suffix); - this.req.setServletPath(DapUtil.absolutize(suffix)); - } - } - - public byte[] execute() throws IOException { - if (this.controller == null) - throw new DapException("Mocker: no controller"); - this.controller.handleRequest(this.req, this.resp); - return this.resp.getContentAsByteArray(); - } - } - - // Mocking Support Class for HTTPMethod - - static public class MockExecutor implements HTTPMethod.Executor { - protected String resourcepath = null; - - public MockExecutor(String resourcepath) { - this.resourcepath = resourcepath; - } - - // HttpHost targethost,HttpClient httpclient,HTTPSession session - public HttpResponse execute(HttpRequestBase rq) throws IOException { - URI uri = rq.getURI(); - DapController controller = getController(uri); - StandaloneMockMvcBuilder mvcbuilder = MockMvcBuilders.standaloneSetup(controller); - mvcbuilder.setValidator(new TestServlet.NullValidator()); - MockMvc mockMvc = mvcbuilder.build(); - MockHttpServletRequestBuilder mockrb = MockMvcRequestBuilders.get(uri); - // We need to use only the path part - mockrb.servletPath(uri.getPath()); - // Move any headers from rq to mockrb - Header[] headers = rq.getAllHeaders(); - for (int i = 0; i < headers.length; i++) { - Header h = headers[i]; - mockrb.header(h.getName(), h.getValue()); - } - // Since the url has the query parameters, - // they will automatically be parsed and added - // to the rb parameters. - - // Finally set the resource dir - mockrb.requestAttr("RESOURCEDIR", this.resourcepath); - - // Now invoke the servlet - MvcResult result; - try { - result = mockMvc.perform(mockrb).andReturn(); - } catch (Exception e) { - throw new IOException(e); - } - - // Collect the output - MockHttpServletResponse res = result.getResponse(); - byte[] byteresult = res.getContentAsByteArray(); - - // Convert to HttpResponse - HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, res.getStatus(), ""); - if (response == null) - throw new IOException("HTTPMethod.executeMock: Response was null"); - Collection keys = res.getHeaderNames(); - // Move headers to the response - for (String key : keys) { - List values = res.getHeaders(key); - for (String v : values) { - response.addHeader(key, v); - } - } - ByteArrayEntity entity = new ByteArrayEntity(byteresult); - String sct = res.getContentType(); - entity.setContentType(sct); - response.setEntity(entity); - return response; - } - - protected DapController getController(URI uri) throws IOException { - String path = uri.getPath(); - path = HTTPUtil.canonicalpath(path); - assert path.startsWith("/"); - String[] pieces = path.split("[/]"); - assert pieces.length >= 2; - // Path is absolute, so pieces[0] will be empty - // so pieces[1] should determine the controller - DapController controller; - if ("d4ts".equals(pieces[1])) { - controller = new D4TSController(); - } else if ("thredds".equals(pieces[1])) { - controller = new Dap4Controller(); - } else - throw new IOException("Unknown controller type " + pieces[1]); - return controller; - } - } - - static class TestFilter implements FileFilter { - boolean debug; - boolean strip; - String[] extensions; - - public TestFilter(boolean debug, String[] extensions) { - this.debug = debug; - this.strip = strip; - this.extensions = extensions; - } - - public boolean accept(File file) { - boolean ok = false; - if (file.isFile() && file.canRead()) { - // Check for proper extension - String name = file.getName(); - if (name != null) { - for (String ext : extensions) { - if (name.endsWith(ext)) - ok = true; - } - } - if (!ok && debug) - System.err.println("Ignoring: " + file.toString()); - } - return ok; - } - - static void filterfiles(String path, List matches, String... extensions) { - File testdirf = new File(path); - assert (testdirf.canRead()); - TestFilter tf = new TestFilter(DEBUG, extensions); - File[] filelist = testdirf.listFiles(tf); - for (int i = 0; i < filelist.length; i++) { - File file = filelist[i]; - if (file.isDirectory()) - continue; - String fname = DapUtil.canonicalpath(file.getAbsolutePath()); - matches.add(fname); - } - } - } - - ////////////////////////////////////////////////// - // Static variables - - static protected String dap4root = null; - static protected String dap4testroot = null; - static protected String dap4resourcedir = null; - - static { - dap4root = locateDAP4Root(threddsroot); - if (dap4root == null) - System.err.println("Cannot locate /dap4 parent dir"); - dap4testroot = canonjoin(dap4root, D4TESTDIRNAME); - dap4resourcedir = canonjoin(dap4testroot, DFALTRESOURCEPATH); - } - - ////////////////////////////////////////////////// - // Static methods - - - static protected String getD4TestsRoot() { - return dap4testroot; - } - - static protected String getResourceRoot() { - return dap4resourcedir; - } - - static String locateDAP4Root(String threddsroot) { - String root = threddsroot; - if (root != null) - root = root + "/" + DEFAULTTREEROOT; - // See if it exists - File f = new File(root); - if (!f.exists() || !f.isDirectory()) - root = null; - return root; - } - - ////////////////////////////////////////////////// - // Instance variables - - - protected String d4tsserver = null; - - protected String title = "Dap4 Testing"; - - public DapTestCommon() { - this("DapTest"); - } - - public DapTestCommon(String name) { - super(name); - - this.d4tsserver = TdsTestDir.dap4TestServer; - if (DEBUG) - System.err.println("DapTestCommon: d4tsServer=" + d4tsserver); - } - - /** - * Try to get the system properties - */ - protected void setSystemProperties() { - String testargs = System.getProperty("testargs"); - if (testargs != null && testargs.length() > 0) { - String[] pairs = testargs.split("[ ]*[,][ ]*"); - for (String pair : pairs) { - String[] tuple = pair.split("[ ]*[=][ ]*"); - String value = (tuple.length == 1 ? "" : tuple[1]); - if (tuple[0].length() > 0) - System.setProperty(tuple[0], value); - } - } - if (System.getProperty("nodiff") != null) - prop_diff = false; - if (System.getProperty("baseline") != null) - prop_baseline = true; - if (System.getProperty("nogenerate") != null) - prop_generate = false; - if (System.getProperty("debug") != null) - prop_debug = true; - if (System.getProperty("visual") != null) - prop_visual = true; - if (System.getProperty("ascii") != null) - prop_ascii = true; - if (System.getProperty("utf8") != null) - prop_ascii = false; - if (prop_baseline && prop_diff) - prop_diff = false; - prop_controls = System.getProperty("controls", ""); - } - - ////////////////////////////////////////////////// - // Overrideable methods - - ////////////////////////////////////////////////// - // Accessor - - public void setTitle(String title) { - this.title = title; - } - - public String getTitle() { - return this.title; - } - - ////////////////////////////////////////////////// - // Instance Utilities - - public void visual(String header, String captured) { - if (!captured.endsWith("\n")) - captured = captured + "\n"; - // Dump the output for visual comparison - System.err.println("\n" + header + ":"); - System.err.println("---------------"); - System.err.print(captured); - System.err.println("---------------"); - System.err.flush(); - } - - protected void findServer(String path) throws DapException { - String svc = "http://" + this.d4tsserver + "/d4ts"; - if (!checkServer(svc)) - System.err.println("D4TS Server not reachable: " + svc); - // Since we will be accessing it thru NetcdfDataset, we need to change the schema. - d4tsserver = "dap4://" + d4tsserver + "/d4ts"; - } - - ////////////////////////////////////////////////// - - public String getDAP4Root() { - return this.dap4root; - } - - @Override - public String getResourceDir() { - return this.dap4resourcedir; - } - - /** - * Unfortunately, mock does not appear to always - * do proper initialization - */ - static protected void mockSetup() { - TdsRequestedDataset.setDatasetManager(new DatasetManager()); - } - - - static protected void testSetup() { - DapController.TESTING = true; - DapCache.dspregistry.register(FileDSP.class, DSPRegistry.FIRST); - DapCache.dspregistry.register(SynDSP.class, DSPRegistry.FIRST); - try { - // Always prefer Nc4Iosp over HDF5 - NetcdfFile.iospDeRegister(NC4IOSP); - NetcdfFile.registerIOProviderPreferred(NC4IOSP, ucar.nc2.iosp.hdf5.H5iosp.class); - // Print out the library version - System.err.printf("Netcdf-c library version: %s%n", getCLibraryVersion()); - System.err.flush(); - } catch (Exception e) { - System.err.println("Cannot load ucar.nc2.jni.netcdf.Nc4Iosp"); - } - } - - static protected MvcResult perform(String url, MockMvc mockMvc, String respath, String... params) throws Exception { - MockHttpServletRequestBuilder rb = MockMvcRequestBuilders.get(url).servletPath(url); - if (params.length > 0) { - if (params.length % 2 == 1) - throw new Exception("Illegal query params"); - for (int i = 0; i < params.length; i += 2) { - if (params[i] != null) { - rb.param(params[i], params[i + 1]); - } - } - } - assert respath != null; - String realdir = canonjoin(dap4testroot, respath); - rb.requestAttr("RESOURCEDIR", realdir); - MvcResult result = mockMvc.perform(rb).andReturn(); - return result; - } - - - static void printDir(String path) { - File testdirf = new File(path); - assert (testdirf.canRead()); - File[] filelist = testdirf.listFiles(); - System.err.println("\n*******************"); - System.err.printf("Contents of %s:%n", path); - for (int i = 0; i < filelist.length; i++) { - File file = filelist[i]; - String fname = file.getName(); - System.err.printf("\t%s%s%n", fname, (file.isDirectory() ? "/" : "")); - } - System.err.println("*******************"); - System.err.flush(); - } - - static public String getCLibraryVersion() { - Nc4prototypes nc4 = NetcdfClibrary.getForeignFunctionInterface(); - return (nc4 == null ? "Unknown" : nc4.nc_inq_libvers()); - } -} - diff --git a/dap4/d4tests/src/test/java/dap4/test/Diff.j b/dap4/d4tests/src/test/java/dap4/test/Diff.j deleted file mode 100644 index 4c516837a1..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/Diff.j +++ /dev/null @@ -1,794 +0,0 @@ -// Diff -- text file difference utility. -// See full docu-comment at beginning of Diff class. - -/* Copyright (c) Ian F. Darwin, http://www.darwinsys.com/, 1996-2002. - * All rights reserved. Software written by Ian F. Darwin and others. - * $Id: LICENSE,v 1.8 2004/02/09 03:33:38 ian Exp $ - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * Java, the Duke mascot, and all variants of Sun's Java 'steaming coffee cup' - logo are trademarks of Sun Microsystems. Sun's, and James Gosling's, - * pioneering role in inventing and promulgating (and standardizing) the Java - * language and environment is gratefully acknowledged. - * - * The pioneering role of Dennis Ritchie and Bjarne Stroustrup, of AT&T, for - * inventing predecessor languages C and C+is also gratefully acknowledged. - */ - -package dap4.test; - -import java.io.*; - - -/** - * This is the info kept per-file. - */ -class fileInfo { - - static final int MAXLINECOUNT = 20000; - - BufferedReader file; /* File handle that is open for read. */ - public int maxLine; /* After input done, # lines in file. */ - node symbol[]; /* The symtab handle of each line. */ - int other[]; /* Map of line# to line# in other file */ - /* ( -1 means don't-know ). */ - /* Allocated AFTER the lines are read. */ - - /** - * Normal constructor with one filename; file is opened and saved. - */ - public fileInfo(String filename) throws Exception { - symbol = new node[MAXLINECOUNT + 2]; - other = null; // allocated later! - file = new BufferedReader(new FileReader(filename)); - } - - public fileInfo(Reader rdr) throws Exception { - symbol = new node[MAXLINECOUNT + 2]; - other = null; // allocated later! - file = new BufferedReader(rdr); - } - - // This is done late, to be same size as # lines in input file. - - void alloc() { - other = new int[symbol.length + 2]; - } -}; - -/** - * diff Text file difference utility. - * ---- Copyright 1987, 1989 by Donald C. Lindsay, - * School of Computer Science, Carnegie Mellon University. - * Copyright 1982 by Symbionics. - * Use without fee is permitted when not for direct commercial - * advantage, and when credit to the source is given. Other uses - * require specific permission. - *

- * Converted from C to Java by Ian F. Darwin, http://www.darwinsys.com/, January, 1997. - * Copyright 1997, Ian F. Darwin. - *

- * Conversion is NOT FULLY TESTED. - *

- * USAGE: diff oldfile newfile - *

- * This program assumes that "oldfile" and "newfile" are text files. - * The program writes to stdout a description of the changes which would - * transform "oldfile" into "newfile". - *

- * The printout is in the form of commands, each followed by a block of - * text. The text is delimited by the commands, which are: - *

- * DELETE AT n - * ..deleted lines - *

- * INSERT BEFORE n - * ..inserted lines - *

- * n MOVED TO BEFORE n - * ..moved lines - *

- * n CHANGED FROM - * ..old lines - * CHANGED TO - * ..newer lines - *

- * The line numbers all refer to the lines of the oldfile, as they are - * numbered before any commands are applied. - * The text lines are printed as-is, without indentation or prefixing. The - * commands are printed in upper case, with a prefix of ">>>>", so that - * they will stand out. Other schemes may be preferred. - * Files which contain more than MAXLINECOUNT lines cannot be processed. - * This can be fixed by changing "symbol" to a Vector. - * The algorithm is taken from Communications of the ACM, Apr78 (21, 4, 264-), - * "A Technique for Isolating Differences Between Files." - * Ignoring I/O, and ignoring the symbol table, it should take O(N) time. - * This implementation takes fixed space, plus O(U) space for the symbol - * table (where U is the number of unique lines). Methods exist to change - * the fixed space to O(N) space. - * Note that this is not the only interesting file-difference algorithm. In - * general, different algorithms draw different conclusions about the - * changes that have been made to the oldfile. This algorithm is sometimes - * "more right", particularly since it does not consider a block move to be - * an insertion and a (separate) deletion. However, on some files it will be - * "less right". This is a consequence of the fact that files may contain - * many identical lines (particularly if they are program source). Each - * algorithm resolves the ambiguity in its own way, and the resolution - * is never guaranteed to be "right". However, it is often excellent. - * This program is intended to be pedagogic. Specifically, this program was - * the basis of the Literate Programming column which appeared in the - * Communications of the ACM (CACM), in the June 1989 issue (32, 6, - * 740-755). - * By "pedagogic", I do not mean that the program is gracefully worded, or - * that it showcases language features or its algorithm. I also do not mean - * that it is highly accessible to beginners, or that it is intended to be - * read in full, or in a particular order. Rather, this program is an - * example of one professional's style of keeping things organized and - * maintainable. - * The program would be better if the "print" variables were wrapped into - * a struct. In general, grouping related variables in this way improves - * documentation, and adds the ability to pass the group in argument lists. - * This program is a de-engineered version of a program which uses less - * memory and less time. The article points out that the "symbol" arrays - * can be implemented as arrays of pointers to arrays, with dynamic - * allocation of the subarrays. (In C, macros are very useful for hiding - * the two-level accesses.) In Java, a Vector would be used. This allows an - * extremely large value for MAXLINECOUNT, without dedicating fixed arrays. - * (The "other" array can be allocated after the input phase, when the exact - * sizes are known.) The only slow piece of code is the "strcmp" in the tree - * descent: it can be speeded up by keeping a hash in the tree node, and - * only using "strcmp" when two hashes happen to be equal. - *

- * Change Log - * ---------- - * 1Jan97 Ian F. Darwin: first working rewrite in Java, based entirely on - * D.C.Lindsay's reasonable C version. - * Changed comments from /***************** to /**, shortened, added - * whitespace, used tabs more, etc. - * 6jul89 D.C.Lindsay, CMU: fixed portability bug. Thanks, Gregg Wonderly. - * Just changed "char ch" to "int ch". - * Also added comment about way to improve code. - * 10jun89 D.C.Lindsay, CMU: posted version created. - * Copyright notice changed to ACM style, and Dept. is now School. - * ACM article referenced in docn. - * 26sep87 D.C.Lindsay, CMU: publication version created. - * Condensed all 1982/83 change log entries. - * Removed all command line options, and supporting code. This - * simplified the input code (no case reduction etc). It also - * simplified the symbol table, which was capable of remembering - * offsets into files (instead of strings), and trusting (!) hash - * values to be unique. - * Removed dynamic allocation of arrays: now fixed static arrays. - * Removed speed optimizations in symtab package. - * Removed string compression/decompression code. - * Recoded to Unix standards from old Lattice/MSDOS standards. - * (This affected only the #include's and the IO.) - * Some renaming of variables, and rewording of comments. - * 1982/83 D.C.Lindsay, Symbionics: created. - * - * @author Ian F. Darwin, Java version - * @author D. C. Lindsay, C version (1982-1987) - * @version Java version 0.9, 1997 - */ - -public class Diff { - - /** - * block len > any possible real block len - */ - final int UNREAL = Integer.MAX_VALUE; - - /** - * Keeps track of information about file1 and file2 - */ - fileInfo oldinfo, newinfo; - - PrintWriter printer = null; - - String identifier = ""; - - - /** - * blocklen is the info about found blocks. It will be set to 0, except - * at the line#s where blocks start in the old file. At these places it - * will be set to the # of lines in the block. During printout , - * this # will be reset to -1 if the block is printed as a MOVE block - * (because the printout phase will encounter the block twice, but - * must only print it once.) - * The array declarations are to MAXLINECOUNT+2 so that we can have two - * extra lines (pseudolines) at line# 0 and line# MAXLINECOUNT+1 - * (or less). - */ - int blocklen[]; - - /** - * main - entry point when used standalone. - * NOTE: no routines return error codes or throw any local - * exceptions. Instead, any routine may complain - * to stderr and then exit with error to the system. - */ - public static void main(String argstrings[]) throws Exception { - if (argstrings.length != 2) { - System.err.println("Usage: diff oldfile newfile"); - System.exit(1); - } - Diff d = new Diff("Diff"); - d.doDiff(argstrings[0], argstrings[1]); - return; - } - - /** - * Construct a Diff object. - */ - public Diff(String id) { - identifier = id; - } - - - /* Do comparison against two Reader streams */ - - public boolean doDiff(Reader oldFile, Reader newFile, Writer out) throws Exception { - this.printer = new PrintWriter(out); - oldinfo = new fileInfo(oldFile); - newinfo = new fileInfo(newFile); - return process(); - } - - public boolean doDiff(Reader oldFile, Reader newFile) throws Exception { - Writer w = new OutputStreamWriter(System.out); - return doDiff(oldFile, newFile, w); - } - - /* Do comparison against two string streams */ - - public boolean doDiff(String data1, String data2, Writer out) throws Exception { - if(data1 == null || data2 == null) return false; - return doDiff(new StringReader(data1), new StringReader(data2), out); - } - - public boolean doDiff(String data1, String data2) throws Exception { - return doDiff(data1, data2, new OutputStreamWriter(System.out)); - } - - boolean process() throws Exception { - /* we don't process until we know both files really do exist. */ - inputscan(oldinfo); - inputscan(newinfo); - - /* Now that we've read all the lines, allocate some arrays. - */ - blocklen = new int[(oldinfo.maxLine > newinfo.maxLine ? - oldinfo.maxLine : newinfo.maxLine) + 2]; - oldinfo.alloc(); - newinfo.alloc(); - - /* Now do the work, and print the results. */ - transform(); - return printout(); - } - - static boolean isBlankLine(String s) - { - int index = 0; - int len = s.length(); - for(index=len-1;index>=0;index--) { - if(" \t\r".indexOf(s.charAt(index)) < 0) return false; - } - return true; - } - - /** - * inputscan Reads the file specified by pinfo.file. - * --------- Places the lines of that file in the symbol table. - * Sets pinfo.maxLine to the number of lines found. - */ - void inputscan(fileInfo pinfo) throws IOException { - String linebuffer; - pinfo.maxLine = 0; - while ((linebuffer = pinfo.file.readLine()) != null) { - if(!isBlankLine(linebuffer)) - storeline(linebuffer, pinfo); - } - } - - /** - * storeline Places line into symbol table. - * --------- Expects pinfo.maxLine initted: increments. - * Places symbol table handle in pinfo.ymbol. - * Expects pinfo is either oldinfo or newinfo. - */ - void storeline(String linebuffer, fileInfo pinfo) { - int linenum = ++pinfo.maxLine; /* note, no line zero */ - if (linenum > fileInfo.MAXLINECOUNT) { - System.err.println("MAXLINECOUNT exceeded, must stop."); - System.exit(1); - } - pinfo.symbol[linenum] = node.addSymbol(this, linebuffer, pinfo == oldinfo, linenum); - } - - /* - * transform - * Analyzes the file differences and leaves its findings in - * the global arrays oldinfo.other, newinfo.other, and blocklen. - * Expects both files in symtab. - * Expects valid "maxLine" and "symbol" in oldinfo and newinfo. - */ - - void transform() { - int oldline, newline; - int oldmax = oldinfo.maxLine + 2; /* Count pseudolines at */ - int newmax = newinfo.maxLine + 2; /* ..front and rear of file */ - - for (oldline = 0; oldline < oldmax; oldline++) - oldinfo.other[oldline] = -1; - for (newline = 0; newline < newmax; newline++) - newinfo.other[newline] = -1; - - scanunique(); /* scan for lines used once in both files */ - scanafter(); /* scan past sure-matches for non-unique blocks */ - scanbefore(); /* scan backwards from sure-matches */ - scanblocks(); /* find the fronts and lengths of blocks */ - } - - /* - * scanunique - * Scans for lines which are used exactly once in each file. - * Expects both files in symtab, and oldinfo and newinfo valid. - * The appropriate "other" array entries are set to the line# in - * the other file. - * Claims pseudo-lines at 0 and XXXinfo.maxLine+1 are unique. - */ - - void scanunique() { - int oldline, newline; - node psymbol; - - for (newline = 1; newline <= newinfo.maxLine; newline++) { - psymbol = newinfo.symbol[newline]; - if (psymbol.symbolIsUnique()) { // 1 use in each file - oldline = psymbol.linenum; - newinfo.other[newline] = oldline; // record 1-1 map - oldinfo.other[oldline] = newline; - } - } - newinfo.other[0] = 0; - oldinfo.other[0] = 0; - newinfo.other[newinfo.maxLine + 1] = oldinfo.maxLine + 1; - oldinfo.other[oldinfo.maxLine + 1] = newinfo.maxLine + 1; - } - - /* - * scanafter - * Expects both files in symtab, and oldinfo and newinfo valid. - * Expects the "other" arrays contain positive #s to indicate - * lines that are unique in both files. - * For each such pair of places, scans past in each file. - * Contiguous groups of lines that match non-uniquely are - * taken to be good-enough matches, and so marked in "other". - * Assumes each other[0] is 0. - */ - - void scanafter() { - int oldline, newline; - - for (newline = 0; newline <= newinfo.maxLine; newline++) { - oldline = newinfo.other[newline]; - if (oldline >= 0) { /* is unique in old & new */ - for (; ;) { /* scan after there in both files */ - if (++oldline > oldinfo.maxLine) break; - if (oldinfo.other[oldline] >= 0) break; - if (++newline > newinfo.maxLine) break; - if (newinfo.other[newline] >= 0) break; - - /* oldline & newline exist, and - aren't already matched */ - - if (newinfo.symbol[newline] != - oldinfo.symbol[oldline]) break; // not same - - newinfo.other[newline] = oldline; // record a match - oldinfo.other[oldline] = newline; - } - } - } - } - - /** - * scanbefore - * As scanafter, except scans towards file fronts. - * Assumes the off-end lines have been marked as a match. - */ - void scanbefore() { - int oldline, newline; - - for (newline = newinfo.maxLine + 1; newline > 0; newline--) { - oldline = newinfo.other[newline]; - if (oldline >= 0) { /* unique in each */ - for (; ;) { - if (--oldline <= 0) break; - if (oldinfo.other[oldline] >= 0) break; - if (--newline <= 0) break; - if (newinfo.other[newline] >= 0) break; - - /* oldline and newline exist, - and aren't marked yet */ - - if (newinfo.symbol[newline] != - oldinfo.symbol[oldline]) break; // not same - - newinfo.other[newline] = oldline; // record a match - oldinfo.other[oldline] = newline; - } - } - } - } - - /** - * scanblocks - Finds the beginnings and lengths of blocks of matches. - * Sets the blocklen array (see definition). - * Expects oldinfo valid. - */ - void scanblocks() { - int oldline, newline; - int oldfront = 0; // line# of front of a block in old, or 0 - int newlast = -1; // newline's value during prev. iteration - - for (oldline = 1; oldline <= oldinfo.maxLine; oldline++) - blocklen[oldline] = 0; - blocklen[oldinfo.maxLine + 1] = UNREAL; // starts a mythical blk - - for (oldline = 1; oldline <= oldinfo.maxLine; oldline++) { - newline = oldinfo.other[oldline]; - if (newline < 0) oldfront = 0; /* no match: not in block */ - else { /* match. */ - if (oldfront == 0) oldfront = oldline; - if (newline != (newlast + 1)) oldfront = oldline; - ++blocklen[oldfront]; - } - newlast = newline; - } - } - - /* The following are global to printout's subsidiary routines */ - // enum{ idle, delete, insert, movenew, moveold, - // same, change } printstatus; - public static final int - idle = 0, delete = 1, insert = 2, movenew = 3, moveold = 4, - same = 5, change = 6; - int printstatus; - boolean anyprinted; - int printoldline, printnewline; // line numbers in old & new file - - /** - * printout - Prints summary to stdout. - * Expects all databuffer structures have been filled out. - * - * @return true if differences detected - */ - boolean printout() { - printstatus = idle; - anyprinted = false; - for (printoldline = printnewline = 1; ;) { - if (printoldline > oldinfo.maxLine) { - newconsume(); - break; - } - if (printnewline > newinfo.maxLine) { - oldconsume(); - break; - } - if (newinfo.other[printnewline] < 0) { - if (oldinfo.other[printoldline] < 0) - showchange(); - else - showinsert(); - } else if (oldinfo.other[printoldline] < 0) - showdelete(); - else if (blocklen[printoldline] < 0) - skipold(); - else if (oldinfo.other[printoldline] == printnewline) - showsame(); - else - showmove(); - } - if (anyprinted == true) println(">>>> "+identifier+": End of differences."); - else println(">>>> "+identifier+": Files are identical."); - return anyprinted; - } - - /* - * newconsume Part of printout. Have run out of old file. - * Print the rest of the new file, as inserts and/or moves. - */ - - void newconsume() { - for (; ;) { - if (printnewline > newinfo.maxLine) - break; /* end of file */ - if (newinfo.other[printnewline] < 0) showinsert(); - else showmove(); - } - } - - /** - * oldconsume Part of printout. Have run out of new file. - * Process the rest of the old file, printing any - * parts which were deletes or moves. - */ - void oldconsume() { - for (; ;) { - if (printoldline > oldinfo.maxLine) - break; /* end of file */ - printnewline = oldinfo.other[printoldline]; - if (printnewline < 0) showdelete(); - else if (blocklen[printoldline] < 0) skipold(); - else showmove(); - } - } - - /** - * showdelete Part of printout. - * Expects printoldline is at a deletion. - */ - void showdelete() { - if (printstatus != delete) - println(">>>> DELETE AT " + printoldline); - printstatus = delete; - oldinfo.symbol[printoldline].showSymbol(); - anyprinted = true; - printoldline++; - } - - /* - * showinsert Part of printout. - * Expects printnewline is at an insertion. - */ - - void showinsert() { - if (printstatus == change) println(">>>> CHANGED TO"); - else if (printstatus != insert) - println(">>>> INSERT BEFORE " + printoldline); - printstatus = insert; - newinfo.symbol[printnewline].showSymbol(); - anyprinted = true; - printnewline++; - } - - /** - * showchange Part of printout. - * Expects printnewline is an insertion. - * Expects printoldline is a deletion. - */ - void showchange() { - if (printstatus != change) - println(">>>> " + printoldline + " CHANGED FROM"); - printstatus = change; - oldinfo.symbol[printoldline].showSymbol(); - anyprinted = true; - printoldline++; - } - - /** - * skipold Part of printout. - * Expects printoldline at start of an old block that has - * already been announced as a move. - * Skips over the old block. - */ - void skipold() { - printstatus = idle; - for (; ;) { - if (++printoldline > oldinfo.maxLine) - break; /* end of file */ - if (oldinfo.other[printoldline] < 0) - break; /* end of block */ - if (blocklen[printoldline] != 0) - break; /* start of another */ - } - } - - /** - * skipnew Part of printout. - * Expects printnewline is at start of a new block that has - * already been announced as a move. - * Skips over the new block. - */ - void skipnew() { - int oldline; - printstatus = idle; - for (; ;) { - if (++printnewline > newinfo.maxLine) - break; /* end of file */ - oldline = newinfo.other[printnewline]; - if (oldline < 0) - break; /* end of block */ - if (blocklen[oldline] != 0) - break; /* start of another */ - } - } - - /** - * showsame Part of printout. - * Expects printnewline and printoldline at start of - * two blocks that aren't to be displayed. - */ - void showsame() { - int count; - printstatus = idle; - if (newinfo.other[printnewline] != printoldline) { - System.err.println("BUG IN LINE REFERENCING"); - System.exit(1); - } - count = blocklen[printoldline]; - printoldline += count; - printnewline += count; - } - - /** - * showmove Part of printout. - * Expects printoldline, printnewline at start of - * two different blocks ( a move was done). - */ - void showmove() { - int oldblock = blocklen[printoldline]; - int newother = newinfo.other[printnewline]; - int newblock = blocklen[newother]; - - if (newblock < 0) skipnew(); // already printed. - else if (oldblock >= newblock) { // assume new's blk moved. - blocklen[newother] = -1; // stamp block as "printed". - println(">>>> " + newother + - " THRU " + (newother + newblock - 1) + - " MOVED TO BEFORE " + printoldline); - for (; newblock > 0; newblock--, printnewline++) - newinfo.symbol[printnewline].showSymbol(); - anyprinted = true; - printstatus = idle; - - } else /* assume old's block moved */ - skipold(); /* target line# not known, display later */ - } - - /** - * Convenience wrapper for println - */ - public void println(String s) { - printer.println(s); - printer.flush(); - } - -}; // end of main class! - -/** - * Class "node". The symbol table routines in this class all - * understand the symbol table format, which is a binary tree. - * The methods are: addSymbol, symbolIsUnique, showSymbol. - */ -class node { /* the tree is made up of these nodes */ - - static Diff diff = null; - static node panchor = null; /* symtab is a tree hung from this */ - static final int freshnode = 0, - oldonce = 1, newonce = 2, bothonce = 3, other = 4; - - node pleft, pright; - int linenum; - int /* enum linestates */ linestate; - String line; - - /** - * Construct a new symbol table node and fill in its fields. - * - * @param pline string A line of the text file - */ - public node(String pline) { - pleft = pright = null; - linestate = freshnode; - /* linenum field is not always valid */ - line = pline; - } - - /** - * matchsymbol Searches tree for a match to the line. - * - * @param pline String pline, a line of text - * If node's linestate == freshnode, then created the node. - */ - static node matchsymbol(String pline) { - int comparison; - node pnode = panchor; - if (panchor == null) return panchor = new node(pline); - for (; ;) { - comparison = linecompare(pnode.line,pline); - if (comparison == 0) return pnode; /* found */ - - if (comparison < 0) { - if (pnode.pleft == null) { - pnode.pleft = new node(pline); - return pnode.pleft; - } - pnode = pnode.pleft; - } - if (comparison > 0) { - if (pnode.pright == null) { - pnode.pright = new node(pline); - return pnode.pright; - } - pnode = pnode.pright; - } - } - /* NOTE: There are return stmts, so control does not get here. */ - } - - /** - * addSymbol(String pline) - Saves line into the symbol table. - * Returns a handle to the symtab entry for that unique line. - * If inoldfile nonzero, then linenum is remembered. - */ - static node addSymbol(Diff diff, String pline, boolean inoldfile, int linenum) { - node.diff = diff; - node pnode; - pnode = matchsymbol(pline); /* find the node in the tree */ - if (pnode.linestate == freshnode) { - pnode.linestate = inoldfile ? oldonce : newonce; - } else { - if ((pnode.linestate == oldonce && !inoldfile) || - (pnode.linestate == newonce && inoldfile)) - pnode.linestate = bothonce; - else pnode.linestate = other; - } - if (inoldfile) pnode.linenum = linenum; - return pnode; - } - - /** - * symbolIsUnique Arg is a ptr previously returned by addSymbol. - * -------------- Returns true if the line was added to the - * symbol table exactly once with inoldfile true, - * and exactly once with inoldfile false. - */ - boolean symbolIsUnique() { - return (linestate == bothonce); - } - - /** - * showSymbol Prints the line to stdout. - */ - void showSymbol() { - diff.printer.println(line); - } - static String compact(String line){ - // trim and remove return characters - String[] pieces = line.trim().split("\r"); - line = ""; for(String s: pieces) line = line +s; - // Break line on whitespace and compact - pieces = line.split("[ \t\n][ \t\n]*"); - line = ""; for(String s: pieces) line = line + s; - return line; - } - - static int linecompare(String line1, String line2) - { - return compact(line1).compareToIgnoreCase(compact(line2)); - } - -} diff --git a/dap4/d4tests/src/test/java/dap4/test/Dump.java b/dap4/d4tests/src/test/java/dap4/test/Dump.java deleted file mode 100644 index 7ebe022f0a..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/Dump.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - - -package dap4.test; - -import dap4.core.util.DapUtil; -import dap4.core.util.Escape; -import java.io.IOException; -import java.io.InputStream; -import java.math.BigInteger; -import java.nio.BufferUnderflowException; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - -public class Dump { - - ////////////////////////////////////////////////// - // Constants - - static public boolean DUMPCSUM = false; - - static final String LBRACE = "{"; - static final String RBRACE = "}"; - - static final BigInteger MASK = new BigInteger("FFFFFFFFFFFFFFFF", 16); - - ////////////////////////////////////////////////// - // Type decls - - // Place to insert the command list - static public interface Commands { - public void run(Dump printer) throws IOException; - } - - ////////////////////////////////////////////////// - // Instance databuffer - - protected ByteBuffer reader = null; - protected boolean checksumming = true; - protected ByteOrder remoteorder = null; - protected StringBuilder buf = null; - protected java.util.zip.Checksum localchecksum; - protected int lastchecksum = 0; - - ////////////////////////////////////////////////// - // Constructor(s) - - public Dump() {} - - ////////////////////////////////////////////////// - // Command processing - - public String dumpdata(InputStream stream, boolean checksumming, ByteOrder remoteorder, Commands commands) - throws IOException { - // Hack for debugging; use a bytebuffer internally - this.reader = ByteBuffer.wrap(DapUtil.readbinaryfile(stream)); - this.checksumming = checksumming; - this.remoteorder = remoteorder; - this.buf = new StringBuilder(); - commands.run(this); - return this.buf.toString(); - } - - public int printcount() throws IOException { - ByteBuffer bytes = checksum(8); - long l = bytes.getLong(); - buf.append(String.format("count=%d%n", l)); - return (int) l; - } - - public void printvalue(char cmd, int typesize, int... indices) throws IOException { - long l = 0; - ByteBuffer bytes = null; - // for strings and opaque, the typesize is zero - if (typesize == 0) { - bytes = checksum(8); - l = bytes.getLong(); - bytes = checksum((int) l); - } else - bytes = checksum(typesize); - if (indices != null && indices.length > 0) { - for (int index : indices) { - buf.append(" [" + Integer.toString(index) + "]"); - } - } - buf.append(" "); - int switcher = (((int) cmd) << 4) + typesize; - switch (switcher) { - case ('S' << 4) + 1: - byte b = bytes.get(); - l = ((long) b); - buf.append(String.format("%d", l)); - break; - case ('U' << 4) + 1: - b = bytes.get(); - l = ((long) b) & 0xFF; - buf.append(String.format("%d", l)); - break; - case ('C' << 4) + 0: - case ('C' << 4) + 1: - l = ((long) bytes.get()) & 0x7F; - buf.append(String.format("'%c'", (char) (l & 0xFF))); - break; - case ('S' << 4) + 2: - short s = bytes.getShort(); - l = ((long) s); - buf.append(String.format("%d", l)); - break; - case ('U' << 4) + 2: - s = bytes.getShort(); - l = ((long) s) & 0xFFFFL; - buf.append(String.format("%d", l)); - break; - case ('S' << 4) + 4: - int i = bytes.getInt(); - l = ((long) i); - buf.append(String.format("%d", l)); - break; - case ('U' << 4) + 4: - i = bytes.getInt(); - l = ((long) i) & 0xFFFFFFFFL; - buf.append(String.format("%d", l)); - break; - case ('S' << 4) + 8: - l = bytes.getLong(); - l = ((long) l); - buf.append(String.format("%d", l)); - break; - case ('U' << 4) + 8: // We have to convert to BigInteger to get this right - l = bytes.getLong(); - l = ((long) l); - BigInteger big = BigInteger.valueOf(l); - big = big.and(MASK); - buf.append(String.format("%s", big.toString())); - break; - case ('F' << 4) + 4: - Float f = bytes.getFloat(); - buf.append(String.format("%g", f)); - break; - case ('F' << 4) + 8: - Double d = bytes.getDouble(); - buf.append(String.format("%g", d)); - break; - case ('T' << 4) + 0: - // Read the text - buf.append('"' + Escape.backslashEscape(new String(bytes.array(), DapUtil.UTF8), "\"") + '"'); - break; - case ('O' << 4) + 0: - buf.append("0x"); - for (i = 0; i < bytes.limit(); i++) { - int uint8 = bytes.get(); - char c = hexchar((uint8 >> 4) & 0xF); - buf.append(c); - c = hexchar((uint8) & 0xF); - buf.append(c); - } - break; - default: - assert false; - } - } - - public void verifychecksum() throws IOException { - if (!checksumming) - return; - int localcrc32 = endchecksum(); - // Get the checksum from the input stream - ByteBuffer bbuf = readn(DapUtil.CHECKSUMSIZE); - int remotecrc32 = bbuf.getInt(); - assert localcrc32 == remotecrc32; - newline(); - } - - public void newline() { - buf.append("\n"); - } - - public void startchecksum() { - if (this.localchecksum == null) - this.localchecksum = new java.util.zip.CRC32(); - this.localchecksum.reset(); - } - - protected int endchecksum() { - long crc = this.localchecksum.getValue(); // get the digest value - crc = (crc & 0x00000000FFFFFFFFL); /* crc is 32 bits */ - this.lastchecksum = (int) crc; - return this.lastchecksum; - } - - protected byte[] readnbytes(int n) throws IOException { - byte[] bytes = new byte[n]; - try { - this.reader.get(bytes); - } catch (BufferUnderflowException e) { - throw new IOException("Short DATADMR"); - } - return bytes; - } - - protected ByteBuffer readn(int n) throws IOException { - byte[] bytes = readnbytes(n); - ByteBuffer result = ByteBuffer.wrap(bytes).order(this.remoteorder); - return result; - } - - protected ByteBuffer checksum(int n) throws IOException { - byte[] bytes = readnbytes(n); - localchecksum.update(bytes, 0, n); - if (DUMPCSUM) { - System.err.print("CCC "); - for (int i = 0; i < n; i++) { - System.err.printf("%02x", bytes[i]); - } - System.err.println(); - } - ByteBuffer result = ByteBuffer.wrap(bytes).order(this.remoteorder); - return result; - } - - public void format(String s) { - buf.append(String.format(s)); - } - - char hexchar(int i) { - return "0123456789ABCDEF".charAt((i & 0xF)); - } - -} diff --git a/dap4/d4tests/src/test/java/dap4/test/GenerateRaw.java b/dap4/d4tests/src/test/java/dap4/test/GenerateRaw.java deleted file mode 100644 index 6956c8d1ae..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/GenerateRaw.java +++ /dev/null @@ -1,400 +0,0 @@ -package dap4.test; - -import dap4.core.ce.parser.CEParserImpl; -import dap4.core.util.DapDump; -import dap4.core.util.Escape; -import dap4.dap4lib.ChunkInputStream; -import dap4.dap4lib.DSPPrinter; -import dap4.dap4lib.FileDSP; -import dap4.dap4lib.RequestMode; -import dap4.servlet.DapController; -import dap4.servlet.Generator; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.MvcResult; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder; -import thredds.server.dap4.Dap4Controller; -import ucar.unidata.util.test.category.NotJenkins; -import ucar.unidata.util.test.category.NotPullRequest; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.StringWriter; -import java.lang.invoke.MethodHandles; -import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.List; - - -/** - * This program is actually a feeder to provide - * testdata for use by the netcdf-c library. - * It operates by capturing the on-wire data - * that would be produced by a request to thredds - * to fufill a request for a dataset. This is - * referred to as raw data. - *

- * In operation, and for each test dataset, - * a .dmr file is placed in - * .../dap4/d4tests/src/test/data/resources/dmrtestfiles - * and a .dap file is placed in - * .../dap4/d4tests/src/test/data/resources/daptestfiles - * The .dap file is the complete captured - * on-the-wire data. The other, with the extension .dmr, - * is just the dmr for that dataset. - *

- * This program is setup as a Junit Test. - * It is a modified version of TestServletConstraints. - * As a rule, this program should only be invoked when new - * test cases are available (see GenerateRaw#defineAlltestcases). - * No harm will occur if it is accidentally run. - *

- * On the netcdf-c side, there is a program -- dap4_test/maketests.sh -- - * that extracts files from the {dmr,dap}testfiles directories and from the - * testfiles directory (for .cdl files). It stores the dmr files in dmrtestfiles, - * the dap files in daptestfiles, and the cdl (if available) in - * cdltestfiles. - */ - -@Category({NotJenkins.class, NotPullRequest.class}) // must call explicitly in intellij -public class GenerateRaw extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static public boolean GENERATE = false; - static public boolean DEBUG = false; - static public boolean DEBUGDATA = false; - static public boolean PARSEDEBUG = false; - static public boolean CEPARSEDEBUG = false; - static public boolean SHOWTESTCASES = false; - - static public boolean USEBIG = false; - static public boolean NOCSUM = false; - - static public boolean USED4TS = false; - - static public boolean USEDAPDMR = true; - - ////////////////////////////////////////////////// - // Constants - - // static protected final String RESOURCEPATH = "/src/test/data/resources"; // wrt getTestInputFilesDir - static protected final String RAWDIR = "/rawtestfiles"; - static protected final String DAPDIR = "/daptestfiles"; - static protected final String DMRDIR = "/dmrtestfiles"; - - // constants for Fake Request - static protected final String FAKEURLPREFIX = (USED4TS ? "/d4ts" : "/dap4"); - - static protected final String RESOURCEPATH = "/src/test/data/resources"; // wrt getTestInputFilesDir - - ////////////////////////////////////////////////// - // Type Declarations - - static protected class TestCase { - static String resourceroot = null; - - static public void setRoots(String resource) { - resourceroot = canonicalpath(resource); - } - - static public String resourcepath() { - return resourceroot; - } - - public String dataset; - public String prefix; - public String suffix; // extensions - public String ce; - public boolean bigendian; - public boolean nochecksum; - public int id; - - public TestCase(String dataset) { - this(0, dataset, null); - } - - public TestCase(int id, String dataset, String ce) { - dataset = canonicalpath(dataset); - // The prefix is everything before the final file name - int index = dataset.lastIndexOf("/"); - if (index < 0) { - prefix = null; - } else { - prefix = canonicalpath(dataset.substring(0, index)); - dataset = dataset.substring(index + 1); - } - // pull off the extensions - index = dataset.indexOf("."); - if (index < 0) { - suffix = ""; - } else { - suffix = dataset.substring(index); - dataset = dataset.substring(0, index); - } - this.dataset = dataset; - this.ce = (ce == null ? null : Escape.urlEncodeQuery(ce)); - this.id = id; - this.bigendian = false; - this.nochecksum = false; - } - - public TestCase setBigEndian(boolean tf) { - this.bigendian = tf; - return this; - } - - public TestCase setNoChecksum(boolean tf) { - this.nochecksum = tf; - return this; - } - - public String inputpath() { - return canonjoin(resourceroot, this.prefix); - } - - public String generatepath(String dir) { - String s = canonjoin(this.resourcepath(), dir, this.dataset); - if (this.id > 0) - s = s + "." + String.format("%d", this.id); - return s + this.suffix; - } - - public String makeurl() { - String url = canonjoin(FAKEURLPREFIX, this.prefix, this.dataset) + this.suffix + ".dap"; - return url; - } - - public String makequery() { - if (this.ce == null) - return null; - return this.ce; - } - - public boolean matches(String name) { - String thisname = this.dataset + this.suffix; - return thisname.equals(name); - } - - } - - ////////////////////////////////////////////////// - // Instance variables - - protected MockMvc mockMvc; - - protected List alltestcases = new ArrayList<>(); - - protected List chosentests = new ArrayList<>(); - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - StandaloneMockMvcBuilder mvcbuilder = USED4TS ? MockMvcBuilders.standaloneSetup(new D4TSController()) - : MockMvcBuilders.standaloneSetup(new Dap4Controller()); - mvcbuilder.setValidator(new TestServlet.NullValidator()); - this.mockMvc = mvcbuilder.build(); - testSetup(); - if (prop_ascii) - Generator.setASCII(true); - TestCase.setRoots(getResourceRoot()); - defineAlltestcases(); - choosetests(); - if (USEDAPDMR) { - String dapdir = canonjoin(TestCase.resourcepath(), DAPDIR); - String dmrdir = canonjoin(TestCase.resourcepath(), DMRDIR); - File dapfile = new File(dapdir); - if (!dapfile.exists()) - dapfile.mkdirs(); - File dmrfile = new File(dmrdir); - if (!dmrfile.exists()) - dmrfile.mkdirs(); - } else { - String rawdir = canonjoin(TestCase.resourcepath(), RAWDIR); - File rawfile = new File(rawdir); - if (!rawfile.exists()) - rawfile.mkdirs(); - } - - } - - ////////////////////////////////////////////////// - // Define inputs - - protected void choosetests() { - if (false) { - chosentests = locate("test_atomic_array.nc"); - // chosentests = locate(5); - prop_visual = true; - prop_generate = false; - DapController.DUMPDMR = true; - } else { - prop_generate = true; - for (TestCase input : alltestcases) { - chosentests.add(input); - } - } - } - - ////////////////////////////////////////////////// - // Junit test methods - - @Test - public void generate() throws Exception { - Assert.assertFalse("No test cases specified", chosentests.size() == 0); - for (TestCase tc : chosentests) { - doOne(tc); - } - } - - ////////////////////////////////////////////////// - // Primary test method - - protected void doOne(TestCase tc) throws Exception { - String inputpath = tc.inputpath(); - String dappath; - String dmrpath; - if (USEDAPDMR) { - dappath = tc.generatepath(DAPDIR) + ".dap"; - dmrpath = tc.generatepath(DMRDIR) + ".dmr"; - } else { - dappath = tc.generatepath(RAWDIR) + ".dap"; - dmrpath = tc.generatepath(RAWDIR) + ".dmr"; - } - - String url = tc.makeurl(); - - String ce = tc.makequery(); - - System.err.println("Input: " + inputpath); - System.err.println("Generated (DMR):" + dmrpath); - System.err.println("Generated (DAP):" + dappath); - System.err.println("URL: " + url); - if (ce != null) - System.err.println("CE: " + ce); - - if (CEPARSEDEBUG) - CEParserImpl.setGlobalDebugLevel(1); - - String little = tc.bigendian ? "0" : "1"; - String nocsum = tc.nochecksum ? "1" : "0"; - MvcResult result; - if (ce == null) { - result = perform(url, this.mockMvc, RESOURCEPATH, DapTestCommon.ORDERTAG, little, DapTestCommon.NOCSUMTAG, nocsum, - DapTestCommon.TRANSLATETAG, "nc4"); - } else { - result = perform(url, this.mockMvc, RESOURCEPATH, DapTestCommon.CONSTRAINTTAG, ce, DapTestCommon.ORDERTAG, little, - DapTestCommon.NOCSUMTAG, nocsum, DapTestCommon.TRANSLATETAG, "nc4"); - } - - // Collect the output - MockHttpServletResponse res = result.getResponse(); - byte[] byteresult = res.getContentAsByteArray(); - - if (prop_debug || DEBUGDATA) { - DapDump.dumpbytestream(byteresult, ByteOrder.nativeOrder(), "GenerateRaw"); - } - - // Dump the dap serialization into a file - if (prop_generate || GENERATE) - writefile(dappath, byteresult); - - // Dump the dmr into a file by extracting from the dap serialization - ByteArrayInputStream bytestream = new ByteArrayInputStream(byteresult); - ChunkInputStream reader = new ChunkInputStream(bytestream, RequestMode.DAP, ByteOrder.nativeOrder()); - String sdmr = reader.readDMR(); // Read the DMR - if (prop_generate || GENERATE) - writefile(dmrpath, sdmr); - - if (prop_visual) { - visual(tc.dataset + ".dmr", sdmr); - FileDSP src = new FileDSP(); - src.open(byteresult); - StringWriter writer = new StringWriter(); - DSPPrinter printer = new DSPPrinter(src, writer); - printer.print(); - printer.close(); - writer.close(); - String sdata = writer.toString(); - visual(tc.dataset + ".dap", sdata); - } - } - - ////////////////////////////////////////////////// - - protected void defineAlltestcases() { - add(new TestCase("testfiles/test_atomic_array.nc"), new TestCase("testfiles/test_atomic_array.syn"), - new TestCase("testfiles/test_atomic_types.nc"), new TestCase("testfiles/test_atomic_types.syn"), - new TestCase("testfiles/test_enum.nc"), new TestCase("testfiles/test_enum_2.nc"), - new TestCase("testfiles/test_enum_array.nc"), new TestCase("testfiles/test_fill.nc"), - new TestCase("testfiles/test_groups1.nc"), new TestCase("testfiles/test_one_var.nc"), - new TestCase("testfiles/test_one_vararray.nc"), new TestCase("testfiles/test_anon_dim.syn"), - new TestCase("testfiles/test_unlim1.nc"), new TestCase("testfiles/test_utf8.nc"), - new TestCase("testfiles/test_opaque.nc"), new TestCase("testfiles/test_opaque_array.nc"), - new TestCase("testfiles/test_sequence_1.syn"), new TestCase("testfiles/test_sequence_2.syn"), - new TestCase("testfiles/test_struct_array.nc"), new TestCase("testfiles/test_struct_array.syn"), - new TestCase("testfiles/test_struct_nested.nc"), new TestCase("testfiles/test_struct_nested3.nc"), - new TestCase("testfiles/test_struct_nested3.nc"), new TestCase("testfiles/test_struct1.nc"), - new TestCase("testfiles/test_struct_type.nc"), new TestCase("testfiles/test_vlen1.nc"), - new TestCase("testfiles/test_vlen2.nc"), new TestCase("testfiles/test_vlen3.nc"), - new TestCase("testfiles/test_vlen4.nc"), // vlen inside a compound - new TestCase("testfiles/test_vlen5.nc"), new TestCase("testfiles/test_vlen6.nc"), - new TestCase("testfiles/test_vlen7.nc"), new TestCase("testfiles/test_vlen8.nc"), - (USED4TS ? new TestCase("testfiles/test_vlen9.nc") : null), // vlen of compound not handled - (USED4TS ? new TestCase("testfiles/test_vlen10.nc") : null), // CDM cannot handle nesting - (USED4TS ? new TestCase("testfiles/test_vlen11.nc") : null), // CDM cannot handle vlen of vlen - - // Constrained generation - new TestCase(1, "testfiles/test_one_vararray.nc", "/t[1]"), - new TestCase(2, "testfiles/test_anon_dim.syn", "/vu32[0:3]"), - new TestCase(3, "testfiles/test_one_vararray.nc", "/t"), - new TestCase(4, "testfiles/test_enum_array.nc", "/primary_cloud[1:2:4]"), - new TestCase(5, "testfiles/test_atomic_array.nc", "/vu8[1][0:2:2];/vd[1];/vs[1][0];/vo[0][1]"), - new TestCase(6, "testfiles/test_struct_array.nc", "/s[0:2:3][0:1]"), - new TestCase(7, "testfiles/test_opaque_array.nc", "/vo2[1][0:1]"), - new TestCase(8, "testfiles/test_atomic_array.nc", "/v16[0:1,3]"), - new TestCase(9, "testfiles/test_atomic_array.nc", "/v16[3,0:1]")); - if (SHOWTESTCASES) { - for (TestCase tc : alltestcases) { - System.err.println(tc.dataset); - } - } - } - - ////////////////////////////////////////////////// - // Utility methods - - protected void add(TestCase... cases) { - for (TestCase tc : cases) { - if (tc != null) - this.alltestcases.add(tc); - } - } - - // Locate the test cases with given prefix or id - List locate(Object tag) { - List results = new ArrayList(); - if (tag instanceof Integer) { - for (TestCase ct : this.alltestcases) { - if (ct.id == (Integer) tag) { - results.add(ct); - break; - } - } - } else if (tag instanceof String) { - for (TestCase ct : this.alltestcases) { - if (ct.matches((String) tag)) { - results.add(ct); - break; - } - } - } - return results; - } -} diff --git a/dap4/d4tests/src/test/java/dap4/test/Synthesize.java b/dap4/d4tests/src/test/java/dap4/test/Synthesize.java deleted file mode 100644 index edc50f4c7b..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/Synthesize.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - - -package dap4.test; - -import dap4.core.dmr.DapType; -import dap4.core.util.DapException; -import dap4.servlet.SerialWriter; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.math.BigInteger; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - -public class Synthesize { - - ////////////////////////////////////////////////// - // Constants - - static final int MAXSIZE = 8; - - static final BigInteger MASK = new BigInteger("FFFFFFFFFFFFFFFF", 16); - - ////////////////////////////////////////////////// - // Type decls - - // Place to insert the command list - static public interface Commands { - public void run(Synthesize reader) throws IOException; - } - - ////////////////////////////////////////////////// - // Instance databuffer - - public boolean checksumming = true; - public ByteOrder order = null; - public byte[] tmp = new byte[MAXSIZE]; - public ByteBuffer bbtmp = ByteBuffer.wrap(tmp); - public ByteArrayOutputStream writer = new ByteArrayOutputStream(); - - ////////////////////////////////////////////////// - // Constructor(s) - - public Synthesize() {} - - ////////////////////////////////////////////////// - // Accessors - - public byte[] getBytes() { - return writer.toByteArray(); - } - - - ////////////////////////////////////////////////// - // Command processing - - public void synthesize(boolean checksumming, ByteOrder order, Commands commands) throws IOException { - this.checksumming = checksumming; - this.order = order; - this.bbtmp.order(order); - commands.run(this); - } - - ////////////////////////////////////////////////// - // Commands - - public void putcount(long count) throws IOException { - bbtmp.position(0); - bbtmp.putLong(count); - writer.write(tmp, 0, bbtmp.position()); - } - - public void putvalue(DapType daptype, Object value) throws IOException { - int typesize = daptype.getSize(); - if (daptype.isFixedSize()) { - ByteBuffer tmp = SerialWriter.encodeArray(daptype, value, this.order); - } else if (daptype == DapType.STRING) { - String s = (String) value; - putcount(s.length()); - } else if (daptype == DapType.OPAQUE) { - ByteBuffer b = (ByteBuffer) value; - int len = b.position(); - putcount(len); - b.position(0); - for (int i = 0; i < len; i++) - writer.write(b.get()); - b.position(len); - } else - throw new DapException("Synthesize.putvalue: illegal type: " + daptype); - } - - public void putchecksum(ByteBuffer b) throws IOException { - if (!checksumming) - return; - int len = b.position(); - b.position(0); - for (int i = 0; i < len; i++) - writer.write(b.get()); - b.position(len); - } - -} diff --git a/dap4/d4tests/src/test/java/dap4/test/TestCDMClient.java b/dap4/d4tests/src/test/java/dap4/test/TestCDMClient.java deleted file mode 100644 index ac064a4cf7..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestCDMClient.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright (c) 1998-2021 University Corporation for Atmospheric Research/Unidata - * See LICENSE for license information. - */ - -package dap4.test; - -import dap4.core.util.DapUtil; -import dap4.servlet.DapCache; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import thredds.test.util.TdsTestDir; -import thredds.test.util.TdsUnitTestCommon; -import ucar.nc2.dataset.NetcdfDataset; - -import java.io.*; -import java.lang.invoke.MethodHandles; -import java.net.MalformedURLException; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; - -/** - * Test Client side access - */ - -public class TestCDMClient extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static final boolean DEBUG = false; - - ////////////////////////////////////////////////// - // Constants - - static final String BASEEXTENSION = ".txt"; - static final String INPUTEXTENSION = ".raw"; - - static final String DAP4TAG = "#protocol=dap4"; - - static final String DATADIR = "src/test/data/resources"; // relative to dap4 root - static final String BASELINEDIR = "TestCDMClient/baseline"; - static final String TESTCDMINPUT = "TestCDMClient/testinput"; - static final String TESTFILESINPUT = "testfiles"; - - static final String[] EXCLUDEDFILETESTS = new String[] {"test_sequence_2.syn.raw"}; - - ////////////////////////////////////////////////// - // Type Declarations - - static class TestCase { - static private String root = null; - - static void setRoot(String r) { - root = r; - } - - static String getRoot() { - return root; - } - - ///////////////////////// - - private String title; - private String dataset; - private String ext; - private boolean checksumming; - private String testpath; - private String baselinepath; - private String url; - - TestCase(String url) { - this(url, true); - } - - TestCase(String url, boolean csum) { - try { - URL u = new URL(url); - this.title = u.getPath(); - } catch (MalformedURLException e) { - this.title = "unknown"; - } - this.checksumming = csum; - this.url = url; - try { - URL u = new URL(url); - this.testpath = DapUtil.canonicalpath(u.getPath()); - int i = this.testpath.lastIndexOf('/'); - assert i > 0; - this.dataset = this.testpath.substring(i + 1, this.testpath.length()); - // strip off any raw extension - if (this.dataset.endsWith(INPUTEXTENSION)) - this.dataset = this.dataset.substring(0, this.dataset.length() - INPUTEXTENSION.length()); - this.baselinepath = root + "/" + BASELINEDIR + "/" + this.dataset + INPUTEXTENSION + BASEEXTENSION; - } catch (MalformedURLException e) { - throw new IllegalArgumentException(url); - } - } - - public String getURL() { - return this.url + DAP4TAG; - } - - public String getPath() { - return this.testpath; - } - - public String getDataset() { - return this.dataset; - } - - public String getBaseline() { - return this.baselinepath; - } - - public String getTitle() { - return this.title; - } - - public String toString() { - return this.url; - } - } - - ////////////////////////////////////////////////// - // Instance variables - - // Test cases - - protected List alltestcases = new ArrayList(); - protected List chosentests = new ArrayList(); - - protected String resourceroot = null; - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - DapCache.flush(); - testSetup(); - this.resourceroot = getResourceRoot(); - TestCase.setRoot(resourceroot); - defineAllTestcases(); - chooseTestcases(); - } - - // convert an extension to a file or url prefix - String prefix(String scheme, String ext) { - if (ext.charAt(0) == '.') - ext = ext.substring(1); - if (scheme.startsWith("http")) { - return "http://" + TdsTestDir.dap4TestServer + "/d4ts"; - } else if (scheme.equals("file")) { - if (ext.equals("raw")) - return "file:/" + this.resourceroot + "/" + TESTCDMINPUT; - } - throw new IllegalArgumentException(); - } - - ////////////////////////////////////////////////// - // Define test cases - - void chooseTestcases() { - if (false) { - chosentests = locate("file:", "test_atomic_array.nc.raw"); - prop_visual = true; - prop_baseline = false; - } else { - prop_baseline = false; - for (TestCase tc : alltestcases) { - chosentests.add(tc); - } - } - } - - void defineAllTestcases() { - System.err.printf("pwd=%s%n", System.getProperty("user.dir")); - List matches = new ArrayList<>(); - String dir = TestCase.getRoot() + "/" + TESTCDMINPUT; - TestFilter.filterfiles(dir, matches, "raw"); - for (String f : matches) { - boolean excluded = false; - for (String x : EXCLUDEDFILETESTS) { - if (f.endsWith(x)) { - excluded = true; - break; - } - } - if (!excluded) { - add(f); - } - } - } - - protected void add(String path) { - File f = new File(path); - if (!f.exists()) - System.err.println("Non existent file test case: " + path); - else if (!f.canRead()) - System.err.println("Unreadable file test case: " + path); - String ext = path.substring(path.lastIndexOf('.'), path.length()); - String url = "file://" + path; - try { - URL u = new URL(url); - System.err.printf("Testcase: add: %s path=%s%n", u.toString(), u.getPath()); - } catch (MalformedURLException e) { - System.err.println("Malformed file test case: " + url); - } - TestCase tc = new TestCase(url); - for (TestCase t : this.alltestcases) { - assert !t.getURL().equals(tc.getURL()) : "Duplicate TestCases: " + t; - } - this.alltestcases.add(tc); - } - - ////////////////////////////////////////////////// - // Junit test method - @Test - public void testCDMClient() throws Exception { - for (TestCase testcase : chosentests) { - doOneTest(testcase); - } - System.err.println("*** PASS"); - } - - ////////////////////////////////////////////////// - // Primary test method - void doOneTest(TestCase testcase) throws Exception { - System.err.println("Testcase: " + testcase.getURL()); - System.err.println("Baseline: " + testcase.getBaseline()); - - NetcdfDataset ncfile; - try { - ncfile = TdsUnitTestCommon.openDatasetDap4Tests(testcase.getURL()); - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("File open failed: " + testcase.getURL(), e); - } - assert ncfile != null; - - String datasetname = testcase.getDataset(); - String data = dumpdata(ncfile, datasetname); - - if (prop_visual) { - visual(testcase.getTitle() + ".dap", data); - } - String baselinefile = testcase.getBaseline(); - - if (prop_baseline) - writefile(baselinefile, data); - else if (prop_diff) { // compare with baseline - // Read the baseline file(s) - String baselinecontent = readfile(baselinefile); - System.err.println("Comparison: vs " + baselinefile); - Assert.assertTrue("*** FAIL", same(getTitle(), baselinecontent, data)); - } - } - - String dumpmetadata(NetcdfDataset ncfile, String datasetname) throws Exception { - StringBuilder args = new StringBuilder("-strict"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - // Print the meta-databuffer using these args to NcdumpW - String dump = ""; - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } - return dump; - } - - String dumpdata(NetcdfDataset ncfile, String datasetname) throws Exception { - StringBuilder args = new StringBuilder("-strict -vall"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - String dump = ""; - // Dump the databuffer - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } - return dump; - } - - ////////////////////////////////////////////////// - // Utility methods - - // Locate the test cases with given prefix - List locate(String scheme, String s) { - return locate(scheme, s, null); - } - - List locate(String scheme, String s, List list) { - if (list == null) - list = new ArrayList<>(); - int matches = 0; - for (TestCase ct : this.alltestcases) { - if (!ct.getURL().startsWith(scheme)) - continue; - if (ct.getPath().endsWith(s)) { - matches++; - list.add(ct); - } - } - assert matches > 0 : "No such testcase: " + s; - return list; - } - - static boolean report(String msg) { - System.err.println(msg); - return false; - } - -} diff --git a/dap4/d4tests/src/test/java/dap4/test/TestConstraints.java b/dap4/d4tests/src/test/java/dap4/test/TestConstraints.java deleted file mode 100644 index 307be71fa5..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestConstraints.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright (c) 1998-2021 University Corporation for Atmospheric Research/Unidata - * See LICENSE for license information. - */ - -package dap4.test; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import thredds.test.util.TdsTestDir; -import thredds.test.util.TdsUnitTestCommon; -import ucar.httpservices.HTTPMethod; -import ucar.nc2.dataset.NetcdfDataset; -import ucar.unidata.util.test.category.NotPullRequest; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.StringWriter; -import java.lang.invoke.MethodHandles; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; - -/** - * Test at the NetcdfDataset level - */ -@Category(NotPullRequest.class) -public class TestConstraints extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static final boolean DEBUG = false; - - static final public boolean DEBUGSERVER = true; - - ////////////////////////////////////////////////// - // Constants - - static final boolean NCDUMP = true; // Use NcDumpW instead of D4Print - - static final String BASEEXTENSION = "raw.txt"; - static final String TESTEXTENSION = ".raw"; - - static final String DAP4TAG = "protocol=dap4"; - - static protected final String SERVLETPATH = "d4ts"; - static protected final String RESOURCEPATH = "/src/test/data/resources"; - static protected final String TESTINPUTPATH = "/testfiles"; - static protected final String BASELINEDIR = "/TestConstraints/baseline"; - - ////////////////////////////////////////////////// - // Type Declarations - - static class TestCase { - static String servletpath = null; - static String baselinedir = null; - static String server = null; - - static public void setRoots(String servletpath, String baselinedir, String server) { - TestCase.baselinedir = baselinedir; - TestCase.servletpath = servletpath; - TestCase.server = server; - } - - static boolean[] idcheck = new boolean[2048]; - - ////////////////////////////////////////////////// - - String title; - String dataset; - String constraint; - int id; - - TestCase(int id, String dataset, String constraint) { - if (idcheck[id]) - throw new IllegalStateException("two tests with same id"); - if (constraint != null && constraint.length() == 0) - constraint = null; - this.constraint = constraint; - this.title = dataset + (constraint == null ? "" : "?" + constraint); - this.dataset = dataset; - this.id = id; - idcheck[id] = true; - } - - String getbaseline() { - return canonjoin(this.baselinedir, dataset) + "." + id + "." + BASEEXTENSION; - } - - String makeurl() { - StringBuilder url = new StringBuilder(); - url.append("dap4://"); - url.append(server); - url.append("/"); - url.append(servletpath); - url.append(TESTINPUTPATH); - url.append("/"); - url.append(dataset); - if (constraint != null) { - url.append("?"); - url.append(CONSTRAINTTAG); - url.append("="); - url.append(constraint); - } - url.append("#"); - url.append(DAP4TAG); - return url.toString(); - } - - String makeName() { - return this.dataset + "." + this.id; - } - - public String toString() { - return makeurl(); - } - } - - ////////////////////////////////////////////////// - // Instance variables - - // Test cases - - protected List alltestcases = new ArrayList(); - protected List chosentests = new ArrayList(); - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - String root = getDAP4Root(); - if (root == null) - throw new Exception("dap4 root cannot be located"); - testSetup(); - if (DEBUGSERVER) - HTTPMethod.MOCKEXECUTOR = new MockExecutor(getResourceRoot()); - TestCase.setRoots(SERVLETPATH, canonjoin(getResourceRoot(), BASELINEDIR), TdsTestDir.dap4TestServer); - defineAllTestcases(); - chooseTestcases(); - } - - ////////////////////////////////////////////////// - // Define test cases - - void chooseTestcases() { - if (false) { - chosentests.add(locate1(4)); - prop_visual = true; - } else { - prop_baseline = false; - prop_visual = false; - for (TestCase tc : alltestcases) { - chosentests.add(tc); - } - } - } - - void defineAllTestcases() { - alltestcases.add(new TestCase(1, "test_one_vararray.nc", "t[1]")); - alltestcases.add(new TestCase(2, "test_anon_dim.syn", "vu32[0:3]")); - alltestcases.add(new TestCase(3, "test_one_vararray.nc", "t")); - alltestcases.add(new TestCase(4, "test_enum_array.nc", "primary_cloud[1:2:4]")); - alltestcases.add(new TestCase(5, "test_atomic_array.nc", "vu8[1][0:2:2];vd[1];vs[1][0];vo[0][1]")); - alltestcases.add(new TestCase(6, "test_struct_array.nc", "s[0:2:3][0:1]")); - alltestcases.add(new TestCase(7, "test_opaque_array.nc", "vo2[1:1][0,0]")); - alltestcases.add(new TestCase(8, "test_atomic_array.nc", "v16[1:2,2]")); - alltestcases.add(new TestCase(9, "test_atomic_array.nc", "v16[2,1:2]")); - } - - ////////////////////////////////////////////////// - // Junit test method - @Test - public void testConstraints() throws Exception { - for (TestCase testcase : chosentests) { - doOneTest(testcase); - } - } - - ////////////////////////////////////////////////// - // Primary test method - void doOneTest(TestCase testcase) throws Exception { - System.err.println("Testcase: " + testcase.makeurl()); - System.err.println("Baseline: " + testcase.getbaseline()); - - String url = testcase.makeurl(); - NetcdfDataset ncfile = null; - try { - ncfile = TdsUnitTestCommon.openDatasetDap4Tests(url); - } catch (Exception e) { - throw e; - } - - // Patch the ncfile to change dataset name - String datasetname = extractDatasetname(url, Integer.toString(testcase.id)); - - String metadata = (NCDUMP ? ncdumpmetadata(ncfile, datasetname) : null); - String data = (NCDUMP ? ncdumpdata(ncfile, datasetname) : null); - - if (prop_visual) { - visual("DMR: " + url, metadata); - visual("DAP: " + url, data); - } - - String testoutput = (NCDUMP ? data : metadata + data); - - if (prop_baseline) - writefile(testcase.getbaseline(), testoutput); - - if (prop_diff) { // compare with baseline - // Read the baseline file(s) - String baselinecontent = readfile(testcase.getbaseline()); - System.err.println("Comparison:"); - Assert.assertTrue("***Fail", same(getTitle(), baselinecontent, testoutput)); - } - } - - ////////////////////////////////////////////////// - // Dump methods - - String ncdumpmetadata(NetcdfDataset ncfile, String datasetname) { - boolean ok = false; - String metadata = null; - String dump = ""; - StringBuilder args = new StringBuilder("-strict"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - // Print the meta-databuffer using these args to NcdumpW - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ok = ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } catch (IOException ioe) { - ioe.printStackTrace(); - ok = false; - } - if (!ok) { - System.err.println("NcdumpW failed"); - } - return dump; - } - - String ncdumpdata(NetcdfDataset ncfile, String datasetname) { - boolean ok = false; - String dump = ""; - - StringBuilder args = new StringBuilder("-strict -vall"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - - // Dump the databuffer - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ok = ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } catch (IOException ioe) { - ioe.printStackTrace(); - ok = false; - } - if (!ok) { - System.err.println("NcdumpW failed"); - } - return dump; - } - - ////////////////////////////////////////////////// - // Utility methods - - // Locate the test cases with given index - TestCase locate1(int index) { - List results = new ArrayList(); - for (TestCase ct : this.alltestcases) { - if (ct.id == index) - return ct; - } - return null; - } - - // Locate the test cases with given prefix - TestCase locate1(String prefix) { - List tests = locate(prefix); - assert tests.size() > 0; - return tests.get(0); - } - - // Locate the test cases with given prefix and optional constraint - List locate(String prefix) { - List results = new ArrayList(); - for (TestCase ct : this.alltestcases) { - if (!ct.title.equals(prefix)) - continue; - results.add(ct); - } - return results; - } - - static boolean report(String msg) { - System.err.println(msg); - return false; - } - - -} diff --git a/dap4/d4tests/src/test/java/dap4/test/TestDSP.java b/dap4/d4tests/src/test/java/dap4/test/TestDSP.java deleted file mode 100644 index 98dcba4078..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestDSP.java +++ /dev/null @@ -1,365 +0,0 @@ -package dap4.test; - -import dap4.core.data.DSP; -import dap4.core.util.DapContext; -import dap4.core.util.DapException; -import dap4.core.util.DapUtil; -import dap4.dap4lib.DMRPrinter; -import dap4.dap4lib.DSPPrinter; -import dap4.dap4lib.FileDSP; -import dap4.dap4lib.HttpDSP; -import dap4.dap4lib.netcdf.Nc4DSP; -import dap4.servlet.DapCache; -import dap4.servlet.SynDSP; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import thredds.test.util.TdsTestDir; -import java.io.File; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.lang.invoke.MethodHandles; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; - -/** - * Test some of the DSP classes: - * AbstractDSP: tested by all the other DSPs - * CDMDSP: tested elsewhere (TestServlet) - * HttpDSP: tested elsewhere (TestCDMClient) - * FileDSP: tested here - * Nc4DSP: tested here - * SynDSP: tested here - * D4DSP: tested because superclass of FileDSP, HttpDSP, and SynDSP - * ThreddsDSP: not directly tested anywhere yet - */ -public class TestDSP extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static final boolean DEBUG = false; - static final boolean SHOWTESTCASES = true; - - static final String BASEEXTENSION = "txt"; - - static final String DAP4TAG = "#protocol=dap4"; - - ////////////////////////////////////////////////// - // Constants - - static final String DATADIR = "src/test/data/resources"; // relative to dap4 root - static final String BASELINEDIR = "TestDSP/baseline"; - static final String TESTCDMINPUT = "TestCDMClient/testinput"; - static final String TESTDSPINPUT = "TestDSP/testinput"; - static final String TESTFILESINPUT = "testfiles"; - - static final String[] EXCLUDEDFILETESTS = new String[] {}; - - ////////////////////////////////////////////////// - // Type Declarations - - static class TestCase { - static protected String root = null; - - static void setRoot(String r) { - root = r; - } - - static String getRoot() { - return root; - } - - ///////////////////////// - - private String title; - private String dataset; - private boolean checksumming; - private String testpath; - private String baselinepath; - private String url; - - TestCase(String url) { - this(url, true); - } - - TestCase(String url, boolean csum) { - this.title = dataset; - this.checksumming = csum; - this.url = url; - try { - URL u = new URL(url); - this.testpath = DapUtil.canonicalpath(u.getPath()); - int i = this.testpath.lastIndexOf('/'); - assert i > 0; - this.dataset = this.testpath.substring(i + 1, this.testpath.length()); - // strip off any raw extension - this.baselinepath = root + "/" + BASELINEDIR + "/" + this.dataset + "." + BASEEXTENSION; - } catch (MalformedURLException e) { - throw new IllegalArgumentException(url); - } - } - - public String getURL() { - return this.url + DAP4TAG; - } - - public String getPath() { - return this.testpath; - } - - public String getDataset() { - return this.dataset; - } - - public String getBaseline() { - return this.baselinepath; - } - - public String getTitle() { - return this.title; - } - - public String toString() { - return this.url; - } - } - - ////////////////////////////////////////////////// - // Static variables and methods - - protected DSP dspFor(String surl) { - URL url; - try { - url = new URL(surl); - } catch (MalformedURLException mue) { - throw new IllegalArgumentException("Malformed url: " + surl); - } - String proto = url.getProtocol(); - String path = url.getPath(); - int dot = path.lastIndexOf('.'); - if (dot < 0) - dot = path.length(); - String ext = path.substring(dot, path.length()); - DSP dsp = null; - try { - if ("file".equals(proto)) { - // discriminate on the extensions - if (".raw".equals(ext)) { - dsp = new FileDSP(); - } else if (".syn".equals(ext)) { - dsp = new SynDSP(); - } - if (".nc".equals(ext)) { - dsp = new Nc4DSP(); - } - } else if ("http".equals(proto) || "https".equals(url.getProtocol())) { - dsp = new HttpDSP(); - } else - throw new IllegalArgumentException("Cannot determine DSP class for: " + surl); - } catch (DapException de) { - throw new IllegalArgumentException("Cannot create DSP for: " + surl); - } - if (DEBUG) - System.err.printf("DSP: %s%n", dsp.getClass().getName()); - return dsp; - } - ////////////////////////////////////////////////// - // Instance variables - - // Test cases - - protected List alltestcases = new ArrayList(); - protected List chosentests = new ArrayList(); - - protected String resourceroot = null; - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - DapCache.flush(); - this.resourceroot = getResourceRoot(); - this.resourceroot = DapUtil.absolutize(this.resourceroot); // handle problem of windows paths - TestCase.setRoot(resourceroot); - defineAllTestcases(); - chooseTestcases(); - } - - // convert an extension to a file or url prefix - String prefix(String scheme, String ext) { - if (ext.charAt(0) == '.') - ext = ext.substring(1); - if (scheme.startsWith("http")) { - return "http://" + TdsTestDir.dap4TestServer + "/d4ts"; - } else if (scheme.equals("file")) { - if (ext.equals("raw")) - return "file:/" + this.resourceroot + "/" + TESTCDMINPUT; - if (ext.equals("syn")) - return "file:/" + this.resourceroot + "/" + TESTDSPINPUT; - if (ext.equals("nc")) - return "file:/" + this.resourceroot + "/" + TESTFILESINPUT; - } - throw new IllegalArgumentException(); - } - - ////////////////////////////////////////////////// - // Define test cases - - void chooseTestcases() { - if (false) { - chosentests = locate("file:", "test_struct_nested3.hdf5.raw"); - prop_visual = true; - prop_baseline = false; - } else { - prop_baseline = false; - for (TestCase tc : alltestcases) { - if (DEBUG) - System.err.printf("Test case: %s%n", tc.dataset); - chosentests.add(tc); - } - } - } - - void defineAllTestcases() { - List matches = new ArrayList<>(); - String dir = TestCase.root + "/" + TESTCDMINPUT; - TestFilter.filterfiles(dir, matches, "raw"); - if (false) { - dir = TestCase.root + "/" + TESTFILESINPUT; - TestFilter.filterfiles(dir, matches, "nc", "syn"); - } - for (String f : matches) { - boolean excluded = false; - for (String x : EXCLUDEDFILETESTS) { - if (f.indexOf(x) >= 0) { - excluded = true; - break; - } - } - if (!excluded) - add("file:/" + f); - } - if (SHOWTESTCASES) { - for (int i = 0; i < this.alltestcases.size(); i++) { - TestCase tc = this.alltestcases.get(i); - System.err.printf("ALLTESTS: %s%n", tc.getURL()); - } - } - } - - protected void add(String url) { - try { - URL u = new URL(url); - File f = new File(u.getPath()); - if (!f.canRead()) { - System.err.println("Unreadable file test case: " + url); - } - } catch (MalformedURLException e) { - System.err.println("Malformed file test case: " + url); - } - String ext = url.substring(url.lastIndexOf('.'), url.length()); - TestCase tc = new TestCase(url); - for (TestCase t : this.alltestcases) { - assert !t.getURL().equals(tc.getURL()) : "Duplicate TestCases: " + t; - } - this.alltestcases.add(tc); - } - - ////////////////////////////////////////////////// - // Junit test method - @Test - public void testDSP() throws Exception { - for (TestCase testcase : chosentests) { - doOneTest(testcase); - } - System.err.println("*** PASS"); - } - - ////////////////////////////////////////////////// - // Primary test method - void doOneTest(TestCase testcase) throws Exception { - System.err.println("Testcase: " + testcase.getURL()); - System.err.println("Baseline: " + testcase.getBaseline()); - - DSP dsp = dspFor(testcase.getURL()); - - dsp.setContext(new DapContext()); - dsp.open(testcase.getURL()); - - String metadata = dumpmetadata(dsp); - if (prop_visual) - visual(testcase.getURL() + ".dmr", metadata); - String data = dumpdata(dsp); - if (prop_visual) - visual(testcase.getURL() + ".dap", data); - - String baselinefile = testcase.getBaseline(); - - String testoutput = metadata + data; - - if (prop_baseline) - writefile(baselinefile, testoutput); - else if (prop_diff) { // compare with baseline - // Read the baseline file(s) - String baselinecontent = readfile(baselinefile); - System.err.println("Comparison: vs " + baselinefile); - Assert.assertTrue("*** FAIL", same(getTitle(), baselinecontent, testoutput)); - } - } - - String dumpmetadata(DSP dsp) throws Exception { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - // Print the meta-databuffer using these args to NcdumpW - DMRPrinter p = new DMRPrinter(dsp.getDMR(), pw); - p.testprint(); - pw.close(); - sw.close(); - return sw.toString(); - } - - String dumpdata(DSP dsp) throws Exception { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - // Print the meta-databuffer using these args to NcdumpW - DSPPrinter p = new DSPPrinter(dsp, pw).flag(DSPPrinter.Flags.CONTROLCHAR); - p.print(); - pw.close(); - sw.close(); - return sw.toString(); - } - - ////////////////////////////////////////////////// - // Utility methods - - // Locate the test cases with given prefix - List locate(String scheme, String s) { - return locate(scheme, s, null); - } - - List locate(String scheme, String s, List list) { - if (list == null) - list = new ArrayList<>(); - int matches = 0; - for (TestCase ct : this.alltestcases) { - if (!ct.getURL().startsWith(scheme)) - continue; - if (ct.getPath().endsWith(s)) { - matches++; - list.add(ct); - } - } - assert matches > 0 : "No such testcase: " + s; - return list; - } - - static boolean report(String msg) { - System.err.println(msg); - return false; - } - - -} diff --git a/dap4/d4tests/src/test/java/dap4/test/TestDSR.java b/dap4/d4tests/src/test/java/dap4/test/TestDSR.java deleted file mode 100644 index f869570ff7..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestDSR.java +++ /dev/null @@ -1,100 +0,0 @@ -package dap4.test; - - -import dap4.core.data.DSPRegistry; -import dap4.dap4lib.FileDSP; -import dap4.servlet.DapCache; -import dap4.servlet.Generator; -import dap4.servlet.SynDSP; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.MvcResult; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder; -import thredds.server.dap4.Dap4Controller; -import java.lang.invoke.MethodHandles; - -/** - * TestDSR verifies the DSR page - * generation code - */ - -public class TestDSR extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static protected final boolean DEBUG = false; - - ////////////////////////////////////////////////// - // Constants - - static protected final String RESOURCEPATH = "/src/test/data/resources"; // wrt getTestInputFilesDir - static protected final String TESTINPUTDIR = "/testfiles"; - static protected final String BASELINEDIR = "/TestDSR/baseline"; - - // constants for Fake Request - static protected final String FAKEDATASET = "test1"; - static protected String FAKEURLPREFIX = "/d4ts"; - static protected String FAKEURLPATH = FAKEURLPREFIX + "/" + FAKEDATASET; - - ////////////////////////////////////////////////// - // Instance variables - - ////////////////////////////////////////////////// - // Instance variables - MockMvc mockMvc = null; - protected String resourceroot = null; - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - StandaloneMockMvcBuilder mvcbuilder = MockMvcBuilders.standaloneSetup(new D4TSController()); - mvcbuilder.setValidator(new TestServlet.NullValidator()); - this.mockMvc = mvcbuilder.build(); - testSetup(); - DapCache.dspregistry.register(FileDSP.class, DSPRegistry.FIRST); - DapCache.dspregistry.register(SynDSP.class, DSPRegistry.FIRST); - if (prop_ascii) - Generator.setASCII(true); - this.resourceroot = getResourceRoot(); - // this.datasetpath = getResourceRoot(); - } - - ////////////////////////////////////////////////// - // Junit test methods - - @Test - public void testDSR() throws Exception { - String url = FAKEURLPATH; // no file specified - - // Figure out the baseline - String baselinepath = canonjoin(this.resourceroot, BASELINEDIR, FAKEDATASET) + ".dsr"; - - MvcResult result = perform(url, this.mockMvc, RESOURCEPATH); - - // Collect the output - MockHttpServletResponse res = result.getResponse(); - byte[] byteresult = res.getContentAsByteArray(); - - // Convert the raw output to a string - String dsr = new String(byteresult, UTF8); - - if (prop_visual) - visual("TestDSR", dsr); - - if (prop_baseline) { - writefile(baselinepath, dsr); - } else if (prop_diff) { // compare with baseline - // Read the baseline file - String baselinecontent = readfile(baselinepath); - System.out.println("DSR Comparison:"); - Assert.assertTrue("***Fail", same(getTitle(), baselinecontent, dsr)); - } - } -} - diff --git a/dap4/d4tests/src/test/java/dap4/test/TestFilters.java b/dap4/d4tests/src/test/java/dap4/test/TestFilters.java deleted file mode 100644 index 8ed1ca90b5..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestFilters.java +++ /dev/null @@ -1,287 +0,0 @@ -package dap4.test; - -import dap4.dap4lib.ChunkInputStream; -import dap4.core.util.*; -import dap4.dap4lib.RequestMode; -import dap4.servlet.Generator; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.lang.invoke.MethodHandles; -import java.math.BigInteger; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.util.*; - -/** - * TestFilter tests server side - * filter processing. - */ - -public class TestFilters extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - ////////////////////////////////////////////////// - // Constants - - static String DATADIR = "src/test/data"; // relative to dap4 root - static String TESTDATADIR = DATADIR + "/resources/"; - static String BASELINEDIR = DATADIR + "/resources/TestFilters/baseline"; - static String TESTINPUTDIR = DATADIR + "/resources/testfiles"; - - // constants for Fake Request - static String FAKEURLPREFIX = "http://localhost:8080/d4ts"; - - static final BigInteger MASK = new BigInteger("FFFFFFFFFFFFFFFF", 16); - - static protected final int DEFAULTROWCOUNT = 5; - - ////////////////////////////////////////////////// - // Type Declarations - - static class ConstraintTest { - static String root = null; - - static ConstraintTest[] alltests; - - static { - alltests = new ConstraintTest[2048]; - Arrays.fill(alltests, null); - } - - String title; - String dataset; - String constraint; - boolean xfail; - Dump.Commands template; - String testinputpath; - String baselinepath; - int id; - int rowcount = DEFAULTROWCOUNT; - - ConstraintTest(int id, String dataset, String ce) { - this(id, dataset, 0, ce, null, true); - } - - ConstraintTest(int id, String dataset, String ce, Dump.Commands template) { - this(id, dataset, 0, ce, template, false); - } - - ConstraintTest(int id, String dataset, int rows, String ce, Dump.Commands template) { - this(id, dataset, rows, ce, template, false); - } - - ConstraintTest(int id, String dataset, int rows, String ce, Dump.Commands template, boolean xfail) { - if (alltests[id] != null) - throw new IllegalStateException("two tests with same id"); - this.id = id; - this.title = dataset + (ce == null ? "" : ("?" + ce)); - this.dataset = dataset; - this.constraint = ce; - this.xfail = xfail; - this.template = template; - this.testinputpath = root + "/" + TESTINPUTDIR + "/" + dataset; - this.baselinepath = root + "/" + BASELINEDIR + "/" + dataset + "." + String.valueOf(this.id); - this.rowcount = rows == 0 ? DEFAULTROWCOUNT : rows; - alltests[id] = this; - } - - String makeurl(RequestMode ext) { - String url = FAKEURLPREFIX + "/" + dataset; - if (ext != null) - url += "." + ext.toString(); - if (constraint != null) { - url += "?" + CONSTRAINTTAG + "="; - String ce = constraint; - // Escape it - // ce = Escape.urlEncodeQuery(ce); - url += ce; - } - return url; - } - - public String toString() { - return makeurl(null); - } - } - - protected String getTestFilesDir() { - return TESTINPUTDIR; - } - - ////////////////////////////////////////////////// - // Instance variables - - // Misc variables - boolean isbigendian = ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN; - - // Test cases - - List alltestcases = new ArrayList(); - - List chosentests = new ArrayList(); - - String datasetpath = null; - - String testroot = null; - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - this.testroot = getTestFilesDir(); - this.datasetpath = this.testroot + "/" + DATADIR; - defineAllTestcases(this.testroot); - chooseTestcases(); - } - - ////////////////////////////////////////////////// - // Define test cases - - protected void chooseTestcases() { - if (false) { - chosentests = locate(1); - } else { - for (ConstraintTest tc : alltestcases) - chosentests.add(tc); - } - } - - protected void defineAllTestcases(String root) { - ConstraintTest.root = root; - this.alltestcases.add(new ConstraintTest(1, "test_sequence_1.syn", "/s", new Dump.Commands() { - public void run(Dump printer) throws IOException { - int count = printer.printcount(); - for (int j = 0; j < count; j++) { - printer.printvalue('S', 4); - printer.printvalue('S', 2); - } - printer.newline(); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new ConstraintTest(2, "test_sequence_1.syn", "/s|i1<0", new Dump.Commands() { - public void run(Dump printer) throws IOException { - int count = printer.printcount(); - for (int j = 0; j < count; j++) { - printer.printvalue('S', 4); - printer.printvalue('S', 2); - } - printer.newline(); - printer.verifychecksum(); - } - })); - - } - - ////////////////////////////////////////////////// - // Junit test methods - @Test - public void testFilters() throws Exception { - boolean pass = true; - for (ConstraintTest testcase : chosentests) { - if (!doOneTest(testcase)) - pass = false; - } - Assert.assertTrue("***Fail: TestServletConstraints", pass); - } - - ////////////////////////////////////////////////// - // Primary test method - boolean doOneTest(ConstraintTest testcase) throws Exception { - boolean pass = true; - System.out.println("Testcase: " + testcase.toString()); - Generator.setRowCount(testcase.rowcount); - pass = dodata(testcase); - return pass; - } - - boolean dodata(ConstraintTest testcase) throws Exception { - boolean pass = true; - String baseline; - RequestMode mode = RequestMode.DAP; - String methodurl = testcase.makeurl(mode); - - Mocker mocker = new Mocker("dap4", methodurl, this); - byte[] byteresult = null; - - try { - byteresult = mocker.execute(); - } catch (Throwable t) { - t.printStackTrace(); - return false; - } - - if (prop_debug) { - ByteOrder order = (isbigendian ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN); - DapDump.dumpbytes(ByteBuffer.wrap(byteresult).order(order), true); - } - - // Setup a ChunkInputStream - ByteArrayInputStream bytestream = new ByteArrayInputStream(byteresult); - - ChunkInputStream reader = new ChunkInputStream(bytestream, RequestMode.DAP, ByteOrder.nativeOrder()); - - String sdmr = reader.readDMR(); // Read the DMR - if (prop_visual) - visual(methodurl, sdmr); - - Dump printer = new Dump(); - String sdata = printer.dumpdata(reader, true, reader.getRemoteByteOrder(), testcase.template); - - if (prop_visual) - visual(testcase.title + ".dap", sdata); - - if (prop_baseline) - writefile(testcase.baselinepath + ".dap", sdata); - - if (prop_diff) { - // compare with baseline - // Read the baseline file - System.out.println("Note Comparison:"); - String baselinecontent = readfile(testcase.baselinepath + ".dap"); - pass = same(getTitle(), baselinecontent, sdata); - System.out.println(pass ? "Pass" : "Fail"); - } - - return pass; - } - - ////////////////////////////////////////////////// - // Utility methods - - // Locate the test cases with given prefix - List locate(Object pattern) { - List results = new ArrayList(); - for (ConstraintTest ct : this.alltestcases) { - if (pattern instanceof String) { - if (ct.title.equals(pattern.toString())) - results.add(ct); - } else if (pattern instanceof Integer) { - if (ct.id == (Integer) pattern) - results.add(ct); - } - } - return results; - } - ////////////////////////////////////////////////// - // Stand alone - - static public void main(String[] argv) { - try { - new TestServlet().testServlet(); - } catch (Exception e) { - System.err.println("*** FAIL"); - e.printStackTrace(); - System.exit(1); - } - System.err.println("*** PASS"); - System.exit(0); - }// main - -} - diff --git a/dap4/d4tests/src/test/java/dap4/test/TestFrontPage.java b/dap4/d4tests/src/test/java/dap4/test/TestFrontPage.java deleted file mode 100644 index c0a9f0207f..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestFrontPage.java +++ /dev/null @@ -1,101 +0,0 @@ -package dap4.test; - -import dap4.core.data.DSPRegistry; -import dap4.core.util.DapUtil; -import dap4.dap4lib.FileDSP; -import dap4.servlet.DapCache; -import dap4.servlet.Generator; -import dap4.servlet.SynDSP; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.MvcResult; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder; -import java.lang.invoke.MethodHandles; - -/** - * TestFrontPage verifies the front page - * generation code - */ - -public class TestFrontPage extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static final boolean DEBUG = false; - - ////////////////////////////////////////////////// - // Constants - - static protected final String RESOURCEPATH = "/src/test/data/resources"; // wrt getTestInputFilesDir - static protected final String TESTINPUTDIR = "/testfiles"; - static protected final String BASELINEDIR = "/TestFrontPage/baseline"; - /* - * static protected String DATADIR = "src/test/data"; // relative to dap4 root - * static protected String TESTDATADIR = DATADIR + "/resources/"; - * static protected String BASELINEDIR = "/TestServlet/baseline"; - * static protected String TESTINPUTDIR = DATADIR + "/resources/testfiles"; - */ - - static protected String TESTFILE = "test_frontpage.html"; - - // constants for Fake Request - static protected String FAKEURLPREFIX = "/d4ts"; - - ////////////////////////////////////////////////// - // Instance variables - MockMvc mockMvc = null; - protected String resourceroot = null; - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - StandaloneMockMvcBuilder mvcbuilder = MockMvcBuilders.standaloneSetup(new D4TSController()); - mvcbuilder.setValidator(new TestServlet.NullValidator()); - this.mockMvc = mvcbuilder.build(); - testSetup(); - DapCache.dspregistry.register(FileDSP.class, DSPRegistry.FIRST); - DapCache.dspregistry.register(SynDSP.class, DSPRegistry.FIRST); - if (prop_ascii) - Generator.setASCII(true); - this.resourceroot = getResourceRoot(); - } - - ////////////////////////////////////////////////// - // Junit test methods - - @Test - public void testFrontPage() throws Exception { - String url = FAKEURLPREFIX; // no file specified - - // Figure out the baseline - String baselinepath = canonjoin(this.resourceroot, BASELINEDIR, TESTFILE); - - MvcResult result = perform(url, this.mockMvc, RESOURCEPATH); - - // Collect the output - MockHttpServletResponse res = result.getResponse(); - byte[] byteresult = res.getContentAsByteArray(); - - // Convert the raw output to a string - String html = new String(byteresult, UTF8); - - if (DEBUG || prop_visual) - visual("Front Page", html); - - if (prop_baseline) { - writefile(baselinepath, html); - } else if (prop_diff) { // compare with baseline - // Read the baseline file - String baselinecontent = readfile(baselinepath); - System.out.println("HTML Comparison:"); - Assert.assertTrue("***Fail", same(getTitle(), baselinecontent, html)); - } - } - -} // class TestFrontPage diff --git a/dap4/d4tests/src/test/java/dap4/test/TestH5Iosp.java b/dap4/d4tests/src/test/java/dap4/test/TestH5Iosp.java deleted file mode 100644 index 82f3cf94ac..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestH5Iosp.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright (c) 1998-2021 John Caron and University Corporation for Atmospheric Research/Unidata - * See LICENSE for license information. - */ - -package dap4.test; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import thredds.test.util.TdsUnitTestCommon; -import ucar.nc2.dataset.NetcdfDataset; -import ucar.unidata.util.test.category.NotJenkins; - -import java.io.*; -import java.lang.invoke.MethodHandles; -import java.math.BigInteger; -import java.nio.ByteOrder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; - -@Category(NotJenkins.class) -public class TestH5Iosp extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static protected final boolean DEBUG = false; - - static protected final boolean NCDUMP = true; - - static protected final Mode mode = Mode.BOTH; - - ////////////////////////////////////////////////// - // Constants - - static protected String DATADIR = "src/test/data"; // relative to dap4 root - static protected String TESTDATADIR = DATADIR + "/resources/"; - static protected String BASELINEDIR = DATADIR + "/resources/TestIosp/baseline"; - static protected String TESTINPUTDIR = DATADIR + "/resources/testfiles"; - - static protected final BigInteger MASK = new BigInteger("FFFFFFFFFFFFFFFF", 16); - - ////////////////////////////////////////////////// - // Type Declarations - - static protected class H5IospTest { - static String root = null; - String title; - String dataset; - String testinputpath; - String baselinepath; - - H5IospTest(String dataset) { - this.title = dataset; - this.dataset = dataset; - this.testinputpath = root + "/" + TESTINPUTDIR + "/" + dataset; - this.baselinepath = root + "/" + BASELINEDIR + "/" + dataset + ".hdf5"; - } - - public String toString() { - return dataset; - } - } - - static protected enum Mode { - DMR, DATA, BOTH; - } - - ////////////////////////////////////////////////// - // Instance variables - - // Misc variables - protected boolean isbigendian = ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN; - - // Test cases - - protected List alltestcases = new ArrayList(); - - protected List chosentests = new ArrayList(); - - protected String datasetpath = null; - - protected String testroot = null; - - ////////////////////////////////////////////////// - @Before - public void setup() throws Exception { - this.testroot = getTestFilesDir(); - File f = new File(testroot + "/" + BASELINEDIR); - if (!f.exists()) - f.mkdir(); - this.datasetpath = this.testroot + "/" + DATADIR; - defineAllTestcases(this.testroot); - chooseTestcases(); - } - - protected String getTestFilesDir() { - return TESTINPUTDIR; - } - - ////////////////////////////////////////////////// - // Define test cases - - void chooseTestcases() { - if (false) { - chosentests = locate("test_enum.nc"); - // chosentests.add(new H5IospTest("test_test.nc")); - } else { - for (H5IospTest tc : alltestcases) { - chosentests.add(tc); - } - } - } - - void defineAllTestcases(String root) { - H5IospTest.root = root; - this.alltestcases.add(new H5IospTest("test_one_var.nc")); - this.alltestcases.add(new H5IospTest("test_one_vararray.nc")); - this.alltestcases.add(new H5IospTest("test_atomic_types.nc")); - this.alltestcases.add(new H5IospTest("test_atomic_array.nc")); - this.alltestcases.add(new H5IospTest("test_enum.nc")); - this.alltestcases.add(new H5IospTest("test_enum_array.nc")); - this.alltestcases.add(new H5IospTest("test_struct_type.nc")); - this.alltestcases.add(new H5IospTest("test_struct_array.nc")); - this.alltestcases.add(new H5IospTest("test_struct_nested.nc")); - this.alltestcases.add(new H5IospTest("test_vlen1.nc")); - this.alltestcases.add(new H5IospTest("test_vlen2.nc")); - this.alltestcases.add(new H5IospTest("test_vlen3.nc")); - this.alltestcases.add(new H5IospTest("test_vlen4.nc")); - this.alltestcases.add(new H5IospTest("test_vlen5.nc")); - } - - - ////////////////////////////////////////////////// - // Junit test methods - - @Test - public void testH5Iosp() throws Exception { - for (H5IospTest testcase : chosentests) { - if (!doOneTest(testcase)) { - Assert.assertTrue(false); - } - } - } - - ////////////////////////////////////////////////// - // Primary test method - boolean doOneTest(H5IospTest testcase) throws Exception { - boolean pass = true; - - System.out.println("Testcase: " + testcase.testinputpath); - - NetcdfDataset ncfile = TdsUnitTestCommon.openDatasetDap4Tests(testcase.testinputpath); - - String metadata = null; - String data = null; - if (mode == Mode.DMR || mode == Mode.BOTH) { - metadata = (NCDUMP ? ncdumpmetadata(ncfile, testcase.dataset) : null); - if (prop_visual) - visual("Meta Data: ", metadata); - } - if (mode == Mode.DATA || mode == Mode.BOTH) { - data = (NCDUMP ? ncdumpdata(ncfile, testcase.dataset) : null); - if (prop_visual) - visual("Data: ", data); - } - - String baselinefile = String.format("%s", testcase.baselinepath); - if (prop_baseline) { - if (mode == Mode.DMR || mode == Mode.BOTH) - writefile(baselinefile + ".dmr", metadata); - if (mode == Mode.DATA || mode == Mode.BOTH) - writefile(baselinefile + ".dap", data); - } else if (prop_diff) { // compare with baseline - String baselinecontent = null; - if (mode == Mode.DMR || mode == Mode.BOTH) { - // Read the baseline file(s) - System.out.println("DMR Comparison:"); - baselinecontent = readfile(baselinefile + ".dmr"); - pass = pass && same(getTitle(), baselinecontent, metadata); - System.out.println(pass ? "Pass" : "Fail"); - } - if (mode == Mode.DATA || mode == Mode.BOTH) { - System.out.println("DATA Comparison:"); - baselinecontent = readfile(baselinefile + ".dap"); - pass = pass && same(getTitle(), baselinecontent, data); - System.out.println(pass ? "Pass" : "Fail"); - } - } - return pass; - } - - ////////////////////////////////////////////////// - // Utility methods - - boolean report(String msg) { - System.err.println(msg); - prop_generate = false; - return false; - } - - - // Locate the test cases with given prefix - List locate(String prefix) { - List results = new ArrayList(); - for (H5IospTest ct : this.alltestcases) { - if (ct.dataset.startsWith(prefix)) - results.add(ct); - } - return results; - } - ////////////////////////////////////////////////// - // Stand alone - - static public void main(String[] argv) { - try { - new TestH5Iosp().testH5Iosp(); - } catch (Exception e) { - System.err.println("*** FAIL"); - e.printStackTrace(); - System.exit(1); - } - System.err.println("*** PASS"); - System.exit(0); - }// main - - ////////////////////////////////////////////////// - // Dump methods - - String ncdumpmetadata(NetcdfDataset ncfile, String datasetname) { - boolean ok = false; - String metadata = null; - String dump = ""; - - StringBuilder args = new StringBuilder("-strict"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - - // Print the meta-databuffer using these args to NcdumpW - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ok = ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } catch (IOException ioe) { - ioe.printStackTrace(); - ok = false; - } - - if (!ok) { - System.err.println("NcdumpW failed"); - System.exit(1); - } - return shortenFileName(dump, ncfile.getLocation()); - } - - String ncdumpdata(NetcdfDataset ncfile, String datasetname) { - boolean ok = false; - StringWriter sw = new StringWriter(); - - StringBuilder args = new StringBuilder("-strict -vall"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - // Dump the databuffer - String dump = ""; - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ok = ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } catch (IOException ioe) { - ioe.printStackTrace(); - ok = false; - } - if (!ok) { - System.err.println("NcdumpW failed"); - System.exit(1); - } - return shortenFileName(dump, ncfile.getLocation()); - } - -} - diff --git a/dap4/d4tests/src/test/java/dap4/test/TestHyrax.java b/dap4/d4tests/src/test/java/dap4/test/TestHyrax.java deleted file mode 100644 index af27184b70..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestHyrax.java +++ /dev/null @@ -1,396 +0,0 @@ -/* - * Copyright (c) 1998-2021 John Caron and University Corporation for Atmospheric Research/Unidata - * See LICENSE for license information. - */ - -package dap4.test; - -import dap4.core.util.DapUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import thredds.test.util.TdsUnitTestCommon; -import ucar.nc2.dataset.NetcdfDataset; -import ucar.unidata.util.test.category.NotJenkins; -import ucar.unidata.util.test.category.NotPullRequest; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.StringWriter; -import java.lang.invoke.MethodHandles; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; - -/** - * Test OpenDap Server at the NetcdfDataset level - */ -public class TestHyrax extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static final boolean DEBUG = false; - - static final boolean NCDUMP = true; // Use NcDumpW instead of NCPrint - - static final String EXTENSION = (NCDUMP ? "ncdump" : "dmp"); - - static final String TESTEXTENSION = "dmr"; - - // Mnemonic - static final boolean HEADERONLY = false; - - static final String IP = "ec2-54-204-231-163"; - ////////////////////////////////////////////////// - // Constants - - static final String DATADIR = "src/test/data"; // relative to dap4 root - static final String TESTDATADIR = DATADIR + "/resources/TestHyrax"; - static final String BASELINEDIR = TESTDATADIR + "/baseline"; - - // Define the names of the xfail tests - static final String[] XFAIL_TESTS = {"test_struct_array.nc"}; - - // Order is important; testing reachability is in the order - // listed - static final String[] SOURCES = - new String[] {"hyrax", "http://" + IP + ".compute-1.amazonaws.com:8080/opendap/data/reader/dap4/dap4.html", - "dap4://" + IP + ".compute-1.amazonaws.com:8080/opendap/data/reader/dap4"}; - - static boolean isXfailTest(String t) { - for (String s : XFAIL_TESTS) { - if (s.equals(t)) - return true; - } - return false; - } - - ////////////////////////////////////////////////// - // Type Declarations - - static class Source { - public String name; - public String testurl; - public String prefix; - - public Source(String name, String testurl, String prefix) { - this.name = name; - this.prefix = prefix; - this.testurl = testurl; - } - } - - static class ClientTest { - static String root = null; - static String server = null; - static int counter = 0; - - boolean checksumming = true; - boolean xfail = false; - boolean headeronly = false; - - String title; - String dataset; // path minus the server url part. - String datasetpath; // Hyrax test databuffer is segregated into multiple directories - String baselinepath; - String constraint; - int id; - - ClientTest(String dataset) { - this(0, dataset, null); - } - - ClientTest(int id, String datasetpath, String constraint) { - // Break off the final file set name - int index = datasetpath.lastIndexOf('/'); - this.dataset = datasetpath.substring(index + 1, datasetpath.length()); - this.datasetpath = datasetpath; - this.title = this.dataset; - this.id = id; - this.constraint = (constraint.length() == 0 ? null : constraint); - this.baselinepath = root + "/" + BASELINEDIR + "/" + dataset; - if (this.constraint != null) - this.baselinepath += ("." + String.valueOf(this.id)); - } - - public ClientTest nochecksum() { - this.checksumming = false; - return this; - } - - public ClientTest xfail() { - this.xfail = true; - return this; - } - - public ClientTest headeronly() { - this.headeronly = true; - return this; - } - - String makeurl() { - String url = url = server + "/" + datasetpath; - if (constraint != null) - url += ("?" + constraint); - return url; - } - - public String toString() { - return dataset; - } - } - - ////////////////////////////////////////////////// - // Instance variables - - // Test cases - - List alltestcases = new ArrayList(); - List chosentests = new ArrayList(); - - String resourceroot = null; - String datasetpath = null; - - String sourceurl = null; - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - this.resourceroot = getResourceRoot(); - this.resourceroot = DapUtil.absolutize(this.resourceroot); // handle problem of windows paths - System.out.println("Using source url " + this.sourceurl); - defineAllTestcases(this.resourceroot, this.sourceurl); - chooseTestcases(); - } - - ////////////////////////////////////////////////// - // Define test cases - - void chooseTestcases() { - if (false) { - chosentests = locate("dmr-testsuite/test_array_7.xml"); - } else { - for (ClientTest tc : alltestcases) { - chosentests.add(tc); - } - } - } - - boolean defineAllTestcases(String root, String server) { - - boolean what = HEADERONLY; - - ClientTest.root = root; - ClientTest.server = server; - if (false) { - alltestcases.add(new ClientTest(1, "D4-xml/DMR_4.xml", "b1")); - } - if (false) { - alltestcases.add(new ClientTest("test_simple_1.dmr")); - // deleted: alltestcases.add(new TestCase("dmr-testsuite/testall.xml")); - } - if (false) { - alltestcases.add(new ClientTest("dmr-testsuite/test_array_1.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_array_2.xml")); - strings: alltestcases.add(new ClientTest("dmr-testsuite/test_array_3.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_array_4.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_array_5.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_array_6.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_array_7.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_array_8.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_array_10.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_array_11.xml")); - - } - if (false) { - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_1.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_2.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_3.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_4.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_5.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_6.xml")); - // sequence: alltestcases.add(new TestCase("dmr-testsuite/test_simple_7.xml")); - // sequence: alltestcases.add(new TestCase("dmr-testsuite/test_simple_8.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_9.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_9.1.xml")); - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_10.xml")); - } - if (false) { - // alltestcases.add(new TestCase("D4-xml/DMR_0.1.xml")); needs fixing - alltestcases.add(new ClientTest("D4-xml/DMR_0.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_1.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_2.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_2.1.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_3.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_3.1.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_3.2.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_3.3.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_3.4.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_3.5.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_4.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_4.1.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_5.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_5.1.xml")); - // serial: alltestcases.add(new TestCase("D4-xml/DMR_6.xml")); - // serial: alltestcases.add(new TestCase("D4-xml/DMR_6.1.xml")); - // serial: alltestcases.add(new TestCase("D4-xml/DMR_6.2.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_7.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_7.1.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_7.2.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_7.3.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_7.4.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_7.5.xml")); - alltestcases.add(new ClientTest("D4-xml/DMR_8.xml")); - } - - if (false) { - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_3_error_1.xml").xfail()); - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_3_error_2.xml").xfail()); - alltestcases.add(new ClientTest("dmr-testsuite/test_simple_3_error_3.xml").xfail()); - } - for (ClientTest test : alltestcases) { - if (what == HEADERONLY) - test.headeronly(); - } - return true; - } - - ////////////////////////////////////////////////// - // Junit test method - - @Test - @Category({NotJenkins.class, NotPullRequest.class}) - public void testHyrax() throws Exception { - boolean pass = true; - for (ClientTest testcase : chosentests) { - if (!doOneTest(testcase)) - pass = false; - } - Assert.assertTrue("*** Fail: TestHyrax", pass); - } - - ////////////////////////////////////////////////// - // Primary test method - boolean doOneTest(ClientTest testcase) throws Exception { - boolean pass = true; - System.out.println("Testcase: " + testcase.dataset); - String url = testcase.makeurl(); - NetcdfDataset ncfile = null; - try { - ncfile = TdsUnitTestCommon.openDatasetDap4Tests(url); - } catch (Exception e) { - System.err.println(testcase.xfail ? "XFail" : "Fail"); - e.printStackTrace(); - return testcase.xfail; - } - String usethisname = TdsUnitTestCommon.extractDatasetname(url, null); - String metadata = (NCDUMP ? ncdumpmetadata(ncfile, usethisname) : null); - if (prop_visual) { - visual(testcase.title + ".dmr", metadata); - } - - String data = null; - if (!testcase.headeronly) { - data = (NCDUMP ? ncdumpdata(ncfile, usethisname) : null); - if (prop_visual) { - visual(testcase.title + ".dap", data); - } - } - - String testoutput = (testcase.headeronly ? metadata : (NCDUMP ? data : metadata + data)); - - String baselinefile = testcase.baselinepath + "." + EXTENSION; - - if (prop_baseline) - writefile(baselinefile, testoutput); - - if (prop_diff) { // compare with baseline - // Read the baseline file(s) - String baselinecontent = readfile(baselinefile); - System.out.println("Comparison: vs " + baselinefile); - pass = pass && same(getTitle(), baselinecontent, testoutput); - System.out.println(pass ? "Pass" : "Fail"); - } - return pass; - } - - - String ncdumpmetadata(NetcdfDataset ncfile, String datasetname) throws Exception { - StringBuilder args = new StringBuilder("-strict"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - String dump = ""; - // Print the meta-databuffer using these args to NcdumpW - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } - - return dump; - } - - String ncdumpdata(NetcdfDataset ncfile, String datasetname) throws Exception { - StringWriter sw = new StringWriter(); - - StringBuilder args = new StringBuilder("-strict -vall"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - - // Dump the databuffer - String dump = ""; - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } - - return dump; - } - - ////////////////////////////////////////////////// - // Utility methods - - - // Locate the test cases with given prefix - List locate(String prefix) { - List results = new ArrayList(); - for (ClientTest ct : this.alltestcases) { - if (!ct.datasetpath.startsWith(prefix)) - continue; - results.add(ct); - } - return results; - } - - static boolean report(String msg) { - System.err.println(msg); - return false; - } - - - ////////////////////////////////////////////////// - // Stand alone - - static public void main(String[] argv) { - try { - new TestHyrax().testHyrax(); - } catch (Exception e) { - System.err.println("*** FAIL"); - e.printStackTrace(); - System.exit(1); - } - System.err.println("*** PASS"); - System.exit(0); - }// main - -} // class TestHyrax - diff --git a/dap4/d4tests/src/test/java/dap4/test/TestNc4Iosp.java b/dap4/d4tests/src/test/java/dap4/test/TestNc4Iosp.java deleted file mode 100644 index 6e7ab506fd..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestNc4Iosp.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright (c) 1998-2021 John Caron and University Corporation for Atmospheric Research/Unidata - * See LICENSE for license information. - */ - -package dap4.test; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import thredds.test.util.TdsUnitTestCommon; -import ucar.nc2.dataset.NetcdfDataset; -import ucar.unidata.util.test.category.NotPullRequest; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.lang.invoke.MethodHandles; -import java.math.BigInteger; -import java.nio.ByteOrder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; - -@Category(NotPullRequest.class) -public class TestNc4Iosp extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static protected final boolean DEBUG = false; - - static protected final boolean NCDUMP = true; - - static protected final Mode mode = Mode.BOTH; - - static String previousJnaEncoding = System.getProperty("jna.encoding"); - - ////////////////////////////////////////////////// - // Constants - - static protected final String RESOURCEPATH = "/src/test/data/resources"; // wrt getTestInputFilesDIr - static protected final String TESTINPUTDIR = "/testfiles"; - static protected final String BASELINEDIR = "/TestIosp/baseline"; - - static protected final BigInteger MASK = new BigInteger("FFFFFFFFFFFFFFFF", 16); - - ////////////////////////////////////////////////// - // Type Declarations - - static protected class Nc4IospTest { - static String inputroot = null; - static String baselineroot = null; - - static public void setRoots(String input, String baseline) { - inputroot = input; - baselineroot = baseline; - } - - String title; - String dataset; - String testinputpath; - String baselinepath; - - Nc4IospTest(String dataset) { - this.title = dataset; - this.dataset = dataset; - this.testinputpath = canonjoin(this.inputroot, dataset); - this.baselinepath = canonjoin(this.baselineroot, dataset) + ".nc4"; - } - - public String toString() { - return dataset; - } - } - - static protected enum Mode { - DMR, DATA, BOTH; - } - - ////////////////////////////////////////////////// - // Instance variables - - // Misc variables - protected boolean isbigendian = ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN; - - // Test cases - - protected List alltestcases = new ArrayList(); - - protected List chosentests = new ArrayList(); - - protected String datasetpath = null; - - protected String root = null; - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - this.root = getResourceRoot(); - testSetup(); - Nc4IospTest.setRoots(canonjoin(getResourceRoot(), TESTINPUTDIR), canonjoin(getResourceRoot(), BASELINEDIR)); - defineAllTestcases(); - chooseTestcases(); - } - - protected String getTestFilesDir() { - return ""; - } - - ////////////////////////////////////////////////// - // Define test cases - - void chooseTestcases() { - if (false) { - chosentests = locate("test_struct_array.nc"); - prop_visual = true; - prop_debug = true; - // chosentests.add(new Nc4IospTest("test_test.nc")); - } else { - prop_baseline = false; - for (Nc4IospTest tc : alltestcases) { - chosentests.add(tc); - } - } - } - - void defineAllTestcases() { - this.alltestcases.add(new Nc4IospTest("test_one_var.nc")); - this.alltestcases.add(new Nc4IospTest("test_one_vararray.nc")); - this.alltestcases.add(new Nc4IospTest("test_atomic_types.nc")); - this.alltestcases.add(new Nc4IospTest("test_atomic_array.nc")); - this.alltestcases.add(new Nc4IospTest("test_enum.nc")); - this.alltestcases.add(new Nc4IospTest("test_enum_array.nc")); - this.alltestcases.add(new Nc4IospTest("test_struct_type.nc")); - this.alltestcases.add(new Nc4IospTest("test_struct_array.nc")); - this.alltestcases.add(new Nc4IospTest("test_struct_nested.nc")); - this.alltestcases.add(new Nc4IospTest("test_vlen1.nc")); - this.alltestcases.add(new Nc4IospTest("test_vlen2.nc")); - this.alltestcases.add(new Nc4IospTest("test_vlen3.nc")); - this.alltestcases.add(new Nc4IospTest("test_vlen4.nc")); - this.alltestcases.add(new Nc4IospTest("test_vlen5.nc")); - } - - - ////////////////////////////////////////////////// - // Junit test methods - - @Test - public void testNc4Iosp() throws Exception { - for (Nc4IospTest testcase : chosentests) { - doOneTest(testcase); - } - } - - ////////////////////////////////////////////////// - // Primary test method - void doOneTest(Nc4IospTest testcase) throws Exception { - System.err.println("Testcase: " + testcase.testinputpath); - - NetcdfDataset ncfile = TdsUnitTestCommon.openDatasetDap4Tests(testcase.testinputpath); - - String metadata = null; - String data = null; - if (mode == Mode.DMR || mode == Mode.BOTH) { - metadata = (NCDUMP ? ncdumpmetadata(ncfile, testcase.dataset) : null); - if (prop_visual) - visual("Meta Data: ", metadata); - } - if (mode == Mode.DATA || mode == Mode.BOTH) { - data = (NCDUMP ? ncdumpdata(ncfile, testcase.dataset) : null); - if (prop_visual) - visual("Data: ", data); - } - - String baselinefile = String.format("%s", testcase.baselinepath); - System.err.println("Testpath: " + testcase.testinputpath); - System.err.println("Baseline: " + baselinefile); - if (prop_baseline) { - if (mode == Mode.DMR || mode == Mode.BOTH) - writefile(baselinefile + ".dmr", metadata); - if (mode == Mode.DATA || mode == Mode.BOTH) - writefile(baselinefile + ".dap", data); - } else if (prop_diff) { // compare with baseline - String baselinecontent = null; - if (mode == Mode.DMR || mode == Mode.BOTH) { - // Read the baseline file(s) - System.err.println("DMR Comparison:"); - try { - baselinecontent = readfile(baselinefile + ".dmr"); - boolean pass = same(getTitle(), baselinecontent, metadata); - Assert.assertTrue("***Fail", pass); - } catch (IOException ioe) { - Assert.assertTrue("baselinefile" + ".dmr: " + ioe.getMessage(), false); - } - } - if (mode == Mode.DATA || mode == Mode.BOTH) { - System.err.println("DATA Comparison:"); - try { - baselinecontent = readfile(baselinefile + ".dap"); - Assert.assertTrue("***Data Fail", same(getTitle(), baselinecontent, data)); - - } catch (IOException ioe) { - Assert.assertTrue("baselinefile" + ".dap: " + ioe.getMessage(), false); - } - } - } - } - - ////////////////////////////////////////////////// - // Utility methods - - boolean report(String msg) { - System.err.println(msg); - prop_generate = false; - return false; - } - - - // Locate the test cases with given prefix - List locate(String prefix) { - List results = new ArrayList(); - for (Nc4IospTest ct : this.alltestcases) { - if (ct.dataset.startsWith(prefix)) - results.add(ct); - } - return results; - } - - ////////////////////////////////////////////////// - // Dump methods - - String ncdumpmetadata(NetcdfDataset ncfile, String datasetname) { - boolean ok = false; - String metadata = null; - String dump = ""; - - StringBuilder args = new StringBuilder("-strict"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - - // Print the meta-databuffer using these args to NcdumpW - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ok = ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } catch (IOException ioe) { - ioe.printStackTrace(); - ok = false; - } - - if (!ok) { - System.err.println("NcdumpW failed"); - System.exit(1); - } - // return shortenFileName(sw.toString(), ncfile.getLocation()); - return dump; - } - - String ncdumpdata(NetcdfDataset ncfile, String datasetname) { - boolean ok = false; - String dump = ""; - StringBuilder args = new StringBuilder("-strict -vall"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - - // Dump the databuffer - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ok = ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } catch (IOException ioe) { - ioe.printStackTrace(); - ok = false; - } - - if (!ok) { - System.err.println("NcdumpW failed"); - System.exit(1); - } - // return shortenFileName(sw.toString(), ncfile.getLocation()); - return dump; - } -} diff --git a/dap4/d4tests/src/test/java/dap4/test/TestParserCE.java b/dap4/d4tests/src/test/java/dap4/test/TestParserCE.java deleted file mode 100644 index 3acb391e0e..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestParserCE.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - -package dap4.test; - - -import dap4.core.ce.CECompiler; -import dap4.core.ce.CEConstraint; -import dap4.core.ce.parser.CEParserImpl; -import dap4.core.dmr.DMRFactory; -import dap4.core.dmr.DapDataset; -import dap4.core.dmr.parser.DOM4Parser; -import dap4.core.dmr.parser.Dap4Parser; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.io.IOException; -import java.lang.invoke.MethodHandles; -import java.util.ArrayList; -import java.util.List; - -public class TestParserCE extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - ////////////////////////////////////////////////// - // Constants - static final boolean DUMPDMR = false; - static final boolean DMRPARSEDEBUG = false; - static final boolean CEPARSEDEBUG = false; - - static final String TESTCASEDIR = "src/test/data/resources/TestParsers"; // relative to dap4 root - - static final boolean USEDOM = false; - - ////////////////////////////////////////////////// - // Type decls - static class TestSet { - public String dmr; - public String constraint; - public String expected = null; - public String[] debug = null; - public int id = 0; - - public TestSet(int id, String cedmr, String ces, String expected) throws IOException { - this.id = id; - this.dmr = cedmr; - this.constraint = ces; - this.expected = expected; - } - - public TestSet setdebug(String[] debug) { - this.debug = debug; - return this; - } - - public TestSet setdebug(String debug) { - return setdebug(new String[] {debug}); - } - - public String toString() { - return constraint; - } - - } - - ////////////////////////////////////////////////// - // Instance methods - - // All test cases - List alltestsets = new ArrayList<>(); - List chosentests = new ArrayList<>(); - - DapDataset dmr = null; - - ////////////////////////////////////////////////// - @Before - public void setup() { - try { - defineAllTestCases(); - chooseTestcases(); - } catch (IOException ioe) { - ioe.printStackTrace(); - } - } - - ////////////////////////////////////////////////// - // Misc. methods - - protected void chooseTestcases() { - if (false) { - chosentests = locate(7); - assert chosentests.size() > 0 : "Not tests chosen"; - } else { - for (TestSet tc : alltestsets) { - chosentests.add(tc); - } - } - } - - // Locate the test cases - List locate(Object ce) { - List results = new ArrayList<>(); - for (TestSet ct : this.alltestsets) { - if (ce instanceof String) { - if (ct.constraint.equals(ce)) - results.add(ct); - } else if (ce instanceof Integer) { - if (ct.id == ((Integer) ce)) - results.add(ct); - } - } - return results; - } - - protected void defineAllTestCases() throws IOException { - alltestsets.add(new TestSet(1, CE1_DMR, "/a[1]", "/a[1]")); - alltestsets.add(new TestSet(2, CE1_DMR, "/b[10:16]", "/b[10:16]")); - alltestsets.add(new TestSet(3, CE1_DMR, "/c[8:2:15]", "/c[8:2:15]")); - alltestsets.add(new TestSet(4, CE1_DMR, "/a[1];/b[10:16];/c[8:2:15]", "/a[1];/b[10:16];/c[8:2:15]")); - alltestsets - .add(new TestSet(5, CE1_DMR, "/d[1][0:2:2];/a[1];/e[1][0];/f[0][1]", "/d[1][0:2:2];/a[1];/e[1][0];/f[0][1]")); - alltestsets.add(new TestSet(6, CE1_DMR, "/s[0:3][0:2].x;/s[0:3][0:2].y", "/s[0:3][0:2]")); - alltestsets.add(new TestSet(7, CE1_DMR, "/seq|i1<0", "/seq|i1<0")); - alltestsets.add(new TestSet(8, CE1_DMR, "/seq|00,i1<10")); - alltestsets.add(new TestSet(9, CE2_DMR, "vo[1:1][0,0]", "/vo[1][0,0]")); - } - - ////////////////////////////////////////////////// - // Junit test method - - @Test - public void testParserCE() throws Exception { - for (TestSet testset : chosentests) { - if (!doOneTest(testset)) { - Assert.assertTrue(false); - System.exit(1); - } - } - } - - boolean doOneTest(TestSet testset) throws Exception { - boolean pass = true; - - System.out.println("Test Set: " + testset.constraint); - - if (DUMPDMR) { - visual("DMR:", testset.dmr); - } - - // Create the DMR tree - System.out.println("Parsing DMR"); - Dap4Parser parser; - if (!USEDOM) - parser = new DOM4Parser(new DMRFactory()); - if (DMRPARSEDEBUG) - parser.setDebugLevel(1); - boolean parseok = parser.parse(testset.dmr); - if (parseok) - dmr = parser.getDMR(); - if (dmr == null) - parseok = false; - if (!parseok) - throw new Exception("DMR Parse failed"); - System.out.flush(); - System.err.flush(); - - // Iterate over the constraints - String results = ""; - CEConstraint ceroot = null; - System.out.println("constraint: " + testset.constraint); - System.out.flush(); - CEParserImpl ceparser = null; - try { - ceparser = new CEParserImpl(dmr); - if (CEPARSEDEBUG) - ceparser.setDebugLevel(1); - parseok = ceparser.parse(testset.constraint); - CECompiler compiler = new CECompiler(); - ceroot = compiler.compile(dmr, ceparser.getCEAST()); - } catch (Exception e) { - e.printStackTrace(); - parseok = false; - } - if (ceroot == null) - parseok = false; - if (!parseok) - throw new Exception("CE Parse failed"); - - // Dump the parsed CE for comparison purposes - String cedump = ceroot.toConstraintString(); - if (prop_visual) - visual("|" + testset.constraint + "|", cedump); - results += (cedump + "\n"); - if (prop_diff) { // compare with baseline - // Read the baseline file - String baselinecontent = testset.expected; - pass = same(getTitle(), baselinecontent, results); - } - return pass; - } - - - //////////////////////////////////// - // Data for the tests - - String CE1_DMR = "" + " " - + " " + " " + " " + " " - + " " + " " + " " + " " - + " " + " " + " " + " " - + " " + " " + " " + " " - + " " + " " + " " + " " - + " " + " " + " " + " " - + " " + " " + " " + " " - + " " + " " + " " + " " - + ""; - - - String CE2_DMR = "" + " " - + " " + " " + " " + " " + ""; -} diff --git a/dap4/d4tests/src/test/java/dap4/test/TestParserDMR.java b/dap4/d4tests/src/test/java/dap4/test/TestParserDMR.java deleted file mode 100644 index 39b0779c6e..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestParserDMR.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - -package dap4.test; - -import dap4.core.dmr.DMRFactory; -import dap4.core.dmr.DapDataset; -import dap4.core.dmr.ErrorResponse; -import dap4.core.dmr.parser.DOM4Parser; -import dap4.core.dmr.parser.Dap4Parser; -import dap4.core.dmr.parser.ParseUtil; -import dap4.dap4lib.DMRPrinter; -import org.junit.Assert; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.io.File; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.lang.invoke.MethodHandles; -import java.util.ArrayList; -import java.util.List; - - -public class TestParserDMR extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static final boolean PARSEDEBUG = false; - - // Do a special test to compare the dmr parser print output - // to the original input. This will often fail in non-essential - // ways, so it must be verified by hand. - static final boolean BACKCOMPARE = false; - - ////////////////////////////////////////////////// - // Constants - // Define the input set(s) - static protected final String DIR1 = "/TestParsers/dmrset"; // relative to dap4 root - static protected final String DIR2 = "/TestServlet/baseline"; // relative to dap4 root - static protected final String BASELINE = "/TestParsers/baseline"; // relative to dap4 root - - ////////////////////////////////////////////////// - - static protected class TestCase { - static public String resourceroot = null; - - String name; - String dir; - String ext; - String input; - String baseline; - - public TestCase(String dir, String name, String ext) { - this.name = name; - this.dir = dir; - this.ext = ext; - this.input = resourceroot + dir + "/" + name + "." + ext; - this.baseline = resourceroot + BASELINE + "/" + name + "." + "dmp"; - } - } - ////////////////////////////////////////////////// - // Instance methods - - // Test cases - protected List alltestcases = new ArrayList(); - protected List chosentests = new ArrayList(); - protected int flags = ParseUtil.FLAG_NONE; - protected boolean debug = false; - - ////////////////////////////////////////////////// - - public TestParserDMR() { - super(); - setControls(); - defineTestCases(); - chooseTestcases(); - } - - ////////////////////////////////////////////////// - // Misc. methods - - protected void chooseTestcases() { - if (false) { - chosentests = locate("test_struct_nested.hdf5"); - prop_visual = true; - assert chosentests.size() > 0 : "No tests chosen"; - } else { - for (TestCase tc : alltestcases) { - chosentests.add(tc); - } - } - } - - // Locate the test cases with given prefix - List locate(String prefix) { - List results = new ArrayList(); - for (TestCase ct : this.alltestcases) { - if (ct.name.startsWith(prefix)) - results.add(ct); - } - return results; - } - - protected void defineTestCases() { - String root = getResourceRoot(); - TestCase.resourceroot = root; - loadDir(DIR1, "dmr"); - loadDir(DIR2, "dmr"); - } - - void loadDir(String dirsuffix, String... extensions) { - File dir = new File(TestCase.resourceroot + dirsuffix); - File[] filelist = dir.listFiles(); - for (int i = 0; i < filelist.length; i++) { - File file = filelist[i]; - String name = file.getName(); - // check the extension - String match = null; - for (String ext : extensions) { - if (name.endsWith(ext)) { - match = ext; - break; - } - } - if (match != null) { - String basename = name.substring(0, name.length() - (match.length() + 1)); - TestCase ct = new TestCase(dirsuffix, basename, match); - addtestcase(ct); - } - } - } - - protected void addtestcase(TestCase ct) { - if (DEBUG) { - System.err.printf("Adding Test: input=%s%n", ct.input); - if (!new File(ct.input).exists()) - System.err.printf(" +++%s does not exist%n", ct.input); - System.err.printf(" baseline=%s%n", ct.baseline); - if (!new File(ct.baseline).exists()) - System.err.printf(" ***%s does not exist%n", ct.baseline); - System.err.flush(); - } - this.alltestcases.add(ct); - } - - void setControls() { - if (prop_controls == null) - return; - flags = ParseUtil.FLAG_NOCR; // always - for (int i = 0; i < prop_controls.length(); i++) { - char c = prop_controls.charAt(i); - switch (c) { - case 'w': - flags |= ParseUtil.FLAG_TRIMTEXT; - break; - case 'l': - flags |= ParseUtil.FLAG_ELIDETEXT; - break; - case 'e': - flags |= ParseUtil.FLAG_ESCAPE; - break; - case 'T': - flags |= ParseUtil.FLAG_TRACE; - break; - case 'd': - debug = true; - break; - default: - System.err.println("unknown X option: " + c); - break; - } - } - } - - ////////////////////////////////////////////////// - // Junit test method - - @Test - public void testParser() throws Exception { - int ntests = 0; - for (TestCase testcase : chosentests) { - ntests++; - doOneTest(testcase); - } - Assert.assertTrue("***Pass ", true); - } - - void doOneTest(TestCase testcase) throws Exception { - String document; - int i, c; - - String testinput = testcase.input; - String baseline = testcase.baseline; - - System.err.println("Testcase: " + testinput); - System.err.println("Baseline: " + baseline); - System.err.flush(); - - document = readfile(testinput); - - Dap4Parser parser = new DOM4Parser(new DMRFactory()); - if (PARSEDEBUG || debug) - parser.setDebugLevel(1); - - if (!parser.parse(document)) - throw new Exception("DMR Parse failed: " + testinput); - DapDataset dmr = parser.getDMR(); - ErrorResponse err = parser.getErrorResponse(); - if (err != null) - System.err.println("Error response:\n" + err.buildXML()); - if (dmr == null) { - System.err.println("No dataset created"); - return; - } - - // Dump the parsed DMR for comparison purposes - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - DMRPrinter dapprinter = new DMRPrinter(dmr, pw); - dapprinter.testprint(); - pw.close(); - sw.close(); - String testresult = sw.toString(); - - // Read the baseline file - String baselinecontent; - if (BACKCOMPARE) - baselinecontent = document; - else - baselinecontent = readfile(baseline); - if (prop_visual) { - visual("Baseline", baselinecontent); - visual("Output", testresult); - } - - if (prop_baseline) { - writefile(baseline, testresult); - } else if (prop_diff) { // compare with baseline - Assert.assertTrue("Files are different", same(getTitle(), baselinecontent, testresult)); - } - } -} diff --git a/dap4/d4tests/src/test/java/dap4/test/TestPrinter.java b/dap4/d4tests/src/test/java/dap4/test/TestPrinter.java deleted file mode 100644 index d22ff1ac97..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestPrinter.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2012, UCAR/Unidata. - * See the LICENSE file for more information. - */ - -package dap4.test; - -import dap4.cdm.nc2.DapNetcdfFile; -import dap4.core.dmr.DapDataset; -import dap4.core.util.*; -import dap4.core.data.DSP; -import dap4.dap4lib.DMRPrinter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import ucar.nc2.*; -import java.io.IOException; -import java.io.PrintWriter; -import java.lang.invoke.MethodHandles; -import java.util.Map; - -/** - * Dump DMR and/or data part of a DSP - */ - -public class TestPrinter { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - ////////////////////////////////////////////////// - // Constants - - // Could use enumset, but it is so ugly, - // so use good old OR'able flags - static final int NILFLAGS = 0; - static final int PERLINE = 1; // print xml attributes 1 per line - static final int NONAME = 2; // do not print name xml attribute - static final int NONNIL = 4; // print empty xml attributes - - ////////////////////////////////////////////////// - // Instance Variables - - protected NetcdfFile ncfile = null; // dsp can be extracted from this - protected DSP dsp = null; - protected DapDataset dmr = null; - protected PrintWriter writer = null; - protected Map varmap = null; - protected IndentWriter printer = null; - - ////////////////////////////////////////////////// - // Constructor(s) - - public TestPrinter(NetcdfFile ncfile, PrintWriter writer) { - try { - setDataset(ncfile); - } catch (DapException de) { - System.err.println("Bad NetcdfFile"); - System.exit(1); - } - setWriter(writer); - setVarMap(null); - } - - public TestPrinter(DSP dsp, PrintWriter writer) { - try { - setDSP(dsp); - } catch (DapException de) { - System.err.println("Bad DSP"); - System.exit(1); - } - setWriter(writer); - setVarMap(null); - } - - ////////////////////////////////////////////////// - // Accessors - - public void setWriter(PrintWriter writer) { - this.writer = writer; - this.printer = new IndentWriter(writer); - } - - public void setDataset(NetcdfFile ncfile) throws DapException { - this.ncfile = ncfile; - setDSP(((DapNetcdfFile) this.ncfile).getDSP()); - } - - public void setDSP(DSP dsp) throws DapException { - this.dsp = dsp; - this.dmr = dsp.getDMR(); - } - - public void setVarMap(Map map) { - this.varmap = map; - } - - ////////////////////////////////////////////////// - // Print methods - - public void flush() throws IOException { - printer.flush(); - writer.flush(); - } - - /** - * Print the CDM metadata for a NetcdfFile object in DMR format - * - * @throws IOException - */ - - public void print() throws IOException { - printer.setIndent(0); - DMRPrinter dmrprinter = new DMRPrinter(this.dmr, writer); - dmrprinter.print(); - dmrprinter.flush(); - } - -} // class TestPrinter diff --git a/dap4/d4tests/src/test/java/dap4/test/TestSerial.java b/dap4/d4tests/src/test/java/dap4/test/TestSerial.java deleted file mode 100644 index f3fab97bfd..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestSerial.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright (c) 1998-2021 John Caron and University Corporation for Atmospheric Research/Unidata - * See LICENSE for license information. - */ - -package dap4.test; - -import dap4.core.util.DapUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import thredds.test.util.TdsTestDir; -import thredds.test.util.TdsUnitTestCommon; -import ucar.nc2.dataset.NetcdfDataset; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.StringWriter; -import java.lang.invoke.MethodHandles; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; - -/** - * Test at the NetcdfDataset level; access .ser files on server. - */ -public class TestSerial extends DapTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - static protected final boolean DEBUG = false; - - static protected final String TESTINPUTDIR = "/testfiles"; - - static protected final boolean NCDUMP = true; // Use NcDumpW instead of D4Print - - static protected final String EXTENSION = (NCDUMP ? "ncdump" : "dmp"); - - static protected final String DAP4TAG = "#dap4"; - - static protected final String[] EMPTY = new String[] {""}; - - ////////////////////////////////////////////////// - // Constants - - static protected final String DATADIR = "src/test/data"; // relative to dap4 root - static protected final String TESTDATADIR = DATADIR + "/resources/TestCDMClient"; - static protected final String BASELINEDIR = TESTDATADIR + "/baseline"; - - static protected final String alpha = "abcdefghijklmnopqrstuvwxyz" + "abcdefghijklmnopqrstuvwxyz".toUpperCase(); - - ////////////////////////////////////////////////// - // Type Declarations - - static protected class ClientTest { - static protected String root = null; - static protected String server = null; - - String title; - String dataset; - String baselinepath; - String[] constraints; - - ClientTest(String dataset) { - this(dataset, EMPTY); - } - - ClientTest(String dataset, String[] constraints) { - this.title = dataset; - this.dataset = dataset; - this.baselinepath = root + "/" + BASELINEDIR + "/" + dataset; - assert constraints != null && constraints.length > 0; - this.constraints = constraints; - } - - String makeurl(String ce) { - StringBuilder url = new StringBuilder(); - url.append("http://"); - url.append(this.server); - url.append("/d4ts"); - url.append("/"); - url.append(TESTINPUTDIR); - url.append("/"); - url.append(this.dataset); - url.append("."); - url.append("nc"); - url.append(DAP4TAG); - if (ce != null && ce.length() > 0) { - url.append("?"); - url.append(DapTestCommon.CONSTRAINTTAG); - url.append("="); - url.append(ce); - } - return url.toString(); - } - - public String toString() { - StringBuilder buf = new StringBuilder(); - buf.append(dataset); - buf.append("{"); - if (constraints != null) - for (int i = 0; i < constraints.length; i++) { - if (i > 0) - buf.append(","); - String ce = constraints[i]; - buf.append(ce == null ? "all" : ce); - } - buf.append("}"); - return buf.toString(); - } - } - - ////////////////////////////////////////////////// - // Instance variables - - // Test cases - - protected List alltestcases = new ArrayList(); - protected List chosentests = new ArrayList(); - - protected String resourceroot = null; - protected String datasetpath = null; - - protected String sourceurl = null; - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - this.resourceroot = getResourceRoot(); - this.resourceroot = DapUtil.absolutize(this.resourceroot); - this.datasetpath = this.resourceroot + "/" + BASELINEDIR; - // findServer(this.datasetpath); - // this.sourceurl = this.d4tsserver; - this.sourceurl = TdsTestDir.dap4TestServer; - System.out.println("Using source url " + this.sourceurl); - defineAllTestcases(this.resourceroot, this.sourceurl); - chooseTestcases(); - } - - ////////////////////////////////////////////////// - // Define test cases - - void chooseTestcases() { - if (false) { - chosentests = locate("test_atomic_array"); - } else { - for (ClientTest tc : alltestcases) { - chosentests.add(tc); - } - } - } - - void defineAllTestcases(String root, String server) { - ClientTest.root = root; - ClientTest.server = server; - alltestcases.add(new ClientTest("test_one_var")); - alltestcases.add(new ClientTest("test_atomic_types")); - alltestcases.add(new ClientTest("test_atomic_array")); - - } - - ////////////////////////////////////////////////// - // Junit test method - - @Test - public void testSerial() throws Exception { - for (ClientTest testcase : chosentests) { - if (!doOneTest(testcase)) { - Assert.assertTrue(false); - } - } - } - - ////////////////////////////////////////////////// - // Primary test method - boolean doOneTest(ClientTest testcase) throws Exception { - boolean pass = true; - int testcounter = 0; - - System.out.println("Testcase: " + testcase.dataset); - - String[] constraints = testcase.constraints; - for (int i = 0; i < constraints.length; i++) { - String url = testcase.makeurl(constraints[i]); - NetcdfDataset ncfile = null; - try { - ncfile = TdsUnitTestCommon.openDatasetDap4Tests(url); - } catch (Exception e) { - throw e; - } - - String usethisname = TdsUnitTestCommon.extractDatasetname(url, null); - String metadata = (NCDUMP ? ncdumpmetadata(ncfile, usethisname) : null); - String data = (NCDUMP ? ncdumpdata(ncfile, usethisname) : null); - - if (prop_visual) { - visual("DMR: " + url, metadata); - visual("DAP: " + url, data); - } - - String testoutput = (NCDUMP ? data : metadata + data); - - String baselinefile = String.format("%s.nc.%s", testcase.baselinepath, EXTENSION); - if (prop_baseline) - writefile(baselinefile, testoutput); - - if (prop_diff) { // compare with baseline - // Read the baseline file(s) - String baselinecontent = readfile(baselinefile); - System.out.println("Comparison:"); - pass = pass && same(getTitle(), baselinecontent, testoutput); - System.out.println(pass ? "Pass" : "Fail"); - } - } - return pass; - } - - ////////////////////////////////////////////////// - // Dump methods - - String ncdumpmetadata(NetcdfDataset ncfile, String datasetname) { - boolean ok = false; - String metadata = null; - StringWriter sw = new StringWriter(); - - StringBuilder args = new StringBuilder("-strict"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - - // Print the meta-databuffer using these args to NcdumpW - ok = false; - String dump = ""; - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ok = ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } catch (IOException ioe) { - ioe.printStackTrace(); - ok = false; - } - if (!ok) { - System.err.println("NcdumpW failed"); - System.exit(1); - } - return dump; - } - - String ncdumpdata(NetcdfDataset ncfile, String datasetname) { - boolean ok = false; - StringWriter sw = new StringWriter(); - - StringBuilder args = new StringBuilder("-strict -vall"); - if (datasetname != null) { - args.append(" -datasetname "); - args.append(datasetname); - } - - // Dump the databuffer - String dump = ""; - ok = false; - try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(byteArrayOutputStream, StandardCharsets.UTF_8)) { - ok = ucar.nc2.NCdumpW.print(ncfile, args.toString(), outputStreamWriter, null); - dump = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); - } catch (IOException ioe) { - ioe.printStackTrace(); - ok = false; - } - if (!ok) { - System.err.println("NcdumpW failed"); - System.exit(1); - } - return dump; - } - - ////////////////////////////////////////////////// - // Utility methods - - - // Locate the test cases with given prefix - ClientTest locate1(String prefix) { - List tests = locate(prefix); - assert tests.size() > 0; - return tests.get(0); - } - - // Locate the test cases with given prefix and optional constraint - List locate(String prefix) { - List results = new ArrayList(); - for (ClientTest ct : this.alltestcases) { - if (!ct.dataset.startsWith(prefix)) - continue; - results.add(ct); - } - return results; - } - - static protected boolean report(String msg) { - System.err.println(msg); - return false; - } - //////////////////////////////////////// - // Stand alone - - static public void main(String[] argv) { - try { - new TestConstraints().testConstraints(); - } catch (Exception e) { - System.err.println("*** FAIL"); - e.printStackTrace(); - System.exit(1); - } - System.err.println("*** PASS"); - System.exit(0); - }// main - -} // class TestConstraints diff --git a/dap4/d4tests/src/test/java/dap4/test/TestServlet.java b/dap4/d4tests/src/test/java/dap4/test/TestServlet.java deleted file mode 100644 index c9ba6bb1f0..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestServlet.java +++ /dev/null @@ -1,860 +0,0 @@ -/* - * Copyright 2016, University Corporation for Atmospheric Research - * See the LICENSE.txt file for more information. - */ - -package dap4.test; - -import dap4.core.dmr.parser.DOM4Parser; -import dap4.core.util.DapDump; -import dap4.dap4lib.ChunkInputStream; -import dap4.dap4lib.RequestMode; -import dap4.servlet.DapCache; -import dap4.servlet.Generator; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.MvcResult; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder; -import org.springframework.validation.Errors; -import org.springframework.validation.Validator; -import thredds.server.dap4.Dap4Controller; -import ucar.nc2.jni.netcdf.Nc4Iosp; -import ucar.nc2.jni.netcdf.Nc4wrapper; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.math.BigInteger; -import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.List; -import ucar.unidata.util.test.category.NotPullRequest; - -/** - * TestServlet has multiple purposes. - * 1. It tests the d4tsservlet. - * 2. It (optionally) stores the serialized raw databuffer - * for datasets into files., These files are then used to - * test client side deserialization (see TestCDMClient). - */ - -/* - * Normally, we would like to use Spring applicationContext - * and autowiring for this class. - * This can work under, say, Jenkins or GitHub Actions, but - * it fails under Intellij at the moment because of Mocking. - * I have managed to get it to work partly, but currently it - * crashes trying to initialize the ChronicleMap cache. - * It should be noted that AFAIK none of the Mocking tests will - * work under Intellij; TestServlet is just one example. - * - * I have included the necessary changes marked with the tag - * USESPRING to remind me of what needs to be done someday. - */ - -/* - * USESPRING - * - * @RunWith(SpringJUnit4ClassRunner.class) - * - * @WebAppConfiguration - * - * @ContextConfiguration( - * locations = {"/WEB-INF/applicationContext.xml", "/WEB-INF/spring-servlet.xml"}, - * loader = MockTdsContextLoader.class) - */ - -// non-deterministic failure on GitHub Actions - no need to hold up PRs for now (and will still barf on Jenkins) -@Category(NotPullRequest.class) -public class TestServlet extends DapTestCommon { - static final boolean USESPRING = false; - - static public boolean DEBUG = false; - static public boolean DEBUGDATA = false; - static public boolean PARSEDEBUG = false; - - static public boolean USEBIG = false; - static public boolean NOCSUM = false; - - ////////////////////////////////////////////////// - // Constants - - static protected final String RESOURCEPATH = "/src/test/data/resources"; // wrt getTestInputFilesDir - static protected final String TESTINPUTDIR = "/testfiles"; - static protected final String BASELINEDIR = "/TestServlet/baseline"; - static protected final String GENERATEDIR = "/TestCDMClient/testinput"; - - // constants for Fake Request - static protected final String FAKEURLPREFIX = "/dap4"; - - static protected final BigInteger MASK = new BigInteger("FFFFFFFFFFFFFFFF", 16); - - // Define the file extensions of interest for generation - static protected final String[] GENEXTENSIONS = new String[] {".raw.dap", ".raw.dmr"}; - - ////////////////////////////////////////////////// - // Type Declarations - - static protected class TestCase { - static String inputroot = null; - static String baselineroot = null; - static String generateroot = null; - - static public void setRoots(String input, String baseline, String generate) { - inputroot = input; - baselineroot = baseline; - generateroot = generate; - } - - protected String title; - protected String dataset; - protected String[] extensions; - protected boolean checksumming; - protected Dump.Commands template; - protected String testinputpath; - protected String baselinepath; - protected String generatepath; - - public TestCase(String dataset, String extensions, boolean checksumming) { - this(dataset, extensions, checksumming, null); - } - - public TestCase(String dataset, String extensions, boolean checksumming, Dump.Commands template) { - this.title = dataset; - this.dataset = dataset; - this.extensions = extensions.split(","); - this.template = template; - this.checksumming = checksumming; - this.testinputpath = canonjoin(this.inputroot, dataset); - this.baselinepath = canonjoin(this.baselineroot, dataset); - this.generatepath = canonjoin(this.generateroot, dataset); - } - - String makeurl(RequestMode ext) { - String u = canonjoin(FAKEURLPREFIX, canonjoin(TESTINPUTDIR, dataset)) + "." + ext.toString(); - return u; - } - - public String toString() { - return dataset; - } - } - - ////////////////////////////////////////////////// - // Instance variables - - protected MockMvc mockMvc; - - // Test cases - - protected List alltestcases = new ArrayList(); - - protected List chosentests = new ArrayList(); - - /* - * USESPRING - * - * @Autowired - * private WebApplicationContext wac; - */ - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - super.bindstd(); - Nc4wrapper.TRACE = false; - // if(DEBUGDATA) DapController.DUMPDATA = true; - /* - * USESPRING - * this.mockMvc = MockMvcBuilders.webAppContextSetup(wac).build(); - * else - */ - { - StandaloneMockMvcBuilder mvcbuilder = MockMvcBuilders.standaloneSetup(new Dap4Controller()); - mvcbuilder.setValidator(new TestServlet.NullValidator()); - this.mockMvc = mvcbuilder.build(); - } - testSetup(); - if (prop_ascii) - Generator.setASCII(true); - TestCase.setRoots(canonjoin(getResourceRoot(), TESTINPUTDIR), canonjoin(getResourceRoot(), BASELINEDIR), - canonjoin(getResourceRoot(), GENERATEDIR)); - defineAllTestcases(); - chooseTestcases(); - } - - @After - public void cleanup() throws Exception { - super.unbindstd(); - Nc4wrapper.TRACE = false; - } - - ////////////////////////////////////////////////// - // Define test cases - - protected void chooseTestcases() { - if (false) { - chosentests = locate("test_struct_type.nc"); - prop_visual = true; - prop_generate = false; - prop_baseline = false; - } else { - prop_baseline = false; - prop_generate = false; - for (TestCase tc : alltestcases) { - chosentests.add(tc); - } - } - } - - - ////////////////////////////////////////////////// - // Junit test methods - - @Test - public void testServlet() throws Exception { - Nc4Iosp.setLogLevel(5); - try { - DapCache.flush(); - for (TestCase testcase : chosentests) { - doOneTest(testcase); - } - } finally { - Nc4Iosp.setLogLevel(0); - } - } - - ////////////////////////////////////////////////// - // Primary test method - - void doOneTest(TestCase testcase) throws Exception { - System.err.println("Testcase: " + testcase.testinputpath); - System.err.println("Baseline: " + testcase.baselinepath); - if (PARSEDEBUG) - DOM4Parser.setGlobalDebugLevel(1); - for (String extension : testcase.extensions) { - RequestMode ext = RequestMode.modeFor(extension); - switch (ext) { - case DMR: - dodmr(testcase); - break; - case DAP: - dodata(testcase); - break; - default: - Assert.assertTrue("Unknown extension", false); - } - } - } - - void dodmr(TestCase testcase) throws Exception { - String url = testcase.makeurl(RequestMode.DMR); - String little = (USEBIG ? "0" : "1"); - String nocsum = (NOCSUM ? "1" : "0"); - MvcResult result = perform(url, this.mockMvc, RESOURCEPATH, DapTestCommon.ORDERTAG, little, DapTestCommon.NOCSUMTAG, - nocsum, DapTestCommon.TESTTAG, "true"); - - // Collect the output - MockHttpServletResponse res = result.getResponse(); - byte[] byteresult = res.getContentAsByteArray(); - - // Test by converting the raw output to a string - String sdmr = new String(byteresult, UTF8); - - if (prop_visual) - visual(testcase.title + ".dmr", sdmr); - if (prop_baseline) { - writefile(testcase.baselinepath + ".dmr", sdmr); - } else if (prop_diff) { // compare with baseline - // Read the baseline file - String baselinecontent = readfile(testcase.baselinepath + ".dmr"); - System.err.println("DMR Comparison"); - Assert.assertTrue("***Fail", same(getTitle(), baselinecontent, sdmr)); - } - } - - void dodata(TestCase testcase) throws Exception { - String url = testcase.makeurl(RequestMode.DAP); - String little = (USEBIG ? "0" : "1"); - String nocsum = (NOCSUM ? "1" : "0"); - MvcResult result = perform(url, this.mockMvc, RESOURCEPATH, DapTestCommon.ORDERTAG, little, DapTestCommon.NOCSUMTAG, - nocsum, DapTestCommon.TESTTAG, "true"); - // Collect the output - MockHttpServletResponse res = result.getResponse(); - byte[] byteresult = res.getContentAsByteArray(); - - if (DEBUGDATA) { - DapDump.dumpbytestream(byteresult, ByteOrder.nativeOrder(), "TestServlet.dodata"); - } - - if (prop_generate) { - // Dump the serialization into a file; this also includes the dmr - String target = testcase.generatepath + ".raw"; - writefile(target, byteresult); - } - - // Setup a ChunkInputStream - ByteArrayInputStream bytestream = new ByteArrayInputStream(byteresult); - - ChunkInputStream reader = new ChunkInputStream(bytestream, RequestMode.DAP, ByteOrder.nativeOrder()); - - String sdmr = reader.readDMR(); // Read the DMR - if (prop_visual) - visual(testcase.title + ".dmr.dap", sdmr); - - Dump printer = new Dump(); - String sdata = printer.dumpdata(reader, testcase.checksumming, reader.getRemoteByteOrder(), testcase.template); - - if (prop_visual) - visual(testcase.title + ".dap", sdata); - - if (prop_baseline) - writefile(testcase.baselinepath + ".dap", sdata); - - if (prop_diff) { - // compare with baseline - // Read the baseline file - System.err.println("Data Comparison:"); - String baselinecontent = readfile(testcase.baselinepath + ".dap"); - Assert.assertTrue("***Fail", same(getTitle(), baselinecontent, sdata)); - } - } - - ////////////////////////////////////////////////// - - protected void defineAllTestcases() { - this.alltestcases.add(new TestCase("test_fill.nc", "dmr,dap", true, // 0 - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('U', 1); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('S', 2); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('U', 4); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_one_var.nc", "dmr,dap", true, // 0 - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 4); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_opaque.nc", "dmr,dap", true, // 0 - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('O', 0); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_opaque_array.nc", "dmr,dap", true, // 0 - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 4; i++) { - printer.printvalue('O', 0, i); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_one_vararray.nc", "dmr,dap", true, // 1 - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 4); - printer.printvalue('S', 4); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_enum.nc", "dmr,dap", true, // - // S1 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 1); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_enum_2.nc", "dmr,dap", true, // - // S1 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 1); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_enum_array.nc", "dmr,dap", true, // 3 - // 5 S1 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 5; i++) { - printer.printvalue('U', 1, i); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_atomic_types.nc", "dmr,dap", true, // 4 - // S1 U1 S2 U2 S4 U4 S8 U8 F4 F8 C1 T O S1 S1 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 1); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('U', 1); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('S', 2); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('U', 2); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('S', 4); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('U', 4); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('S', 8); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('U', 8); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('F', 4); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('F', 8); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('C', 1); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('T', 0); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('O', 0); - printer.verifychecksum(); - printer.startchecksum(); - printer.startchecksum(); - printer.printvalue('S', 1); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('S', 1); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_atomic_array.nc", "dmr,dap", true, // 5 - // 6 U1 4 S2 6 U4 2 F8 2 C1 4 T 2 O 5 S1 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 6; i++) { - printer.printvalue('U', 1, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 4; i++) { - printer.printvalue('S', 2, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 6; i++) { - printer.printvalue('U', 4, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - printer.printvalue('F', 8, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - printer.printvalue('C', 1, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 4; i++) { - printer.printvalue('T', 0, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - printer.printvalue('O', 0, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 5; i++) { - printer.printvalue('S', 1, i); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_groups1.nc", "dmr,dap", true, // 6 - // 5 S4 3 F4 5 S4 7 F4", - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 5; i++) { - printer.printvalue('S', 4, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 3; i++) { - printer.printvalue('F', 4, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 5; i++) { - printer.printvalue('S', 4, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 7; i++) { - printer.printvalue('F', 4, i); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_struct_type.nc", "dmr,dap", true, // 7 - // { S4 S4 } - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 4); - printer.printvalue('S', 4); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_utf8.nc", "dmr,dap", true, // 9 - // 2 { S4 S4 } - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - printer.printvalue('T', 0, i); - printer.format("%n"); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_struct_nested.hdf5", "dmr,dap", true, // 10 - // { { S4 S4 } { S4 S4 } } - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 4); - printer.printvalue('S', 4); - printer.printvalue('S', 4); - printer.printvalue('S', 4); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_struct_nested3.hdf5", "dmr,dap", true, - // { { {S4 } } } - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 4); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_sequence_1.syn", "dmr,dap", true, // 0 - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - int count = printer.printcount(); - for (int j = 0; j < count; j++) { - printer.printvalue('S', 4); - printer.printvalue('S', 2); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_sequence_2.syn", "dmr,dap", true, // 0 - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - int count = printer.printcount(); - for (int j = 0; j < count; j++) { - printer.printvalue('S', 4); - printer.printvalue('S', 2); - } - printer.newline(); - } - printer.verifychecksum(); - } - })); - /* - * Not currently working - * this.alltestcases.add( - * new TestCase("test_vlen1.nc", "dmr,dap", true, - * new Dump.Commands() - * { - * public void run(Dump printer) throws IOException - * { - * int count = printer.printcount(); - * for(int i = 0;i < count;i++) { - * printer.printvalue('S', 4, i); - * printer.format("\n"); - * } - * printer.printchecksum(); - * } - * })); - * this.alltestcases.add( - * new TestCase("test_vlen2.nc", "dmr,dap", true, - * new Dump.Commands() - * { - * public void run(Dump printer) throws IOException - * { - * //{1, 3, 5, 7}, {100,200}, {-1,-2},{1, 3, 5, 7}, {100,200}, {-1,-2}; - * for(int d3 = 0;d3 < 3;d3++) { - * for(int d2 = 0;d2 < 2;d2++) { - * int count = printer.printcount(); - * for(int i = 0;i < count;i++) { - * printer.printvalue('S', 4, d3, d2, i); - * printer.format("\n"); - * } - * } - * } - * printer.printchecksum(); - * } - * })); - * this.alltestcases.add( - * new TestCase("test_vlen3.hdf5", "dmr,dap", true, - * new Dump.Commands() - * { - * public void run(Dump printer) throws IOException - * { - * int count = printer.printcount(); - * for(int i = 0;i < count;i++) { - * printer.printvalue('S', 4, i); - * printer.format("\n"); - * } - * printer.printchecksum(); - * } - * })); - * //*hdf5 iosp is not doing this correctly - * this.alltestcases.add( - * new TestCase("test_vlen4.hdf5", "dmr,dap", true, - * new Dump.Commands() - * { - * public void run(Dump printer) throws IOException - * { - * for(int i=0;i<2;i++) { - * int count = printer.printcount(); - * for(int j = 0;j < count;j++) { - * printer.printvalue('S', 4, i, j); - * printer.format("\n"); - * } - * } - * printer.printchecksum(); - * } - * })); - * this.alltestcases.add( - * new TestCase("test_vlen5.hdf5", "dmr,dap", true, - * new Dump.Commands() - * { - * public void run(Dump printer) throws IOException - * { - * for(int i = 0;i < 2;i++) { - * int count = printer.printcount(); - * for(int j = 0;j < count;j++) { - * printer.printvalue('S', 4, i, j); - * printer.format("\n"); - * } - * } - * printer.printchecksum(); - * } - * })); - */ - this.alltestcases.add(new TestCase("test_anon_dim.syn", "dmr,dap", true, // 0 - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 6; i++) { - printer.printvalue('S', 4, i); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_atomic_types.syn", "dmr,dap", true, // 4 - // S1 U1 S2 U2 S4 U4 S8 U8 F4 F8 C1 T O S1 S1 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 1); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('U', 1); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('S', 2); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('U', 2); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('S', 4); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('U', 4); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('S', 8); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('U', 8); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('F', 4); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('F', 8); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('C', 1); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('T', 0); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('O', 0); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('S', 1); - printer.verifychecksum(); - printer.startchecksum(); - printer.printvalue('S', 1); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_atomic_array.syn", "dmr,dap", true, // 5 - // 6 U1 4 S2 6 U4 2 F8 2 C1 4 T 2 O 5 S1 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 6; i++) { - printer.printvalue('U', 1, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 4; i++) { - printer.printvalue('S', 2, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 6; i++) { - printer.printvalue('U', 4, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - printer.printvalue('F', 8, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - printer.printvalue('C', 1, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 4; i++) { - printer.printvalue('T', 0, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - printer.printvalue('O', 0, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 5; i++) { - printer.printvalue('S', 1, i); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase("test_struct_array.syn", "dmr,dap", true, // 8 - // 12 { S4 S4 } - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 4; i++) { - printer.printvalue('F', 4, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 3; i++) { - printer.printvalue('F', 4, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 3; j++) { - printer.printvalue('S', 4, i); - printer.format(" "); - printer.printvalue('S', 4); - printer.format("%n"); - } - } - printer.verifychecksum(); - } - })); - // XFAIL tests - this.alltestcases.add(new TestCase("test_struct_array.nc", "dmr", true)); - } - - ////////////////////////////////////////////////// - // Utility methods - - - // Locate the test cases with given prefix - List locate(String prefix) { - List results = new ArrayList(); - for (TestCase ct : this.alltestcases) { - if (ct.dataset.startsWith(prefix)) - results.add(ct); - } - return results; - } - - - ////////////////////////////////////////////////// - // Support classes - - static /* package */ class NullValidator implements Validator { - public boolean supports(Class clazz) { - return true; - } - - public void validate(Object target, Errors errors) { - return; - } - } - -} - diff --git a/dap4/d4tests/src/test/java/dap4/test/TestServletConstraints.java b/dap4/d4tests/src/test/java/dap4/test/TestServletConstraints.java deleted file mode 100644 index 1a20ea04bb..0000000000 --- a/dap4/d4tests/src/test/java/dap4/test/TestServletConstraints.java +++ /dev/null @@ -1,453 +0,0 @@ -package dap4.test; - -import dap4.core.ce.parser.CEParserImpl; -import dap4.core.data.DSPRegistry; -import dap4.core.util.DapDump; -import dap4.core.util.Escape; -import dap4.dap4lib.ChunkInputStream; -import dap4.dap4lib.FileDSP; -import dap4.dap4lib.RequestMode; -import dap4.servlet.DapCache; -import dap4.servlet.Generator; -import dap4.servlet.SynDSP; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.MvcResult; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder; -import thredds.server.dap4.Dap4Controller; -import ucar.unidata.util.test.category.NotPullRequest; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.lang.invoke.MethodHandles; -import java.math.BigInteger; -import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.List; - - -/** - * TestServletConstraints has multiple purposes. - * 1. It tests the d4tsservlet ability to serve up constrained data. - * 2. It (optionally) stores the serialized raw databuffer - * for datasets into files., These files are then used to - * test client side deserialization (see TestCDMClient). - */ -@Category(NotPullRequest.class) -public class TestServletConstraints extends DapTestCommon { - static public boolean DEBUG = false; - static public boolean DEBUGDATA = false; - static public boolean PARSEDEBUG = false; - static public boolean CEPARSEDEBUG = false; - - static public boolean USEBIG = false; - static public boolean NOCSUM = false; - - ////////////////////////////////////////////////// - // Constants - - static protected final String RESOURCEPATH = "/src/test/data/resources"; // wrt getTestInputFilesDir - static protected final String TESTINPUTDIR = "/testfiles"; - static protected final String BASELINEDIR = "/TestServletConstraints/baseline"; - static protected final String GENERATEDIR = "/TestCDMClient/testinput"; - - // constants for Fake Request - static protected final String FAKEURLPREFIX = "/dap4"; - - static protected final BigInteger MASK = new BigInteger("FFFFFFFFFFFFFFFF", 16); - - // Define the file extensions of interest for generation - static protected final String[] GENEXTENSIONS = new String[] {".raw.dap", ".raw.dmr"}; - - ////////////////////////////////////////////////// - // Type Declarations - - static protected class TestCase { - static String inputroot = null; - static String baselineroot = null; - static String generateroot = null; - - static public void setRoots(String input, String baseline, String generate) { - inputroot = input; - baselineroot = baseline; - generateroot = generate; - } - - protected String title; - protected String dataset; - protected String[] extensions; - protected boolean checksumming; - protected Dump.Commands template; - protected String testinputpath; - protected String baselinepath; - protected String generatepath; - - protected String constraint = null; - protected int id; - - protected TestCase(int id, String dataset, String extensions, String ce, Dump.Commands template) { - this(id, dataset, extensions, ce, true, template); - } - - protected TestCase(int id, String dataset, String extensions, String ce, boolean checksumming, - Dump.Commands template) { - this.id = id; - this.title = dataset + (ce == null ? "" : ("?" + ce)); - this.constraint = ce; - this.dataset = dataset; - this.extensions = extensions.split(","); - this.template = template; - this.checksumming = checksumming; - this.testinputpath = canonjoin(this.inputroot, dataset); - this.baselinepath = canonjoin(this.baselineroot, dataset) + "." + id; - this.generatepath = canonjoin(this.generateroot, dataset) + "." + id; - } - - String makeurl(RequestMode ext) { - String u = canonjoin(FAKEURLPREFIX, canonjoin(TESTINPUTDIR, dataset)) + "." + ext.toString(); - return u; - } - - String makequery() { - String query = ""; - if (this.constraint != null) { - String ce = this.constraint; - // Escape it - ce = Escape.urlEncodeQuery(ce); - query = ce; - } - return query; - } - - public String makeBasepath(RequestMode mode) { - String ext; - switch (mode) { - case DMR: - return this.baselinepath + ".dmr"; - case DAP: - return this.baselinepath + ".dap"; - default: - break; - } - throw new UnsupportedOperationException("illegal mode: " + mode); - } - - public String toString() { - return dataset + "." + id; - } - } - - ////////////////////////////////////////////////// - // Instance variables - - protected MockMvc mockMvc; - - // Test cases - - protected List alltestcases = new ArrayList(); - - protected List chosentests = new ArrayList(); - - ////////////////////////////////////////////////// - - @Before - public void setup() throws Exception { - super.bindstd(); - StandaloneMockMvcBuilder mvcbuilder = MockMvcBuilders.standaloneSetup(new Dap4Controller()); - mvcbuilder.setValidator(new TestServlet.NullValidator()); - this.mockMvc = mvcbuilder.build(); - testSetup(); - if (prop_ascii) - Generator.setASCII(true); - TestCase.setRoots(canonjoin(getResourceRoot(), TESTINPUTDIR), canonjoin(getResourceRoot(), BASELINEDIR), - canonjoin(getResourceRoot(), GENERATEDIR)); - defineAllTestcases(); - chooseTestcases(); - } - - @After - public void cleanup() { - super.unbindstd(); - } - - - ////////////////////////////////////////////////// - // Define test cases - - protected void chooseTestcases() { - if (false) { - if (false) { - chosentests = locate(8); - } else { - List choose1 = locate(8); - chosentests = locate(5); - chosentests.addAll(choose1); - } - prop_visual = true; - prop_debug = false; - prop_generate = false; - prop_baseline = true; - } else { - prop_baseline = false; - prop_generate = false; - for (TestCase tc : alltestcases) { - chosentests.add(tc); - } - } - } - - ////////////////////////////////////////////////// - // Junit test methods - - @Test - public void testServletConstraints() throws Exception { - DapCache.flush(); - for (TestCase testcase : chosentests) { - doOneTest(testcase); - } - } - - ////////////////////////////////////////////////// - // Primary test method - - void doOneTest(TestCase testcase) throws Exception { - System.err.println("Testcase: " + testcase.toString()); - System.err.println("Baseline: " + testcase.baselinepath); - if (CEPARSEDEBUG) - CEParserImpl.setGlobalDebugLevel(1); - - for (String extension : testcase.extensions) { - RequestMode ext = RequestMode.modeFor(extension); - switch (ext) { - case DMR: - dodmr(testcase); - break; - case DAP: - dodata(testcase); - break; - default: - Assert.assertTrue("Unknown extension", false); - } - } - } - - void dodmr(TestCase testcase) throws Exception { - String url = testcase.makeurl(RequestMode.DMR); - String query = testcase.makequery(); - String basepath = testcase.makeBasepath(RequestMode.DMR); - - String little = (USEBIG ? "0" : "1"); - String nocsum = (NOCSUM ? "1" : "0"); - MvcResult result = perform(url, this.mockMvc, RESOURCEPATH, DapTestCommon.CONSTRAINTTAG, query, - DapTestCommon.ORDERTAG, little, DapTestCommon.NOCSUMTAG, nocsum, DapTestCommon.TESTTAG, "true"); - - // Collect the output - MockHttpServletResponse res = result.getResponse(); - byte[] byteresult = res.getContentAsByteArray(); - - // Test by converting the raw output to a string - String sdmr = new String(byteresult, UTF8); - - if (prop_visual) - visual(testcase.title + ".dmr", sdmr); - if (prop_baseline) { - writefile(basepath, sdmr); - } else if (prop_diff) { // compare with baseline - // Read the baseline file - String baselinecontent = readfile(basepath); - System.err.println("DMR Comparison"); - Assert.assertTrue("***Fail", same(getTitle(), baselinecontent, sdmr)); - } - } - - void dodata(TestCase testcase) throws Exception { - String url = testcase.makeurl(RequestMode.DAP); - String query = testcase.makequery(); - String basepath = testcase.makeBasepath(RequestMode.DAP); - String little = (USEBIG ? "0" : "1"); - String nocsum = (NOCSUM ? "1" : "0"); - MvcResult result = perform(url, this.mockMvc, RESOURCEPATH, DapTestCommon.CONSTRAINTTAG, query, - DapTestCommon.ORDERTAG, little, DapTestCommon.NOCSUMTAG, nocsum, DapTestCommon.TESTTAG, "true"); - - // Collect the output - MockHttpServletResponse res = result.getResponse(); - byte[] byteresult = res.getContentAsByteArray(); - - if (prop_debug || DEBUG) { - DapDump.dumpbytestream(byteresult, ByteOrder.nativeOrder(), "TestServletConstraint.dodata"); - } - - if (prop_generate) { - // Dump the serialization into a file; this also includes the dmr - String target = testcase.generatepath + ".raw"; - writefile(target, byteresult); - } - - // Setup a ChunkInputStream - ByteArrayInputStream bytestream = new ByteArrayInputStream(byteresult); - - ChunkInputStream reader = new ChunkInputStream(bytestream, RequestMode.DAP, ByteOrder.nativeOrder()); - - String sdmr = reader.readDMR(); // Read the DMR - if (prop_visual) - visual(testcase.title + ".dmr.dap", sdmr); - - Dump printer = new Dump(); - String sdata = printer.dumpdata(reader, testcase.checksumming, reader.getRemoteByteOrder(), testcase.template); - - if (prop_visual) - visual(testcase.title + ".dap", sdata); - - if (prop_baseline) - writefile(basepath, sdata); - - if (prop_diff) { - // compare with baseline - // Read the baseline file - System.err.println("Data Comparison:"); - String baselinecontent = readfile(testcase.baselinepath + ".dap"); - Assert.assertTrue("***Fail", same(getTitle(), baselinecontent, sdata)); - } - } - - ////////////////////////////////////////////////// - - protected void defineAllTestcases() { - this.alltestcases.add(new TestCase(1, "test_one_vararray.nc", "dmr,dap", "/t[1]", - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 4); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase(2, "test_anon_dim.syn", "dmr,dap", "/vu32[0:3]", // test for dimension inclusion - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('U', 4); - printer.printvalue('U', 4); - printer.printvalue('U', 4); - printer.printvalue('U', 4); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase(3, "test_one_vararray.nc", "dmr,dap", "/t", // test for dimension inclusion - // S4 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - printer.printvalue('S', 4); - printer.printvalue('S', 4); - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase(4, "test_enum_array.nc", "dmr,dap", "/primary_cloud[1:2:4]", - // 2 S1 - new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - printer.printvalue('U', 1, i); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase(5, "test_atomic_array.nc", "dmr,dap", - "/vu8[1][0:2:2];/vd[1];/vs[1][0];/vo[0][1]", new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - printer.printvalue('U', 1, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 1; i++) { - printer.printvalue('F', 8, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 1; i++) { - printer.printvalue('T', 0, i); - } - printer.verifychecksum(); - printer.startchecksum(); - for (int i = 0; i < 1; i++) { - printer.printvalue('O', 0, i); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase(6, "test_struct_array.nc", "dmr,dap", "/s[0:2:3][0:1]", new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 2; j++) { - printer.printvalue('S', 4); - } - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase(7, "test_opaque_array.nc", "dmr,dap", "/vo2[1][0:1]", new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 2; i++) { - printer.printvalue('O', 0, i); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase(8, "test_atomic_array.nc", "dmr,dap", "/v16[0:1,3]", new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 3; i++) { - printer.printvalue('S', 2, i); - } - printer.verifychecksum(); - } - })); - this.alltestcases.add(new TestCase(9, "test_atomic_array.nc", "dmr,dap", "/v16[3,0:1]", new Dump.Commands() { - public void run(Dump printer) throws IOException { - printer.startchecksum(); - for (int i = 0; i < 3; i++) { - printer.printvalue('S', 2, i); - } - printer.verifychecksum(); - } - })); - for (int i = 0; i < 3; i++) { - int numCases = this.alltestcases.size(); - for (int testCase = 0; testCase < numCases; testCase++) { - this.alltestcases.add(this.alltestcases.get(testCase)); - } - } - } - - ////////////////////////////////////////////////// - // Utility methods - - - // Locate the test cases with given prefix - List locate(Object tag) { - List results = new ArrayList(); - for (TestCase ct : this.alltestcases) { - if (tag instanceof Integer && ct.id == (Integer) tag) { - results.add(ct); - break; - } else if (tag instanceof String && ct.title.equals((String) tag)) { - results.add(ct); - break; - } - } - return results; - } -} diff --git a/dap4/d4tests/src/test/resources/logback-test.xml b/dap4/d4tests/src/test/resources/logback-test.xml deleted file mode 100644 index d24280d3c9..0000000000 --- a/dap4/d4tests/src/test/resources/logback-test.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - %highlight([%d{HH:mm:ss.SSS} %-5level %logger{36}]) %message%n - - - - - - - - - - - - - - - - diff --git a/dap4/d4ts/build.gradle b/dap4/d4ts/build.gradle index 5f1da93acd..23ca998d68 100644 --- a/dap4/d4ts/build.gradle +++ b/dap4/d4ts/build.gradle @@ -3,40 +3,39 @@ apply from: "$rootDir/gradle/any/war-published.gradle" apply from: "$rootDir/gradle/any/gretty.gradle" dependencies { - compile enforcedPlatform(project(':tds-platform')) + implementation enforcedPlatform(project(':tds-platform')) + + implementation 'edu.ucar:dap4' + implementation project(":dap4:d4servlet") - compile 'edu.ucar:dap4' - compile project(":dap4:dap4-servlet") providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}" - compile 'org.slf4j:slf4j-api' + compileOnly 'org.slf4j:slf4j-api' runtime 'org.apache.logging.log4j:log4j-slf4j-impl' runtime 'org.apache.logging.log4j:log4j-web' - testRuntime 'ch.qos.logback:logback-classic' + compileOnly 'org.slf4j:slf4j-api' } -// This specifies the resources from ":dap4:d4tests" that we need to include in the d4ts war and inplaceWebapp. +// This specifies the resources from ":dap4" that we need to include in the d4ts war and inplaceWebapp. def d4testsResourcesCopySpec = copySpec { - File d4testsResourcesDir = project(":dap4:d4tests").file('src/test/data/resources') + File d4tsResourcesDir = project(":dap4:d4ts").file('src/main/webapp/WEB-INF') + +/*These are already in place - from (new File(d4testsResourcesDir, 'favicon.ico')) { + from(d4tsResourcesDir) { into('WEB-INF/') + include('dsr.xml.template') + include('dsr.html.template') + include('frontpage.html.template') + include('favicon.ico') } - from (new File(d4testsResourcesDir, "testfiles/")) { - into('WEB-INF/resources/testfiles/') - include('*.syn') + from (new File(d4tsResourcesDir, "testfiles/")) { + into('WEB-INF/testfiles/') include('*.nc') - include('*.hdf5') - include('*.raw') - } - /* ignore for now - from(new File(d4testsResourcesDir, "testfiles/dmr/")) { - into('WEB-INF/resources/testfiles/dmr/') - include('*.dmr') } - */ +*/ } diff --git a/dap4/d4ts/src/main/java/dap4/d4ts/D4TSServlet.java b/dap4/d4ts/src/main/java/dap4/d4ts/D4TSServlet.java index bc832898c8..59ae59c7c1 100644 --- a/dap4/d4ts/src/main/java/dap4/d4ts/D4TSServlet.java +++ b/dap4/d4ts/src/main/java/dap4/d4ts/D4TSServlet.java @@ -5,16 +5,13 @@ package dap4.d4ts; -import dap4.core.data.DSPRegistry; import dap4.core.util.DapContext; import dap4.core.util.DapException; import dap4.core.util.DapUtil; import dap4.dap4lib.DapCodes; import dap4.dap4lib.DapLog; -import dap4.dap4lib.FileDSP; -import dap4.dap4lib.netcdf.Nc4DSP; import dap4.servlet.*; -import javax.servlet.ServletContext; + import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -36,31 +33,11 @@ public class D4TSServlet extends DapController { static final boolean PARSEDEBUG = false; - static protected final String RESOURCEPATH = "WEB-INF/resources"; + static final String RESOURCEPATH = "/testfiles"; ////////////////////////////////////////////////// // Type Decls - static class D4TSFactory extends DSPFactory { - - public D4TSFactory() { - // Register known DSP classes: order is important - // in event that two or more dsps can match a given file - // (e.q. FileDSP vs Nc4DSP). - // Only used in server - DapCache.dspregistry.register(Nc4DSP.class, DSPRegistry.LAST); - DapCache.dspregistry.register(SynDSP.class, DSPRegistry.LAST); - DapCache.dspregistry.register(FileDSP.class, DSPRegistry.LAST); - } - - } - - ////////////////////////////////////////////////// - - static { - DapCache.setFactory(new D4TSFactory()); - } - ////////////////////////////////////////////////// // Instance variables @@ -92,7 +69,7 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws Se @Override protected void doFavicon(String icopath, DapContext cxt) throws IOException { DapRequest drq = (DapRequest) cxt.get(DapRequest.class); - String favfile = getResourcePath(drq, icopath); + String favfile = drq.getResourcePath(icopath); if (favfile != null) { try (FileInputStream fav = new FileInputStream(favfile);) { byte[] content = DapUtil.readbinaryfile(fav); @@ -120,36 +97,11 @@ protected void doCapabilities(DapRequest drq, DapContext cxt) throws IOException } - @Override - public String getResourcePath(DapRequest drq, String location) throws DapException { - String prefix = drq.getResourceRoot(); - if (prefix == null) - throw new DapException("Cannot find location resource: " + location).setCode(DapCodes.SC_NOT_FOUND); - location = DapUtil.canonicalpath(location); - String datasetfilepath = DapUtil.canonjoin(prefix, location); - // See if it really exists and is readable and of proper type - File dataset = new File(datasetfilepath); - if (!dataset.exists()) { - String msg = String.format("Requested file does not exist: prefix=%s location=%s datasetfilepath=%s", prefix, - location, datasetfilepath); - throw new DapException(msg).setCode(HttpServletResponse.SC_NOT_FOUND); - } - if (!dataset.canRead()) - throw new DapException("Requested file not readable: " + datasetfilepath) - .setCode(HttpServletResponse.SC_FORBIDDEN); - return datasetfilepath; - } - @Override public long getBinaryWriteLimit() { return DEFAULTBINARYWRITELIMIT; } - @Override - public String getServletID() { - return "d4ts"; - } - /** * Isolate front page builder so we can override if desired for testing. * @@ -161,14 +113,59 @@ protected FrontPage getFrontPage(DapRequest drq, DapContext cxt) throws DapExcep if (this.defaultroots == null) { // Figure out the directory containing // the files to display. - String pageroot; - pageroot = getResourcePath(drq, ""); - if (pageroot == null) - throw new DapException("Cannot locate resources directory"); + String testroot = drq.getResourcePath("/"); + if (testroot == null) + throw new DapException("Cannot locate dataset directory"); this.defaultroots = new ArrayList<>(); - this.defaultroots.add(new Root("testfiles", pageroot)); + this.defaultroots.add(new Root(testroot, RESOURCEPATH)); } return new FrontPage(this.defaultroots, drq); } + @Override + public String getServletID() { + return "/d4ts"; + } + + @Override + public String getWebContentRoot(DapRequest drq) throws DapException { + try { + String servletpath = getServletContext().getResource("/").getPath(); + String path = servletpath + "WEB-INF"; + File f = new File(path); + if (!f.exists() || !f.canRead() || !f.isDirectory()) + throw new DapException("Cannot find WEB-INF").setCode(DapCodes.SC_NOT_FOUND); + return path; + } catch (IOException ioe) { + throw new DapException(ioe); + } + } + + /** + * Convert a URL path for a dataset into an absolute file path + * + * @param drq dap request + * @param location suffix of url path + * @return path in a string builder so caller can extend. + * @throws IOException + */ + public String getResourcePath(DapRequest drq, String location) throws DapException { + try { + String root = getWebContentRoot(drq); + if (root == null) + throw new DapException("Cannot find WEB-INF").setCode(DapCodes.SC_NOT_FOUND); + StringBuilder path = new StringBuilder(DapUtil.canonicalpath(root)); + if (location.charAt(0) != '/') + path.append('/'); + path.append(location); + String result = path.toString(); + File f = new File(result); + if (!f.exists() || !f.canRead()) + throw new DapException("Cannot find Resource path: " + result).setCode(DapCodes.SC_NOT_FOUND); + return result; + } catch (IOException ioe) { + throw new DapException(ioe).setCode(DapCodes.SC_NOT_FOUND); + } + } + } diff --git a/dap4/d4ts/src/main/java/dap4/d4ts/FrontPage.java b/dap4/d4ts/src/main/java/dap4/d4ts/FrontPage.java index 5273627d4d..322620282d 100644 --- a/dap4/d4ts/src/main/java/dap4/d4ts/FrontPage.java +++ b/dap4/d4ts/src/main/java/dap4/d4ts/FrontPage.java @@ -5,11 +5,17 @@ package dap4.d4ts; +import dap4.core.util.DapConstants; import dap4.core.util.DapException; import dap4.core.util.DapUtil; import dap4.dap4lib.DapLog; import dap4.servlet.DapRequest; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletResponse; import java.io.*; +import java.net.MalformedURLException; +import java.net.URL; import java.util.ArrayList; import java.util.Comparator; import java.util.List; @@ -25,6 +31,10 @@ public class FrontPage { static final boolean DUMPFILELIST = false; + static final String FPTEMPLATE = "/templates/dap4.frontpage.html.template"; + + static final String DFALTTESTSERVER = "remotetest.unidata.ucar.edu"; + ////////////////////////////////////////////////// // Constants @@ -33,36 +43,35 @@ public class FrontPage { static final protected String[] expatterns = new String[0]; // Define the file sources of interest - static final protected FileSource[] SOURCES = - new FileSource[] {new FileSource(".nc", "netCDF"), new FileSource(".hdf5", "HDF5"), - new FileSource(".dap", "Raw Protocol Output"), new FileSource(".syn", "Synthetic")}; + static final protected FileSource[] SOURCES = new FileSource[] {new FileSource(".nc", "netCDF")}; - static public class Root { + public static class Root { public String prefix; + public String dir; + public List files; public String toString() { return String.format("{'%s/%s'}", this.prefix, this.dir); } - public Root(String dir, String prefix) { - this.dir = dir; + public Root(String prefix, String dir) { this.prefix = DapUtil.canonicalpath(prefix); + this.dir = dir; } public String getFullPath() { - return DapUtil.canonjoin(this.prefix, this.dir); - } + return this.prefix + "/" + this.dir; + }; public void setFiles(List files) { this.files = files; } } - // Remote Test server: should match values in TestDir.java private static String dap4TestServerPropName = "d4ts"; - static public String dap4TestServer = "remotetest.unidata.ucar.edu"; // mutable + public static String dap4TestServer = null;; // mutable static { String d4ts = System.getProperty(dap4TestServerPropName); @@ -88,6 +97,7 @@ public FileSource(String ext, String tag) { protected DapRequest drq = null; protected List roots = null; // root paths to the displayed files + protected StringBuilder frontpage = null; ////////////////////////////////////////////////// // Constructor(s) @@ -103,7 +113,26 @@ public FrontPage(List rootinfo, DapRequest req) throws DapException { // Construct the list of usable files buildFileList(root); } + // Figure out the test server + if (this.dap4TestServer == null) { + try { + URL url = new URL(drq.getRequest().getRequestURL().toString()); + this.dap4TestServer = url.getHost(); + if (url.getPort() > 0) + this.dap4TestServer += ":" + url.getPort(); + } catch (MalformedURLException mue) { + this.dap4TestServer = null; + } + } + if (this.dap4TestServer == null) + this.dap4TestServer = DFALTTESTSERVER; + // Get the template and fill in selected macros + try { + this.frontpage = initialPage(this.dap4TestServer); + } catch (IOException ioe) { + throw new DapException(ioe).setCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + } } ////////////////////////////////////////////////// @@ -148,7 +177,7 @@ public int compare(File f1, File f2) { }); if (DUMPFILELIST) { for (File x : matches) { - System.err.printf("file: %s/%s%n", rootinfo.prefix, x.getName()); + System.err.printf("file: %s/%s%n", rootinfo.dir, x.getName()); } } FileSource clone = new FileSource(src.ext, src.tag); @@ -160,46 +189,71 @@ public int compare(File f1, File f2) { } protected String buildPage() throws DapException { - StringBuilder html = new StringBuilder(); - html.append(HTML_PREFIX); - html.append(HTML_HEADER1); - StringBuilder rootnames = new StringBuilder(); for (Root root : this.roots) { if (rootnames.length() > 0) rootnames.append(","); rootnames.append(root.dir); } - html.append(String.format(HTML_HEADER2, rootnames)); - + StringBuilder sources = new StringBuilder(); for (Root root : this.roots) { try { for (FileSource src : root.files) { - html.append(String.format(HTML_HEADER3, src.tag)); - html.append(TABLE_HEADER); + StringBuilder allrows = new StringBuilder(); for (File file : src.files) { String name = file.getName(); - StringBuilder buf = new StringBuilder(); - buf.append(this.drq.getControllerPath()); - buf.append('/'); - buf.append(DapUtil.canonicalpath(root.dir)); - buf.append('/'); - buf.append(DapUtil.canonicalpath(name)); - String urlpath = buf.toString(); - String line = String.format(HTML_FORMAT, name, urlpath, urlpath, urlpath); - html.append(line); + String rootpath = root.dir; + if (rootpath.startsWith("/")) + rootpath = rootpath.substring(1); + String url = String.format(HTML_URL_FORMAT, this.dap4TestServer, rootpath, name); + StringBuilder row = new StringBuilder(HTML_ROW); + substitute(row, "dataset", name); + substitute(row, "url", url); + allrows.append(row); } - html.append(TABLE_FOOTER); + StringBuilder source = new StringBuilder(HTML_SOURCE); + substitute(source, "source", src.tag); + substitute(source, "rows", allrows.toString()); + sources.append(source); } } catch (Exception e) { sendtrace(drq, e); } } - html.append(HTML_FOOTER); - return html.toString(); + substitute(this.frontpage, "sources", sources.toString()); + return this.frontpage.toString(); + } + + protected StringBuilder initialPage(String testserver) throws IOException { + // Get the FrontPage template + StringBuilder page = new StringBuilder(); + String template = drq.getWebContentPath(FPTEMPLATE); + try (InputStream stream = new FileInputStream(template)) { + int ch; + while ((ch = stream.read()) >= 0) { + page.append((char) ch); + } + } + // Fill in initial parameters + substitute(page, "dap4TestServer", testserver); + return page; + } + + protected void substitute(StringBuilder buf, String macro, String value) { + int from = 0; + String tag = "${" + macro + "}"; + int taglen = tag.length(); + int valuelen = value.length(); + for (;;) { + int index = buf.indexOf(tag, from); + if (index < 0) + break; + buf.replace(index, index + taglen, value); + from = index + valuelen; + } } - static public void sendtrace(DapRequest drq, Exception e) { + public static void sendtrace(DapRequest drq, Exception e) { try { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); @@ -212,7 +266,7 @@ static public void sendtrace(DapRequest drq, Exception e) { } } - static public void sendtext(DapRequest drq, String s) { + public static void sendtext(DapRequest drq, String s) { try { // s = s.replace("<", "<"); // s = s.replace(">", ">"); @@ -258,24 +312,16 @@ static public void sendtext(DapRequest drq, String s) { */ ////////////////////////////////////////////////// - // HTML prefix and suffix + // HTML Text Pieces // (Remember that java does not allow Strings to cross lines) - static final String HTML_PREFIX = - "\n\nDAP4 Test Files\n\n\n\n"; - - static final String HTML_HEADER1 = "

DAP4 Test Files

\n"; - static final String HTML_HEADER2 = "

http://" + dap4TestServer + "/d4ts/{%s}

%n
%n"; - static final String HTML_HEADER3 = "

%s Based Test Files

%n"; - - static final String TABLE_HEADER = "\n"; - static final String TABLE_FOOTER = "
\n"; - static final String HTML_FOOTER = "
\n\n"; + static final String HTML_URL_FORMAT = DapConstants.HTTPSCHEME + "//%s/d4ts/%s/%s"; - static final String HTML_FORMAT = "%n" + "%s:%n" - + " DMR.XML %n" - + " DAP %n" - + " DSR.XML %n" + "%n"; -} + static final String HTML_SOURCE = "

${source} Based Test Files

\n\n${rows}\n
"; + static final String HTML_ROW = String.join("\n", "", "${dataset}:", + " DMR ", + " DAP ", + " DSR ", "", ""); +} // FrontPage diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/README.md b/dap4/d4ts/src/main/webapp/WEB-INF/README.md new file mode 100644 index 0000000000..ae8ea847ce --- /dev/null +++ b/dap4/d4ts/src/main/webapp/WEB-INF/README.md @@ -0,0 +1,14 @@ +## Notes on DAP4 Web Files + +The template files for the DAP4 DSR and Capabilities support +are located in this directory: +* dap4/d4ts/src/main/webapp/WEB-INF/templates/ + +The template files are: +* dap4.dsr.html.template +* dap4.dsr.xml.template +* dap4.frontpage.html.template + +The DSR templates are also used in the tds server. +They are installed in this directory. +* tds/src/main/webapp/WEB-INF/templates/ diff --git a/dap4/d4tests/src/test/data/resources/favicon.ico b/dap4/d4ts/src/main/webapp/WEB-INF/favicon.ico similarity index 100% rename from dap4/d4tests/src/test/data/resources/favicon.ico rename to dap4/d4ts/src/main/webapp/WEB-INF/favicon.ico diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.dsr.html.template b/dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.dsr.html.template new file mode 100644 index 0000000000..422a1552d8 --- /dev/null +++ b/dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.dsr.html.template @@ -0,0 +1,61 @@ + + + + + + name="title" content="Dataset Services Response"> + + + + +
+

DAP4 Dataset Services

+
+
+ + + +
Dap Version:${DAP_VERSION}
Server Software Version:${DAP_SERVER}
+
+

Dataset: ${DATASET}

+ + + + + + +
Dataset Service + Class + Format + URL + Media Type +
Metadata + DMR + XML + ${URL}.dmr.xml + application/vnd.opendap.dap4.dataset-metadata+xml +
Data + DAP + Binary + ${URL}.dap + application/vnd.opendap.dap4.data +
Services + DSR + XML + ${URL}.dsr.xml + application/vnd.opendap.dap4.dataset-services+xml +
Services + DSR + HTML + ${URL}.dsr.html + application/vnd.opendap.dap4.dataset-services+html +
+ + diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.dsr.xml.template b/dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.dsr.xml.template new file mode 100644 index 0000000000..d07474a1a1 --- /dev/null +++ b/dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.dsr.xml.template @@ -0,0 +1,28 @@ + + + +${DAP_VERSION} +${DAP_SERVER} + + + + + + + + + + + + diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.frontpage.html.template b/dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.frontpage.html.template new file mode 100644 index 0000000000..7f2a9ee9a6 --- /dev/null +++ b/dap4/d4ts/src/main/webapp/WEB-INF/templates/dap4.frontpage.html.template @@ -0,0 +1,18 @@ + + + + + + + + +
+

DAP4 Test Files

+
+

http://${dap4TestServer}/d4ts/testfiles/*

+
+${sources} +
+ + diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_atomic_array.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_atomic_array.nc new file mode 100644 index 0000000000000000000000000000000000000000..9250eab38f7e78345572975317c2bc41504a9075 GIT binary patch literal 14477 zcmeHOYiwLs5uW>4du^}tD0ZHRY@Lv%A#vkJELUL1&U&{Fc5IW4LU{;h?YpkGtarn{ z2vtx}evl>=Dk=rh{)m6H5~v|45v{^YfG84CgckwLA6mc?rb3}@9#GMMN|-t4%-!v^ zw_THUTBJMj-E+_Lp800Z%-nOXPxSYN>TB24>RvA}-Bk3IPFb=;RrFqX^w@BJ-#*>< ztllKbjOD88cXje6>XYdsDy`K)qmst=gNccu0T1p>eIKKC1}pqNz+Q znuhmbRWn{XUb$#09ZM#;Zv6aA}iaT^oO*Smt;VEMpJe|lRF}DJH2_~_7 zARdjRAdsEP#*>NI)L1qR;Y=!$;WRl;RhSb^Fzt8Yyr*3=%odj8mPG5h*XO=}>YbPY){$Endkb6Z91oBSdG^u2?}`E^n6|ACrkKP_wi^KSWIpsFDH=4EBb@LXb2b39@g`-r!Jp&+yP_ zIM6#71m7nKM*}4$G+?NAZ&0-FQSJ9n#?pTLi}+FSfxeL6ilMYg7yM({j6adg6smHO zR4g(Uk2d?6TEK@B(uIckq=pIgY43|o#VjF2(ojNxCMW6Yjr-H{G30tq%frwMM@WT{ zuFJ&6u=f82!`8)ND0S>77r!+iF@z#LG!zDQTBaVpu|;-t>Y=A{7)pgds|?4an&_gm zM`*?})w3v>ZZrI$a5xC(lzr5`4)9sR>DoP)r;8evyd4ho4=n9MX@fgHv+kMs5|gU~ zl%2qpU8cn5?v~6rC00SpAtg3eEg$qhNlfVB0uuYwnQ!oNEh&??uULACwL|csk6xHB zF?M~NmMgKuJ-10>4K=qQF`VO5jYHf%*vXSvVrSV15UeVlheER4~D?g^rxl` z@K3C6gb%c?*#&oE$3~d^^9zUISu9-zvyTj9U;s<~FxRyHyWkTIjOPMBg;{K{8mx}v z&tn&Adui^Q&%;5yZG@)5Z7)EFXnVf<^d&ecN`HN0@((Z|Za>$3{Z+V#x2qubvzqHb zVY463KC$sSWJQC41JC>iC^%?@p34uugf}i#5&KYX;BUZY)dB4GQDO;ocuH!Qu3A3U|BF~(NPlci;EvP^lCHR_>dc$3O`V(C$G zTjjGKR8tV|)O=r@zA<XgGBr z&qZb)z=iaGVKM zz^0SiuTjR6Z77%X_-ss_<(%h~$7l1(Xfw)Lv?OOFNdd3+B5((lBuAWLg}>hGOyffk-?XeXoPK z(C20NA=%7_AO3|nQ9nY5u?8OQ?I6DP1w+Ao!J$BKRGbTUp#30&U_~;KbTm^qAhtj9 z0x#9eeM0|&=f+3W?jGqfk)d|WIRDq5M@D1~0L_Sv4Ihp2rXDGP0TWwf+mqbo0N+$T zt$TIyYXYM|Df{xz&Y8F3lnp8^!SBpGo?nPp!ji}rCtfQlmExJu6Mm_-1nHjWUpKB? z7Q9yUI|14Ur6)7*WM~gQ@yfNzqe|@j?e*hbm{f!+KSNpur=QyR@5-Z0+ttM=lNP<1 zxfd3-jTsqz^|cvnt6bHJq5ex-^KD9<`W5 zws_K--VQ6!_QAK#Z0(o7=v!z;v~G!fzXGVKs9oZtB2L*`$mbQj1?QJL&Q#Vr;-I@k zD9o+V@~Ax9KjxV8bHi_LScqdjnpt{FylZn|wshya^iV$3-?tn1>wPMG@wbT?jr9VI zY$CZGK2)=oa`(oB}2k;`_n95s`5$H=vGu-DN{KJqhj*|t_YBrw@4={buf zt(kmWrRT<3+?q)ygGkS%Z5f+;}a$&fCM#aLQsC7jbJ_VIM=1_A`uh2w;L!-$gr(#)U|v?byc;m$_Fm2B0_TT>}B44 z&+*-j!PH-=<_1>@qBsXLsDd|g`it}xj%bI$RhI{RaI>)%A0$?9Fv6WtXh`%V46`@V zvo#Tews^ENPO%weBFu3J#;c6D8Iy>OSi#OPfensCqqd-dWl|;B%7#cR7U|uF{ZKXC zHDjhbCpUTS!1iOj_xYeGjC{_XmdE;<+GW>FR-!FpLwM0$%z&B_kW(+lg+(8+@~jQ# z=jkIExxi70VWJYGa4|t#teak3y!A`vZyC8jRc7xPY6!U8LN8ce=_fLtkYorHiauoM zYz@0VZyEQuwXK1ISz-vvQvgSqHVk#oS$A8b%19;FPDka0tyfLciprCfZ*ILU!fpY| z$R(;Jw_xA_SFTV?mdA;*6?3CxQ{Yhe!7Uy%#YHa+77X8E7c)|c?WUuWEywhZw@xD} zFYbJF^bVDZPnZ&`4m_LyvyojU+|5dy5esQG{a2nyNXMM z9cVL$){_S^r$mJvOL>uu|0zOEm1NQy?LnFY4^h36*T$Y%y*bc`yFA1(8y>3ckfyu{ z=qcC6&sA{L42CKcsC?1JU#RATwTJv|*cQ+z#IAszOwVNRPc!U5Q$!L~?lI>|2*n!; zXSc21+~fz>JLSXkU=YP+;Jx6T55?GY37kCG>48&NS_<=gOdoXc(r*UV z$Ds>LJ@Bpfz7bf+0owZwpYZ)y8H8$IIf)Ii7A~E>HU=*vzzcOZ7M_9cu@s-ywD=6P z@M_OKe)Td~92+^2a}^%Oqz5i`>>P(1m@I*zU3S`wjieozD3#V4lVa}d?-`*^cGF_E*qg}%+pm{N>x4<6WjR6y zQaR)|8p!#dMN*-i_;n+K&^r0PfYj0gk_zQwFBK0$TW!-I6!OC0w&eu4%i@e{2l9|^ z?f65QQd*0jo+fL@@QtP8X}FlfR?Q;Me0xt)=7zE)a+A8v1NeCt@zEvuu(x?5*{4t! zo*Y*)bFtFai<((bGlAA1b#Ea?duT23v3;_B9Lp{~j^|uA({RDRJ(<^snab3!a-e}n z<-l!Q`f+v*JWX$}_iL`T4V#+ykfaH5bh(pS5f$Z3v&wyp8(!g zC}l})5qVqpGlz+klba+a-6Vv8Hw0#?|3Cku^<5e+xL=5F>ipd=hCWq!fo0ERzgQL@ z2fzC33F$8!OTEc+n9cqazl4pV36+`#mVm1iwA{nPmlQ=yvyfv+1arHf1q(S&@D(d;oiA#2gS8Jmeb7k_!XAG zpy;Ft`9Z@>gxZ5fXDrqp_sC*JCnv9J)t$Es$@w| zs#cdlo@V@1^pzQk=cBZLkYRV%i?f{=8?s9NU11yo3G?EJoHq^C3b zJd%eL9(|DHw9XaA!a=h)WFvMg6bR?P!+^tp!+^tp!@z&ZK>q~v^Q#+4x(kP~ojzB% huD*OpVq%OZWMu@zgXShH>K@RwKAvXpBuIjgpozxRXvDYvW_ISg-#qTj?CfZFmzB&e0TP=H45$z)KN3p18>NNgoW6mT9O3GY_O-hGtX?D1 zEtSgcxl*ZIQDK!`#!Gb2NUORRYXV@=fPXMMv_DUN8cYQn{`GdXb%#TPzHrp_*HZ|2X)io^g`r^JoXmG$6j1Fz~_AgFzsIP0T zt9JoZ%c918{&{K1bq!?Y9m>Ok^|GQ~h5xp+TpHGz8hKLLEO1o#IS>P~SD>>10dutl ze0^cGwZ#Tvfl$yturWr>gPv%(FN&%NLmo;M3BnJxWr1iYqI}4|3v;F$C_R-6%lC)F z>FFY#=0I`!fmQxU#2?&*71S+;wP=d1xMY~h|9?b~r3^Gpz$Gz264(ijbX2UxWYKk9 zBcE3cD@BEBn?|8UD{YiDBBPLltQ11{$mrPX?w+3IutaqW?P-96)RuGW|ByZDcFmX& zO3W;QL4syLnMgsIU?}Yc4dv%Mim3nOBNIZ2Ow~o<6<{qPREd>j(MF6S5f?gxS*F00 zc`)fik+~oq+Yek_m}f;Ngc8dhAId}`1!W@1%klz-vhnSg_vHyCOo%1YlIBkUCs@Vs zNwg#jGIYeSQNS^#W~IVY=0n#5lz;Ne==>kP%d?gfLWyOM4<)TgQczNip{y!UC=Wh0 zb}UaQZ%a#LCQ1ufE5zuCv?Plf4@V3^)^rPFI!j?H^JA7bshr6x3-^9>(Y>~#8>V0# z_4HLWF@*%@bRj&+GYH90rSqCuMRNwoQUxPV?@olc^dZhLx@~Mh>$;A1Tx_BrExf%8 z_oxL%CGf9oxfOawcomUXx%8SU%Sd^>xUKz&y9dhxZUv4gLO4`W>^t4C4V)O2Df=xl zWwvtQaI4+^Z0ovCH&_ol4$Xnxm|P7tXKLocG|X59r{3yw0(JD6FsH$>6dn`S&F4=K z!UkbIyK7|>`qAoyUu*991QrMf%aOJd@EJN(gV!~BN-V}_!ujv7e*v$dLk%?FTyPpL z2#1=^hfl*Ak!{Np*DgU^liZ-aqcaWsG1YfZU6bX`(mwb2h`6WcsDOt39Thud!NPZ+o z7Rj<=PL<@4U&v^a@4u8&B|B9&0>!#APL(WG-3Ju8s8b1%Y)yV}OG2L6y=gH!+-2eI z=3)7UvgeLlayU(-<_@;-+%d1f=8oTf|K>yvEM`!DsC3Rvu1TtGP)(oUnaezYt3#=^ z3B?$T2eQ{DlYAci>cWGbiLqF!c2`=UsT7(LI3i@OEo3KpXGMx1Y++0mW%Fb2Oax2>Oax2>Oax2>Oax2>Oax2>OavwY z0y*|V#2(o!yc0`xEU1@N+igH$>SRT~Cye1>cWc^D$!cqzPV;!?XN>;tdL+;{rf z+q&a&4lKmJ5Z^$uiWs$@YRs*2XYYO;z0>W<=lACxzHFCRl*^+<_4e^r&{0wg^_ErU zMV;Z)p58FO$F8hBy?=3s?jj+LXM}hI%>lh`e;}~FFA(!d{0kK+P239OUY`nwyWU+g zcz04`wMh+eRWT9 zWdP0KopU|z{a_jw%ZHtM-1F&lHu90D9*-QqkBxlrsmDWK&u1fVwwDct{R4gB7Z5yz z@W=Z(ooCnbh|d!WdXpY`-#(K+U_MO*Oax2>Oax2>G7uO^z=*g?GOR9?P>|GrE`PGc fv8a9BU-ODvT4-A2Pe+=^wc6#Ib{-nLq7VNAL*}i! diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_enum_1.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_enum_1.nc new file mode 100644 index 0000000000000000000000000000000000000000..e98f12301e779baa6b97ecc812db7c260dd1f90c GIT binary patch literal 989 zcmd5)%}T>S5S}E~#@b3zdl5nLrqp1If`UCrN-2n~Kj1aQbk)c7|j#>v?dMZsKl?9q=R~^S2m-i8GCmJ=t|69$z zgq1J~w=fA{)NIc8O&+j8|9)9QBkgF3?-u6yX;ZInW_Kv9z!<3XTN@31Teux2e4BYN zfslrWR(-~VXS+_NTy&UkwGJ!G+L~5cY_T)O-A@BV zxP&u^gDe9y#W%CKI5RID=nf`k7FITP4oksR>MzHgFk1#@#0mxclxC1>g$U~l$9pp%6El_aRa|nULhM93T zG@-%bfN%okIRVzmz|An90hrF?-7<4>!V+^zQwO{MnHYfp$Tucm% zASG-HAd-;yE0%B!YLz$v73?RMCj11^D z!1w|JAiZo*C&z<0AixHpK%@-c^b=s`E9|}1oQ#YOnROXhEr41BkXlrdnOe*s43yFXVo)%Zr4|)u=I7ZO v>ExxBB&Vd=n&?^T8S18_mZj$87v!eqmFQ%oq?y_p>KPj7nJxPEPMZ+`?JK5_ literal 0 HcmV?d00001 diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_enum_array.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_enum_array.nc similarity index 74% rename from dap4/d4tests/src/test/data/resources/testfiles/test_enum_array.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_enum_array.nc index c6b4a2f3885c8f8f01c47f75d93ca4aab94ded28..b9afa6df63286fa59d203b7f7341fc88ff96d872 100644 GIT binary patch literal 8197 zcmeI1L2J}N6o4n0-ECa6wrWdJ1fxf-OIus1hk{EsYZtd!?G_IrEa@g~r(~0oWD7kl zdJzvE^d$7qgEv9&(7Sl^CkT4>DuPEr-7p7jeb0%A+3WWFFks!4UQAj^QL>#9A?YZ_e)`fylA<=qxJJhNpq=L@L5nG(jm+Q$I)XNKfg8{qIedcRS-*;U zloW`Ds%E3oYLT-rgvb$pwZ3TCt$NdLx6DezBKia5NFg+CU{@9`u74}jUtVXi0UyT* zyu_^543~AiAZB4;tn?Bi2$TJ(Ehl2mitm*T(Pjw-q=NrbM8|;IwwH9=)tM^mGM68s zARtl(LiOKXPZ@UAzcAcIhQ~Y|@}xNVzvqj1xU5(deEFMu*!SYumWgw;DgJply`r8qxRzFD5S=6YM6A8tZzCll-L z>g@bfd1|^mU7vja5{zV%1SA1TKoXDyBmqf468N_SZkx@<;cu%Lf%tEL`1@N#^>JAA lq?80C0ZBj-kOU+FNk9^i1SA1TKoXDyB!T~i0Q@Z6{{`6{lx_e3 literal 8293 zcmeHM&ubGw6rSBAb()|XmLJh`Jo7k4vI8)%KUe;D!r)RppWqL4v1|E&u;RUi~x}N29Z_jUcO~2J%x2+}( zEo2w6H?FnKEz@>-9kc6iZ?xAJBM$S~TiN-WVM-U|AYe97m;uU%_g{ZV(8k^_4uHhi z4oiT}qyn!=g}fD}*{0!wP3w31w$rsb%|52hYQAgu(B#@_p_LoBAGC6|?|7jP`j=s5 zbO7y#vmn0Zx=}mtM;x$^A6T(G&+0yc1m##fF>*>7O%5vB((;IkUyF{&KK*w)bWK9pC6QlcWs#Nm5|K^`nrEO(R67FJA(pp{Q(DVY37DP|zaFGM}hS zp*1EEKc=w@GINnn1Rjy)s7_r+KMAOUywFOyS`GTh2c#4a4mw|4(aW`BrChIRxso1k z?(2|mUGP8&Sokw!-N#@MHk2BF)B8{Mb`d$sR2rIT5PdF$rWg(O@cY;c43cVK$`Zhb ziz(+;bo9c-+=Yi0v$kP*D*PHMkXy?a)V2jYM!u`fzOQy2|IoB$xR%kh&8$kY$gbXb z^)%SN@qcaK4u15c5;`%8*(1dexj{UEUEU0~Vl&)|XE?^?%A0zXm%$8nr8pVn_F^$S z2&h8BE=%`Zt7Ev2p+=xml(2H9^1o&<5bzpe#H5DG;~&%ou|*!rmee<%0vm%-M4NZ^g20Ee- zJa1q2(!8#AfCn%#!F-5b)eCx6FKc=|h<+CK5+}6{-|$QyCm$=6#X;GH-k8~Of`1U` z7(~BeU=WEYR%P3rptjHg0fB%(Kp-Fx5C{ka{x<~fX_XScjYV!@m?Pbd=o(FVe-bwv mf$Tucm% zASD6CL;@2A&|vfW@z>s%3%|S$T5K^AYdsiGd5y}+A1o;05Xu7 zkpbOW7@vV1tP4VjuD3Y_c0MlyBO}-)AXAxnKrRG14`L+;11md-$*cw9|K|__X=Y~Z zgE}3e2q?4@BtB%pj7e=bafSsjB|ySkfPs|*5*8pnV*@NO`k{dVixq|)LpC6Q4*z@l zKnT9DfOuAcft3pq79hSL5W_-aA~ZCh6a(R8$zuTuFJ=aA1|9|x28MXI%$%IC#GKMp z1_5B$!|Y>X1OkvkAb`;zdl|w&1Z{wtBA2_rvxhe1Qj3Z+^Yd(tbn;S5l2g)bP4q1F40Tgd%Tjal h3vyHQN^~+((oAg)^$d;ljBcnVZ~L&Pe#S;d1_0lbj{E=s literal 0 HcmV?d00001 diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_fill_2.nc similarity index 53% rename from dap4/d4tests/src/test/data/resources/testfiles/test_struct_array.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_fill_2.nc index 00be0b7551cc187c64813c264eff0fd585da322c..95e7e806a25e8e61ef39d7464bfe401b0da93bd0 100644 GIT binary patch literal 7247 zcmeI1O>7%Q6oB7){TJ6EDI}znN|+*n3dL$n8>OJAu{Jh|>K}+}Bzmzn_7*R)z0vO4 zl)RU=rNJx&!it_rk)#B>PdLaIF;IJoC!?KE-jOMWb zD5Mfj&|L}Aozi5rVYO?OYD0INiu0& z<`@3vLQD!}b~XRb5zqXDdBCa;U!SPk5L%4mAgDTxAUvBP3R=U^ZP41ycEf6!&5gDL zCD+zn&aEm{VaZd$Jl$|DM`{$XLBBv1ePz?O`xP1$hHJ2wyy-Y*>n*e+paw(XNOU6B zJ^$?G&phiV7ZqiOrW8;Vg_&@!&XDcIBS1VXlkXA#Wwr7%>jPyH8RN0N;xY zW)FD{)Ci2OAeZAWkg5t{#DaZmxpb)nkD-XxjD}xX%V!FuwPK-C($cvM#Lp5(6$kSg z6w>*Or@t)q&(uvPfq#0UWw_c(Hc>O1M$0j+R$`;=CR&y|sOsppsc$rlWP(!)$e;lB z{|Lm%pi04TtF?2-SInka^A?c_FdKj?w{Kq&4B<`;FuYletfv7t)3Qh(WT31q<|?r zM|UMCIs*u{J1?as1|$J~`=kEBU9jAy;U4lWclfpM3Lg99zR8|0q?aV6Q~b)wE$8Ov zz0Cp3HxCj!fQur7uvb=sOfO=z+D+W)%KT9!y^ePFI(6~j_Lm>niMG9MYOudN4O^6!7I8G; z-daR4jknL=D$|JJS+YwBa{MDuOL6Ff<5|ky@$%QHF~#@2^Mgu3d(E~s4cj#_QcedC zNxW#Zj$zZO!BXld9wguqz|!&L$zf3MXUtyy$ zX_!&|zQ&1&dfKLy7qGPRz`X4W$WEmQF#Qwun83NF=jS9c6| z5TfcIqCk}D#TqBP$Q7?Q=X{37DEjASQm`wmi?UsDNi1Lc@x$kCZGG3>>3#I2;>EuM G-G2ah%1$Z( literal 6534 zcmeHM&1+LZ5Z`?-jiIErwV!^VQCsn1u(gVZepp`8rZi1r(}M>gAI+-`)+8j)(n6tv zSQP42yogu-0YSWq`Ui+T33?VUiilwSnAzQlufd22wg@}Pd$T(`yF2@v*$GT;MM7gu zjr$rIlF!FHtVJ~G^voM z1P6lsCvx_py-+M&u?x=1d~WWvOQA1#HrRKDwFqEd8*;%B$cfu5(ORk3NvKCO5I0e|U(jwgIO>)l>kT)^TyHT5SX(6pZ+-yf|A?LLWVYYe=gY3r$RgW66nl zES0oIqhST}K@(Jf3X&;l+b-FCrld@qkUF(|DKRn|w<43?P8{KMaAwY?oJqC4bn0C- zHtb&F-eCVLobFGfu^e29ffgH`3ZoVt;~YG6jG6g-B>>+{00PVkjRkUfh$W159V6RdetBS z84{Y2Mg<_W!QDsQi~Elbir{$!8Bpxzz;4swvG8;_W`$F7H*^~AmdiMqitRw__e54z zbAnP=hSZ(x&g!T{r&3@F>rqY^VjF2{{lj6|+VS_e6^{yY5icMzosLd{L5?ChU1TkjY+zeWy#i*D)S*^%dNemO-dT0 zNI`v5M420?dl4M?>R=2U^GPQ-@XZIo7ax4k4TN=|P{g6CeU;wc+t zNC%CE1bXPM`RGnXd*zO-K%h@N`@}G;`U=iMWYCbky#qi~3=K9e%+Fn2H1dbta(qq- zfKINgk$XSix4J=nwauohZ>s*>7fN4#F;-u578EA@VhjK6aC5<&dWDmkxdVemm8_wQIeOYyeb$ zaA18`P5t2`Pbh_3RsYO|z2}Ac9Y-`xIJ2&4nt~8m8a?FhkM7wm+!nxsz996yiF^9R zK`=t(uLgYjq*UXQ(uV!qzo{phLSX{}5Tv!^saQ4(kKuIke|o{hImxQqZPq~rRJfJqAF(st!cVfJ9cS#S!_g-o>-p0)8Ai@A)i54HiaR; zjBLGf^FDAG~M z?KpQqVhI0rmQ6a#YdzT?q88&B@@%ZU#TZ5`Y``MI0!sEoeRB+BG~U1&Ce7l*6EBs@ z1*e#=*h}j+rci?$io%i}0{W)IHbr~WfrR2*5&1+@k~k>k0xUgb(H);<=;H~wc>XE$-p+@b{;R|Y;7I> zFp5p^cCOKHA@1~~hk%EGhk%EGhk%EGhk%EGhk%EGhk%EGhk%DbTM=kKvq1m(uk>F0 zZmVjxUnAl!R=U6Xh*oAMh#5v^g3Nhhz6?y!93XaODmk8MmUWKF8;pq z$YfrL$=R)NroY}kR&IYBA*Eis``7J8afCg_T&5_{&N#x%D@#s;N~-{HUXh>gPT$W`z>g*8r6110A~wlJ5DpD33W?Q+Gz%mQT%!+6naR_!vS{6?dL zm<7cA-RQyabK%HP!LHi#rA15#RtDz^vm>LCa3mUzmOr@m*-yXR`2MAN|HtnQU7tPt y`pCVnSATyIU@Qi3^BYP4(5hrU3JG)+9>xpc8us79>l3_I@p=cZo)-X4#Qp^n%;n$! literal 0 HcmV?d00001 diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_misc1.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_misc1.nc new file mode 100644 index 0000000000000000000000000000000000000000..4129edc066a5dc0e90005eaf1485ed118d7db996 GIT binary patch literal 16155 zcmeHNO>7%Q6drry)J--&l#~=w=<=hsBCYGBDI$U>Ngbz&NS!85B~+<0+jxUFb#~p| zO`s@Jd+34Eo(d-p0b|Z zH#2YFeBYZNKj-4u$Y@K`V@=^`l#$$%(lsbFaanQtZs(7aV^Sp+ijE#zdG3pM_`Ta|?}+Km`jydm&oh41S}BX1bB(U(4U_=I*zg4TaDu3x`4>a)C;%13iAo*o9tz z7_2kOI?usfqzP-ZXN7)sS&ZqGoxB;lA_}&BC+`TzRANET`Y<-tU|>29E|ao?+3Z|j z!gal@?U;e(vvweZUXM<~d$~}F4|+F@yaZTcVmO`VfFaZf*vR;)?)=g7jP!xu{iR=Px=w`Es-*ZOlD zaYA!wsXo53mwvDc-#esP-W@p%9Kcn|zR^~r%RzpI)2C)ZhZ`3|Br z3&L+c4kkfpyhM0I)v1F_mF+7VFO%X$pG#(7$>M@$aPh2ZVdSe(tL#};bU&S&Dsi`G ztEiH@tZdham;(87MPrdgCl92_?dit#j%#Q^KOq+X%C&q5`XXa9Iomhj&omq>NQ{gc zS+L>ww(A(D76Zd^gHqL!>DlI~ycIJ@;_UL}Eys(j^?^Ya){47OaSfwoo2D@Bp`;g3 z&dG7UiDp3LKH4o>tu9A-3~S*AGJ{JDn!*Nn)j;w%Gy`_(*is2!DrvIe%jF7$cOcK~ zc=vC_oDLhj1?aWB>jbi!80nu)yaQXq=m#sGeN`g8U!F?d5iObiq9C$WY|4IMI$6`p zW*ieHDjt6xg$rL|+FqvMS-!vMSs63P_?DT;TT51+R(N@ED(%2HGVGZFFqq??)j$*&%>PPwiy) z5Kssx1QY@a0fm44DA?P z2;P$AVLE%DcOPW9;rG*lzF2>(XMYw`qHY0_-NC+GcJ9zXPpqdm*4y~Wd*3j&x?I}@ z=9MS}6aoqXg@8gpA@D#TFf*M@hTwNIIv7(~JpEOSvg<&FLLOJ>)KXEa9u)!#0fm4< zKp~(Icwi7X5C6@znf@wjgxtJKh zO4vj|3K?0T${83--b0z9G7KP5ph@U@VSE7rkka2!tKy;h7<6C^V(Fc~-+lu-pO=9V z;u4Vmn0Y`h6ae}j;y48cRxXeTvlfUCWHfLHfox!AjDiLS+!NbC;zJXdgnTgdclPk+ z2?V*HnSqai1LXgBKj(m={DRb?lFZa%24SF-9uR~4U6xu@oSC0zYowExT9TZSW^1Bn msb{F0l3JFUlV6aVnpdKek&vq-Rvrw_~9oP!|BQC1YU# literal 0 HcmV?d00001 diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_one_vararray.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_one_vararray.nc similarity index 78% rename from dap4/d4tests/src/test/data/resources/testfiles/test_one_vararray.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_one_vararray.nc index e0cc0ce34aef43f68a02eeed4a9af4a43d44f5d3..c82678de635394e06e63ffd32526cece9c91f58b 100644 GIT binary patch literal 6152 zcmeI0&2G~`5P-+)B(f}*q>w6rkT4)FP^=~d1cyjOjzc0+2jZT3iCpZemeRO#+;Bkx zapM9KZ@@cn;D~q#gv14I+~5shX64}a;NqHw27Q510k(W_O8c=^g@ z?i;{_ng+EOXsO80qUxDbH+T9j_aTBUoEWTela{Jb0*!3jgSO|vIUJ%xko!)5-EqDC z&>eerd*Fbvi8OFSG27s_*B!q8LB4)tCz_e~@y%(N+MTW$M7!a17R6I@Yd4b7#hUz zUkgQ@M${W*5tWzPS+a(i%}Y!apP6$T6iD9dZ#p zy%>XxZ5ipKnFabm-`ju-xPr1$!-qmU&I-4d$4$ESZ2$St?mZGm6E!N1W=tsgDwJW3 zJdT{MGjd$p8FPi;Y<(U`W z*tH)g@m`pu5yGMZwD6$Q=pB zHIg?U-{U4Jl7J*|S_wR~hXa0-(dB}|b?n8hC4Qy(BsO2mLX*8DAPGnUl7J*22}lBx YfFvLZNCJ|8Bp?Z#76SBF`E`8$0^6tHb^rhX literal 6248 zcmeH{&1(}u6u{r?Hem@{n`&!fDYy!P2Ms1v(L=$o*_hCDQY;2+{i1pflBUi7`$eQ7A9dM(ULHg9I$*Sz0O=1r|qUCwM|fW$Ch39@p? zKYtP#_)lW#yRnz{may-EA?H+ZP%M_ zr)`%T4wzlC2}sE(x4i41lZ<+bnxpmyL1^K(XCXzqQnkDQfe~1%|1z>hMK?LB7%JsI&e9$^ z3Rpo#`8hU?dV3$>2HJ>S4j;uyq1u5F<61(N@H?^V;T?WEVqNj4?DHLtXj z%{rdf$7OwQ5o^ryQNj7_8Hg8vrWwD|>(l58o$mRe5LX*sU#bmEq-V-{-3>qWiL zk0`~3!mZEVcjC>}76s40KJr_$ez+js5yGQK(Z uri-lr-&S~}v?8DgC<2OrBA^H;0*Zhlpa>`eihv@Z2wWBdtGLlS`1}Q!=HxQ~ diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_opaque.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_opaque.nc new file mode 100644 index 0000000000000000000000000000000000000000..b2923df7c1337a5886a3c700bb5071f32d86c306 GIT binary patch literal 659 zcmeD5aB<`1lHy|G;9!7(|4=ZQ2_j+um6)fpaihP7OAr&!7A7UI7&BA_1567#&BesP z2vW%=1|k_*KqLq-=f{`4hcMxCV1*#LvV21YC`VL=0i=hS5vL6T0w7~_pbm)#aX^3% zLLrl<6T?iw&R5vlcF%$3S98i>BkXlrd znOe*s43yIYVvxVfQj3Z+^Yd(tbn;S5l2g)bP4q1F40Tgd%Tjal3vyHQN^~+((oAg) W^$d;ljEeepEM!!6P48TN_B{Z`!f$r~ literal 0 HcmV?d00001 diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_opaque_array.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_opaque_array.nc similarity index 76% rename from dap4/d4tests/src/test/data/resources/testfiles/test_opaque_array.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_opaque_array.nc index 895a8bf0658ca05633ae3923c2fd697ab33a73f9..e0cb43deb5cc95954377ff91f7b182dfea540837 100644 GIT binary patch literal 6176 zcmeH|PiqrF6u@V9ObB6{q?$IZ2(Ev6sWCKbD|!et>~2hGnrM=f2qEom?Mj<1$(n-* zg0~*^AbJw?B8VsTqJ9Ozn;;^7gMI_`z1f+jhUDVK%RI6>J8#~beed_)Z1&4mX)1m) zuEt_S$ZszCT&P*%3s3I2*?QS(sMX26s& zhzcJq{&!>U@{+T9!M7Jl zL?$MoT|iSxq7WD4YgUWRCOH8r1ctA-D(iNwS*h3BO|w|FiFOkhgF_^As1?_3X1~hq zTiae=hhInUx`AnxbjRCuyM52^>Kk_hz3T_Vr9r3XbvAa~oG!#57?2A4Cy0gtwQFv$ z>1-`q-md466u=8>sI%bUogn7d)rFAZB}F-p8WkW4c9TY^2QU>Ci6n4F7l$1Rl{$`l zK?m?2)o}_UsH&5x+Gs~f8j^sbiX=?m?>Sz#6S)1qQyEio+yF(p74l9(MPRF8IjWUr zi_C)sRw@G*hCZ%&ATQo^NEUY+&aq$C-p>E1o8>i;uIO)pLc5R9DM^wgjG$qc?1o)4 z?KX?xGHi(vIGv!=cY|Rlhjk}0Tt6(^m|Vq~12ZOK&LRcP^z%=TFv2KS3r@JutB#@b zXYB?qVcW1iZr9A~J%7*b1s<@*e$K&#*$>A%@8IJNU2}lBxfFvLZNCJ|8Bp?Y$0+N6vAPGnU|Brxj&c40>`tt$&SP;Lye|S1* K87UZ_q5J`J^ZW?_ literal 6272 zcmeH{J8u&~5P)az;^<^Kv3Vp8h{pvQ3b61gpfm`q^O;z2Y-GEm@B?3ng|Q?1Fa?o< z===|$prZgGBswGtXlZDn0f~P=h3J5py&aPnIW5hOeK)r|vvWJ&%U% zNF;M0gme@ljG*FTj8M#@6#CHeX$bTG_)D^~KQVy)t43ZBC7PHnS`9wZ^0`&2WOPoV-}6g=Li zU*G)vs^qS%&o0umP-`)lUM*NxuMgv{D%%)3E%@m?ct*=(b=s^z)YJ&Y%!Wr+O5++{ zoJMu4J+SfLu(1K$Y|d`AvDVZRcJp3fcYDEK)3DKRH<}$kWwSW&wDPq$F5Ec`3?k$| zE*KYXQk$||+yws=4>xFvx&mcWU=%Li0qtKWKLK$p*3zCL74nrTz%jH@5tDdPLriNj zqElBLL!ai}vCKpEJR0_i^JDpqEF2|;g=5A>%NeL=t|`MXhdt*!y#eLXXg-jI`+%v- z6aq}4?B%?&S9HBvn8G41rMI^lL1W+ta^*ocPIX*Y<*c%sx-@|fVSCxqXBsNrJqO}3 zC!anQImtGyH33aP61eV`3i10oBWX}*8}NUsCb8Sx+v z2!KT)Oa%ELecm3h^A)x=xg;ZFEoLpfIQaY6sE~rz$X1GO!?XCkOPff(_wi zV1#%FWH(Sh(8#>MoOBgt)ZTwk)Bae-;RZ#gzyiTr~uF8b(jDE literal 0 HcmV?d00001 diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_vlen9.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_struct_array.nc similarity index 67% rename from dap4/d4tests/src/test/data/resources/testfiles/test_vlen9.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_struct_array.nc index 572ed1deaa09aeedf5bec917e6ba1b20752190f4..7628fd1ed9cff2225241a22c691816aedcb553f2 100644 GIT binary patch literal 6240 zcmeHL&1(}u6rb5mLI~S7)z(@OT#I_BH8eGf9s-8V#s<@*O?na~O}ksVkR~PBmiDCe zCI~{kcoDoP1+U`Ci~oiG1HFle9|(TFH@h!MqlJo~2=nOfn|bqQ`kUW-^TO=y$#kYC zawMXJ!;Iv+FLQ@I%eX(VlM25qOs0#9_EZ@WHZ|Z6(Ufi-Q5Z*;&>?(ta%bv7*?og1 zkkBB$c|bTqOR?4yew&6A^Z-$;jdi~r8bAXNsHi}A^SR%QMzNm^;hV8dPhrbi*%I*e zXSdP|ozJLxiUrTZ!pOloV^Po^RGn?GKxg;f^qrtsq~`+X0)oPMYhScKbpW^BfBaZ$ znV~Qnx&f;P1tDt0134V@&~15&4IUK}fYxpzsjr0Edf64csU2>W_{8jXt?HcKfZaK?#t?ATj`uwV^ z*XnM2Xsyz4D)Uu4rjsNX0#ac8UZx?Sa^7|qti?pyS$3>lL{bbHi@z#Vf98+^+0y&u z@X7zq;o0Bg&^sDC+3O!X4re$&0kLEXBw{Q7&;ZiihdhVr`^)rTFZ!yZ?YaQx;{dLz za^_ctIqZT^-YR?Nt%-gr8-O%{V?$|T)awn)sa0INxjR|lP*K8=#szTm+BGku`yl6G zsdmEWvZYxz3?6tEhTuWycsywZ(t<*NUuf&>WBR?myZN|aOkSbw(%}<@1;({1ZbfB% zY#b33&5T(z^M+X#2#{X%v?^|;X}fJGt&_#VIPL{U7YGFcu#u)(1|}g7?2(7RLZtcQ ze-9BMe6;;;6%kSB`QD+QL6BG>M9C`Wjp;^x#csF`1RYCP3?2-_n%%&KZ!Ps+HN#`J=eW~Er>7G0q3E~JIcc}T+Ktof*R3HC%ck79N_pL{1Vz7!^C$6fr5ziTnqR3F%cW~WnSjz@Gdhq>g-)BjwHV{HmQV3KCR2c-aX(edzay)p52kg#OD*lI0hgBksLmG?d!JIYn1Wc&JAzo6)7 zPBEoL?jjYR^~g-S7{`Zqv9MCCI{2S=uzuXcq*EwjsZdEdi}wPjR1Wq`wS1+RUtIHJ z4$CmS%zQ~5@Z9S3(xc`mb3_54P~6ri)({sGW=QipYTsR|!r<85x+Bl6izY;v87m6g zx*O3JO%f2bReb@RUwFJqvB+9P$r3ru5J%^Z&dHq6j<4=*;9hb%v#^J14>}Rgxpw%J z8+A?>0?pmJedVF#$~&wZd~rJjn0?-x^ya;k>t$7Tx=)Dtg?x~&`T_R-FT9FfDrtAF zz-G~n_apf<+XZ9Bc?Ng3#<*|vAt7+nO(!L-h#4qMF+OCbJQsm>lNZp)$fpT4U%$bn zz;T_J>&5e*ahVjGt#g4JgGfde5D5Y-#fI@E?;&isBv>U_(kQ;f1j-W-0I5361W{WFp%_GE7(iw*Gvc(F zfd{G-PVsZyR0ca=VOx_+GBVa;R%2i_16lzJg9-))0U!-=ssckL0}C>DazGC&c0)3l zQy_+b9GsS!nv-J4z(Aa#VAVzp9K@++&pzS?b^lJ3=uJaN*wU(Pxtq531Z^e!lVQiV`hO$!L*>$Tucm% zASD6&LFufLRAks}TbOKBLaDOR`}%%7NJi%_w6uqX-zSHlJrQ*l1n`Mn$8tgD}hBlD+-~j8I)qMS(J-lJb2j(i4V#D~7_fVdw z3^<0F85z*iEsW0-2vW+-z{kJ=QX22)98i>BkXlrdnOe*s43yFXVo)fTr4|)u=I7ZO x>ExxBB&Vd=n&?^T8S18_mZj$87v!eqmFQ%oq?y_p>KPj88I>6p>k9&P0RS8loc90# literal 0 HcmV?d00001 diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_struct_type.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_struct_type.nc new file mode 100644 index 0000000000000000000000000000000000000000..67e8dc9d9ecbc1b8ebd30f0e023527eea96779dc GIT binary patch literal 679 zcmeD5aB<`1lHy|G;9!7(|4^`;2_j+ul~~PnWs<*#OAr&!7A7UI7&BA_1567#&BesP z2vW%=1|k_*KqLq-C&!n(hcFq~L_iEi7O+APtJnm}6qR8B>0oBWX}*8}NUsCb8Sx+v z2!KT)Oa%ELecm3h^A)x=xg;ZFEoLpfIQaY6sE~rz$X1GO!?XCkOPff(_wi zV1#%FWH(Sh(8#>MoOBgt)ZTwk)Bae-;RZ#gzyiTr~uF8b(jDE literal 0 HcmV?d00001 diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_test.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_test.nc new file mode 100644 index 0000000000000000000000000000000000000000..bcacdf7f59740f9d9f2e3b81715aabb0fae912ce GIT binary patch literal 666 zcmeD5aB<`1lHy|G;9!7(|4=ZC2_j+ul{k8I^LKv_mmnsdElf&aF=nU=2ACFfnv02n z5u}n$5=1hxfJhKvOU*0IjW2l*;W4m@f*6b}V6{LNQ<-M0gz@Z zs8ixW91!4vPzX}sLXRKV`3l>bT#}Ko3bO(Os|7RA1whpTz<_|*&B2gt$dGKrkZjDr z$i%#0`?L9A?Ys<(5RZUt1nLATCZv~@9i)m`3uJC1hY-k3%#1UkE{0eJ6j}-r9}?h{ zfh($ literal 0 HcmV?d00001 diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_unlim.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_unlim.nc similarity index 58% rename from dap4/d4tests/src/test/data/resources/testfiles/test_unlim.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_unlim.nc index f362f967fb04419bb47f89d756dd3bfe5b57f02d..012cc869321b8e1e9000e83c40b8de7dbe2f7012 100644 GIT binary patch literal 18251 zcmeHOO>7%Q6n?wwBv!IX1GI#esx<`(MB3nl0IEckM2_>Lq)wXjzzKJWH^kuVn%zw) zC~9*;La0cWWp;Mo zyqS6Py_q-Tx0`n-$HqI`54GFrG%(#YG(Dj?SyOQ7#$z3`lVkI?`-Oc>@tl+?;woG7 zb{i}b>F%cMxUX|nS=1`nmSq{0uxCxqe$x1X%u&(; zDFZ!e=(&h@E$vj|JgxbgYkEvW2bCCns53ZlSXFddVJjB=?2eMCg9CGEaK(b3ES8oA zb72^j%7K^oF?6FbxO-9(`&Gm_J-EF%@;YF-nbCy>1sFk1fQ?O^$`=-7QC*1tRw;(zIr_)u5cjs?|;` zq*hD*tC8==#UPB5Wq{94-w3r4puq?vNW^)wM!06I_pxqfZ;U|3Xxa#kQ~u6N2XD>h zCZ~DI*gH-cJ=KyHJv=pk%t!%V8y>krt!SC+Tc+c#Mh}DLjIKug;9azAOP5-By_!#DmnZaSzch$!5EF@!{8twr4X}B; zQ!S)hAGGz>t@TEm<__!3Tw8nS#!8tgkV?uc{<8K5(Esw+@6{W)`iQRck*Vq)B?D|< z1-qxAE{&d9oma6kg z*}g@&FX}y^OS||u@q&^Um5PCfW~a@RyaRRQm7`)c^5b|l@{3+ljD4?I@z41c_7`Rw zuKRO_ae2;jD};~(`=FaPu=+kTGqrF=bwOJYO=4QH_u6D>;8)FZCc88~(^PGIrZd9l zzd>dqH#?&MQ%4CcgGDujd4Vwe>@Aqj=3zdc6U@5W){b#4H9pJpnT6Y7!;vmTXZPt` zu7ZFdAP5Kof`A|(2nYg#fFK|U2m*qDAkaJl6!}O~3IQKMgtMjWWvJB>I5b7A$z3#3u& z0Ybz|aR|o7(364FJxvhP3kUVur&!3%MPb#Ck}|#qA#3+xqV~@D5gBS|;CP_kmkbT| zo$TvBQKFz#SVc1?$Cpb>&kgnW^$+w7ys~=fD}c?l?FpNLb&9u+;2)-SOjj^vMgg*z zMlj7`I*X}_Nk|Y71Ox#=KoAfF{!a*;na}4fJY4WQMb6bx@E!x1eqjsK*3W!?+EOZy zf`A|(2nYg#fFN)mAfV3++dslHpIGfW!rLa^!t&NGHQLnIN_8QYuSH2r5r3dkmy|m} zKoAfF1OY)n5D)|e0YN|z_-`O^+5FR-7%Q6o6-U?Z~9-CT-KEP@r2MmYhO^4`uqJ4$WwQ=wAny<|K) zGjIOBH@hppyj+=`n$8YBF(^CeOp zMk>*xakl4!y3kN%I9|qt>LsR=USfbQgfNdNfC(@GCcp%k025#WOn?b60Vco%m;e)C0!-kc5-^Jx z3!p&&0Y(c%Zq$;n9*hzgft;cQ&tEGA!%6lMT_ybH3%hcT2O07OOUu)FMrD{c(hp|l)>6k^Wbhd(O z*bCP~y;^o8go+En=2)H@+dMa4o;^b=)BCPW?PwRwgfba_(#P7dw-;~}rSru}RsTcM zjF!S6ke$Me<2vGSjpCHM>N=n?oFQsftWT@Of;o=1AQ~4uH=;<8EVPoQBVP-o3>%&w zL`~@Q`C}8k&8x=~;9`^*4`|+V35<7>@d)BWGOzF5XWlmtj{Md&%+JrNg_e@_s%&5% z=30ty8ZF;TkEymda=*Xa?f=e;s`kMQi}RSr`We>5wWw(X8CKdMoZK71?eBWqHBs*z zU9#(GIBqDDqPRm8@4;QI4(RhoRF4l-CQ|XutaP#JXhv`3d$hgs7#n+ z%Eao0we?|!qZ69ug01wkyFdB~Ekw6xGKw(ZF@EHbDh=$#TuXI!-wtjjXZzc02VTMM zW+_%lg6hJ^_8dEK8lD}WBz#>yjzgdli0uZAb|Ay>LLeJ<)Ci^BXki?k*;dc+A$Sk% z7v1+yb*_G14T0|`JaKrJ^n0J;G#d#P4E)<#rgKj1h+01Vrhu3IA;P(fC(@GCcp%k025#W zOn?b60Vco%{wV=;Vx))hYrhUY8~XN*PCD}%I%G64BqH!hELNr~iuKVH$l#Jy#9V~wGa z^9UWFD39juXt$ppKXtX&?uh22xjXVPSx;xLo?om~G;j)%-6%&t=iiaflK;OYeInPd z@6AM?+DV`MTeLRvYmpx3On?b60Vco%m;e)C0!)Aj{9g!M#+Z#s_=R*C(kGCtk`Q@F NlaLl5EkSCR{sha|`#=By diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_unlim1.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_unlim1.nc similarity index 66% rename from dap4/d4tests/src/test/data/resources/testfiles/test_unlim1.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_unlim1.nc index 5b92931e639a768c5376d3bfc20b9472c19109f7..6a46aede6fa6f5d71cd35eec1e5198484033e7d3 100644 GIT binary patch literal 10059 zcmeHNJ!~9B6rSBZJBPD&Oo%Z_kaMB|;p8|w1}PGjeLA0GE6&-mQ$Ul;;$3qG=iOs> z9Ri9J7c>Y#0X>Qkq6iYQfHa5*Xebj2i3%zN1rmrLM3W}GZ)V>4@DJz;EQ)#Z?CidI z^X9$p&ClLjzdkcH-P?1d$IfO2(>+aR9#x!zZg}mB-w)2uOfA~(r}iU~=VWvfciCF^ z*usKHe?PA44z5B>t4fG&z7fKG0{0HFvVydx^|TR)2Z(iuicKZB?5#E%L2f0Ab1z5n zi%BhNc0WiB!eT3g)9}*Yzyj@8RqOiG)gS+m=J&p0S+Ajvs;9yLyoy{u38DwWq)O? z6h*OL54|)-)d}-zk zPZ@jHDWj%Z+NIo+^GACs#0wLX*Puno+}<)B|261Q*jdn}*R(P07<8AcY7ctgC8-c^ zy?=9Kd(7DZUKSkl37VduNinuxjNPNicJ;}HH>~(*d-t^R_J&4e156@D@;_aCaIo{Z zqZiSKx%(g}B9qovgPPh8#K?uu-`G@e{UO!o9o^MEh5&3| z8`JjTQ>0P83GykD9*vQ(SHZe~cKyb}Wls z<6W1ZTay8TM9f#=-q3K}RgJtO4=ZTyT*)3qgJWmDJE9~oSuq6EK#1o@X4jSG&XO4Q z>0onaAGl_lF}R+~xFfo8>(_mV9Uog#g7{7&3RB%pdFp8gUX}gy<@+J$OLXUzvi*p1 zpH^o=pW5P+)C+wt_N$>sVaH*L-2nr6^|;!MgCtptgQ}NSlfbJsf=fYz_X~XtZ|>&| zV{O568$ier2Sh&(u+4L3Zg%Os90ErWCNWm*PKPWUzpj@v;?n+%soMUGcZ5%V5xLW) z`8f%ge3ei#)YL+l7YM`8y9M((Jk00!1ih}d>CszDi_h}>&cb>)aIgh*@qnt$)gWLH zFbEg~3<3rLgMdN6AYc$M2p9wm0tSK35kTf6iyQ_ecx=uSA(??6;z&t!$&^F^DT&4M zba}B{DV3`-CGiwVA#31!sh0$lk>uQjPwB8QsZ$O#i*}U?$jOw2Of?XX>wtgv6Av`h zs68u9I*2F7VvCRh1?`Uw-=!c%pvFg!hw^*L_*ni_e&mFYq*c_UFs8?A z{>qc%Bl(fh{OEIQZ+>=uv0S#OFGq%JoiZhz|4c{q=P#CLoOkPWQp7%g5T5;UFwW+uY1)*uQmht4rIN_0T$Box#B!V;)o~)bcW1FTcvWZD>~32Q zK}6g@aH_-+aYjPw0T4ps$gM{tE`Si1N}%#1RpNxg%zJO_Hnjy+g{n$#lDF?~-n^M_ z=Dm%_d3SAjWh6750itvoY#0|!ejF&8J}XDK&-2^d7*KDnEmuwFZ}YU6w`|46Vh-0C z6AWS*7g{8yWM5IMV2B$4&Q)p~FbZk>saJ|yQP}aK#P?zxKZ>O&=JA1a-HT#B3@**@ z1zyr^samDu(Rt0$zH3ubKyRQ`MHI;`Io`T({={xKpQ50()LjB zQB-siYoRsP-ka`jr|o5T!YF$qjIPG5u=CTo=z_pu1PtQ@GGQh8E$Se3>q!!HBs+tC zAj-m28m8XHR?49n(=-h^^T(c@rV;K*z`jy|eIQl?96Kc#tP~sun)^VL!P2I8U;s$hVXcP+28e>$T6N~ z)Utw~wWW?TOTJ(jML5_7u7r70vV?8&<$lb5LHQe8?ioF}U?AJvMH=-rT4@3R{ZIS`nRycg97TV%4 zOI{lKXf;h|2Q1U%b4f8n4F8*pUm&ylo!}Ji%77&PE?sf}m+mgy?fGR?slF)Y_%Sp^ zEyLz$w`uhZi9?$C^~kNBfC+VCzn7EZZhiC0gB(j2E!z=$jWB4&+1L*nUiN%0 zcX2j1kH4=jewOLF7$xBfORixf_-5ul`{(dDhrqy_+ZuFpr%#famT7--k`$0ilX%*a z4m^i|)r~h+f@>LN8_Fx+;2I+549V(unUQpcrnTh?ZWzAv`$h5)A5S@on&CCxQrttw zXw9ko;o1iahAh>>l~INwF1~4kj&n?(zt_HZrCKT(m=t8c zaZP#7|3bgKD7l!QksGwuJp14b^K*WSb>qC&gWS5O5zq)|1T+E~0gZr0KqH_L&ebqO?m|vC zO_1_ah<%>VY>0&y4}OxB3+}XXs){Zkg?KI%uRaw@j^;p_WAVOW*n1WQpm~ z(s*=3m|eaIw8PL~)~+1q^JL|RK`lU!cK~cw4rIUdrjudt=WlCTfo640(_{p)HwuLK z%;ihWHGmB(CagS0?JSGM$Z?;2;q$pLFR^A$#cHjQssVFgl5MA1>2~2PP7zviUv2ET zt!|^;>UEt;(*p}zM)mwahd*Ip}%_=j%@sS_Ap4CYR&e;qhL4+qoLh@l-R>4 znJ$gJIQ061plC}e0Rhs{{sLG8sMiXTeg9yq8Xko{6#L=O zOM=nw;b7W1APJ1N16WPY_aeeZGt+c58{J)4MGbEWKOmBSB~)Yb z?emu$A+jFOkaEw8vDb3$$I)>RCn1tWMOnm$LKp`zRaCjOjzxy$QQj)vDQ;f(gK;p3 zj_yLwX$CMnZv&4?{@Zj-8Oe^q&L#ps~vCb z^#%v`y}p0A-`Tr1WsphVNN27?T!J|=!vSxFf+C>u>DBSFOm$&Z2#HFFP{SFsG?&Tc z+?C5RK>!<)79@{wjEF@V!!V>{INb*|-4{8_go`bFW8+f0wb_?`+;xw z2mVAgZVkJwcF#-OT(UUQ>(7Zq$O+EGX$2`#+>_WXh@>bW;zYevnpP+&&N<2VPa5ky z`I(}rma-i>on@_Ulc|6uj3YJ0u3W0`0IZ;n=1by5f$)=OYSWS3Q{0?S zU;_lLcUg>1c2oJViia@9qmf!jcR#v6$Q!f5Vha9UC=?KTi;QHAx8Dz38S`wjeB)>kCT2^MS!_5f9_RS^_h($!QWMYw{!;>X zoN8I_UTR0?os84r*CKBuyz@nrfqMTztGz3G=2icqlEKs9BzPCR3El@UgA>(>;>psa vu4|frCZGvu0-As(pb2OKnt&#t31|YEfF|&73D7y6|MaA@JDumbO=tXH;Ck{q diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_vlen1.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen1.nc similarity index 85% rename from dap4/d4tests/src/test/data/resources/testfiles/test_vlen1.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen1.nc index 4c7f0975642da98433a047ea28e435c7424aae7b..e575c561a34e221e69576c7232cf387c4103f3bd 100644 GIT binary patch literal 4765 zcmeD5aB<`1lHy|G;9!7(|4=Yj2qIztm549)x##cU62!!_g-Ho4#>@njf@wjgxtJIj zK}y&pK_nv!hy($)vYgbs_>%V!9s`>Qh{4DLRtsWPC_$N`G7KP1%!~}^M#K050wBG5 zP?yAmI3U0ap^(UW*XJj}&R5vpRH7=GR#_FCm~r4Vsd~(lbNv>>QcCxMQ92KDOdTFNu|HDhc{0k$brlZ zd<-0*aEkYH4k*emNG&SKOf6;*21@AxG02Z)sYS(^`FXZRI(exj$th{JCVG~7hPo-K zWvMy&1-YqtB{~@?X{NS@dWJ@NMn!!)7J`C(E;M*R@$c^J?*mQ;(69otf#R^B1M!)G zm=%cGffxoZ@WWW6^k@i-hQMeDjE2By2#kinXb6mkz-S1JhQMeDjE2By2#kinU=INR DVJmSM literal 4863 zcmeH_%}PQ+6oAj%t9B7BF@uU0(WXUoK{IL7BCeEVWb^_?I+A2p(TfE60zE)4;HFKq z=|$SL?G1VaJ7=5|A+;|!=Q4AC=giDE_r6j-Oea^9K;n52gN!kGny_T25q3F$!NxDT zRwahqA4bU;zb(i)xwz*R6?!G7wR>J-d_hhP0PIO}(Nx*xUm0ON}| z0+YuHWvKgub~oJ5k3ti1F@A>%>WDJ-) zb3A~}XuO&f8)09PRZ}>$pc5$Aa{-$GZOQBe3OsGXR!<-)5N6Z!NQ^p0~lSY8*{5-kLTfDjM@ XLO=)z0U;m+gn$qb0zyCt{B;7KLw0!b diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_vlen10.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen10.nc similarity index 78% rename from dap4/d4tests/src/test/data/resources/testfiles/test_vlen10.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen10.nc index eeb02b63519450cf297c27d7345c516f8eb6e9bf..703a7d7fa7a7c5d2122ebf1b9753c22a34171085 100644 GIT binary patch literal 4902 zcmeD5aB<`1lHy|G;9!7(|4^VN3=uJaN~B!6xz^vqC5VY<3zHI9jF}lK1=E5~b1^Y6 zf|Rg{fk;Lc5D5az$?+xcAxyX&SRqKREWX4B$`KF%DVoa!QCbP17(`_lKqfIWGN9WB z<1_FgO!u*1A%_xs+PH^Z9`Gkc!Tt(g7^Kad#)cp%7K`S}oLj=32b z%kf?5{Gf$=Zbu8eXw!UL*F~9JreFOUFe(|J#7+Qo2K^N>4jfP&gCQ{RDQ;!An~fu@ zX;-Zl=11|(@^Sp2Iaae(ZPXVNow{Y0%9UDmPo`$$v+?9i*>bE}SJ zZzL3(>dlE55IMyf+0U7%*ReC|CyFoaWl((;viWrv=AAeWOQJ(pd|^`NamgY_r)WQk z;PpBB$d8l>j1g2$oK)|UJLtW64eCM@r`Q;wNN4Y2pS`P9KoL*`6ahs*5l{sFJAqFfyoZPY diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_vlen11.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen11.nc similarity index 80% rename from dap4/d4tests/src/test/data/resources/testfiles/test_vlen11.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen11.nc index 729e4b607b28eb57afb11d9d10938b9b2865759f..a0ed0bb977e40e5921a2dc365fcabb635b55497e 100644 GIT binary patch literal 4850 zcmeD5aB<`1lHy|G;9!7(|4{Hr2qIztl{kBI*GYd5mmnsdElf&aF=l3{6if>`&BesP z2vWi(4k8&@KqLsTlo`gCyoa#il3dw8>nfE>oi0(CwEV_7UTmU#j}GRzEo3>=`qkN0y9D9SHLEh@=OEoKk~ zO6dVHNLyKIQE_H|o~@BiUTR5lN}8>So~53lZc1udYEFJZZfahMPDVpEUtp9AHZ4fl6Mjc9UX*sCGXzd{qEhbzr5U3E4!K0QVPgS6AZ|OTVB4UHD;p> z$6P<=%>-YsRt~lFhqfHnbzQ>vm~o%dKoDfUfJ^{%0pkdc)8~W}kOdQe%>$<~==HsU z-}Z)>C$>&l#|16$2E%r*yJ?TQo`34LI_(oqm94T>T6Mj^>-72;Ue_O;xvjMrz_vCl zdmVD2F!v!nfSu@EVnFtu)t&|JDJoI|O@{?YpkKs?dUGa(e~J-|U%?ugj-7G*q`taS ztwm&nlyfUOfXO8D6bmDwhC_o=)4!C_mHqh;zLX3IfsD8b=NE`RPh}rxoiGWZ$#-PV zP^61($>R6o+|jB3!JdNKS5lJ&W6nlkH~pFvEICJMVQ8`{f-hM)%0IqQwjl)|x98ON z!?ILELh*`5=AwJShfibC2uJ;N0jA_09TaInqpyMIP;Y!L&mi3OG_A^%0!jg;fKosy ZpcGIFC;Qe9W33N(;FqJ^5O{BxFX9RIy1nPw1f0lK44#YrGud?V4Aw1fNNY z)Zb6VA7HyzYY#;D)|;K&TIVxt zq##BSQW*URL>Q+9)01D`3zOa(nkF3Unx^qLMLb2D92mJ6*$tU6^aOpy#P*FuxW8|5 z`_E-qgBOGWg4hik&y&|^sR3~?X{lYvmdkJkMHDDOk;^YS#d5w>td#9+!GYvG1Pl#g zp+Pab=!o^Vc?lR zBP=0>$$`bf$zeAdP1mni1Fv;3MX;1OROaM>ww$~l=5ZfpI=b3V^FqG747{ZwTuE(< zijqAr7r@D$MzYR10k<`?kuTW`w|To!$)S!YS);-;pby3=f+c6pS#pZDQxOr&pi2VJ ztp?SW7XWZ5Q9Xf4`mo|H5uu0xWz3_Fg)*W~1KY);BI3sU_afp5N3ZN`Q$*Z|S+2X2 zm*kkULOVVy?$YL{Wr!YDDcX0MjV-Sk_?QpW%hLGJ3AMc@HKN(f81^RYDzj7Ro9T(` zuGjWzjV)|b!PthoK0P~;p2(y#yL+o-tmw}Wn72y>ag?$Z@DX#;@i}u@b<4R2v7CRP z!^97Zgd!xrw3gcU3CWR(@+I!#^9~>R7a)>TS$@ZdY>2pHb^GJ*XU_gkhGvKSNimpx zJW^aCpb$_9Cy)5Kssx1QY`QF9PD8E-%eA7WaHPr@MORobKkG>*-G3 MsVB3}Io-W~0%4I_ZvX%Q literal 4762 zcmeD5aB<`1lHy|G;9!7(|4=YX2qIztm3ZGhA<^H%C5VY<3zHI9jF}lK1=E5~b1^Y6 zf|Rg{fk;Lc5D5azW$`8NAxyX&SRqI*Ile>*%3%`)DPm+{f~sXIGt7gj(}s!>OPNG7 z9s)aGVX<^WI5L)C7GYqO1ezlN!oYxlxKn|_r%f#ayB0%cT?SS&pi>lpTG9*|7_5La zh|LIcDmJq|c!>*v&EjQXgaiagCD0h4AtV{Z3Jz0dCJrHxR%XU3XyAZs2ZOmV#-OE> zo30y!!gv@tPmuZ9ABaY

CX6y-8OlvY6~22mLXkV(vp4Cwa3 z_zZkdrAX8>hvOw+=PT@Ja!E$U63ikDtdc;bAln3h0ReHR0)wgX&(qkos4y!qu$lo~ z3DS~g$iRS2yRvI{1Xw#S10%%mAddib0`(En%PIy^#jFJm0H7{pzyXdJX2$2xaDl6t zhOBCEvFqncu=_iEc(aLu+{MTObvgr6nPDO{vUvhQQp~`(;{e4#yq|MGQGP*cQAuWM zF@rErN)L!Z`pQy^iZk=`Y>jmCQcIFk(riuiEcFa^Q&P)PbMgyvQ}ar6GE&k^Z4LDd zjr5GxT(*w^Md){^l_1;Po&9~lwnBpr>H=_V0;R!;7L>MGftVd600kHLVXRSlGz3ON mU^E0qLtr!nMnhmU1V%$(Gz3ONU^E0qLtr!nMnhn*hX4Qzlz-0v literal 4982 zcmeH`%}T>S5XWb;Z4IT>qO|yR5HFq#M5^>63Mm?>*y7Pk#Wumx+LSirpgnm~e2PAS z2Ym(a-o5x5o^)rkTeMKT2zr?_}ne2H4#*jCB1 zcOWOhyvp(b_GMZz#s27_bkBs1-kJ(=ScIgom&A={b0)~9v_k7^W4$Z&1(5{xzO4d3 zEYtE=9k&t}y`ix0ean<8pvw|*2Lg7Z9$qWw@%jBpzPcNHvBh z4xQ?eJgK@=S;qe!`Y6ZGXGYw5yv%8fRw6(IhyW2F0z`la5CI}U1c(3;AOb|-zZ3Wb D%x-+o diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_vlen4.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen4.nc similarity index 80% rename from dap4/d4tests/src/test/data/resources/testfiles/test_vlen4.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen4.nc index f119d3d119f70ae096eb44d36fe7bb7f8a12f630..bc214f5f4f79a2f83c2a78f073bfe94326b24f8e 100644 GIT binary patch literal 4884 zcmeD5aB<`1lHy|G;9!7(|4<+z3=uJaN^G6|RNmjiC5VY<3zHI9jF}lK1=E5~b1^Y6 zf|Rg{fk;Lc5D5azW$`8NAxyX&SRqI*Ile>*$`KF%DXLIu7Lr?*xp%TUz5L!G=U*6x@!<$VMWIZDb)O8F@Wrle`zkvWxAc$lJMkEI)I^zAD z1B&tsQj1D5Q;Qiu2~!V=tO91jVihH06S91DOKjgV^rQ{ytz=fD<3keLyh~fO5fnkakue zW(Q)J>tQ)41t@j`h+$v{Ka4d>kA}c#2#kinXb6mkz-S1JhQMeDjE2By2#kinXb6mk Lz-R~zmJk2{NNItY literal 4990 zcmeHG%}N4M6h3!GYY;6_jEW#>5m6*eShPqIv>GrnTC~haN0R(QhuI{q+628oZ_*c#DV`b8cVk7?O;f?R&A5#iAPACL!bt#30pkdcqc?;TFas7om6O70uhVsVUc>EU zo~A9xIxZ-_+v_(v?VLSmyI!?cZ#J$tmCa-`Tbni4cblDV%WZpu>so#L2f)tkX6zk^ zOJZK-cmR3X7MCDid-!+}=u?zdB@^Z$jQ#>Dy&JbcZi*3%cfRp?iC@JgY0TAaRY0?j znnuME7^ozZ`j!h$DHwKH(Y+tMpw_85azu!Fk(kwrcdLTO=iEphSqy~0d3k?`+M|#E zX11_J9Sn8CR)Qi^T&Nk-^f8jV!2JCh-$=X>m&_MWWcn4ar1+XjQC5WbObp*nD*qsQ z-l97^R2!r;DaX{|s8BwZozzdKy5fZnq=sgM%I*2zBpkJ+>otwa@-)kywweLWfM!55 bpc&8%Xa+O`ngPv#W*&6BOfy2kvM9)&sP&XyDEHx*;AU8Fy zL?%kn20%;hR(f(i&s{>UQYyWw`^Z+{P$ASQ*y(hcFr zSb|xEfmITySOA1M7#LW<8Wk9P+SDSjYng1psKRY1sU`uI=4GF}nn`AIGo!jxJu}48 zNf3%bR0eDsGc&{FMi$Y@HyNk!GBAASJ);iM$N<#nD8R(P$iTqN#32Nx84V^2FpD!W zf^~5G|No!I2WZ&jUS>x=1EAwT0H~aSK^^EVZI=JOPDPXNF)J`KP5#ep$H+0+jzvxc z?sbqlAXw&d(`$1fhdj$94g*1`84M{vi4#D~JXw=NescoH5`Gz&`5;e#LJ!6Vu>m~a BM9u&J diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_vlen6.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen6.nc similarity index 75% rename from dap4/d4tests/src/test/data/resources/testfiles/test_vlen6.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen6.nc index f294775e10c4d12f2152269389214030301c680e..01c393c1ad3c15376ed2c8b991333f5c2bc73d5b 100644 GIT binary patch literal 6176 zcmeHLPj3=I6o0!5NXS;G(o&6yYdx4$+!Sn$#*j#sMFpxeg;ka4#u;I-@uDK8olUyvojPL8c)5=TW06advE5w-@G@Q;Z>znUP@d}sPQ-m z`pd~!3r99NZ zJ?Epb6>2CEmG{+2uFKmiSAc{y1x_v}`jF&Wv(^3jj}|lE`24c8KU>zcG(<0-U|&8_&Cg+s*yQBBVun>OFKApCoM3iY>crx9o;xci4(|5O)H~bpmJX1ps2{ z={`f8_#(g;StQa7#TYrC{?y2#7%oQ{Ikntf=S}@FaVRQSn06Z0qtRgKjRGHGq;NH{ zP()0;5ye^|pT+RQz$t8*_srZa*PD2~!4M-c$R4=e?LyAX<<0!-uRlMak|c?MMBt1N zcxW~2EQ|T^Dw10qHzLKwc`i<2lB3UA6w5i@#)=(tR4-$p%op^2(HB`TWi1hq2uK7Z p0uljXym|2I)j#je&ZC3~sTWW4+GS?mym`F&y*ESPd8trbh@Xu!6vJS1 zEGfG5@>|N&bflp%%{QqtrLC0;buIB#yC~*$U7C@b$u_PrjwUPTAQHxO&L%BroOp<) ziA|A(K(oL&7ic+;JW2nIT74OvE?qc3TAMOh>IwLpH*iMNG_lY)1u6hWeBjN55J`PH z$*X9{Sxk_$DtX6&F%rb6qo^1wl(+4wQ?6ATj+L+2630gwW&oBb5u_pJ4&+nRFaR+_ z4nN=8tXZY4*eV)vxfb>^XoOqx?IXV%a&CRh+lN;_U*PIQ6JzB-9P6Q)-?q^RcX1aU z+Qsg^-#6jEWkMZTg`(;Dka8>yv;8 zR$>vlt+3ViLi9FMXtSfNN^3d{(-u!2&1tYGdh(NddHW6ZRjUXn0+R$bty)Fg26&7? z=#rolNmm735u{%NTfDsGbs=s6T8}#XU_F5fDQ_34r&>io5l{pa0YyL&Py`eKML-cy b1QY>9KoR)g1n?JI`gsw*x8wJG8e{(t#uo3d diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_vlen7.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen7.nc similarity index 75% rename from dap4/d4tests/src/test/data/resources/testfiles/test_vlen7.nc rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen7.nc index f1989bf335527058821ea58df60fc548364b7072..5ccf64addd58a7d05a41afef478258698e1ed99f 100644 GIT binary patch literal 6160 zcmeHLPiqrF6o0#$gb=ni)wHQ1xVDI*H8immMFNK1jR~e3O?vVY((HyVq}j4r1D*sg zB8UgUFCcz|9{L@`i+%|4qBq5h`rhnJo0b$$dYVUe=k3gUGw=Q8_x4X-)U4`E=3GWi zr$NYXF4@JnXO$1U{PFI4vu3qaeNSCteVWFHgv;?Zqk=*vsRcSK2|AN#<4*J~Rw0`u zAIfs8c;jxQ&!VU~MMHg_6dS}c5H|C!aBJQlSaB+sHP zMUq7z;#dq=zwz@ubD6oNC^?!;RZvJl5iNS7I(PBHfnPoi`KM@+Wa(>}IK?*{t=G&O zK;)4)F%SJ3nQD-NG|g=`D(yC$!7d7v(6H(ow$rXRole`VG;GixQCJ!zV+W_QVKe)? z+6ntZ;(!RDA;VW`#g<*QTef4`9k$|4#GOEJyHR)KMF3*ygMEfH zjSGTLi%66inlbt0Jl~^;Qn(ydB#W3dcZsX|LmDAgFq(E8^FbKwdST=vj6~N09>j>T z7ZTUXr4^(f5~sXYxLqh-cfGMU2zHT)(aN^lUoRI6#Zsa4>ciK!=p;oVAQAXS2;4K9 z4OYec)+vfxybXvF7x#0W$1#U3RW^G{PsFxA?a4baE>($uL_i`S5s(N-1SA3y0f~S_ YKq4R!kO)Ww{yzfjFKPa5WwHtZOMjEOSLU%Ou8Dc5>aeCSd}b`kWy%%9+eMwn{GrPuyT>a#EUT| zrU#FH9KHAl^rjd6JG}W1c=coEy*EIJG`UNzA(vl@o{2IP%VG;G zE{4?nQqoJx6`Iq2g9dZ@N+DM@VqcB(V&62C8kw2xqXy%svUV0cVa()gR)glT2dKx{ z31-1xz3lAvyFI@j2L1rnPr>7eeP}?2et!^jJ6q{d#}Ds&`|Y4bOPN$Ab@`&_5B+wx z_t5WzqXTdM>Xbq{buE?NWN`uJnIR3{kR5t}^1XQHBZo20Y+L{_S&}V6e;OV<8@HGU ziZle8CC0fx%ek~9Te1sQR?+CnxsCDJgvAn1z}}*TJBDG1Bi2b+0${`k@u3h&b3VyS zsK;4EkaSAfS`Fq%5WOaUa>X6DTq{<}^_r6{xeCW;g`)$SC=$|0efSr-$N^Y01$hJK zOx{q8M3sTZl(%EvfL&07!^@DTB%9=?RIKeysxARKPy-y7seL7$7&c^lRK(Nm@!OWQ8z&6-p_9$ZAVbTB8U)zsJeN#>Xse1E`wNy zlL*9XhRuN=qP1g%f*og7X{-3=o}GO)=fNWH$x!C-`a2ryUK7v+W(nMODkX6nsC$hr z33?;xs-P<(rVOk=kC(T&L8gozEl*AKP!rGuGyzRO6VL=S0Zl*?&;&FAO+XXS1pW&G N_;VlqyolfNe*=e;?+pL| diff --git a/dap4/d4tests/src/test/data/resources/testfiles/test_vlen3.hdf5 b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen8.nc similarity index 66% rename from dap4/d4tests/src/test/data/resources/testfiles/test_vlen3.hdf5 rename to dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_vlen8.nc index 2d3be725086e483adbdc3e6c184103cc1cfe6c02..6b87f7a37a4d9d894bd83f87dc4a13c674006f83 100644 GIT binary patch literal 6208 zcmeHKPiqrF6o0$h#E_=8)&5fiw?z?Z4N0iAB88UCrVXZ>+VmvSu+Ga0FP>K@LNm-4H6>YY9z=8PVxVwaPBQU{Gp;v@9b*c^;@HT*_XDDh!> zYCXabN4l4tkYiTqWPzf4xh*+nl@Vz`Z)e}g@xTDhjmIO+o-_b|{lm6^Z@%BpZ+5pa zV+dlG(2g7jkcbGU3BBQgBV77sHEoC%(lt%%prHvA^hUgc<5xR=qX`&&f|{7vzLAU& z{gm5(A-n*FuLuVu@g!~hp1LX4hd3n2)G94hDsU0!2q?kG7ng0PQY<^winUO(A@vZM z1OsA`gR`(~3;TI#zqTE;O#HiM-4CsN!SsS1zupQOb#vo!Xx1Cyk*e)B19zk5r%jd| z5Fj1bKMyGaRCWAt)7zTP2Rngxj5+2A;Ks)ddpC=q^u|2g7tQPZx` z{&fsQ=J>2Wip$gDIyOQPYfOqnq2;>H+^jpV6Vo~woXe*L7c2B0hTU?4y4`TcEli3RTsyR+^1nzZnL2=v1)M z*ytGAev_)rTy6>r5SEU)>Ga)n_Lk?j{aRxeYf(70?QPwj%cirrbgq~=e1%R*{u%>| zR=FgOTb2SodQJoW5_63?IWIrCA`J;7f1abjkCKGuX zNZ*TX9NQgi%h<@5gmHXDUjX1Q9WSN+kZzTIcWK62!!_g-Ho4#>@tPmuZ9ABaY<*GtF{e3_*I1qspn2q3q`JfcW3dHO{3!HQMmW^00JqD@bNENOR3SK6c`Yfw=9 zxOr4WtS1lNy?F5B-|mPl7jnZ+2e4Yy~|C!aTB>%)Iwz-uum)4Rg1UpXf^L zPU!JCu>6o>?u3eeggrBP204ZVvoT)<_Z4-u=G@6%(|LL`2|_Byb<&Alb23WPy9OahJHCJVJH`bRr0J zwoAEc75Z?9QlaJZ#Yv}JEmq2I)y|b1NM6J(L5Eo6P|i&{!v3_hpPmm|CVpyW-4E^j zgy{u~e!Uem>gLRq(5yGYRaLvz3~DnAzGbpxfCAES{%w$?fZVbl&U$kr`Cu{d*6k9r z0eCjrHykl^e#bCN4F7JIV*TW692RAUiLRCScIp`#$fILQC9~JJW}g$Dkit}P>p4}s z(P(->y%zed^$BBPU=%{QrB1RG?MOH78BVjhVWnbq8g`)tg`LKSYMsi9z1Ow!Wk6$} zzg#+4u?y!oH7*uu0?7p`83VdukXD>>CY&j!Y&))4kq!W@=+(kn%MVwVUa16#lb(;; zW)bnhMl&IAU%y|bh#0E2HPj2_K=mUE+AZ7Xn~f#E83u@x3fsbmYNzctsVc`a16Zh7 zV&fy$m^F0N^V|MHV+m_E9GLg!M#qP&p^TL&4!(JWPD&Jk|DC{DyHXM-U%t)wEx@On z|8DsO%j3P6_~YeoIsW^V?&44l55GGT+21C<2Or cBA^H;0*b)DCLr$n@={NCc5!c)eY)HK1W+Fcr~m)} literal 6272 zcmeHLPft@p5TAXo;0q~&f1p*2KD~G_HkP3AqL#cqETOc75|6fp_Xv&HlJ?n)_21F& zU=zQA2RZ1$BgPNl&6se~4`4i)nCQ&z4pc}{6XR(I_RZ|>%)H&-Z>CB6G?$$j9y&P$ zB#r|y7?mbJerS1|R4Y8^{R$g>bTOA*wBp;=Ik|7gv>T_{tA{KQ&PXb^I*z3Xb z_#N^Sa2Oo?D;K&I|-avvWk?XcOZHR{*Woq8Cp1gq<{WnP*}O{FF; z24Oo~Z*1HR>rrPdSiRiikWO7qrLVxK1m=T09zaH>#fO@2KKPmxXw%HqTQ($N0PPbv zD0b8Vc`5c_|Aig@ob(^ZB;?=L>%UX|@)y0_oI3P*TjjX%ORB+fnu?gZ0fN0!j_&Kp z%dKyllDc6KLQ*e;+Ol*G*7k9_^pUe?cJ7vNAn^#j1{~V4EK3GDM=8)2%pZawg_*Yd zGku911q@22z5H~kgmYq;P*SG?$j;9Dh0<)XP%e4Xd0*4Ds&8ILPZEVkhiE~0s}vwn z2T1pGXMnI|yx7%lm!moTdX;xum-lscAzj?^pHXEUt?*l z)^hQ`>SCdK*%>#eVNFu)y36+>x88_$x7yWat-8D(rd*au=$1Yf{*bsVz4Tuc8xyTA zfkb0oTU0ctF5ZrWiSFOh3dGZzoZBi4V2X{u)lV+C-z9Nl6e(g{vQ{uTq3uDvrOO1Y zcKW@xyJMRf$(!s?0V7y$$(}OH&z6>Un>>ppxb`VLp3xMb|v7eff0jq0IgYTLb|c zfe5oN`ZNBbU-100%071OXeJ;gFMoM+<2 zo7Zd`Z4lUxz)i21msLb%jKUSg70Hdry~*nV`o6=#jj6+BJgw1(#339k&qvrY+8|&M sFbEg~3<3rLgMdN6AYc$M2p9wm0tSKqjR5^3%D;Qj_jdZ8&vUYW0zJq6dH?_b diff --git a/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_zerodim.nc b/dap4/d4ts/src/main/webapp/WEB-INF/testfiles/test_zerodim.nc new file mode 100644 index 0000000000000000000000000000000000000000..fee2801c9145f926f881714762e21ebe51850abe GIT binary patch literal 14107 zcmeHMO>7%Q6dvy;shezmC@CqV(B(&@BCT=K6cnjZk~&TkkvdHrE|rkkW;b|)v+M3| z0!5M9Lk|>sDx8q`5$XW}2Ly$lIBX&DAYj|XHASnZd7pCy&&p_M}x;qLjS6k_A@jf2zk8gU-+m?*L#<4U#bRUv<$5<-e2=*gt$<{* zo;d3{3t!ExSff87KEK?h96ezdei+p6bAA=latm8jKr zUI-i~%z1tgKXy`(z$!=(bEP>0I1Q5UjdZN{(IiNBgajm`VG=4`{->*j8?&jY zXUJNuuFD8li<v+AmsduE)6#>sk}3!7T<=VFP@&LGm;-19loXQVCzmX|dtpatFdMNRRD# z>mS6NE*rcB$n}EnMY5Zi>0hn91KYyryBnW=T_$~4-b&sSEtzpd5ZNIP(Bl0;2@S8-v!Yz+Sh<3;<`ig$mlvn<35+wtp7|3Nyjg$y`9md2 z;obq2aIv826ZW(V*I0<+`ctM2tz){T{Q~z2o`9=Ly6PWi|HBOk?G~V)ms^7U#t zjZJd8O5^yLNKSePAd*vi+6PEZt3>XpB|WsO3GIwcb<&s06#@zYg@8gpA)pXY2q**; z0tx|zfI>hapb)5s0LCQZ6qccg4#t4+A8`yxH1m)|5B;nbI+IH0cu3+YXoXP& z+ls8viOR8wQs9uqv0j7%OdhhJ@B-z%^#8uJ&-&fI#!cFV0zF0+@dzhK?wmzrVe0ac z*;*FKc*z~Kh(a(Qk1l?J78x@l4!He*5zVPGr+^U#S}xCB`mv@%UF~%vVqh>a*z)1q-!9Cj(=mvfksDG@(K1lF zCH3}gDU$EYB~VqTiV6XRfI>hapb$_9+(ihSgCBFp#u(dNSC7I#`GE2P2|30p$bA2b2%oeLnCnf1z0G literal 0 HcmV?d00001 diff --git a/dap4/git.sh b/dap4/git.sh deleted file mode 100644 index 0ec56d5a1f..0000000000 --- a/dap4/git.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -set -x -GIT=github -DST=$GIT/dap4 - -FILES=`cat Inventory |tr -d '\r' |tr '\r\n' ' '` - -rm -fr ${GIT} -mkdir -p ${DST} - -for f in ${FILES} ; do -DIR=`dirname $f` -mkdir -p ${DST}/${DIR} -cp $f $DST/$f -done - diff --git a/gradle/any/coverage.gradle b/gradle/any/coverage.gradle index f6ba25970f..141cb5e034 100644 --- a/gradle/any/coverage.gradle +++ b/gradle/any/coverage.gradle @@ -21,7 +21,7 @@ tasksExtendedByJacoco.all { * in cdm/src/main only. * * That's fine for :cdm, but we have subprojects that contain no code in their 'main' source set, namely :it, - * :cdm-test, and :dap4:d4tests. They only have code in their 'test' SourceSets. As a result, the default + * and :cdm-test. They only have code in their 'test' SourceSets. As a result, the default * 'jacocoTestReport' task added to those tasks will generate an empty report, because there's nothing to report on. * * We could remedy this by adding main SourceSets from other projects to report on. This would be particularly diff --git a/gradle/root/testing.gradle b/gradle/root/testing.gradle index 2f6212b8bc..fe25d7b912 100644 --- a/gradle/root/testing.gradle +++ b/gradle/root/testing.gradle @@ -40,13 +40,14 @@ ext { isRdaDataAvailable = false // figure out how to set later - // for now, ignore dap4 tests when checking against netcdf-java pull requests + // for now, ignore dap4 when checking against netcdf-java pull requests skipDap4 = false ciWorkspace = System.getenv('GITHUB_WORKSPACE') if (ciWorkspace != null) { ciWorkspace = ciWorkspace.replace('/', '') - skipDap4 = ciWorkspace != null && ciWorkspace.endsWith('netcdf-java') +// skipDap4 = ciWorkspace != null && ciWorkspace.endsWith('netcdf-java') } + skipDap4 = false if (skipDap4) { logger.warn 'Skipping dap4 tests when running against netCDF-Java PRs.' } diff --git a/settings.gradle b/settings.gradle index 8e620f54e8..58101fe65c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,9 +2,8 @@ rootProject.name = 'thredds-data-server' // These all refer to subdirectory names. -//include 'dap4:d4servlet' -//include 'dap4:d4ts' -//include 'dap4:d4tests' +include 'dap4:d4servlet' +include 'dap4:d4ts' include 'docs' include 'opendap:dtswar' include 'opendap:server' @@ -21,4 +20,3 @@ include 'tds-ui' // Set name of the opendap servlet artifact project(':opendap:server').name = 'opendap-servlet' -//project(':dap4:d4servlet').name = 'dap4-servlet' diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle index 40b400f431..8ce1d1de57 100644 --- a/tds-platform/build.gradle +++ b/tds-platform/build.gradle @@ -76,7 +76,8 @@ dependencies { runtime 'org.apache.taglibs:taglibs-standard-impl:1.2.5' // dap4 - api 'edu.ucar:dap4' + runtime 'edu.ucar:dap4' + // defined in tds-testing-platform as well, but using api config runtime 'org.apache.logging.log4j:log4j-web' diff --git a/tds-testing-platform/build.gradle b/tds-testing-platform/build.gradle index cf0f7c48c9..f4e705e120 100644 --- a/tds-testing-platform/build.gradle +++ b/tds-testing-platform/build.gradle @@ -20,10 +20,6 @@ dependencies { // spring-test 5.3.3. api 'org.springframework:spring-test:5.3.27' - // opendap - api 'org.apache.taglibs:taglibs-standard-spec' - api 'org.apache.taglibs:taglibs-standard-impl' - // dap4 // defined in tds-platform as well, but using runtime config api 'org.apache.logging.log4j:log4j-web' // api because of :dap4:d4tests) diff --git a/tds/build.gradle b/tds/build.gradle index 4cc3f73db7..daf3aba123 100644 --- a/tds/build.gradle +++ b/tds/build.gradle @@ -31,9 +31,8 @@ dependencies { implementation project(':tds-ugrid') // DAP4 Dependencies (technically forward) - compile 'edu.ucar:dap4' -// -// compile project(':dap4:dap4-servlet') + implementation 'edu.ucar:dap4' + implementation project(':dap4:d4servlet') // Server stuff providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}" @@ -101,6 +100,7 @@ dependencies { testCompile 'junit:junit' testCompile project(':tds-test-utils'); testCompile 'edu.ucar:cdm-test-utils' // Contains stuff like the JUnit @Category classes. + testCompile 'edu.ucar:httpservices' // Logging compile 'org.slf4j:slf4j-api' diff --git a/tds/src/integrationTests/java/ucar/nc2/util/net/TestFormBuilder.java b/tds/src/integrationTests/java/ucar/nc2/util/net/TestFormBuilder.java index ef54cfe686..7a71babe67 100644 --- a/tds/src/integrationTests/java/ucar/nc2/util/net/TestFormBuilder.java +++ b/tds/src/integrationTests/java/ucar/nc2/util/net/TestFormBuilder.java @@ -9,6 +9,9 @@ import org.apache.http.HttpEntity; import org.junit.Assert; import org.junit.Test; +import org.junit.Before; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import thredds.test.util.TdsUnitTestCommon; @@ -17,17 +20,16 @@ import java.io.*; import java.lang.invoke.MethodHandles; -import java.util.HashMap; -import java.util.Map; -import java.util.TreeMap; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Test HttpFormBuilder */ + +@RunWith(Parameterized.class) public class TestFormBuilder extends TdsUnitTestCommon { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); ////////////////////////////////////////////////// // Constants @@ -59,125 +61,133 @@ public class TestFormBuilder extends TdsUnitTestCommon { static final String NULLURL = "http://" + TestDir.remoteTestServer; ////////////////////////////////////////////////// - // Instance Variables + // Static Fields - protected String boundary = null; + private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - File attach3file = null; + ////////////////////////////////////////////////// + // Test Case Class + + // Encapulate the arguments for each test + static class TestCase { + public String name; + public boolean ismultipart; + public HttpEntity content; + + public TestCase(String name, HttpEntity content, boolean ismultipart) { + this.name = name; + this.ismultipart = ismultipart; + this.content = content; + } + + public String toString() { + return this.name; + } + } + + ////////////////////////////////////////////////// + // Test Generator + + @Parameterized.Parameters(name = "{index}: {0}") + static public List defineTestCases() throws IOException { + List testcases = new ArrayList<>(); + // Simple form test case + HTTPFormBuilder builder = buildForm(false, null); + HttpEntity content = builder.build(); + TestCase tc = new TestCase("simple-form", content, false); + testcases.add(tc); + + // Multi-part form test case + File attach3file = HTTPUtil.fillTempFile("attach3.txt", ATTACHTEXT); + attach3file.deleteOnExit(); + builder = buildForm(true, attach3file); + content = builder.build(); + tc = new TestCase("multi-part-form", content, true); + testcases.add(tc); + return testcases; + } + + ////////////////////////////////////////////////// + // Test Fields + + TestCase tc; + + ////////////////////////////////////////////////// + // Instance Variables ////////////////////////////////////////////////// // Constructor(s) - public TestFormBuilder() { + public TestFormBuilder(TestCase tc) { + this.tc = tc; setTitle("HTTPFormBuilder test(s)"); + HTTPIntercepts.setGlobalDebugInterceptors(false); + } + + ////////////////////////////////////////////////// + // Junit test method(s) + + @Before + public void setup() { setSystemProperties(); - // Turn on Session debugging - HTTPSession.TESTING = true; - HTTPIntercepts.setGlobalDebugInterceptors(true); } @Test - public void testSimple() throws Exception { - HTTPSession session = HTTPFactory.newSession(NULLURL); - session.resetInterceptors(); + public void test() throws Exception { try { - HTTPFormBuilder builder = buildForm(false); - HttpEntity content = builder.build(); - try (HTTPMethod postMethod = HTTPFactory.Post(session)) { - postMethod.setRequestContent(content); + HTTPIntercepts.DebugInterceptRequest dbgreq = null; + HttpEntity entity = null; + try (HTTPMethod postMethod = HTTPFactory.Post(NULLURL)) { + HTTPSession session = postMethod.getSession(); + session.resetInterceptors(); + postMethod.setRequestContent(tc.content); // Execute, but ignore any problems - try { - postMethod.execute(); - } catch (Exception e) { - // ignore - } + postMethod.execute(); + dbgreq = session.getDebugRequestInterceptor(); // Get the request that was used + Assert.assertTrue("Could not get debug request", dbgreq != null); + entity = dbgreq.getRequestEntity(); + Assert.assertTrue("Could not get debug entity", entity != null); } - // Get the request that was used - HTTPIntercepts.DebugInterceptRequest dbgreq = session.getDebugRequestInterceptor(); - Assert.assertTrue("Could not get debug request", dbgreq != null); - HttpEntity entity = dbgreq.getRequestEntity(); - Assert.assertTrue("Could not get debug entity", entity != null); // Extract the form info Header ct = entity.getContentType(); - String body = extract(entity, ct, false); + String body = extract(entity, ct, tc.ismultipart); Assert.assertTrue("Malformed debug request", body != null); - if (DEBUG || prop_visual) + if (prop_visual) visual("TestFormBuilder.testsimple.RAW", body); - body = genericize(body, OSTEXT, null, null); - if (DEBUG) - visual("TestFormBuilder.testsimple.LOCALIZED", body); - String diffs = TdsUnitTestCommon.compare("TestFormBuilder.testSimpl", simplebaseline, body); - if (diffs != null) { - System.err.println("TestFormBuilder.testsimple.diffs:\n" + diffs); - Assert.assertTrue("TestFormBuilder.testSimple: ***FAIL", false); - } - } catch (Exception e) { - Assert.assertTrue("***FAIL: " + e.getCause(), false); - if (DEBUG) - e.printStackTrace(); - } - } - - @Test - public void testMultiPart() throws Exception { - // Try to create a tmp file - attach3file = HTTPUtil.fillTempFile("attach3.txt", ATTACHTEXT); - attach3file.deleteOnExit(); - - HTTPSession session = HTTPFactory.newSession(NULLURL); - session.resetInterceptors(); - try { - HTTPFormBuilder builder = buildForm(true); - HttpEntity content = builder.build(); - try (HTTPMethod postMethod = HTTPFactory.Post(session)) { - postMethod.setRequestContent(content); - // Execute, but ignore any problems - try { - postMethod.execute(); - } catch (Exception e) { - // ignore + if (!tc.ismultipart) { // simple form + body = genericize(body, OSTEXT, null, null); + if (prop_visual) + visual("TestFormBuilder.testsimple.LOCALIZED", body); + String diffs = TdsUnitTestCommon.compare("TestFormBuilder.testSimple", simplebaseline, body); + if (diffs != null) { + System.err.println("TestFormBuilder.testsimple.diffs:\n" + diffs); + Assert.assertTrue("TestFormBuilder.testSimple: ***FAIL", false); } - } - // Get the request that was used - HTTPIntercepts.DebugInterceptRequest dbgreq = session.getDebugRequestInterceptor(); - Assert.assertTrue("Could not get debug request", dbgreq != null); - HttpEntity entity = dbgreq.getRequestEntity(); - Assert.assertTrue("Could not get debug entity", entity != null); - // Extract the form info - Header ct = entity.getContentType(); - String body = extract(entity, ct, true); - Assert.assertTrue("Malformed debug request", body != null); - if (DEBUG || prop_visual) - visual("TestFormBuilder.testmultipart.RAW", body); - // Get the contenttype boundary - String boundary = getboundary(ct); - Assert.assertTrue("Missing boundary info", boundary != null); - String attach3 = getattach(body, "attach3"); - Assert.assertTrue("Missing attach3 info", attach3 != null); - body = genericize(body, OSTEXT, boundary, attach3); - if (DEBUG) - visual("TestFormBuilder.testmultipart.LOCALIZED", body); - String diffs = TdsUnitTestCommon.compare("TestFormBuilder.testMultiPart", multipartbaseline, body); - if (diffs != null) { - System.err.println("TestFormBuilder.testmultipart.diffs:\n" + diffs); - Assert.assertTrue("TestFormBuilder.testmultipart: ***FAIL", false); + } else if (tc.ismultipart) { // multi-part form + // Get the contenttype boundary + String boundary = getboundary(ct); + Assert.assertTrue("Missing boundary info", boundary != null); + String attach3 = getattach(body, "attach3"); + Assert.assertTrue("Missing attach3 info", attach3 != null); + body = genericize(body, OSTEXT, boundary, attach3); + if (prop_visual) + visual("TestFormBuilder.testmultipart.LOCALIZED", body); + String diffs = TdsUnitTestCommon.compare("TestFormBuilder.testMultiPart", multipartbaseline, body); + if (diffs != null) { + System.err.println("TestFormBuilder.testmultipart.diffs:\n" + diffs); + Assert.assertTrue("TestFormBuilder.testmultipart: ***FAIL", false); + } + } else { + assert false; } } catch (Exception e) { - Assert.assertTrue("***FAIL: " + e.getCause(), false); - if (DEBUG) - e.printStackTrace(); + e.printStackTrace(); + Assert.assertTrue("***FAIL: " + e, false); } } - protected HTTPFormBuilder buildForm(boolean multipart) throws HTTPException { + static HTTPFormBuilder buildForm(boolean ismultipart, File attach3file) throws HTTPException { HTTPFormBuilder builder = new HTTPFormBuilder(); - - /* - * StringBuffer javaInfo = new StringBuffer(); - * javaInfo.append("Java: home: " + System.getProperty("java.home")); - * javaInfo.append(" version: " + System.getProperty("java.version")) - */ - builder.add("fullName", NAMEENTRY); builder.add("emailAddress", EMAILENTRY); builder.add("organization", ORGENTRY); @@ -188,7 +198,7 @@ protected HTTPFormBuilder buildForm(boolean multipart) throws HTTPException { builder.add("os", OSTEXT); builder.add("hardware", HARDWAREENTRY); - if (multipart) { + if (ismultipart) { // Use bytes builder.add("attachmentOne", EXTRATEXT.getBytes(HTTPUtil.ASCII), "extra.html"); // Use Inputstream diff --git a/tds/src/main/java/thredds/server/catalogservice/CatalogViewContextParser.java b/tds/src/main/java/thredds/server/catalogservice/CatalogViewContextParser.java index 9f555d9967..0ee70acd96 100644 --- a/tds/src/main/java/thredds/server/catalogservice/CatalogViewContextParser.java +++ b/tds/src/main/java/thredds/server/catalogservice/CatalogViewContextParser.java @@ -581,7 +581,7 @@ private void setAccess() { urlString = urlString + ".html"; break; case DAP4: - urlString = urlString + ".dmr.xml"; + urlString = urlString + ".dsr.html"; break; case WCS: queryString = "service=WCS&version=1.0.0&request=GetCapabilities"; diff --git a/tds/src/main/java/thredds/server/dap4/Dap4Controller.java b/tds/src/main/java/thredds/server/dap4/Dap4Controller.java index f601401c00..b1ac877e23 100644 --- a/tds/src/main/java/thredds/server/dap4/Dap4Controller.java +++ b/tds/src/main/java/thredds/server/dap4/Dap4Controller.java @@ -5,135 +5,126 @@ package thredds.server.dap4; -// import dap4.core.data.DSPRegistry; -// import dap4.core.util.DapContext; -// import dap4.core.util.DapException; -// import dap4.core.util.DapUtil; -// import dap4.dap4lib.DapCodes; -// import dap4.dap4lib.DapLog; -// import dap4.servlet.DSPFactory; -// import dap4.servlet.DapCache; -// import dap4.servlet.DapController; -// import dap4.servlet.DapRequest; +import dap4.core.util.DapContext; +import dap4.core.util.DapException; +import dap4.core.util.DapUtil; +import dap4.dap4lib.DapCodes; +import dap4.servlet.DapController; +import dap4.servlet.DapRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import thredds.core.TdsRequestedDataset; -import ucar.nc2.NetcdfFile; -import javax.servlet.ServletContext; +import thredds.server.config.TdsContext; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; @Controller @RequestMapping("/dap4") -public class Dap4Controller { - - // ////////////////////////////////////////////////// - // // Constants - // - // static final boolean DEBUG = false; - // - // static final boolean PARSEDEBUG = false; - // - // // NetcdfDataset enhancement to use: need only coord systems - // // static Set ENHANCEMENT = EnumSet.of(NetcdfDataset.Enhance.CoordSystems); - // - // ////////////////////////////////////////////////// - // // Type Decls - // - // static class Dap4Factory extends DSPFactory { - // - // public Dap4Factory() { - // // For TDS, we only need to register one DSP type: ThreddsDSP. - // // This is because we will always serve only NetcdfFile objects. - // // See D4TSServlet for a multiple registration case. - // DapCache.dspregistry.register(ThreddsDSP.class, DSPRegistry.LAST); - // } - // - // } - // - // static { - // DapCache.setFactory(new Dap4Factory()); - // } +public class Dap4Controller extends DapController { ////////////////////////////////////////////////// - // Spring Elements + // Constants + + static final boolean DEBUG = false; + + static final boolean PARSEDEBUG = false; + + static final String SERVICEID = "/dap4"; + + // NetcdfDataset enhancement to use: need only coord systems + // static Set ENHANCEMENT = EnumSet.of(NetcdfDataset.Enhance.CoordSystems); + + ////////////////////////////////////////////////// + // Instance variables @Autowired - private ServletContext servletContext; + private TdsContext tdscontext; + + ////////////////////////////////////////////////// + // Spring Elements @RequestMapping("**") public void handleRequest(HttpServletRequest req, HttpServletResponse res) throws IOException { - throw new UnsupportedOperationException("DAP4 is not currently functional, but we are working on it!"); - // super.handleRequest(req, res); + // throw new UnsupportedOperationException("DAP4 is not currently functional, but we are working on it!"); + super.handleRequest(req, res); } - // ////////////////////////////////////////////////// - // // Constructor(s) - // - // public Dap4Controller() { - // super(); - // } - // - // ////////////////////////////////////////////////////////// - // - // @Override - // protected void doFavicon(String icopath, DapContext cxt) throws IOException { - // throw new UnsupportedOperationException("Favicon"); - // } - // - // @Override - // protected void doCapabilities(DapRequest drq, DapContext cxt) throws IOException { - // addCommonHeaders(drq); - // OutputStream out = drq.getOutputStream(); - // PrintWriter pw = new PrintWriter(new OutputStreamWriter(out, DapUtil.UTF8)); - // pw.println("Capabilities page not supported"); - // pw.flush(); - // } - // - // @Override - // public long getBinaryWriteLimit() { - // return DEFAULTBINARYWRITELIMIT; - // } - // - // @Override - // public String getServletID() { - // return "dap4"; - // } - // - // // There is a problem Spring under intellij when using mocking. - // // See TestServlet for more info. In any case, if autowiring does - // // not work, then TdsRequestedDataset.getLocationFromRequestPath - // // will fail because it internal DatasetManager value will be null. - // // Autowiring would have set it to non-null. So, check to see if - // // the autowiring worked and if so use - // // TdsRequestedDataset.getLocationFromRequestPath. - // // Otherwise, compute the proper path from the drq.getResourceRoot. - // // This is completely a hack until such time as we can get things - // // to work under Intellij. - // @Override - // public String getResourcePath(DapRequest drq, String location) throws DapException { - // String realpath; - // if (TdsRequestedDataset.getDatasetManager() != null) { - // realpath = TdsRequestedDataset.getLocationFromRequestPath(location); - // } else { - // assert TdsRequestedDataset.getDatasetManager() == null; - // String prefix = drq.getResourceRoot(); - // assert (prefix != null); - // realpath = DapUtil.canonjoin(prefix, location); - // } - // - // if (!TESTING) { - // if (!TdsRequestedDataset.resourceControlOk(drq.getRequest(), drq.getResponse(), realpath)) - // throw new DapException("Not authorized: " + location).setCode(DapCodes.SC_FORBIDDEN); - // } - // File f = new File(realpath); - // if (!f.exists() || !f.canRead()) - // throw new DapException("Not found: " + location).setCode(DapCodes.SC_NOT_FOUND); - // // ncfile = TdsRequestedDataset.getNetcdfFile(this.request, this.response, path); - // return realpath; - // } + ////////////////////////////////////////////////// + // Constructor(s) + + public Dap4Controller() { + super(); + } + + ////////////////////////////////////////////////////////// + + @Override + protected void doFavicon(String icopath, DapContext cxt) throws IOException { + throw new UnsupportedOperationException("Favicon"); + } + + @Override + protected void doCapabilities(DapRequest drq, DapContext cxt) throws IOException { + addCommonHeaders(drq); + OutputStream out = drq.getOutputStream(); + PrintWriter pw = new PrintWriter(new OutputStreamWriter(out, DapUtil.UTF8)); + pw.println("Capabilities page not supported"); + pw.flush(); + } + + @Override + public long getBinaryWriteLimit() { + return DEFAULTBINARYWRITELIMIT; + } + + @Override + public String getServletID() { + String cp = tdscontext.getContextPath(); + if (cp == null || cp.length() == 0) + cp = "dap4"; + StringBuilder id = new StringBuilder(cp); + // Strip any trailing '/' + if (id.charAt(id.length() - 1) == '/') + id.deleteCharAt(id.length()); + // ensure it starts with '/' + if (id.charAt(0) != '/') + id.insert(0, '/'); + return id.toString(); + } + + @Override + public String getWebContentRoot(DapRequest drq) throws DapException { + File root = tdscontext.getServletRootDirectory(); + if (!root.exists() || !root.canRead() || !root.isDirectory()) + throw new DapException("Cannot locate WEB-INF root").setCode(DapCodes.SC_NOT_FOUND); + String rootpath = root.getAbsolutePath() + "/WEB-INF"; + return DapUtil.canonicalpath(rootpath); + } + + /** + * Convert a URL path for a dataset into an absolute file path + * + * @param location suffix of url path + * @return path in a string builder so caller can extend. + * @throws IOException + */ + public String getResourcePath(DapRequest drq, String location) throws DapException { + assert (location.charAt(0) == '/'); + // Remove the leading service name, if any + if (location.startsWith(SERVICEID)) + location = location.substring(SERVICEID.length()); + String path = TdsRequestedDataset.getLocationFromRequestPath(location); + if (path == null || path.length() == 0) + throw new DapException(String.format("getLocationFromRequestPath: location=|%s| path=null", location, path)) + .setCode(DapCodes.SC_NOT_FOUND); + File f = new File(path); + if (!f.exists() || !f.canRead() || !f.isFile()) + throw new DapException("Cannot locate resource: " + location).setCode(DapCodes.SC_NOT_FOUND); + return DapUtil.canonicalpath(path); + } } diff --git a/tds/src/main/java/thredds/server/dap4/ThreddsDSP.java b/tds/src/main/java/thredds/server/dap4/ThreddsDSP.java deleted file mode 100644 index 2fb74c0542..0000000000 --- a/tds/src/main/java/thredds/server/dap4/ThreddsDSP.java +++ /dev/null @@ -1,67 +0,0 @@ -/// * -// * Copyright 1998-2015 the University Corporation for Atmospheric Research/Unidata -// * -// * Portions of this software were developed by the Unidata Program at the -// * University Corporation for Atmospheric Research. -// * -// * Access and use of this software shall impose the following obligations -// * and understandings on the user. The user is granted the right, without -// * any fee or cost, to use, copy, modify, alter, enhance and distribute -// * this software, and any derivative works thereof, and its supporting -// * documentation for any purpose whatsoever, provided that this entire -// * notice appears in all copies of the software, derivative works and -// * supporting documentation. Further, UCAR requests that the user credit -// * UCAR/Unidata in any publications that result from the use of this -// * software or in any product that includes this software. The names UCAR -// * and/or Unidata, however, may not be used in any advertising or publicity -// * to endorse or promote any products or commercial entity unless specific -// * written permission is obtained from UCAR/Unidata. The user also -// * understands that UCAR/Unidata is not obligated to provide the user with -// * any support, consulting, training or assistance of any kind with regard -// * to the use, operation and performance of this software nor to provide -// * the user with any updates, revisions, new versions or "bug fixes." -// * -// * THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR -// * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// * DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, -// * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING -// * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -// * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -// * WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. -// */ -// -// package thredds.server.dap4; -// -// import dap4.cdm.dsp.CDMDSP; -// import dap4.core.util.DapContext; -// import dap4.core.util.DapException; -// import dap4.core.util.DapUtil; -// import dap4.dap4lib.DapCodes; -// import thredds.core.TdsRequestedDataset; -// import ucar.nc2.NetcdfFile; -// import java.io.File; -// -/// ** -// * CDM->DAP DSP -// * Used (for now) only on server side. -// */ -// -// public class ThreddsDSP extends CDMDSP { -// -// -// ////////////////////////////////////////////////// -// // Instance variables -// -// ////////////////////////////////////////////////// -// // Constructor(s) -// -// public ThreddsDSP() {} -// -// public ThreddsDSP(String path) throws DapException { -// super(path); -// } -// -// ////////////////////////////////////////////////// -// -// } diff --git a/tds/src/main/java/thredds/server/opendap/NcDAS.java b/tds/src/main/java/thredds/server/opendap/NcDAS.java index 0fb32558b5..8383912250 100644 --- a/tds/src/main/java/thredds/server/opendap/NcDAS.java +++ b/tds/src/main/java/thredds/server/opendap/NcDAS.java @@ -146,7 +146,7 @@ private int addAttributes(opendap.dap.AttributeTable table, Variable v, Iterator // add attribute table for this variable while (iter.hasNext()) { Attribute att = (Attribute) iter.next(); - if ((isVbyte && att.getShortName().equalsIgnoreCase(CDM.UNSIGNED)) || Attribute.isspecial(att)) + if ((isVbyte && att.getShortName().equalsIgnoreCase(CDM.UNSIGNED)) || CDM.isspecial(att)) continue; // got this covered int dods_type = DODSNetcdfFile.convertToDODSType(att.getDataType()); diff --git a/tds/src/main/webapp/WEB-INF/altContent/startup/catalog.xml b/tds/src/main/webapp/WEB-INF/altContent/startup/catalog.xml index 80f3c081ff..7845434332 100644 --- a/tds/src/main/webapp/WEB-INF/altContent/startup/catalog.xml +++ b/tds/src/main/webapp/WEB-INF/altContent/startup/catalog.xml @@ -8,7 +8,7 @@ - + diff --git a/tds/src/main/webapp/WEB-INF/templates/dap4.dsr.html.template b/tds/src/main/webapp/WEB-INF/templates/dap4.dsr.html.template new file mode 100644 index 0000000000..422a1552d8 --- /dev/null +++ b/tds/src/main/webapp/WEB-INF/templates/dap4.dsr.html.template @@ -0,0 +1,61 @@ + + + + + + name="title" content="Dataset Services Response"> + + + + +
+

DAP4 Dataset Services

+
+


+ + + +
Dap Version:${DAP_VERSION}
Server Software Version:${DAP_SERVER}
+
+

Dataset: ${DATASET}

+ + + + + + +
Dataset Service + Class + Format + URL + Media Type +
Metadata + DMR + XML + ${URL}.dmr.xml + application/vnd.opendap.dap4.dataset-metadata+xml +
Data + DAP + Binary + ${URL}.dap + application/vnd.opendap.dap4.data +
Services + DSR + XML + ${URL}.dsr.xml + application/vnd.opendap.dap4.dataset-services+xml +
Services + DSR + HTML + ${URL}.dsr.html + application/vnd.opendap.dap4.dataset-services+html +
+ + diff --git a/tds/src/main/webapp/WEB-INF/templates/dap4.dsr.xml.template b/tds/src/main/webapp/WEB-INF/templates/dap4.dsr.xml.template new file mode 100644 index 0000000000..d07474a1a1 --- /dev/null +++ b/tds/src/main/webapp/WEB-INF/templates/dap4.dsr.xml.template @@ -0,0 +1,28 @@ + + + +${DAP_VERSION} +${DAP_SERVER} + + + + + + + + + + + + diff --git a/tds/src/test/content/thredds/catalog.xml b/tds/src/test/content/thredds/catalog.xml index 5c67dae062..bf6175869f 100644 --- a/tds/src/test/content/thredds/catalog.xml +++ b/tds/src/test/content/thredds/catalog.xml @@ -9,7 +9,7 @@ - + From d0c6e836c53e9864796c4d5e1dbe82b0bb662de1 Mon Sep 17 00:00:00 2001 From: Jennifer Oxelson Date: Mon, 22 Jan 2024 19:09:24 -0700 Subject: [PATCH 068/120] NSF Unidata logo (#456) * Add NSF Unidata logo * Update threddsConfig.xml for new NSF Unidata logo --- tds/src/main/webapp/NSF-Unidata.png | Bin 0 -> 12196 bytes tds/src/test/content/thredds/threddsConfig.xml | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 tds/src/main/webapp/NSF-Unidata.png diff --git a/tds/src/main/webapp/NSF-Unidata.png b/tds/src/main/webapp/NSF-Unidata.png new file mode 100644 index 0000000000000000000000000000000000000000..8ea869565ec4a1dfb63ea61b688aadc782af2de1 GIT binary patch literal 12196 zcmZ{K19W9!vhInE?%1|Y(y`M~$F^R274W83zLZ5th1-Em%e?%cWa=DoZ3`ghf? zs;~6dTIa02{&0C&aU^(LcmM!^B=Jo|@qsfANZ7%mDBY*{6@C8EOH5{HKle2mQEUKfD8o z{+kLJ+Zmb=OV}8gnJAhV7<+u^AacO|Cq@qVzwl8x5dY%;W(GJhf*$!GaQ5FcoB#m$ zlfMg0e*CiQ!v~6mvbwXnj5N2AoeiVG-yn?cHuir}0A6?Q57x%S*?`#H#@g12+ntZ} z9~Rsn{9iE>De*r{oUQms)n(*~h3y`ToF#%baSXdZ7EEt?TY@H3<8El=%{>#aK`w=m5GIF%A zceb#zCI0Kzz|hXcnU9q8Z=io&|IE|I{$GJ?o&H(XM}1802KG$Mj6kOUAIQYr;(yZn zzfgZQ|0~Sd!t{TE{nh*z>>theuN-+lI?65VXky@O=csIFXU+eg`^wAopBDd9An)Hy zxaBR}O{~>LENo0{oj#hu&-{gjm+Akj`A?*5zQ}O#2^?`5dIth6JD+okqzl#IWtR*to*>9=r)k%JMk3IVS*5H%NpUYNxewV|I#nDH$d9CfVIPX@@h_TfSa;ch3 zl?%*aSQJR-h zl%!kAu!R5cx0+8QlP^sk&?!Ip@F!9|kc1C19r9V?R-zYQ%M}v9SHr915*$18kq`-oqMp*i( zepnMYgo$v^cA@c%)SUAfFG>T=$8(IcoHCgnUe40*xv!S(Kxqi_gqG&T&zTn7 zs@Hn~6_t(OKczog6YAtJH-EDkn?Gj2q#=Z>Pc0vxf9+Ogq-JWS*t^D%5Gon=7giNk zk}m}yPa@)02)%%Prw-<3!$d2TPmoMfl2oaZA-6o(@;I#L(er6MnJb#WIsQ8rNkkjJ zosUbQ=T1Fa!39e%&rkB~uY8bkVv!YiOUvR~^r8Y?y}0@C#QEbN z3YMah=8fn}mWlYnBU}+}HDR97Vy#*I%!i58k~EE;1C4I$J8i#zugN`T4MsrrTnrTt z3iz~ln4io)88-~!-4JN;`(1CHKExQU`PnX|-KsgaX`VBLZn{L|X*2An5oL3pinXhn z71ebAjJfnJ<&J}`lq4@nRHX4z2X4$#N!KF;Lhn+F8rE!R7$14T(G8W#mS)b`xtD0? z=O*6;IisOmM+mt$f`Cyr7{GuT_*7oBi5SCu)jEvz~hRSb~@T$qHqS?9lH zb&Xc5*eDMU?(rPnSws}1<4UkCE0I0DU>w+gAHU{2j+an0__RaR0w1dj-~hv^=_M{o zH0mN;EJ^xJYmbd2lHkc%9*?Rt0$KWbn}5W3ziLUZdQW$dJChLDh@nW0Z8uJktwVc~ zt2JDwRz5|ckj;?EY46{rweFH6XIK6!z{cx3Kv8OQo-%aIU($KX(jaL6xfB#!?vvt znPR93X9lynm7Hl2vsygG|Vfljc*^t4**>K87}$sdPxHN(WH!`FQnQDR?x&r&AX~)NvmA_DiB%mFNG(IsWrhEqJuc(!8Iv7Jgyv*$vwnBvzb&yu}=E6qY=kj%K7W|;E zs&MqbF-rX?kn=eNxB1@V+|IM3VP#F~HH(ncPGIIoEHyfL#6Vag*5s}yHVb_>4wog; zF>!JpAQcl|45cO&@R?6A55nye$?gIo=Q@+VLfJ3l`$;vuYFy#6A5YTUUT%; zu2L~8l>VZQ$WNX$pU-q(cSB;_T4K9jy(jBrC!+7E9FvduG&tgYp3rB*NLz*BG}Y-9 zNVAA5iIs@9nNeY$zn@L8pPKK@*jip(&)jdb??5hBsLExAmpZdLAfXGi?rJqZ2DAP2 z#D9qrC+gaxqI9ZLt{g#Cf)2gyyq)g0c_Yvxnk!gT1tpdfj`2%vSynPfu09i{#!GP+ zYgrUAMzRk3K$8VKYmy$(K*l9Zdh=$0edbTDtD}b1{{c@5FX@120;vtd1gWCUGLooN z6&MzOjwU6!dCKYga-}{2v5}>*+I7$#z4$esug?IRm5-sF254`X#8J>pFee~SNaXh= zoEr(wSWWHLP;)aUHFsZ?}y`=);)98$-D(@ zr__#U#&$6Z)-oXnw4>W2bUHrZrZiswwaxMUG#!M`U2^eH?{SA0{p3$!e)a}on5qyx z3o5K+R4Flc&c&y*hA{YC$jwm^;|BEE@X6u8jo#TbWgv_{Dn<=(6~VD?I4ImdZ8~HVc0U#I z7rrEDS3wB{GaMydCqPIF4%KKT>g&mkXrj?U?|7JKMFZrrt$NcBI`-;s3x8I}y``|V zaWEk&sQkLKjgvRHb!LLxrZ!$)=$<#sz(VIZ2#k=8s?--@+rC)@A~cL)<=^{|&`z*V zpYK($uIU#!;6gk$a-V?Nn0#7?(oWT9`^4D@70CcjM?1b7&V}-GGa}<_T#{UE`6Z>} zIi)rU_8xrkj^eiw&#;obNuwcM?$-jjt=%ZjsIkYPr~LNjWE597HB*UJ+04ylb!A23 z^9{GureH#1VPCK`r}5NK_#9?=#C0=0z&5~MJAhMk#SF-sOisxQxpErX5lwmuqOl!b zoMG^Q#=R58K+cC?*d{2VM@4MHY5em@1OG$2+Aj`sxnthJaGC*rl_f}mdg+LjZ4r(l z#_CdA#r5epOEi-C7x2-pg%((-iFA}Jw&*x0f49v_O6_FSl+`6bz(bjOtHr15+1VVr z`1~}CcRdrWftha6B(KN%6)lSLoR2=hD7A?{?Iuo~~4hgDNWS2V;{rBLGQxxf@KDz#twx&QPIEmnPw zFWn!hnex@Y?N;@*OBxu@=ug}FH9&XizO>k4q0q<8GjH0Y zoQHrtME`_4!I<+S>;k&tUvoS|?dCvK%EMYrcu3&}-)+JN(gw1G?)#tBl@Sl2>(^I3 z5wAb9E4Uh7sn{RP3nt0@7zAoeL~TsRvC76be$fuq+rX;>K09DjQv(R8%Ugzft_KwF z=5vKS3+Y6bFg1@a!h@ZCTp9WJ9cX1fk2@z6`csBu*5Npr3xV7{>9BLEb+|%dPrw4o zzv!zg4{Q^d=*eUV1!V+^mWMG}^F%=*xf4nn@(nC4?6F9hnlIxTON(O!O=1*u#gNcG zkJ=?RS^4T(3eYpzIu9Hq3|Nv2CkNb_@*RUrlm(IKTrBDF7@#xF*r~ZER>9Id^E)^a zp;Zt`M-d9gvBbq5uOQJd1UJQuBv^8SF0Gg4I55*`h+YwqgG*XFvpv0F4A=+1eNO_8 zt;)ns*lGJtx&5iy1$DpnlF8t1=$GO`V(gI35_<>gzqw_b7hU|Gtb5K@Ka{8RVD}sR zM!w&R`wqM~TJpAFm_C*9Q>cMpUf zgct|rIsSq5`lREkX*-T1n4eQfrwJ4+O1iK#`NKe?v}BY}HDTZ#9h|0m;3-zmy$$F& z25G+f#DcNfe8Gc3c_8^HO0XYlF;lrN?XjRV4iO5`R^!>p9HW`-2(mSzxcJ)XyqZf9 z8a%Xc>?X22-H4Ec`8mwn5V8?7rMT~2?h#l8J?Q5hVX5^w`iccogcDcHPB>kI+pUOQ zrOlqgzlIFkT6?|)t4HO}c{Bf{-==h7uwmsW_Lpp+U0sw5tl&^t`W55!|q zM3Vc0FP<`Ra#HnNk;zIG^)a|EB&4 z(;hP)Sv4W70!qyQxsS3@&=hcSUK5ftS%Bsb@;4ZxL@soLg}i174KT#~j>BNY_Hyfv zHZe6DSS~^hIMj`jvDQ9hiAlngyLn}SBFR$@2fU7*VGYA35Hud);Um6NfNEnd?ma*i zqsjbx_F1g0^;|e)$PjVlkvXAYIE->o=-XS8BN<|$%*<{EjD73-rqu7u<6j_G69tQ( zd&$4_b9P_-QG#u7uOAbp%Ja26a#Y%z5&mHz@0*K?#u<$ou1I*42Gxd}i)f|sXcDT= zd$HW;YP0gpm-#v~LI!$8QRT`2`lO&BdDdhm^k<<$GiNlNpBFbh%(IGvMXab)l0(6| zTYS?tnT?#sUZgc`qz2zthq62ZM$ixVMD#*{JBp8|bKP2mOGs_%D}zDHl6=+}gsAZT zL{O}+FaY%6k3|q$T`+_i3f$nQee8tumsIJz)9zs@>vrNwWN(pt^j%b7p^+&Z*J%6I zYI^j8tQWiIg?@W;+@T%y31nsCJiDVACnT<>Ug6xx_7n3LmZ20y=*`aZ+%eK9G6!~5 z9o0bl20e94q&c-Q-o_La7vU#~e7i-kpIrTBO|~LO*027bJ3;zQzQ6HkE}Z z>-pFaNZ}rM#w-cmcc5Nh;Gp+N@N%9I=TqH`MIawYa+H_GiPm39+@{YgyX65jbSH~k zOY=A;6dY-PYfb$aAta(U?a2MyUnDy%Q(Uj}l=fHoF=*{@MnFfQ#GSCxe*8G6xCJKA zxgkHai`S2If*tz!3bcoQ`#5}dTzrTro7-+Cc{dbtepf!2-(WD;-q67MGs|mRGhJQ3 z$X`HY(ueW05=q-(ef{xUu+wptmKi7`N~wHI<^qk18sj8i>u`UrGrJuTQ{f4OFJ}mb%0zNWQoX2j7iu0vVnMpij=u6q8NV>iVJSh9~;MNye2RHmf)!UHQAO z;C7wdQPch;;i&f)pu+3o{nh;ew{=>5lt7npgdQF5X{Hex(pC~iRG>o~T06ZbW*+a>E>_Sx=vxGxe zn(3`Vc?JWM$?mFbfrhC|U!C=76Ty|#zQ3}b!m#?c3T%+W4~?$X!9tDB%p5XuA9#J@9;Jjip_#=lH3rOfzn6CIPdrTMU^Y0P~tH0t!_hK_(! zN6yCzgeKm5cCY*f&9=eLf%oi4!aa>6r=?VCjY?^uMCdP2bJhXv)Y5P*_uiLP+Ad%C zr^%2Cf;_1iecu&Cgebjjzy{cAp$wZ}v=PTUFD0US^k*7a7eLfA{>cNZheAI>w}wxFE`*BgT^{UOES* zIw}QD*S&^CX)|f8S!+r(F+!3$rj`Yn5o+5S<=g4PcOPlW8+a*E%<0YTXT|$XLW$o6 z1-f>>CrgL3o&`z%iT4v^fR_UirxtQYNspl%4~*f+0_N}MZE^lRrP$Od@O5=uO@7HZY(_D3Yjw!`JSU^?b(t;+IW7bC(nJ%KZV)5QIaQ% zC-UV`^X0B@tZpPLMFy|)ao#xK{^b5@()sB%CmP-#=Pl+q0~9z!n@q5AT?u`-ds*e= zeH_j~8zekamz8XLvkUbA({T&^^jzoDX)~sA{@pP=4!N7wUtGjl?ekAE1AT^}@r2MnDD~X~T2Vw8CFl^1A>7(w8KD@~iz@p4Cf z{s_H#8mkD|6NVB5PQn83K6}0i69taD{<}NfM_GS^ zK0MjtXx0b~-^GRTudnlx$rW3n-HsMPYMB!{q7~0Evd8t;D^5!J)Kgr6Scq9}yexTg z4_y;vn@h5X&Up|8&p^6tjNo!^P|KJ1>O}8AOA?iV;^qWGNFruZi^7QdPT*YK%hHC- z4XY*Y!QFz8({u5AFp&XFmocI%@Uw!bq`E0CvATcB-Z&#KrqSA`)zN_8YWnR5nh2ax zqKfoI)cr(cXzv~BQDn8!E$11tG++stdcT?kpBK%e_R}_P7QtYwHa!d@B$=|mCPh~F zU6jb}0J;4GA(F{(<9r*Zb-j}VWhBq)R*MY^5vdR=n4a0bTxBc+-3GWtyYaVN}9_lMaUEK)!?*KfJquA4}{Dt;5ns|;Z-zMTvYqYv+ z3*=oML2OygyAj>pdmhaaGU#N4I4IG~mNSMW zrw(bODv5|eVVNv2tbX{8<{^$*JKYoi73gX*mafA>bP=`D2zBfZZT3BPBWr*j1>^e| zfBH|mB6_2Ym}aEusit3mlwDI(b*+#j%-s!mmPMPvGhv?4okf521J+E^vkAyR3kzW)5!N#2Q8xWTc z?_nv6H}4EK+IK|)!M-+}qOxTlO!^)PXe1k=K>koLr-Na?{RE8$i7$xIlHAPG=!MuB zeh}!}Q+?NNl^S_&arvfB8=HD>MV2kcsTjrR5)Zz%5}dsK3NgUQYdVAgu%pkGZ5BmD z$fDkFxggz7y(IY$uylEB!oO;kcZdnR$)e~DgAqxg+585rCBGhv{=$QMOd!_%)E%!T z$kRj7R1R<6ZHqt9qXL-;_eaP&7eyl)Wp<}E>XZS!ugXc5T)oAq2F^WgSCx6f@lz-pdaHUPnR2~G98hR1QLf(0UvV+w|mAB_sMf)WQL-C*cA zybT=sQn0*d_9b!;swgqGJ}8X~Hj;EvgQZY0)aujvSTZJrnT*Ot!uOV{p`&FKP z)^@1Pl@-L5YmPEWO{f6d4kr$db`GQi1A9y+2yJ;_Y73!zZAQ)~AZ)h{vxWuz4_kxK z?@oIldL&+&%qhCJ0QKXXoN7bbT1hM4V1LG0+cjg`nCmncQ}Bc}#ZN8-6rp!(uEMKp zZCZ_^iAg&3w=_Rp6%H0qJ=a5`$m|h`_O0r3-4qtKs&nw?c&xXw=G>mT$BA-ICC6t( ztX>KV=5Ok52C_lIi8(})hxZBV!ZYss71lvy8;)o1F@O-zE|K|lzY!Sj$)##XA-8ub zrGA6>AJ+B+h1Mt^-1qBw7q;$Ahts;v5~!k|>G2Pn9B}qE7rnL?&`1y=U@Rm{UsJG5 z=-R?Q>Hdm_(LzV_c26F)PRgN%9tEnSSCb3&ZXFeXz-#-508*xZ77D^iU|(d0n*Cl> zaT0ztsx&X0j)&iHu8Mx0hWqRvrz$cz*n9yxdCvB3JgJayBLwsr(ONpM^!!lU7F7lk z&w3&lWjCfc8_KnUBPZf)A!R#Jq)gj&aJsV>=Bnu01H0}l3O^APx$74GxfEz03kZ%{ zps^l&HhLe7&mfJIL7MiqG0Fc46K58#y2bOnakF*aI#3jq{78cAzCd-Y$Q8ws^u73# z|1sg+ToM40XSa#KLfHLlB3?e*oACRK_>Q4Fw)h$I-@dCB;g=2hkkamVYMv8Ycbt#e(rZO%%gA&c3KK;6|4t z&qL)9^I?L(bk<`Rm^Kv6SlGyjXOU1?6Dc>_=l<3)DX0!JPIveS9)2^tBS3_ZD%~gW z{%}F5AiZ2yS6H`}{I;^v_MC!YGtq8orTfW3+{^)&)tZgQUntxNTKeP9UpCcD(zMBo zI>A~@LqR(ve_~^=z5&U&pn^ZdG-Arx?T*o+2DY+v#qmn#-O>H!w$mP*Y>)(F0{IWw zhBjo@MoEyr_U~cIP_i!vPK->%`jZ}K*@iG=q{n+%xih7-(U?|q5Ahb!l``+`jJPPu z{shw;qitch;jXSg^Hh@}u$*2toF-zP7|-_SQnc*62ZMzxw=P5s(=YHqY(#Ac`PG|5m)fnBbIgyx@&Wf`)p&rRUv%ath>~Uqm-bk|D8u)!Gb@_U!k&KAxugD z2Bq*r^rk{TcgKE_>#A9MU>P}3Ac(pI0IU6mcggV>@$MW zolx^vV}8J^rC{-_gSB~#GPn6UN@W_uGfbUf>|-8O%aVuC*4Xi}V5#3IYni0fD7}`Z zCy=4Mup*zJY`b}=u<2KnTU=MPDe>lkyGZ>=A>)Z-Qs*X%n^*3Zmb65xGI#$5FN|d{ zUz5-9>zc>Ka$%Q=Uhi;nT>pLWa*SbUv#4tr-7)x3-p)|O7ES-si=(Xs)A0aV!R?f6{pBYc-QwF# zE@rn~vzvSAx;_7FkP&CTvu4k@ zR>$ab?_9PE)plD5L}|s%F~jCg7M}0B@N@ljfO+MjdFe>PINO^bk#AO|QY-#VA30`a z(jQ;Ha)`~(g|>Y}U7DYe&dZZbymb+jJae=z-OcwG>vrB|ZL++2WM{zelr^ZQa&HK% zl1FW-Ae?t=5J=FjEo1WV7P?MaiPjYnsB|9vxsypQO2)88NFwo}=#|CyzsxZux5k1~ zm-Vp0I8r)jO)d5EfH87m^YaoEfDKLI& zEbe?5`PW?09C(Nq?2ytZxj+dOz0csz_c!^)xnnEka2QFKW#6RSe#g((0@=gqtT8aW z@i#+q4qjgQ5BI^Y5q*U;<_$l^8BLKDFY70OUCqc1e~5o69tK-#H#zSoCp_(Gb#*y9 znVh4XE$I0T?i}1kekmn4(Pn9k0zF`3kNw!_!wHU`o%%-9J~tqdQRUrLReB>~?@gR6_Pf;Ot3JMh!qZTQCw zcxJM0_lBDhx2(iRT#$b$8uPFO^+%6~pUS4Jn{SH}Zd4;3nk9W4gM1O8A-eE;A-7t) zCV3gOt<%g`t2DfT;DdS34iKdAujw~dSb5}lL08VXx_i7jpB8eHRIQE?F^mycJGY;w zua_z{o@X3>N~fnW6|VP-YA`==EEA}~9j!j$wa zVFggJI#qNitA0HvlbO>7F?)Bxn?TgrJiO$?`x1V9&0XizCm4!(0sVT>9}v$(AadEU zKHc)LNGm_>SJ3jS_Inf;J$v5?{SBX~t3tQGi&a#Ea{Q+(BfX@k!ZFF{u0K)yeV@uz zD_LO=_wG9l{@kP%yw9=qkhARh)M5pHap>#bdIfG|u5GoR>8Z`Bqt|mE(X+=;-xTKw zWKu3;5;_g%cm48M07C5X8x_87QU&x+tVb)THT9@lMItO5sO3G+Hj;(+-OUKKtWK%7 y*vqYcmIosxpNZq==Vj!{eNv}XsbgXEhi;rjrut?n9=E?I%_T%-MXJ8)2mT-0_O)dI literal 0 HcmV?d00001 diff --git a/tds/src/test/content/thredds/threddsConfig.xml b/tds/src/test/content/thredds/threddsConfig.xml index 18e69102b4..38dceb4f78 100644 --- a/tds/src/test/content/thredds/threddsConfig.xml +++ b/tds/src/test/content/thredds/threddsConfig.xml @@ -16,10 +16,10 @@ - Unidata + NSF Unidata https://www.unidata.ucar.edu/ - unidataIcon.gif - Unidata + NSF-Unidata.png + NSF Unidata From aeadae228c15a08b93dec73bb9fbd0fb5c792387 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 22 Jan 2024 19:23:06 -0700 Subject: [PATCH 069/120] Fix wms epsg database not loading (#457) * Add wms get map test for projection requiring epsg database * EpsgDatabasePath should not be a URI and add log info --- .../java/thredds/server/wms/TestWmsServer.java | 14 ++++++++++++++ .../main/java/thredds/server/config/TdsInit.java | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java b/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java index 126039b3dd..1e12bdb06a 100644 --- a/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java +++ b/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java @@ -67,6 +67,20 @@ public void testGetPng() { TestOnLocalServer.withHttpPath("/wms/scanCdmUnitTests/conventions/cf/ipcc/tas_A1.nc?service=WMS&version=1.3.0" + "&request=GetMap&CRS=CRS:84&WIDTH=512&HEIGHT=512&LAYERS=tas&BBOX=0,-90,360,90&format=" + ContentType.png.toString() + "&time=1850-01-16T12:00:00Z"); + testGetPng(endpoint); + } + + @Test + @Category(NeedsCdmUnitTest.class) + public void testGetPngInAnotherProjection() { + String endpoint = + TestOnLocalServer.withHttpPath("/wms/scanCdmUnitTests/conventions/cf/ipcc/tas_A1.nc?service=WMS&version=1.3.0" + + "&request=GetMap&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&LAYERS=tas&BBOX=0,-90,360,90&format=" + + ContentType.png.toString() + "&time=1850-01-16T12:00:00Z"); + testGetPng(endpoint); + } + + private static void testGetPng(String endpoint) { byte[] result = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.png.toString()); // make sure we get a png back // first byte (unsigned) should equal 137 (decimal) diff --git a/tds/src/main/java/thredds/server/config/TdsInit.java b/tds/src/main/java/thredds/server/config/TdsInit.java index 5fb007afa4..dfba33dd63 100644 --- a/tds/src/main/java/thredds/server/config/TdsInit.java +++ b/tds/src/main/java/thredds/server/config/TdsInit.java @@ -149,8 +149,8 @@ public void onApplicationEvent(ContextRefreshedEvent event) { configCatalogInitializer.init(readMode, (PreferencesExt) mainPrefs.node("configCatalog")); // set epsg database location for edal-java (comes from apache-sis) - EpsgDatabasePath.DB_PATH = - (new File(tdsContext.getThreddsDirectory(), "/cache/edal-java/epsg/").toURI().toString()); + EpsgDatabasePath.DB_PATH = (new File(tdsContext.getThreddsDirectory(), "/cache/edal-java/epsg/").getPath()); + startupLog.info("EPSG database path: " + EpsgDatabasePath.DB_PATH); startupLog.info("TdsInit complete"); } } From 0a6d66340094606b5ad0e44a320311e8eb2ec0d7 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 22 Jan 2024 19:23:46 -0700 Subject: [PATCH 070/120] Add documentation for customizing iso xsl file (#458) --- .../tds_configuration/AddingOgcIsoServices.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md b/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md index 48f1634e10..5863f52990 100644 --- a/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md +++ b/docs/userguide/src/site/pages/tds_tutorial/tds_configuration/AddingOgcIsoServices.md @@ -51,6 +51,16 @@ To see which versions of the plugin are compatible with your TDS version see the The plugin can be downloaded on the [TDS downloads page](https://downloads.unidata.ucar.edu/tds/){:target="_blank"}. The downloaded ncISO plugin jar file should be placed in your `${tomcat_home}/webapps/thredds/WEB-INF/lib/` directory. +##### Customizing the xsl +If you need to customize the ISO output by updating the default `UnidataDD2MI.xsl`, you must place your custom version +in `${tomcat_home}/webapps/thredds/WEB-INF/classes/resources/xsl/nciso/UnidataDD2MI.xsl`. For example: + +```bash +$ cd ${tomcat_home}/webapps/thredds/ +$ mkdir -p WEB-INF/classes/resources/xsl/nciso/ +$ cp /path/to/myCustomUnidataDD2MI.xsl WEB-INF/classes/resources/xsl/nciso/UnidataDD2MI.xsl +``` + #### Updating `threddsConfig.xml` The following section in the `threddsConfig.xml` file controls the ncISO services: From 056f00e831473adad0b4c8262107d2c3fc2ccca6 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 23 Jan 2024 09:29:02 -0700 Subject: [PATCH 071/120] Add version-info.json to repo and add gradle task to deploy to nexus --- gradle/root/publishing.gradle | 19 ++++++++++++++++++ project-files/docs/version-info.json | 30 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 project-files/docs/version-info.json diff --git a/gradle/root/publishing.gradle b/gradle/root/publishing.gradle index d49f107f2c..e38dfe2744 100644 --- a/gradle/root/publishing.gradle +++ b/gradle/root/publishing.gradle @@ -132,6 +132,25 @@ def publishReleaseInfoAndLatestTask = tasks.register('publishReleaseInfoAndLates publish.dependsOn publishReleaseInfoAndLatestTask +def publishVersionInfoTask = tasks.register('publishVersionInfo', PublishToRawRepoTask) { + group = 'publishing' + description = 'Publish version-info.json to Nexus docs.' + host = 'https://artifacts.unidata.ucar.edu/' + repoName = 'docs-tds' + + publishSrc = new File(rootProject.getProjectDir(), "project-files/docs/") + + onlyIf { + // Will be evaluated at task execution time, not during configuration. + // Fails the build if the specified properties haven't been provided. + username = getPropertyOrFailBuild NEXUS_USERNAME_KEY + password = getPropertyOrFailBuild NEXUS_PASSWORD_KEY + return true + } +} + +publish.dependsOn publishVersionInfoTask + // The "publish" tasks require credentials for our Nexus server, which they look for in Gradle properties. // If those properties (i.e. NEXUS_USERNAME_KEY and NEXUS_PASSWORD_KEY) haven't been provided, the build will fail. // Therefore, we only want to configure credentials when a "publish" task is part of the execution plan. Otherwise, diff --git a/project-files/docs/version-info.json b/project-files/docs/version-info.json new file mode 100644 index 0000000000..f90bd26f04 --- /dev/null +++ b/project-files/docs/version-info.json @@ -0,0 +1,30 @@ +{ + "package" : "tds", + "packageName" : "THREDDS Data Server", + "releases" : [ + { + "version": "5.4", + "include": "1", + "releaseDate": "2022-07-01", + "status": "release", + "docsets": { + "userguide": { + "baseUrl": "https://docs.unidata.ucar.edu/tds/5.4/userguide/index.html", + "docsetName": "TDS User's Guide" + } + } + }, + { + "version": "5.5", + "include": "1", + "releaseDate": "2024-01-23", + "status": "snapshot", + "docsets": { + "userguide": { + "baseUrl": "https://docs.unidata.ucar.edu/tds/5.5/userguide/index.html", + "docsetName": "TDS User's Guide" + } + } + } + ] +} From 97368c292f9227e83c2251e706bd7b7a5943014b Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 23 Jan 2024 10:52:58 -0700 Subject: [PATCH 072/120] Update docs versions to 5.5 --- docs/adminguide/src/site/_data/sidebars/admin_sidebar.yml | 2 +- docs/devguide/src/site/_config.yml | 2 +- docs/devguide/src/site/_data/sidebars/dev_sidebar.yml | 2 +- docs/quickstart/src/site/_data/sidebars/quickstart_sidebar.yml | 2 +- docs/shared/src/site/_data/topnav.yml.golden | 2 +- docs/userguide/src/site/_config.yml | 2 +- docs/userguide/src/site/_data/sidebars/user_sidebar.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/adminguide/src/site/_data/sidebars/admin_sidebar.yml b/docs/adminguide/src/site/_data/sidebars/admin_sidebar.yml index 0695a879ad..29385bf296 100644 --- a/docs/adminguide/src/site/_data/sidebars/admin_sidebar.yml +++ b/docs/adminguide/src/site/_data/sidebars/admin_sidebar.yml @@ -1,7 +1,7 @@ entries: - title: Sidebar product: Administrator's Guide - version: 5.4 + version: 5.5 folders: - title: output: pdf diff --git a/docs/devguide/src/site/_config.yml b/docs/devguide/src/site/_config.yml index 35832d6d6e..c8b6f293e8 100644 --- a/docs/devguide/src/site/_config.yml +++ b/docs/devguide/src/site/_config.yml @@ -2,7 +2,7 @@ theme: unidata-jekyll-theme # this will appear in an HTML meta tag, sidebar, and perhaps elsewhere -docset_version: 5.4 +docset_version: 5.5 # this appears on the top navigation bar next to the home button topnav_title: THREDDS Data Server (TDS) diff --git a/docs/devguide/src/site/_data/sidebars/dev_sidebar.yml b/docs/devguide/src/site/_data/sidebars/dev_sidebar.yml index 6a5a4aaea4..b96f3958b1 100644 --- a/docs/devguide/src/site/_data/sidebars/dev_sidebar.yml +++ b/docs/devguide/src/site/_data/sidebars/dev_sidebar.yml @@ -1,7 +1,7 @@ entries: - title: Sidebar product: TDS Developer's Guide - version: 5.4 + version: 5.5 folders: - title: diff --git a/docs/quickstart/src/site/_data/sidebars/quickstart_sidebar.yml b/docs/quickstart/src/site/_data/sidebars/quickstart_sidebar.yml index 0560628dc3..99ea4ee4b7 100644 --- a/docs/quickstart/src/site/_data/sidebars/quickstart_sidebar.yml +++ b/docs/quickstart/src/site/_data/sidebars/quickstart_sidebar.yml @@ -1,7 +1,7 @@ entries: - title: Sidebar product: TDS Tutorial And Reference Documentation - version: 5.4 + version: 5.5 folders: - title: diff --git a/docs/shared/src/site/_data/topnav.yml.golden b/docs/shared/src/site/_data/topnav.yml.golden index bc9eb25e9f..4d505f90f6 100644 --- a/docs/shared/src/site/_data/topnav.yml.golden +++ b/docs/shared/src/site/_data/topnav.yml.golden @@ -29,7 +29,7 @@ topnav_dropdowns: - title: GitHub external_url: https://github.com/Unidata/tds - title: Documentation - external_url: https://docs.unidata.ucar.edu/tds/5.4/userguide/index.html + external_url: https://docs.unidata.ucar.edu/tds/5.5/userguide/index.html - title: Rosetta folderitems: diff --git a/docs/userguide/src/site/_config.yml b/docs/userguide/src/site/_config.yml index 3c7fd2f426..93c54a43e9 100644 --- a/docs/userguide/src/site/_config.yml +++ b/docs/userguide/src/site/_config.yml @@ -2,7 +2,7 @@ theme: unidata-jekyll-theme # this will appear in an HTML meta tag, sidebar, and perhaps elsewhere -docset_version: 5.4 +docset_version: 5.5 # this appears on the top navigation bar next to the home button topnav_title: THREDDS Data Server (TDS) diff --git a/docs/userguide/src/site/_data/sidebars/user_sidebar.yml b/docs/userguide/src/site/_data/sidebars/user_sidebar.yml index 3d739dd33b..889dfa049a 100644 --- a/docs/userguide/src/site/_data/sidebars/user_sidebar.yml +++ b/docs/userguide/src/site/_data/sidebars/user_sidebar.yml @@ -1,7 +1,7 @@ entries: - title: Sidebar product: TDS User's Guide - version: 5.4 + version: 5.5 folders: - title: From 0caee5a61602ef1e3c230da7f9a06e0a3d87e094 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 23 Jan 2024 11:09:51 -0700 Subject: [PATCH 073/120] Use current in url instead of 5.5 --- docs/shared/src/site/_data/topnav.yml.golden | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/shared/src/site/_data/topnav.yml.golden b/docs/shared/src/site/_data/topnav.yml.golden index 4d505f90f6..744aa3ccb6 100644 --- a/docs/shared/src/site/_data/topnav.yml.golden +++ b/docs/shared/src/site/_data/topnav.yml.golden @@ -29,7 +29,7 @@ topnav_dropdowns: - title: GitHub external_url: https://github.com/Unidata/tds - title: Documentation - external_url: https://docs.unidata.ucar.edu/tds/5.5/userguide/index.html + external_url: https://docs.unidata.ucar.edu/tds/current/userguide/index.html - title: Rosetta folderitems: From 8c02320d0e10b9dfb3f6d366010891550431e775 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 8 Feb 2024 16:03:37 -0700 Subject: [PATCH 074/120] Add flag to RandomAccessFile cache to cleanup deleted files (#463) --- tds/src/main/java/thredds/server/config/TdsInit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds/src/main/java/thredds/server/config/TdsInit.java b/tds/src/main/java/thredds/server/config/TdsInit.java index dfba33dd63..eee7589ee1 100644 --- a/tds/src/main/java/thredds/server/config/TdsInit.java +++ b/tds/src/main/java/thredds/server/config/TdsInit.java @@ -399,7 +399,7 @@ private void readThreddsConfig() { max = ThreddsConfig.getInt("RandomAccessFile.maxFiles", 500); secs = ThreddsConfig.getSeconds("RandomAccessFile.scour", 11 * 60); if (max > 0) { - RandomAccessFile.setGlobalFileCache(new FileCache("RandomAccessFile", min, max, -1, secs)); + RandomAccessFile.setGlobalFileCache(new FileCache("RandomAccessFile", min, max, -1, secs, true)); startupLog.info("TdsInit: RandomAccessFile.initPartitionCache= [" + min + "," + max + "] scour = " + secs); } From b29e2c462c77ba501e29babef3424beaed46aba5 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 13 Feb 2024 13:02:56 -0700 Subject: [PATCH 075/120] Fix WMS netcdf file locking issue (#461) * Refactor acquire catalog to helper function * Refactor acquire netcdf dataset to helper method * Add test of wms cache and file locking * Use guava cache in WMS and be sure to close netcdfDataset * Add cache info for admin debug service * Update tests to work with new wms cache * Use temporary folder for wms test * Add debug command to clear wms cache * Limit access to method * Add category to test * Make variable final --- .../server/wms/TestUpdateWmsServer.java | 27 ++-- .../thredds/server/admin/DebugCommands.java | 12 ++ .../server/wms/TdsWmsDatasetFactory.java | 9 -- .../server/wms/ThreddsWmsCatalogue.java | 13 +- .../thredds/server/wms/ThreddsWmsServlet.java | 116 ++++++++++-------- .../java/thredds/server/wms/TestWmsCache.java | 91 +++++++++----- 6 files changed, 160 insertions(+), 108 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/server/wms/TestUpdateWmsServer.java b/tds/src/integrationTests/java/thredds/server/wms/TestUpdateWmsServer.java index bb11f8cdba..d3b477c235 100644 --- a/tds/src/integrationTests/java/thredds/server/wms/TestUpdateWmsServer.java +++ b/tds/src/integrationTests/java/thredds/server/wms/TestUpdateWmsServer.java @@ -5,6 +5,7 @@ package thredds.server.wms; +import java.io.File; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; @@ -19,9 +20,9 @@ import org.jdom2.input.SAXBuilder; import org.jdom2.xpath.XPathExpression; import org.jdom2.xpath.XPathFactory; -import org.junit.After; -import org.junit.Ignore; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.TemporaryFolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; @@ -33,36 +34,40 @@ import static com.google.common.truth.Truth.assertThat; -@Ignore("TODO: fix locked files issue") public class TestUpdateWmsServer { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private static final Namespace NS_WMS = Namespace.getNamespace("wms", "http://www.opengis.net/wms"); private static final String DIR = "src/test/content/thredds/public/testdata/"; - private static final Path TEST_FILE = Paths.get(DIR, "testUpdate.nc"); + private static final Path SRC_FILE_1 = Paths.get(DIR, "testGridAsPoint.nc"); + private static final Path SRC_FILE_2 = Paths.get(DIR, "testData.nc"); + private static final String FILENAME = "testUpdate.nc"; - @After - public void cleanupTestFile() throws IOException { - Files.delete(TEST_FILE); - } + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(new File(DIR)); @Test public void testUpdateFile() throws IOException, JDOMException { - final String path = "/wms/localContent/testUpdate.nc?service=WMS&version=1.3.0&request=GetCapabilities"; + final String filePath = temporaryFolder.getRoot().getName() + "/" + FILENAME; + final String path = "/wms/localContent/" + filePath + "?service=WMS&version=1.3.0&request=GetCapabilities"; final String endpoint = TestOnLocalServer.withHttpPath(path); // Check initial WMS output - Files.copy(Paths.get(DIR, "testGridAsPoint.nc"), TEST_FILE); + createTestFile(SRC_FILE_1, FILENAME); final byte[] result = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.xmlwms); checkLayerNameInXml(result, "withT1Z1"); // Update test file and check that WMS output is updated - Files.copy(Paths.get(DIR, "testData.nc"), TEST_FILE, StandardCopyOption.REPLACE_EXISTING); + createTestFile(SRC_FILE_2, FILENAME); final byte[] updatedResult = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.xmlwms); checkLayerNameInXml(updatedResult, "Z_sfc"); } + private void createTestFile(Path srcFile, String filename) throws IOException { + Files.copy(srcFile, Paths.get(temporaryFolder.getRoot().toString(), filename), StandardCopyOption.REPLACE_EXISTING); + } + private void checkLayerNameInXml(byte[] result, String expectedLayerName) throws IOException, JDOMException { final Reader reader = new StringReader(new String(result, StandardCharsets.UTF_8)); final SAXBuilder saxBuilder = new SAXBuilder(); diff --git a/tds/src/main/java/thredds/server/admin/DebugCommands.java b/tds/src/main/java/thredds/server/admin/DebugCommands.java index b6c5f55c40..c22c8761e6 100644 --- a/tds/src/main/java/thredds/server/admin/DebugCommands.java +++ b/tds/src/main/java/thredds/server/admin/DebugCommands.java @@ -10,6 +10,7 @@ import org.springframework.stereotype.Component; import thredds.featurecollection.cache.GridInventoryCacheChronicle; import thredds.server.config.TdsContext; +import thredds.server.wms.ThreddsWmsServlet; import thredds.servlet.ServletUtil; import ucar.nc2.dataset.NetcdfDataset; import java.io.ByteArrayOutputStream; @@ -149,6 +150,9 @@ public void doAction(Event e) { f.format("%n%n"); GridInventoryCacheChronicle.showCache(f); + f.format("%n%n"); + ThreddsWmsServlet.showCache(f); + e.pw.flush(); } }; @@ -162,6 +166,7 @@ public void doAction(Event e) { FileCacheIF fc = GribCdmIndex.gribCollectionCache; if (fc != null) fc.clearCache(false); + ThreddsWmsServlet.resetCache(); e.pw.println(" ClearCache ok"); } }; @@ -220,6 +225,13 @@ public void doAction(Event e) { }; debugHandler.addAction(act); + act = new Action("forceWMSCache", "Force clear WMS Cache") { + public void doAction(Event e) { + ThreddsWmsServlet.resetCache(); + e.pw.println(" WMS force clearCache done"); + } + }; + debugHandler.addAction(act); } protected void makeDebugActions() { diff --git a/tds/src/main/java/thredds/server/wms/TdsWmsDatasetFactory.java b/tds/src/main/java/thredds/server/wms/TdsWmsDatasetFactory.java index f0933e9452..4b212f40ca 100644 --- a/tds/src/main/java/thredds/server/wms/TdsWmsDatasetFactory.java +++ b/tds/src/main/java/thredds/server/wms/TdsWmsDatasetFactory.java @@ -22,15 +22,6 @@ public void setNetcdfDataset(NetcdfDataset ncd) { this.netcdfDataset = ncd; } - /** - * Get time of last modification of the underlying netcdfDataset - * - * @return time of last modification in Unix time (msecs since reference), or 0 if unknown - */ - long getLastModified() { - return netcdfDataset.getLastModified(); - } - /** * * None of this matters really. For NcML datasets, we cannot rely on a location, as the diff --git a/tds/src/main/java/thredds/server/wms/ThreddsWmsCatalogue.java b/tds/src/main/java/thredds/server/wms/ThreddsWmsCatalogue.java index 5a3ccc41f2..752a16c388 100644 --- a/tds/src/main/java/thredds/server/wms/ThreddsWmsCatalogue.java +++ b/tds/src/main/java/thredds/server/wms/ThreddsWmsCatalogue.java @@ -147,15 +147,6 @@ public String getTdsDatasetPath() { return tdsDatasetPath; } - /** - * Get time of last modification of the underlying netcdfDataset - * - * @return time of last modification in Unix time (msecs since reference), or 0 if unknown - */ - long getLastModified() { - return datasetFactory.getLastModified(); - } - @Override public FeaturesAndMemberName getFeaturesForLayer(String layerName, PlottingDomainParams params) throws EdalException { /* @@ -431,4 +422,8 @@ public EnhancedVariableMetadata getLayerMetadata(final VariableMetadata metadata */ return new TdsEnhancedVariableMetadata(this, metadata); } + + void setNetcdfDataset(NetcdfDataset ncd) { + datasetFactory.setNetcdfDataset(ncd); + } } diff --git a/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java b/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java index 3eaaa0d0a9..fb8285c68c 100644 --- a/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java +++ b/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java @@ -28,6 +28,10 @@ package thredds.server.wms; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import java.io.IOException; +import java.util.Formatter; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -36,7 +40,6 @@ import uk.ac.rdg.resc.edal.wms.RequestParams; import uk.ac.rdg.resc.edal.wms.WmsCatalogue; import uk.ac.rdg.resc.edal.wms.WmsServlet; -import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -70,16 +73,14 @@ public CachedWmsCatalogue(ThreddsWmsCatalogue wmsCatalogue, long lastModified) { } } - private static final Map catalogueCache = new HashMap<>(); - - static void resetCache() { - catalogueCache.clear(); - } + private static final Cache catalogueCache = + CacheBuilder.newBuilder().maximumSize(200).recordStats().build(); + private static int cacheLoads = 0; @Override @RequestMapping(value = "**", method = {RequestMethod.GET}) protected void dispatchWmsRequest(String request, RequestParams params, HttpServletRequest httpServletRequest, - HttpServletResponse httpServletResponse, WmsCatalogue catalogue) throws Exception { + HttpServletResponse httpServletResponse, WmsCatalogue wmsCatalogue) throws Exception { /* * The super implementation of this gets called with a servlet-wide * catalogue, which "should" have been injected with the @@ -95,60 +96,75 @@ protected void dispatchWmsRequest(String request, RequestParams params, HttpServ // Look - is setting this to null the right thing to do?? String removePrefix = null; TdsRequestedDataset tdsDataset = new TdsRequestedDataset(httpServletRequest, removePrefix); - if (useCachedCatalogue(tdsDataset.getPath())) { - catalogue = catalogueCache.get(tdsDataset.getPath()).wmsCatalogue; - } else { - NetcdfFile ncf = TdsRequestedDataset.getNetcdfFile(httpServletRequest, httpServletResponse, tdsDataset.getPath()); - NetcdfDataset ncd; - if (TdsRequestedDataset.useNetcdfJavaBuilders()) { - ncd = NetcdfDatasets.enhance(ncf, NetcdfDataset.getDefaultEnhanceMode(), null); - } else { - ncd = NetcdfDataset.wrap(ncf, NetcdfDataset.getDefaultEnhanceMode()); - } - - String netcdfFilePath = ncf.getLocation(); + try (NetcdfDataset ncd = acquireNetcdfDataset(httpServletRequest, httpServletResponse, tdsDataset.getPath())) { + ThreddsWmsCatalogue catalogue = acquireCatalogue(ncd, tdsDataset.getPath()); /* - * Generate a new catalogue for the given dataset - * - * In the full system, we should keep a cache of these - * ThreddsWmsCatalogues, but in this example we just create each new one - * on the fly. - * - * If a feature cache is required on the WMS (a Good Idea), I recommend - * a single cache in this servlet which gets passed to each WmsCatalogue - * upon construction (i.e. HERE). That's a TDS implementation detail - * though, hence not in this example. + * Now that we've got a WmsCatalogue, we can pass this request to the + * super implementation which will handle things from here. */ - if (netcdfFilePath == null) { - throw new EdalLayerNotFoundException("The requested dataset is not available on this server"); - } - catalogue = new ThreddsWmsCatalogue(ncd, tdsDataset.getPath()); - final CachedWmsCatalogue cachedWmsCatalogue = - new CachedWmsCatalogue((ThreddsWmsCatalogue) catalogue, ncd.getLastModified()); - catalogueCache.put(tdsDataset.getPath(), cachedWmsCatalogue); + super.dispatchWmsRequest(request, params, httpServletRequest, httpServletResponse, catalogue); } + } - /* - * Now that we've got a WmsCatalogue, we can pass this request to the - * super implementation which will handle things from here. - */ - super.dispatchWmsRequest(request, params, httpServletRequest, httpServletResponse, catalogue); + private ThreddsWmsCatalogue acquireCatalogue(NetcdfDataset ncd, String tdsDatasetPath) throws IOException { + if (ncd.getLocation() == null) { + throw new EdalLayerNotFoundException("The requested dataset is not available on this server"); + } + + final CachedWmsCatalogue cachedWmsCatalogue = catalogueCache.getIfPresent(tdsDatasetPath); + final long lastModified = ncd.getLastModified(); + + if (cachedWmsCatalogue != null && cachedWmsCatalogue.lastModified >= lastModified) { + // Must update NetcdfDataset to ensure file resources are reacquired, as this has been closed. + // But we don't need to recreate the ThreddsWmsCatalogue as it is up-to-date according to the last modified + cachedWmsCatalogue.wmsCatalogue.setNetcdfDataset(ncd); + return cachedWmsCatalogue.wmsCatalogue; + } else { + // Create and put/ replace in cache + ThreddsWmsCatalogue threddsWmsCatalogue = new ThreddsWmsCatalogue(ncd, tdsDatasetPath); + catalogueCache.put(tdsDatasetPath, new CachedWmsCatalogue(threddsWmsCatalogue, lastModified)); + cacheLoads++; + return threddsWmsCatalogue; + } } - // package private for testing - static boolean useCachedCatalogue(String tdsDatasetPath) { - if (containsCachedCatalogue(tdsDatasetPath)) { - // This date last modified will be updated e.g. in the case of an aggregation with a recheckEvery - final long netcdfDatasetLastModified = catalogueCache.get(tdsDatasetPath).wmsCatalogue.getLastModified(); - final long cacheLastModified = catalogueCache.get(tdsDatasetPath).lastModified; - return cacheLastModified >= netcdfDatasetLastModified; + private static NetcdfDataset acquireNetcdfDataset(HttpServletRequest httpServletRequest, + HttpServletResponse httpServletResponse, String tdsDatasetPath) throws IOException { + NetcdfFile ncf = TdsRequestedDataset.getNetcdfFile(httpServletRequest, httpServletResponse, tdsDatasetPath); + if (TdsRequestedDataset.useNetcdfJavaBuilders()) { + return NetcdfDatasets.enhance(ncf, NetcdfDataset.getDefaultEnhanceMode(), null); + } else { + return NetcdfDataset.wrap(ncf, NetcdfDataset.getDefaultEnhanceMode()); + } + } + + public static void showCache(Formatter formatter) { + formatter.format("%nWmsCache:%n"); + formatter.format("numberOfEntries=%d, ", getNumberOfEntries()); + formatter.format("loads=%d, ", getCacheLoads()); + formatter.format("evictionCount=%d ", catalogueCache.stats().evictionCount()); + formatter.format("%nentries:%n"); + for (Map.Entry entry : catalogueCache.asMap().entrySet()) { + formatter.format(" %s%n", entry.getKey()); } - return false; + } + + public static void resetCache() { + catalogueCache.invalidateAll(); + cacheLoads = 0; } // package private for testing static boolean containsCachedCatalogue(String tdsDatasetPath) { - return catalogueCache.containsKey(tdsDatasetPath); + return catalogueCache.asMap().containsKey(tdsDatasetPath); + } + + static long getNumberOfEntries() { + return catalogueCache.size(); + } + + static int getCacheLoads() { + return cacheLoads; } } diff --git a/tds/src/test/java/thredds/server/wms/TestWmsCache.java b/tds/src/test/java/thredds/server/wms/TestWmsCache.java index 5434fb7267..fbac1a6588 100644 --- a/tds/src/test/java/thredds/server/wms/TestWmsCache.java +++ b/tds/src/test/java/thredds/server/wms/TestWmsCache.java @@ -1,6 +1,7 @@ package thredds.server.wms; import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; import java.io.File; import java.io.IOException; @@ -8,9 +9,11 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; +import java.util.List; import javax.servlet.ServletException; import org.junit.*; +import org.junit.experimental.categories.Category; import org.junit.rules.TemporaryFolder; import org.junit.runner.RunWith; import org.slf4j.Logger; @@ -21,8 +24,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import java.lang.invoke.MethodHandles; +import ucar.nc2.dataset.NetcdfDatasets; +import ucar.nc2.util.cache.FileCacheIF; +import ucar.unidata.util.test.category.NeedsCdmUnitTest; -@Ignore("TODO: fix WMS cache - tests fail on windows (and occasionally on GH?)") @RunWith(SpringJUnit4ClassRunner.class) @WebAppConfiguration @ContextConfiguration(locations = {"/WEB-INF/applicationContext.xml"}) @@ -58,65 +63,93 @@ public void clearCache() { @Test public void shouldCacheFile() throws IOException, ServletException { - assertThat(ThreddsWmsServlet.containsCachedCatalogue(TEST_PATH)).isFalse(); - getCapabilities(TEST_PATH); - assertThat(ThreddsWmsServlet.containsCachedCatalogue(TEST_PATH)).isTrue(); - assertThat(ThreddsWmsServlet.useCachedCatalogue(TEST_PATH)).isTrue(); + assertAddedToCache(TEST_PATH); + assertUsedCache(TEST_PATH); } // TODO also test updating an S3 file (currently not implemented through MFileS3) @Test public void shouldCacheS3File() throws IOException, ServletException { - assertThat(ThreddsWmsServlet.containsCachedCatalogue(S3_TEST_PATH)).isFalse(); - getCapabilities(S3_TEST_PATH); - assertThat(ThreddsWmsServlet.containsCachedCatalogue(S3_TEST_PATH)).isTrue(); - assertThat(ThreddsWmsServlet.useCachedCatalogue(S3_TEST_PATH)).isTrue(); + assertAddedToCache(S3_TEST_PATH); + assertUsedCache(S3_TEST_PATH); } @Test public void shouldNotUseOutdatedCacheFile() throws IOException, ServletException { - getCapabilities(TEST_PATH); - assertThat(ThreddsWmsServlet.containsCachedCatalogue(TEST_PATH)).isTrue(); - assertThat(ThreddsWmsServlet.useCachedCatalogue(TEST_PATH)).isTrue(); - + assertAddedToCache(TEST_PATH); updateTestFile(); - assertThat(ThreddsWmsServlet.containsCachedCatalogue(TEST_PATH)).isTrue(); - assertThat(ThreddsWmsServlet.useCachedCatalogue(TEST_PATH)).isFalse(); + assertAddedToCache(TEST_PATH); } @Test public void shouldUseUnchangedAggregation() throws IOException, ServletException { - getCapabilities(AGGREGATION_RECHECK_MINUTE_PATH); - assertThat(ThreddsWmsServlet.containsCachedCatalogue(AGGREGATION_RECHECK_MINUTE_PATH)).isTrue(); - assertThat(ThreddsWmsServlet.useCachedCatalogue(AGGREGATION_RECHECK_MINUTE_PATH)).isTrue(); + assertAddedToCache(AGGREGATION_RECHECK_MINUTE_PATH); + assertUsedCache(AGGREGATION_RECHECK_MINUTE_PATH); } @Test public void shouldUseRecheckedButUnchangedAggregation() throws IOException, ServletException { - getCapabilities(AGGREGATION_RECHECK_MSEC_PATH); - assertThat(ThreddsWmsServlet.containsCachedCatalogue(AGGREGATION_RECHECK_MSEC_PATH)).isTrue(); - assertThat(ThreddsWmsServlet.useCachedCatalogue(AGGREGATION_RECHECK_MSEC_PATH)).isTrue(); + assertAddedToCache(AGGREGATION_RECHECK_MSEC_PATH); // Will be rechecked after 1 ms - assertThat(ThreddsWmsServlet.containsCachedCatalogue(AGGREGATION_RECHECK_MSEC_PATH)).isTrue(); - assertThat(ThreddsWmsServlet.useCachedCatalogue(AGGREGATION_RECHECK_MSEC_PATH)).isTrue(); + assertUsedCache(AGGREGATION_RECHECK_MSEC_PATH); } @Test public void shouldNotUseOutdatedAggregation() throws IOException, ServletException { - getCapabilities(AGGREGATION_RECHECK_MSEC_PATH); - assertThat(ThreddsWmsServlet.containsCachedCatalogue(AGGREGATION_RECHECK_MSEC_PATH)).isTrue(); - assertThat(ThreddsWmsServlet.useCachedCatalogue(AGGREGATION_RECHECK_MSEC_PATH)).isTrue(); - + assertAddedToCache(AGGREGATION_RECHECK_MSEC_PATH); updateTestFile(); - assertThat(ThreddsWmsServlet.containsCachedCatalogue(AGGREGATION_RECHECK_MSEC_PATH)).isTrue(); - assertThat(ThreddsWmsServlet.useCachedCatalogue(AGGREGATION_RECHECK_MSEC_PATH)).isFalse(); + assertAddedToCache(AGGREGATION_RECHECK_MSEC_PATH); + } + + @Test + public void shouldNotLockFileInCache() throws IOException, ServletException { + final String filename = "testGridAsPoint.nc"; + final String testPath = "localContent/" + filename; + getCapabilities(testPath); + assertThat(ThreddsWmsServlet.containsCachedCatalogue(testPath)).isTrue(); + + // check file is not locked in netcdf file cache + final FileCacheIF cache = NetcdfDatasets.getNetcdfFileCache(); + final List entries = cache.showCache(); + assertThat(entries.size()).isGreaterThan(0); + final boolean isLocked = entries.stream().filter(e -> e.contains(filename)).anyMatch(e -> e.startsWith("true")); + assertWithMessage(cache.showCache().toString()).that(isLocked).isFalse(); + } + + @Test + @Category(NeedsCdmUnitTest.class) + public void shouldNotLockAggregationInCache() throws IOException, ServletException { + final String testPath = "ExampleNcML/Agg.nc"; + getCapabilities(testPath); + assertThat(ThreddsWmsServlet.containsCachedCatalogue(testPath)).isTrue(); + + // check aggregation is not locked in netcdf file cache + final FileCacheIF cache = NetcdfDatasets.getNetcdfFileCache(); + final List entries = cache.showCache(); + assertThat(entries.size()).isGreaterThan(0); + final boolean isLocked = entries.stream().filter(e -> e.contains(testPath)).anyMatch(e -> e.startsWith("true")); + assertWithMessage(cache.showCache().toString()).that(isLocked).isFalse(); } private void updateTestFile() throws IOException { Files.copy(TEST_FILE, TEMP_FILE, StandardCopyOption.REPLACE_EXISTING); } + private void assertUsedCache(String path) throws ServletException, IOException { + int loads = ThreddsWmsServlet.getCacheLoads(); + getCapabilities(path); + assertThat(ThreddsWmsServlet.containsCachedCatalogue(path)).isTrue(); + assertThat(ThreddsWmsServlet.getCacheLoads()).isEqualTo(loads); + } + + private void assertAddedToCache(String path) throws ServletException, IOException { + int loads = ThreddsWmsServlet.getCacheLoads(); + getCapabilities(path); + assertThat(ThreddsWmsServlet.containsCachedCatalogue(path)).isTrue(); + assertThat(ThreddsWmsServlet.getCacheLoads()).isEqualTo(loads + 1); + } + private void getCapabilities(String path) throws ServletException, IOException { final String uri = "/thredds/wms/" + path; final MockHttpServletRequest request = new MockHttpServletRequest("GET", uri); From 5156cfa3a81ae2d7aa87d20a53f37a0082af4cd4 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 13 Feb 2024 16:00:00 -0700 Subject: [PATCH 076/120] Add edal-java/WMS info to upgrade guide (#464) --- .../src/site/pages/tds_tutorial/production/Upgrade.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md b/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md index bd4eae7639..00f3aae51c 100644 --- a/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md +++ b/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md @@ -65,6 +65,12 @@ The following is no longer used: * By default, most services are enabled, but may still be turned off in `threddsConfig.xml`. +### WMS/ Godiva +TDS 5.x uses the [edal-java](https://github.com/Reading-eScience-Centre/edal-java) library (formerly ncWMS 1.x). +As this is a major version change to that library, there may be some breaking changes. +See also the [edal user guide](https://reading-escience-centre.gitbooks.io/edal-user-guide/content/) and the +[changes from ncWMS 1.x](https://reading-escience-centre.gitbooks.io/ncwms-user-guide/content/01-ncwms1x.html#changes). + ## Java Web Start Java Web Start has been [deprecated as of Java 9](https://www.oracle.com/technetwork/java/javase/9-deprecated-features-3745636.html#JDK-8184998){:target="_blank"}, and has been removed in [Java 11](https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html){:target="_blank"}, which is the Long-term Release post-Java 8. From def5377b4838a5e53d40778c9ce6460d8661d2f8 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 14 Feb 2024 10:56:43 -0700 Subject: [PATCH 077/120] Wms cache last modified comparison (#465) * Add test for replacing a file with a file with older date last modified * Only use cache file if the last modified matches exactly --- .../java/thredds/server/wms/ThreddsWmsServlet.java | 2 +- .../test/java/thredds/server/wms/TestWmsCache.java | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java b/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java index fb8285c68c..87d9606dd3 100644 --- a/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java +++ b/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java @@ -115,7 +115,7 @@ private ThreddsWmsCatalogue acquireCatalogue(NetcdfDataset ncd, String tdsDatase final CachedWmsCatalogue cachedWmsCatalogue = catalogueCache.getIfPresent(tdsDatasetPath); final long lastModified = ncd.getLastModified(); - if (cachedWmsCatalogue != null && cachedWmsCatalogue.lastModified >= lastModified) { + if (cachedWmsCatalogue != null && cachedWmsCatalogue.lastModified == lastModified) { // Must update NetcdfDataset to ensure file resources are reacquired, as this has been closed. // But we don't need to recreate the ThreddsWmsCatalogue as it is up-to-date according to the last modified cachedWmsCatalogue.wmsCatalogue.setNetcdfDataset(ncd); diff --git a/tds/src/test/java/thredds/server/wms/TestWmsCache.java b/tds/src/test/java/thredds/server/wms/TestWmsCache.java index fbac1a6588..259c7b7352 100644 --- a/tds/src/test/java/thredds/server/wms/TestWmsCache.java +++ b/tds/src/test/java/thredds/server/wms/TestWmsCache.java @@ -81,6 +81,18 @@ public void shouldNotUseOutdatedCacheFile() throws IOException, ServletException assertAddedToCache(TEST_PATH); } + @Test + public void shouldNotUseCacheFileWithNewerModified() throws IOException, ServletException { + final File testFile = new File(TEMP_FILE.toUri()); + final long lastModified = testFile.lastModified(); + assertAddedToCache(TEST_PATH); + + // Change test file to have older last modified date + assertThat(testFile.setLastModified(lastModified - 1)).isTrue(); + + assertAddedToCache(TEST_PATH); + } + @Test public void shouldUseUnchangedAggregation() throws IOException, ServletException { assertAddedToCache(AGGREGATION_RECHECK_MINUTE_PATH); From 3e3cdc408a16ddfeef083cbe81518a6c2556deeb Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 26 Feb 2024 10:16:38 -0700 Subject: [PATCH 078/120] Add styles directory to WMS config (#470) * Add wms styles directory to config * Refactor to helper function to reduce duplication --- .../site/pages/thredds/ThreddsConfigRef.md | 8 +++++ .../server/config/TdsConfigMapper.java | 30 +++++++++++++++---- .../thredds/server/config/WmsConfigBean.java | 9 ++++++ 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md b/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md index 9b5c45f34b..5544c8f1db 100644 --- a/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md +++ b/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md @@ -236,6 +236,7 @@ The following shows all the configuration options available in the WMS section o true false wmsPalettes + wmsStyles 2048 2048 @@ -259,6 +260,13 @@ where they are contained. * More information on the format of palette files can also be found in the [ncWMS documentation](https://reading-escience-centre.gitbooks.io/ncwms-user-guide/content/06-development.html#:~:text=To%20add%20new,in%20hexadecimal%20notation.). * If you created palette files for TDS 4.x and would like to use them in TDS 5.x, an open source tool named [Magic Palette Converter](https://github.com/billyz313/magic-palette-converter){:target="_blank"} for THREDDS is available to assist in the conversion (special thanks to [Billy Ashmall](https://github.com/Unidata/tds/discussions/346){:target="_blank"}!) +* `stylesLocationDir`: optionally specify the location of the directory containing your own style files, by specifying the directory + where they are contained. + * If the directory location starts with a `/`, the path is absolute, otherwise it is relative to `${tds.content.root.path}/thredds/`. + * The default directory for custom styles files is `${tds.content.root.path}/thredds/wmsStyles`. + * If you don't specify a custom styles directory, or specify it incorrectly, the default directory will be used. + * More information on the format of style files can also be found in the + [ncWMS documentation](https://reading-escience-centre.gitbooks.io/ncwms-user-guide/content/06-development.html#styles). * `maxImageWidth`: the maximum image width in pixels that this WMS service will return. * `maxImageHeight`: the maximum image height in pixels that this WMS service will return. diff --git a/tds/src/main/java/thredds/server/config/TdsConfigMapper.java b/tds/src/main/java/thredds/server/config/TdsConfigMapper.java index dd56f5160b..cb1e3a640b 100644 --- a/tds/src/main/java/thredds/server/config/TdsConfigMapper.java +++ b/tds/src/main/java/thredds/server/config/TdsConfigMapper.java @@ -16,6 +16,7 @@ import thredds.server.wms.ThreddsWmsCatalogue; import thredds.server.wms.config.WmsDetailedConfig; import uk.ac.rdg.resc.edal.graphics.utils.ColourPalette; +import uk.ac.rdg.resc.edal.graphics.utils.SldTemplateStyleCatalogue; /** * Centralize the mapping of threddsConfig.xml configuration settings to the data objects used by @@ -173,6 +174,7 @@ enum WmsConfigMappings { WMS_ALLOW("WMS.allow", null, "true"), WMS_ALLOW_REMOTE("WMS.allowRemote", null, "false"), WMS_PALETTE_LOCATION_DIR("WMS.paletteLocationDir", null, null), + WMS_STYLES_LOCATION_DIR("WMS.stylesLocationDir", null, null), WMS_MAXIMUM_IMAGE_WIDTH("WMS.maxImageWidth", null, "2048"), WMS_MAXIMUM_IMAGE_HEIGHT("WMS.maxImageHeight", null, "2048"), WMS_CONFIG_FILE("WMS.configFile", null, null); @@ -200,14 +202,14 @@ String getValueFromThreddsConfig() { static void load(WmsConfigBean wmsConfig, TdsContext tdsContext) { final String defaultPaletteLocation = tdsContext.getThreddsDirectory() + "/wmsPalettes"; + final String defaultStylesLocation = tdsContext.getThreddsDirectory() + "/wmsStyles"; final String defaultWmsConfigFile = tdsContext.getThreddsDirectory() + "/wmsConfig.xml"; wmsConfig.setAllow(Boolean.parseBoolean(WMS_ALLOW.getValueFromThreddsConfig())); wmsConfig.setAllowRemote(Boolean.parseBoolean(WMS_ALLOW_REMOTE.getValueFromThreddsConfig())); - String paletteLocation = WMS_PALETTE_LOCATION_DIR.getValueFromThreddsConfig(); - if (paletteLocation == null) - paletteLocation = defaultPaletteLocation; + final String paletteLocation = + getValueFromThreddsConfigOrDefault(WMS_PALETTE_LOCATION_DIR, defaultPaletteLocation); wmsConfig.setPaletteLocationDir(paletteLocation); try { ColourPalette.addPaletteDirectory(new File(paletteLocation)); @@ -221,9 +223,17 @@ static void load(WmsConfigBean wmsConfig, TdsContext tdsContext) { } } - String wmsConfigFile = WMS_CONFIG_FILE.getValueFromThreddsConfig(); - if (wmsConfigFile == null) - wmsConfigFile = defaultWmsConfigFile; + final String stylesLocation = getValueFromThreddsConfigOrDefault(WMS_STYLES_LOCATION_DIR, defaultStylesLocation); + wmsConfig.setStylesLocationDir(stylesLocation); + try { + SldTemplateStyleCatalogue.getStyleCatalogue().addStylesInDirectory(new File(stylesLocation)); + } catch (FileNotFoundException e) { + if (!stylesLocation.equals(defaultStylesLocation)) { + startupLog.warn("Could not find custom styles directory {}", stylesLocation, e); + } + } + + final String wmsConfigFile = getValueFromThreddsConfigOrDefault(WMS_CONFIG_FILE, defaultWmsConfigFile); WmsDetailedConfig wdc = WmsDetailedConfig.fromLocation(wmsConfigFile); if (wdc == null) { @@ -261,6 +271,14 @@ static void load(WmsConfigBean wmsConfig, TdsContext tdsContext) { } } + private static String getValueFromThreddsConfigOrDefault(WmsConfigMappings property, String defaultValue) { + final String value = property.getValueFromThreddsConfig(); + if (value == null) { + return defaultValue; + } + return value; + } + enum TdsUpdateConfigMappings { TDSUPDAATE_LOGVERSIONINFO("TdsUpdateConfig.logVersionInfo", null, "true"); diff --git a/tds/src/main/java/thredds/server/config/WmsConfigBean.java b/tds/src/main/java/thredds/server/config/WmsConfigBean.java index d2bdb4f7e0..4051006e95 100644 --- a/tds/src/main/java/thredds/server/config/WmsConfigBean.java +++ b/tds/src/main/java/thredds/server/config/WmsConfigBean.java @@ -19,6 +19,7 @@ public class WmsConfigBean { private boolean allow; private boolean allowRemote; private String paletteLocationDir; + private String stylesLocationDir; private int maxImageWidth; private int maxImageHeight; @@ -49,6 +50,14 @@ public void setPaletteLocationDir(String paletteLocationDir) { this.paletteLocationDir = paletteLocationDir; } + public String getStylesLocationDir() { + return stylesLocationDir; + } + + public void setStylesLocationDir(String stylesLocationDir) { + this.stylesLocationDir = stylesLocationDir; + } + public int getMaxImageWidth() { return maxImageWidth; } From 7f5f22e52e3c6d4bfdd325b4557d6950f75446c4 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 28 Feb 2024 14:53:48 -0700 Subject: [PATCH 079/120] Fix WMS guava cache concurrency issues (#467) * Add test for WMS requests in parallel * Do not mutate (by reopening/closing) files in the wms cache * Update wms cache tests * Use guava cache loader instead of put * Add test for bad wms request * Rethrow execution exceptions io or edal exceptions * Clear wms cache before netcdf file cache * Update test before/after steps to avoid problems with locked files * Revert "Update test before/after steps to avoid problems with locked files" This reverts commit 318891518e1df4cd78fb2baeac877c524e8e99c9. * Ignore WMS test that updates a file * Update WMS cache tests to alter last modified rather than replace file to test cache * Add extra asserts to test after step * Disable Raf cache to avoid file locks for wms tests --- .../server/wms/TestUpdateWmsServer.java | 2 + .../thredds/server/wms/TestWmsServer.java | 43 +++++++++ .../thredds/server/admin/DebugCommands.java | 2 +- .../server/wms/TdsWmsDatasetFactory.java | 15 ++++ .../server/wms/ThreddsWmsCatalogue.java | 16 +++- .../thredds/server/wms/ThreddsWmsServlet.java | 90 +++++++++++++------ .../java/thredds/server/wms/TestWmsCache.java | 66 +++++++++++--- 7 files changed, 192 insertions(+), 42 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/server/wms/TestUpdateWmsServer.java b/tds/src/integrationTests/java/thredds/server/wms/TestUpdateWmsServer.java index d3b477c235..2dbbe53274 100644 --- a/tds/src/integrationTests/java/thredds/server/wms/TestUpdateWmsServer.java +++ b/tds/src/integrationTests/java/thredds/server/wms/TestUpdateWmsServer.java @@ -20,6 +20,7 @@ import org.jdom2.input.SAXBuilder; import org.jdom2.xpath.XPathExpression; import org.jdom2.xpath.XPathFactory; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; @@ -34,6 +35,7 @@ import static com.google.common.truth.Truth.assertThat; +@Ignore("File locks on windows prevent files from being updated") public class TestUpdateWmsServer { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); diff --git a/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java b/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java index 1e12bdb06a..e0680829a5 100644 --- a/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java +++ b/tds/src/integrationTests/java/thredds/server/wms/TestWmsServer.java @@ -6,6 +6,9 @@ package thredds.server.wms; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.concurrent.*; +import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; import org.jdom2.Document; import org.jdom2.Element; @@ -28,9 +31,13 @@ import java.util.List; import thredds.test.util.TestOnLocalServer; import thredds.util.ContentType; +import ucar.httpservices.HTTPException; +import ucar.httpservices.HTTPFactory; +import ucar.httpservices.HTTPSession; import ucar.unidata.util.test.category.NeedsCdmUnitTest; import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; public class TestWmsServer { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @@ -167,6 +174,42 @@ public void shouldApplyNcmlOffsetToData() throws IOException, JDOMException { checkValue(withoutOffsetEndpoint, -92.5); } + @Test + public void shouldGetMapInParallel() throws InterruptedException { + final int nRequests = 100; + final int nThreads = 10; + + final ExecutorService executor = Executors.newFixedThreadPool(nThreads); + final List> tasks = new ArrayList<>(); + for (int i = 0; i < nRequests; i++) { + tasks.add(this::getMap); + } + + final List> results = executor.invokeAll(tasks); + final List resultCodes = results.stream().map(result -> { + try { + return result.get(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }).collect(Collectors.toList()); + + assertWithMessage("result codes = " + Arrays.toString(resultCodes.toArray())) + .that(resultCodes.stream().allMatch(code -> code.equals(HttpServletResponse.SC_OK))).isTrue(); + } + + private int getMap() { + final String endpoint = TestOnLocalServer + .withHttpPath("/wms/scanLocal/2004050300_eta_211.nc" + "?LAYERS=Z_sfc" + "&SERVICE=WMS" + "&VERSION=1.1.1" + + "&REQUEST=GetMap" + "&SRS=EPSG%3A4326" + "&BBOX=-64,26,-35,55" + "&WIDTH=256" + "&HEIGHT=256"); + + try (HTTPSession session = HTTPFactory.newSession(endpoint)) { + return HTTPFactory.Get(session).execute(); + } catch (HTTPException e) { + throw new RuntimeException(e); + } + } + private String createGetFeatureInfoEndpoint(String path, String variableName) { return TestOnLocalServer.withHttpPath("/wms/" + path + "?LAYERS=" + variableName + "&service=WMS&version=1.3.0&CRS=CRS:84&BBOX=0,0,10,10&WIDTH=100&HEIGHT=100" diff --git a/tds/src/main/java/thredds/server/admin/DebugCommands.java b/tds/src/main/java/thredds/server/admin/DebugCommands.java index c22c8761e6..9b67751af2 100644 --- a/tds/src/main/java/thredds/server/admin/DebugCommands.java +++ b/tds/src/main/java/thredds/server/admin/DebugCommands.java @@ -160,13 +160,13 @@ public void doAction(Event e) { act = new Action("clearCaches", "Clear All File Object Caches") { public void doAction(Event e) { + ThreddsWmsServlet.resetCache(); NetcdfDataset.getNetcdfFileCache().clearCache(false); NetcdfDatasets.getNetcdfFileCache().clearCache(false); RandomAccessFile.getGlobalFileCache().clearCache(false); FileCacheIF fc = GribCdmIndex.gribCollectionCache; if (fc != null) fc.clearCache(false); - ThreddsWmsServlet.resetCache(); e.pw.println(" ClearCache ok"); } }; diff --git a/tds/src/main/java/thredds/server/wms/TdsWmsDatasetFactory.java b/tds/src/main/java/thredds/server/wms/TdsWmsDatasetFactory.java index 4b212f40ca..8aa5db0bb2 100644 --- a/tds/src/main/java/thredds/server/wms/TdsWmsDatasetFactory.java +++ b/tds/src/main/java/thredds/server/wms/TdsWmsDatasetFactory.java @@ -38,4 +38,19 @@ protected NetcdfDataset getNetcdfDatasetFromLocation(String location, boolean fo return this.netcdfDataset; } + /** + * Close resources + */ + void close() throws IOException { + netcdfDataset.close(); + } + + /** + * Get time of last modification of the underlying netcdfDataset + * + * @return time of last modification in Unix time (msecs since reference), or 0 if unknown + */ + long getLastModified() { + return netcdfDataset.getLastModified(); + } } diff --git a/tds/src/main/java/thredds/server/wms/ThreddsWmsCatalogue.java b/tds/src/main/java/thredds/server/wms/ThreddsWmsCatalogue.java index 752a16c388..3652ba6549 100644 --- a/tds/src/main/java/thredds/server/wms/ThreddsWmsCatalogue.java +++ b/tds/src/main/java/thredds/server/wms/ThreddsWmsCatalogue.java @@ -423,7 +423,19 @@ public EnhancedVariableMetadata getLayerMetadata(final VariableMetadata metadata return new TdsEnhancedVariableMetadata(this, metadata); } - void setNetcdfDataset(NetcdfDataset ncd) { - datasetFactory.setNetcdfDataset(ncd); + /** + * Close resources + */ + void close() throws IOException { + datasetFactory.close(); + } + + /** + * Get time of last modification of the underlying netcdfDataset + * + * @return time of last modification in Unix time (msecs since reference), or 0 if unknown + */ + long getLastModified() { + return datasetFactory.getLastModified(); } } diff --git a/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java b/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java index 87d9606dd3..e30ac566ff 100644 --- a/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java +++ b/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java @@ -30,12 +30,18 @@ import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; +import com.google.common.cache.RemovalListener; +import com.google.common.util.concurrent.UncheckedExecutionException; import java.io.IOException; import java.util.Formatter; +import java.util.concurrent.ExecutionException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import ucar.nc2.dataset.NetcdfDatasets; +import uk.ac.rdg.resc.edal.exceptions.EdalException; import uk.ac.rdg.resc.edal.graphics.exceptions.EdalLayerNotFoundException; import uk.ac.rdg.resc.edal.wms.RequestParams; import uk.ac.rdg.resc.edal.wms.WmsCatalogue; @@ -62,6 +68,7 @@ @Controller @RequestMapping("/wms") public class ThreddsWmsServlet extends WmsServlet { + private static final Logger logger = LoggerFactory.getLogger(ThreddsWmsServlet.class); private static class CachedWmsCatalogue { public final ThreddsWmsCatalogue wmsCatalogue; @@ -73,9 +80,16 @@ public CachedWmsCatalogue(ThreddsWmsCatalogue wmsCatalogue, long lastModified) { } } + private static final RemovalListener removalListener = notification -> { + try { + notification.getValue().wmsCatalogue.close(); + } catch (IOException e) { + logger.warn("Could not close {}, exception = {}", notification.getKey(), e); + } + }; + private static final Cache catalogueCache = - CacheBuilder.newBuilder().maximumSize(200).recordStats().build(); - private static int cacheLoads = 0; + CacheBuilder.newBuilder().maximumSize(100).removalListener(removalListener).recordStats().build(); @Override @RequestMapping(value = "**", method = {RequestMethod.GET}) @@ -96,36 +110,55 @@ protected void dispatchWmsRequest(String request, RequestParams params, HttpServ // Look - is setting this to null the right thing to do?? String removePrefix = null; TdsRequestedDataset tdsDataset = new TdsRequestedDataset(httpServletRequest, removePrefix); - try (NetcdfDataset ncd = acquireNetcdfDataset(httpServletRequest, httpServletResponse, tdsDataset.getPath())) { - ThreddsWmsCatalogue catalogue = acquireCatalogue(ncd, tdsDataset.getPath()); - - /* - * Now that we've got a WmsCatalogue, we can pass this request to the - * super implementation which will handle things from here. - */ - super.dispatchWmsRequest(request, params, httpServletRequest, httpServletResponse, catalogue); - } + ThreddsWmsCatalogue catalogue = acquireCatalogue(httpServletRequest, httpServletResponse, tdsDataset.getPath()); + + /* + * Now that we've got a WmsCatalogue, we can pass this request to the + * super implementation which will handle things from here. + */ + super.dispatchWmsRequest(request, params, httpServletRequest, httpServletResponse, catalogue); } - private ThreddsWmsCatalogue acquireCatalogue(NetcdfDataset ncd, String tdsDatasetPath) throws IOException { - if (ncd.getLocation() == null) { - throw new EdalLayerNotFoundException("The requested dataset is not available on this server"); + private ThreddsWmsCatalogue acquireCatalogue(HttpServletRequest httpServletRequest, + HttpServletResponse httpServletResponse, String tdsDatasetPath) throws IOException { + + invalidateIfOutdated(tdsDatasetPath); + + try { + CachedWmsCatalogue catalogue = catalogueCache.get(tdsDatasetPath, () -> { + NetcdfDataset ncd = acquireNetcdfDataset(httpServletRequest, httpServletResponse, tdsDatasetPath); + if (ncd.getLocation() == null) { + ncd.close(); + throw new EdalLayerNotFoundException("The requested dataset is not available on this server"); + } + + try { + ThreddsWmsCatalogue threddsWmsCatalogue = new ThreddsWmsCatalogue(ncd, tdsDatasetPath); + return new CachedWmsCatalogue(threddsWmsCatalogue, ncd.getLastModified()); + } catch (EdalException e) { + ncd.close(); + throw e; + } + }); + + return catalogue.wmsCatalogue; + } catch (ExecutionException e) { + throw new IOException(e); + } catch (UncheckedExecutionException e) { + if (e.getCause() instanceof EdalException) { + throw new EdalException("", e.getCause()); + } else { + throw e; + } } + } + private static void invalidateIfOutdated(String tdsDatasetPath) { final CachedWmsCatalogue cachedWmsCatalogue = catalogueCache.getIfPresent(tdsDatasetPath); - final long lastModified = ncd.getLastModified(); - if (cachedWmsCatalogue != null && cachedWmsCatalogue.lastModified == lastModified) { - // Must update NetcdfDataset to ensure file resources are reacquired, as this has been closed. - // But we don't need to recreate the ThreddsWmsCatalogue as it is up-to-date according to the last modified - cachedWmsCatalogue.wmsCatalogue.setNetcdfDataset(ncd); - return cachedWmsCatalogue.wmsCatalogue; - } else { - // Create and put/ replace in cache - ThreddsWmsCatalogue threddsWmsCatalogue = new ThreddsWmsCatalogue(ncd, tdsDatasetPath); - catalogueCache.put(tdsDatasetPath, new CachedWmsCatalogue(threddsWmsCatalogue, lastModified)); - cacheLoads++; - return threddsWmsCatalogue; + if (cachedWmsCatalogue != null + && cachedWmsCatalogue.lastModified != cachedWmsCatalogue.wmsCatalogue.getLastModified()) { + catalogueCache.invalidate(tdsDatasetPath); } } @@ -152,7 +185,6 @@ public static void showCache(Formatter formatter) { public static void resetCache() { catalogueCache.invalidateAll(); - cacheLoads = 0; } // package private for testing @@ -164,7 +196,7 @@ static long getNumberOfEntries() { return catalogueCache.size(); } - static int getCacheLoads() { - return cacheLoads; + static long getCacheLoads() { + return catalogueCache.stats().loadCount(); } } diff --git a/tds/src/test/java/thredds/server/wms/TestWmsCache.java b/tds/src/test/java/thredds/server/wms/TestWmsCache.java index 259c7b7352..715ce260d9 100644 --- a/tds/src/test/java/thredds/server/wms/TestWmsCache.java +++ b/tds/src/test/java/thredds/server/wms/TestWmsCache.java @@ -11,7 +11,8 @@ import java.nio.file.StandardCopyOption; import java.util.List; import javax.servlet.ServletException; - +import javax.servlet.http.HttpServletResponse; +import org.joda.time.DateTime; import org.junit.*; import org.junit.experimental.categories.Category; import org.junit.rules.TemporaryFolder; @@ -26,6 +27,7 @@ import java.lang.invoke.MethodHandles; import ucar.nc2.dataset.NetcdfDatasets; import ucar.nc2.util.cache.FileCacheIF; +import ucar.unidata.io.RandomAccessFile; import ucar.unidata.util.test.category.NeedsCdmUnitTest; @RunWith(SpringJUnit4ClassRunner.class) @@ -48,6 +50,24 @@ public class TestWmsCache { @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(new File(DIR)); + // @BeforeClass happens before TdsInit so we need @Before + @Before + public void disableRafCache() { + // Avoid file locks which prevent files from being updated on windows + final FileCacheIF rafCache = RandomAccessFile.getGlobalFileCache(); + if (rafCache != null) { + rafCache.disable(); + } + } + + @AfterClass + public static void enableRafCache() { + final FileCacheIF rafCache = RandomAccessFile.getGlobalFileCache(); + if (rafCache != null) { + rafCache.enable(); + } + } + @Before public void createTestFiles() throws IOException { File tempFile = temporaryFolder.newFile(FILENAME); @@ -59,6 +79,8 @@ public void createTestFiles() throws IOException { @After public void clearCache() { ThreddsWmsServlet.resetCache(); + assertThat(ThreddsWmsServlet.getNumberOfEntries()).isEqualTo(0); + assertNoneLockedInNetcdfFileCache(); } @Test @@ -115,11 +137,12 @@ public void shouldNotUseOutdatedAggregation() throws IOException, ServletExcepti } @Test - public void shouldNotLockFileInCache() throws IOException, ServletException { + public void shouldNotLockFileInNetcdfFileCacheAfterCacheReset() throws IOException, ServletException { final String filename = "testGridAsPoint.nc"; final String testPath = "localContent/" + filename; getCapabilities(testPath); assertThat(ThreddsWmsServlet.containsCachedCatalogue(testPath)).isTrue(); + ThreddsWmsServlet.resetCache(); // check file is not locked in netcdf file cache final FileCacheIF cache = NetcdfDatasets.getNetcdfFileCache(); @@ -131,38 +154,61 @@ public void shouldNotLockFileInCache() throws IOException, ServletException { @Test @Category(NeedsCdmUnitTest.class) - public void shouldNotLockAggregationInCache() throws IOException, ServletException { + public void shouldNotLockAggregationInNetcdfFileCacheAfterCacheReset() throws IOException, ServletException { final String testPath = "ExampleNcML/Agg.nc"; getCapabilities(testPath); assertThat(ThreddsWmsServlet.containsCachedCatalogue(testPath)).isTrue(); + ThreddsWmsServlet.resetCache(); - // check aggregation is not locked in netcdf file cache + assertNotLockedInNetcdfFileCache(testPath); + } + + @Test + public void shouldNotLockFileInCacheAfterExceptionIsThrown() throws ServletException, IOException { + final String filename = "1day.nc"; + final String testPath = "localContent/" + filename; + getCapabilities(testPath, HttpServletResponse.SC_BAD_REQUEST); + assertThat(ThreddsWmsServlet.containsCachedCatalogue(testPath)).isFalse(); + + assertNotLockedInNetcdfFileCache(filename); + } + + private void assertNoneLockedInNetcdfFileCache() { + assertNotLockedInNetcdfFileCache(""); + } + + private void assertNotLockedInNetcdfFileCache(String path) { final FileCacheIF cache = NetcdfDatasets.getNetcdfFileCache(); final List entries = cache.showCache(); assertThat(entries.size()).isGreaterThan(0); - final boolean isLocked = entries.stream().filter(e -> e.contains(testPath)).anyMatch(e -> e.startsWith("true")); + final boolean isLocked = entries.stream().filter(e -> e.contains(path)).anyMatch(e -> e.startsWith("true")); assertWithMessage(cache.showCache().toString()).that(isLocked).isFalse(); } - private void updateTestFile() throws IOException { - Files.copy(TEST_FILE, TEMP_FILE, StandardCopyOption.REPLACE_EXISTING); + private void updateTestFile() { + final File testFile = new File(TEMP_FILE.toUri()); + assertThat(testFile.setLastModified(DateTime.now().getMillis())).isTrue(); } private void assertUsedCache(String path) throws ServletException, IOException { - int loads = ThreddsWmsServlet.getCacheLoads(); + long loads = ThreddsWmsServlet.getCacheLoads(); getCapabilities(path); assertThat(ThreddsWmsServlet.containsCachedCatalogue(path)).isTrue(); assertThat(ThreddsWmsServlet.getCacheLoads()).isEqualTo(loads); } private void assertAddedToCache(String path) throws ServletException, IOException { - int loads = ThreddsWmsServlet.getCacheLoads(); + long loads = ThreddsWmsServlet.getCacheLoads(); getCapabilities(path); assertThat(ThreddsWmsServlet.containsCachedCatalogue(path)).isTrue(); assertThat(ThreddsWmsServlet.getCacheLoads()).isEqualTo(loads + 1); } private void getCapabilities(String path) throws ServletException, IOException { + getCapabilities(path, HttpServletResponse.SC_OK); + } + + private void getCapabilities(String path, int expectedResponseCode) throws ServletException, IOException { final String uri = "/thredds/wms/" + path; final MockHttpServletRequest request = new MockHttpServletRequest("GET", uri); request.setParameter("service", "WMS"); @@ -172,6 +218,6 @@ private void getCapabilities(String path) throws ServletException, IOException { final MockHttpServletResponse response = new MockHttpServletResponse(); threddsWmsServlet.service(request, response); - assertThat(response.getStatus()).isEqualTo(MockHttpServletResponse.SC_OK); + assertThat(response.getStatus()).isEqualTo(expectedResponseCode); } } From 22791fcbde6163c1161395fbd2ef551c1ae6d623 Mon Sep 17 00:00:00 2001 From: haileyajohnson Date: Thu, 29 Feb 2024 15:19:09 -0800 Subject: [PATCH 080/120] add sample setenv.bat for tomcat on windows to docs (#471) --- .../tds_tutorial/getting_started/setenv.bat | 25 +++++++++++++++++++ .../getting_started/RunningTomcat.md | 1 + 2 files changed, 26 insertions(+) create mode 100644 docs/userguide/src/site/files/tds_tutorial/getting_started/setenv.bat diff --git a/docs/userguide/src/site/files/tds_tutorial/getting_started/setenv.bat b/docs/userguide/src/site/files/tds_tutorial/getting_started/setenv.bat new file mode 100644 index 0000000000..bdcf7d0b92 --- /dev/null +++ b/docs/userguide/src/site/files/tds_tutorial/getting_started/setenv.bat @@ -0,0 +1,25 @@ +@echo off +rem ENVARS for Tomcat +set CATALINA_HOME=\usr\local\tomcat +set CATALINA_BASE=\usr\local\tomcat +set JAVA_HOME=\usr\local\java + +rem TDS specific ENVARS +rem Define where the TDS content directory will live +rem THIS IS CRITICAL and there is NO DEFAULT - the TDS will not start without this. +set CONTENT_ROOT=data\content +set CONTENT_ROOT_PATH=-Dtds.content.root.path="%CONTENT_ROOT%" + +rem Set java prefs related variables (used by the wms service, for example) +set JAVA_PREFS_ROOTS=-Djava.util.prefs.systemRoot="%CONTENT_ROOT%\thredds\javaUtilPrefs" -Djava.util.prefs.userRoot="%CONTENT_ROOT%\thredds\javaUtilPrefs" + +rem Some commonly used JAVA_OPTS settings: +set NORMAL=-Xmx4096m -Xms512m +set HEAP_DUMP=-XX:+HeapDumpOnOutOfMemoryError +set HEADLESS=-Djava.awt.headless=true + +rem Standard setup. +set JAVA_OPTS=%CONTENT_ROOT_PATH% %JAVA_PREFS_ROOTS% %NORMAL% %HEAP_DUMP% %HEADLESS% + +rem Uncomment the following line if you want to display the JAVA_OPTS +rem echo %JAVA_OPTS% \ No newline at end of file diff --git a/docs/userguide/src/site/pages/tds_tutorial/getting_started/RunningTomcat.md b/docs/userguide/src/site/pages/tds_tutorial/getting_started/RunningTomcat.md index 91813af5b2..ef20909d1e 100644 --- a/docs/userguide/src/site/pages/tds_tutorial/getting_started/RunningTomcat.md +++ b/docs/userguide/src/site/pages/tds_tutorial/getting_started/RunningTomcat.md @@ -85,6 +85,7 @@ If it finds `setenv.sh`, it will apply the custom environment and JVM configurat {%include note.html content=" If you're running Tomcat on an instance of Windows OS, you will want to create a `setenv.bat` file. " %} +Download an {% include link_file.html file="tds_tutorial/getting_started/setenv.bat" text="example" %} here. 1. Create the `setenv.sh` file. From ae75b1281decc525b9cd05439a7318d89c3553eb Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 5 Mar 2024 10:47:44 -0700 Subject: [PATCH 081/120] Improve logging (#472) * Make sure edal-java style loading code logs errors * Add extra info to log --- tds/src/main/java/thredds/server/config/TdsConfigMapper.java | 2 ++ tds/src/main/webapp/WEB-INF/classes/log4j2.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tds/src/main/java/thredds/server/config/TdsConfigMapper.java b/tds/src/main/java/thredds/server/config/TdsConfigMapper.java index cb1e3a640b..ceeebe1141 100644 --- a/tds/src/main/java/thredds/server/config/TdsConfigMapper.java +++ b/tds/src/main/java/thredds/server/config/TdsConfigMapper.java @@ -212,6 +212,7 @@ static void load(WmsConfigBean wmsConfig, TdsContext tdsContext) { getValueFromThreddsConfigOrDefault(WMS_PALETTE_LOCATION_DIR, defaultPaletteLocation); wmsConfig.setPaletteLocationDir(paletteLocation); try { + startupLog.info("Loading custom WMS palette files from " + paletteLocation); ColourPalette.addPaletteDirectory(new File(paletteLocation)); } catch (FileNotFoundException e) { // If there is an error adding a custom palette, it is logged in the server startup log by edal-java. @@ -226,6 +227,7 @@ static void load(WmsConfigBean wmsConfig, TdsContext tdsContext) { final String stylesLocation = getValueFromThreddsConfigOrDefault(WMS_STYLES_LOCATION_DIR, defaultStylesLocation); wmsConfig.setStylesLocationDir(stylesLocation); try { + startupLog.info("Loading custom WMS style files from " + stylesLocation); SldTemplateStyleCatalogue.getStyleCatalogue().addStylesInDirectory(new File(stylesLocation)); } catch (FileNotFoundException e) { if (!stylesLocation.equals(defaultStylesLocation)) { diff --git a/tds/src/main/webapp/WEB-INF/classes/log4j2.xml b/tds/src/main/webapp/WEB-INF/classes/log4j2.xml index 2a0594caa7..1c3853d9f9 100644 --- a/tds/src/main/webapp/WEB-INF/classes/log4j2.xml +++ b/tds/src/main/webapp/WEB-INF/classes/log4j2.xml @@ -176,8 +176,8 @@ - - + + From f87d839fa1abb9eba53b988aec0749c21535072a Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 7 Mar 2024 14:57:32 -0700 Subject: [PATCH 082/120] Add test for bug that missing variable in one grib partition caused NaNs for all times after (#473) --- .../server/ncss/NcssGridIntegrationTest.java | 27 +++++++++++++++++++ tds/src/test/content/thredds/catalogGrib.xml | 15 +++++++++++ 2 files changed, 42 insertions(+) diff --git a/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java b/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java index a9781efe9f..41b4fe54ad 100644 --- a/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java +++ b/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java @@ -21,8 +21,10 @@ import ucar.httpservices.HTTPMethod; import ucar.httpservices.HTTPSession; import ucar.ma2.Array; +import ucar.ma2.InvalidRangeException; import ucar.nc2.NetcdfFile; import ucar.nc2.NetcdfFiles; +import ucar.nc2.Variable; import ucar.nc2.dataset.NetcdfDataset; import ucar.nc2.dataset.NetcdfDatasets; import ucar.nc2.dt.grid.GeoGrid; @@ -172,4 +174,29 @@ private void checkFileType(String acceptParameter, int expectedResponseCode, Str } } } + + @Test + public void shouldNotReturnNaNsForBestGribCollectionVariable() throws IOException, InvalidRangeException { + // precip variable not present in 2024-03-01T19:00:00Z partition + final String varName = "Total_precipitation_Forecast_altitude_above_msl_1_Hour_Accumulation"; + final String timeBeforeMissing = "2024-03-01T18:00:00Z"; + final String timeAfterMissing = "2024-03-01T21:00:00Z"; + + final String endpoint = TestOnLocalServer.withHttpPath("/ncss/grid/grib/NCEP/RTMA/CONUS_2p5km/Best" + "?var=" + + varName + "&north=40&west=-70&east=-69&south=39&horizStride=1&accept=netcdf3" + "&time_start=" + + timeBeforeMissing + "&time_end=" + timeAfterMissing); + + final byte[] content = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.netcdf); + + try (NetcdfFile ncf = NetcdfFiles.openInMemory("test_data.nc", content)) { + final Variable var = ncf.findVariable(varName); + assertThat((Object) var).isNotNull(); + // first element for all times + final Array array = var.read(":,0:0,0:0,0:0"); + assertThat(array.getSize()).isEqualTo(3); + assertThat(array.getFloat(0)).isNotNaN(); + assertThat(array.getFloat(1)).isNotNaN(); + assertThat(array.getFloat(2)).isNotNaN(); + } + } } diff --git a/tds/src/test/content/thredds/catalogGrib.xml b/tds/src/test/content/thredds/catalogGrib.xml index 4b63d5cd8c..ef9fe76d79 100644 --- a/tds/src/test/content/thredds/catalogGrib.xml +++ b/tds/src/test/content/thredds/catalogGrib.xml @@ -91,4 +91,19 @@ + + + + + + + true + + + From 8b426b9ccaab74ff9200dce25072c89e5fff7ee0 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 8 Mar 2024 15:57:26 -0700 Subject: [PATCH 083/120] Fix documentation about how to disable the scour in an AggregationCache to use a unit so it will be parsed (#474) --- docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md b/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md index 5544c8f1db..e8d2c4282b 100644 --- a/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md +++ b/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md @@ -443,7 +443,7 @@ If not otherwise set, the TDS will use the `${tds.content.root.path}/thredds/cac We recommend that you use this default, by not specifying a `AggregationCache`.`dir` element. Every `scour` amount of time, any item that hasn't been changed since `maxAge` time will be deleted. -If you have aggregations that never change, set `scour` to `-1` to disable the operation. +If you have aggregations that never change, set `scour` to `-1 sec` to disable the operation. Otherwise, make `maxAge` longer than the longest time between changes. Basically, you don't want to remove active aggregations. From f85e92fae6ca3025f4149aea952e34f6ea1e45f9 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 13 Mar 2024 12:35:56 -0600 Subject: [PATCH 084/120] Ensure location is not null so aggregation cache is used (#475) --- tds/src/main/java/thredds/core/DatasetManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tds/src/main/java/thredds/core/DatasetManager.java b/tds/src/main/java/thredds/core/DatasetManager.java index a22d2c160b..aaaeca3911 100644 --- a/tds/src/main/java/thredds/core/DatasetManager.java +++ b/tds/src/main/java/thredds/core/DatasetManager.java @@ -399,7 +399,8 @@ public CoverageCollection openCoverageDataset(HttpServletRequest req, HttpServle // since the urlPath doesn't need to point to a file if there is ncml String ncml = datasetTracker.findNcml(reqPath); if (ncml != null) { - Optional opt = CoverageDatasetFactory.openNcmlString(ncml); + Optional opt = + CoverageDatasetFactory.openNcmlString(ncml, DatasetUrl.findDatasetUrl(reqPath).getTrueurl()); if (!opt.isPresent()) throw new FileNotFoundException("NcML is not a Grid Dataset " + reqPath + " err=" + opt.getErrorMessage()); From 38a765b00dcdf120a429ff0ee3528dd2eed5b68d Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 14 Mar 2024 10:32:33 -0600 Subject: [PATCH 085/120] Bump spring version (#476) --- tds-platform/build.gradle | 2 +- tds-testing-platform/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle index 8ce1d1de57..4327f20530 100644 --- a/tds-platform/build.gradle +++ b/tds-platform/build.gradle @@ -14,7 +14,7 @@ dependencies { // If there is a conflict (previously hidden by optimistic resolution), we should get an error when we build, and // at that point we can take things on a case-by-case basis. api enforcedPlatform("edu.ucar:netcdf-java-bom:${depVersion.netcdfJava}") - api enforcedPlatform('org.springframework:spring-framework-bom:5.3.27') + api enforcedPlatform('org.springframework:spring-framework-bom:5.3.32') api enforcedPlatform('org.springframework.security:spring-security-bom:5.7.11') api platform('net.openhft:chronicle-bom:2.23.136') api enforcedPlatform("org.apache.logging.log4j:log4j-bom:2.17.1") diff --git a/tds-testing-platform/build.gradle b/tds-testing-platform/build.gradle index f4e705e120..fefd54b9e5 100644 --- a/tds-testing-platform/build.gradle +++ b/tds-testing-platform/build.gradle @@ -18,7 +18,7 @@ dependencies { // Spring-test v5.3.4 introduced a hard dependency on servlet api v4. // That will be rolled back in v5.4.5, so for now, we specifically ask for // spring-test 5.3.3. - api 'org.springframework:spring-test:5.3.27' + api 'org.springframework:spring-test:5.3.32' // dap4 // defined in tds-platform as well, but using runtime config From b11b463b090c36e37efaf205827ad946be2ade02 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 20 Mar 2024 09:33:00 -0600 Subject: [PATCH 086/120] Do not wrap EdalException with another EdalException (#478) --- tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java b/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java index e30ac566ff..057b6c6e4d 100644 --- a/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java +++ b/tds/src/main/java/thredds/server/wms/ThreddsWmsServlet.java @@ -146,7 +146,7 @@ private ThreddsWmsCatalogue acquireCatalogue(HttpServletRequest httpServletReque throw new IOException(e); } catch (UncheckedExecutionException e) { if (e.getCause() instanceof EdalException) { - throw new EdalException("", e.getCause()); + throw (EdalException) e.getCause(); } else { throw e; } From 1f78cd3210780d85b8cdd1262cc638853db8d393 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 20 Mar 2024 09:58:00 -0600 Subject: [PATCH 087/120] Suppress CVE that does not affect us (#479) --- .../dependency-check-suppression.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/project-files/owasp-dependency-check/dependency-check-suppression.xml b/project-files/owasp-dependency-check/dependency-check-suppression.xml index 08eba890ff..8ff8f873b3 100644 --- a/project-files/owasp-dependency-check/dependency-check-suppression.xml +++ b/project-files/owasp-dependency-check/dependency-check-suppression.xml @@ -146,4 +146,12 @@ ^pkg:maven/org\.quartz\-scheduler/quartz@.*$ CVE-2023-39017 + + + ^pkg:maven/org\.springframework\.security/spring\-security\-core@.*$ + CVE-2024-22257 + From 4f45a07cc3b150fe127004a07e6a9f1a7cc259f1 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 20 Mar 2024 10:52:25 -0600 Subject: [PATCH 088/120] Update spring security (#480) * Revert "Suppress CVE that does not affect us (#479)" This reverts commit 1f78cd3210780d85b8cdd1262cc638853db8d393. * Bump spring security version --- .../dependency-check-suppression.xml | 8 -------- tds-platform/build.gradle | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/project-files/owasp-dependency-check/dependency-check-suppression.xml b/project-files/owasp-dependency-check/dependency-check-suppression.xml index 8ff8f873b3..08eba890ff 100644 --- a/project-files/owasp-dependency-check/dependency-check-suppression.xml +++ b/project-files/owasp-dependency-check/dependency-check-suppression.xml @@ -146,12 +146,4 @@ ^pkg:maven/org\.quartz\-scheduler/quartz@.*$ CVE-2023-39017 - - - ^pkg:maven/org\.springframework\.security/spring\-security\-core@.*$ - CVE-2024-22257 - diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle index 4327f20530..6adf05542b 100644 --- a/tds-platform/build.gradle +++ b/tds-platform/build.gradle @@ -15,7 +15,7 @@ dependencies { // at that point we can take things on a case-by-case basis. api enforcedPlatform("edu.ucar:netcdf-java-bom:${depVersion.netcdfJava}") api enforcedPlatform('org.springframework:spring-framework-bom:5.3.32') - api enforcedPlatform('org.springframework.security:spring-security-bom:5.7.11') + api enforcedPlatform('org.springframework.security:spring-security-bom:5.7.12') api platform('net.openhft:chronicle-bom:2.23.136') api enforcedPlatform("org.apache.logging.log4j:log4j-bom:2.17.1") api enforcedPlatform("jakarta.platform:jakarta.jakartaee-bom:8.0.0") From 584b48dc2eef57903869c9215f6eacac43d7e097 Mon Sep 17 00:00:00 2001 From: Hailey Johnson Date: Thu, 28 Mar 2024 12:39:46 -0700 Subject: [PATCH 089/120] fix instructions for using your own logo --- docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md b/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md index e8d2c4282b..d1ecf776b3 100644 --- a/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md +++ b/docs/userguide/src/site/pages/thredds/ThreddsConfigRef.md @@ -61,7 +61,7 @@ logos of the server and host institution) * all generated THREDDS catalogs that don't override this information -The best way to use your own logo is to put it in the `${tds.content.root.path}/thredds/public/` directory, and specify it in `serverInformation` as `/thredds/`, e.g.: +The best way to use your own logo is to put it in the `${tomcat path}/webapps/thredds/` directory, and specify it in `serverInformation` as `/thredds/`, e.g.: ~~~xml /thredds/yourIcon.gif From 0f799c5ceecd9f85d422b437b8da5254567d05e1 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 5 Apr 2024 12:29:19 -0600 Subject: [PATCH 090/120] Test cleanup (#489) * Replace references to remotetest Replace references to remotetest with references to localhost test server * Replace remotetest server constant with TestOnLocalServer constant * Spotless formatting * Remove references to TdsTestDir --- .../java/thredds/test/util/TdsTestDir.java | 15 --------------- .../thredds/test/util/TdsUnitTestCommon.java | 4 ---- .../java/opendap/test/TestGrid1.java | 6 +++--- .../java/opendap/test/TestGrid2.java | 5 ++--- .../opendap/test/TestNcmlWithOpendap.java | 5 ++--- .../cdmr/TestCdmRemoteCompareHeadersP.java | 1 - .../thredds/server/fileserver/TestHTTP.java | 4 ++-- .../thredds/server/ncss/TestGridAsPointP.java | 1 - .../server/services/ConsistentDatesTest.java | 1 - .../thredds/server/wcs/TestWcsServer.java | 1 - .../java/ucar/nc2/dt/fmrc/TestUgridFmrc.java | 19 +++++++++---------- .../ucar/nc2/util/net/TestFormBuilder.java | 4 ++-- .../java/ucar/nc2/util/net/TestMisc.java | 12 ++++++------ .../ucar/nc2/util/net/TestTomcatAuth.java | 8 ++++---- .../grid/AllVariablesSubsettingTest.java | 1 - .../grid/FmrcHorizSubsettingTest.java | 1 - .../grid/SpatialSubsettingTest.java | 1 - .../grid/TemporalSpaceSubsettingTest.java | 1 - .../grid/VariableSpaceSubsettingTest.java | 1 - .../grid/VerticalStrideSubsettingTest.java | 1 - .../server/opendap/TestCEEvaluator.java | 1 - 21 files changed, 30 insertions(+), 63 deletions(-) delete mode 100644 tds-test-utils/src/main/java/thredds/test/util/TdsTestDir.java diff --git a/tds-test-utils/src/main/java/thredds/test/util/TdsTestDir.java b/tds-test-utils/src/main/java/thredds/test/util/TdsTestDir.java deleted file mode 100644 index dd154c508e..0000000000 --- a/tds-test-utils/src/main/java/thredds/test/util/TdsTestDir.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) 2021 University Corporation for Atmospheric Research/Unidata - * See LICENSE for license information. - */ - -package thredds.test.util; - -public class TdsTestDir { - - // Remote Test server(s) - public static String remoteTestServer = "localhost:8081"; - - public static String dap4TestServerPropName = "d4ts"; - public static String dap4TestServer = "localhost:8083"; -} diff --git a/tds-test-utils/src/main/java/thredds/test/util/TdsUnitTestCommon.java b/tds-test-utils/src/main/java/thredds/test/util/TdsUnitTestCommon.java index 56df6f0a92..fb8a6323ad 100644 --- a/tds-test-utils/src/main/java/thredds/test/util/TdsUnitTestCommon.java +++ b/tds-test-utils/src/main/java/thredds/test/util/TdsUnitTestCommon.java @@ -44,15 +44,11 @@ public abstract class TdsUnitTestCommon { static final Set ENHANCEMENT = EnumSet.of(NetcdfDataset.Enhance.CoordSystems); protected static String threddsroot = null; - protected static String threddsServer = null; static { // Compute the root path threddsroot = locateThreddsRoot(); assert threddsroot != null : "Cannot locate /thredds parent dir"; - threddsServer = TdsTestDir.remoteTestServer; - if (DEBUG) - System.err.println("TdsUnitTestCommon: threddsServer=" + threddsServer); } ////////////////////////////////////////////////// diff --git a/tds/src/integrationTests/java/opendap/test/TestGrid1.java b/tds/src/integrationTests/java/opendap/test/TestGrid1.java index 5996a16b00..4ba2d00133 100644 --- a/tds/src/integrationTests/java/opendap/test/TestGrid1.java +++ b/tds/src/integrationTests/java/opendap/test/TestGrid1.java @@ -10,10 +10,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import thredds.test.util.TdsUnitTestCommon; +import thredds.test.util.TestOnLocalServer; import ucar.nc2.NetcdfFiles; import ucar.nc2.dataset.NetcdfDataset; import ucar.nc2.dataset.NetcdfDatasets; -import ucar.unidata.util.test.TestDir; import java.lang.invoke.MethodHandles; @@ -36,7 +36,7 @@ public class TestGrid1 extends TdsUnitTestCommon { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - static final protected String URLPATH = "/thredds/dodsC/scanLocal/testgrid1.nc"; + static final protected String URLPATH = "dodsC/scanLocal/testgrid1.nc"; public TestGrid1() { setTitle("Simple DAP Grid"); @@ -46,7 +46,7 @@ public TestGrid1() { @Test public void testGrid1() throws Exception { System.out.println("TestGrid1:"); - String url = "dods://" + TestDir.remoteTestServer + URLPATH; + String url = "dods://" + TestOnLocalServer.server + URLPATH; boolean pass = true; NetcdfDataset ncfile = null; diff --git a/tds/src/integrationTests/java/opendap/test/TestGrid2.java b/tds/src/integrationTests/java/opendap/test/TestGrid2.java index 4c3eecfe01..30b16cc050 100644 --- a/tds/src/integrationTests/java/opendap/test/TestGrid2.java +++ b/tds/src/integrationTests/java/opendap/test/TestGrid2.java @@ -14,7 +14,6 @@ import ucar.nc2.dataset.NetcdfDataset; import ucar.nc2.dataset.NetcdfDatasets; import ucar.nc2.write.Ncdump; -import ucar.unidata.util.test.TestDir; import java.io.IOException; import java.io.StringWriter; @@ -38,7 +37,7 @@ public class TestGrid2 extends TdsUnitTestCommon { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - static final protected String URLPATH = "/thredds/dodsC/scanLocal/testgrid2.nc"; + static final protected String URLPATH = "dodsC/scanLocal/testgrid2.nc"; public TestGrid2() { setTitle("DAP Grid with repeated dimension"); @@ -48,7 +47,7 @@ public TestGrid2() { @Test public void testGrid2() throws Exception { System.out.println("TestGrid2:"); - String url = "dods://" + TestDir.remoteTestServer + URLPATH; + String url = "dods://" + TestOnLocalServer.server + URLPATH; boolean pass = true; try (NetcdfDataset ncfile = NetcdfDatasets.openDataset(url)) { System.out.println("url: " + url); diff --git a/tds/src/integrationTests/java/opendap/test/TestNcmlWithOpendap.java b/tds/src/integrationTests/java/opendap/test/TestNcmlWithOpendap.java index ccdae3fd53..e6d2742b09 100644 --- a/tds/src/integrationTests/java/opendap/test/TestNcmlWithOpendap.java +++ b/tds/src/integrationTests/java/opendap/test/TestNcmlWithOpendap.java @@ -14,15 +14,14 @@ import ucar.nc2.NetcdfFile; import ucar.nc2.Variable; import ucar.nc2.dataset.NetcdfDatasets; -import ucar.unidata.util.test.TestDir; public class TestNcmlWithOpendap { private static final double[] expectedValues = new double[] {Double.NaN, 1, 2, 3}; @Test public void shouldUseNcmlToModifyDatasetScanValues() throws IOException { - final String path = "/thredds/dodsC/EnhancedDatasetScan/testgrid1.nc"; - final String url = "dods://" + TestDir.remoteTestServer + path; + final String path = "dodsC/EnhancedDatasetScan/testgrid1.nc"; + final String url = "dods://" + TestOnLocalServer.server + path; try (NetcdfFile ncFile = NetcdfDatasets.openDataset(url)) { final Variable var = ncFile.findVariable("enhancedVar"); assertThat((Object) var).isNotNull(); diff --git a/tds/src/integrationTests/java/thredds/server/cdmr/TestCdmRemoteCompareHeadersP.java b/tds/src/integrationTests/java/thredds/server/cdmr/TestCdmRemoteCompareHeadersP.java index f0d90dd9a4..cdca52f01b 100644 --- a/tds/src/integrationTests/java/thredds/server/cdmr/TestCdmRemoteCompareHeadersP.java +++ b/tds/src/integrationTests/java/thredds/server/cdmr/TestCdmRemoteCompareHeadersP.java @@ -14,7 +14,6 @@ import org.junit.runners.Parameterized; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import thredds.test.util.TdsTestDir; import thredds.test.util.TestOnLocalServer; import ucar.nc2.Attribute; import ucar.nc2.NetcdfFile; diff --git a/tds/src/integrationTests/java/thredds/server/fileserver/TestHTTP.java b/tds/src/integrationTests/java/thredds/server/fileserver/TestHTTP.java index b66c4eace8..1b9612db3d 100644 --- a/tds/src/integrationTests/java/thredds/server/fileserver/TestHTTP.java +++ b/tds/src/integrationTests/java/thredds/server/fileserver/TestHTTP.java @@ -10,6 +10,7 @@ import thredds.client.catalog.Dataset; import thredds.client.catalog.ServiceType; import thredds.client.catalog.tools.DataFactory; +import thredds.test.util.TestOnLocalServer; import ucar.ma2.Array; import ucar.ma2.Index; import ucar.nc2.Attribute; @@ -20,7 +21,6 @@ import ucar.nc2.dataset.NetcdfDataset; import ucar.nc2.dataset.NetcdfDatasets; import ucar.unidata.util.test.Assert2; -import ucar.unidata.util.test.TestDir; import java.io.IOException; import java.lang.invoke.MethodHandles; import java.util.Formatter; @@ -29,7 +29,7 @@ public class TestHTTP { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - String url = "http://" + TestDir.remoteTestServer + "/thredds/fileServer/scanLocal/mydata1.nc"; + String url = "http://" + TestOnLocalServer.server + "fileServer/scanLocal/mydata1.nc"; @Test public void testOpenNetcdfFile() throws IOException { diff --git a/tds/src/integrationTests/java/thredds/server/ncss/TestGridAsPointP.java b/tds/src/integrationTests/java/thredds/server/ncss/TestGridAsPointP.java index cdd177d09f..e4646db78c 100644 --- a/tds/src/integrationTests/java/thredds/server/ncss/TestGridAsPointP.java +++ b/tds/src/integrationTests/java/thredds/server/ncss/TestGridAsPointP.java @@ -22,7 +22,6 @@ import org.junit.runners.Parameterized; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import thredds.test.util.TdsTestDir; import thredds.test.util.TestOnLocalServer; import thredds.util.ContentType; import ucar.httpservices.HTTPFactory; diff --git a/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java b/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java index c2d7110ed3..24e4ec7624 100644 --- a/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java +++ b/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java @@ -24,7 +24,6 @@ import org.junit.rules.TemporaryFolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import thredds.test.util.TdsTestDir; import thredds.test.util.TestOnLocalServer; import thredds.util.ContentType; import ucar.nc2.Attribute; diff --git a/tds/src/integrationTests/java/thredds/server/wcs/TestWcsServer.java b/tds/src/integrationTests/java/thredds/server/wcs/TestWcsServer.java index 3ec60b61b4..6152dcf9f5 100644 --- a/tds/src/integrationTests/java/thredds/server/wcs/TestWcsServer.java +++ b/tds/src/integrationTests/java/thredds/server/wcs/TestWcsServer.java @@ -20,7 +20,6 @@ import org.junit.rules.TemporaryFolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import thredds.test.util.TdsTestDir; import thredds.test.util.TestOnLocalServer; import thredds.util.ContentType; import ucar.nc2.NetcdfFile; diff --git a/tds/src/integrationTests/java/ucar/nc2/dt/fmrc/TestUgridFmrc.java b/tds/src/integrationTests/java/ucar/nc2/dt/fmrc/TestUgridFmrc.java index 65d9631b71..4ae69dfc9b 100644 --- a/tds/src/integrationTests/java/ucar/nc2/dt/fmrc/TestUgridFmrc.java +++ b/tds/src/integrationTests/java/ucar/nc2/dt/fmrc/TestUgridFmrc.java @@ -13,7 +13,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; -import thredds.test.util.TdsTestDir; +import thredds.test.util.TestOnLocalServer; import ucar.ma2.Array; import ucar.ma2.DataType; import ucar.ma2.InvalidRangeException; @@ -49,8 +49,8 @@ public static void openIndividualFiles() { @Test @Category(NeedsCdmUnitTest.class) public void test2DFmrc() throws IOException, InvalidRangeException { - final String urlPath2d = "/thredds/cdmremote/testUsfWsfUgridFmrc/USF_WSF_nc_fmrc.ncd"; - final String tdsLocation = "cdmremote:http://" + TdsTestDir.remoteTestServer + urlPath2d; + final String urlPath2d = "cdmremote/testUsfWsfUgridFmrc/USF_WSF_nc_fmrc.ncd"; + final String tdsLocation = "cdmremote:http://" + TestOnLocalServer.server + urlPath2d; String testVariableName = "salinity"; String singleRuntimeSection = ":,2,10:10000:100"; try (NetcdfFile fmrc2d = NetcdfDatasets.openFile(tdsLocation, null)) { @@ -80,8 +80,8 @@ public void test2DFmrc() throws IOException, InvalidRangeException { @Category(NeedsCdmUnitTest.class) public void testCFOFmrc() throws IOException, InvalidRangeException { // 8 hour offset into a collection of runs that output hourly - final String urlPathCfo = "/thredds/cdmremote/testUsfWsfUgridFmrc/offset/USF_WSF_nc_Offset_8.0hr"; - final String tdsLocation = "cdmremote:http://" + TdsTestDir.remoteTestServer + urlPathCfo; + final String urlPathCfo = "cdmremote/testUsfWsfUgridFmrc/offset/USF_WSF_nc_Offset_8.0hr"; + final String tdsLocation = "cdmremote:http://" + TestOnLocalServer.server + urlPathCfo; String testVariableName = "salinity"; String singleSpatialSection = "2,10:10000:100"; // index 8 => forecast hour 8 since index 0 is forecast hour 0 @@ -113,9 +113,8 @@ public void testCFOFmrc() throws IOException, InvalidRangeException { @Category(NeedsCdmUnitTest.class) public void testCFTFmrc() throws IOException, InvalidRangeException { // 8 hour offset into a collection of runs that output hourly - final String urlPathCft = - "/thredds/cdmremote/testUsfWsfUgridFmrc/forecast/USF_WSF_nc_ConstantForecast_2019-01-28T03:00:00Z"; - final String tdsLocation = "cdmremote:http://" + TdsTestDir.remoteTestServer + urlPathCft; + final String urlPathCft = "cdmremote/testUsfWsfUgridFmrc/forecast/USF_WSF_nc_ConstantForecast_2019-01-28T03:00:00Z"; + final String tdsLocation = "cdmremote:http://" + TestOnLocalServer.server + urlPathCft; String testVariableName = "salinity"; String singleSpatialSection = "2,10:10000:100"; // Forecast time 2019-01-28T03:00:00Z should be the 4th time index into the second granule of the collection @@ -141,8 +140,8 @@ public void testCFTFmrc() throws IOException, InvalidRangeException { @Category(NeedsCdmUnitTest.class) public void testFMRFmrc() throws IOException, InvalidRangeException { // the 2019-01-28T00:00:00Z Forecast Model Run should be the same as the second granule that makes up collection. - final String urlPathCft = "/thredds/cdmremote/testUsfWsfUgridFmrc/runs/USF_WSF_nc_RUN_2019-01-28T00:00:00Z"; - final String tdsLocation = "cdmremote:http://" + TdsTestDir.remoteTestServer + urlPathCft; + final String urlPathCft = "cdmremote/testUsfWsfUgridFmrc/runs/USF_WSF_nc_RUN_2019-01-28T00:00:00Z"; + final String tdsLocation = "cdmremote:http://" + TestOnLocalServer.server + urlPathCft; String testVariableName = "salinity"; String testSection = ":,2,10:10000:100"; try (NetcdfFile fmrcCfo = NetcdfDatasets.openFile(tdsLocation, null)) { diff --git a/tds/src/integrationTests/java/ucar/nc2/util/net/TestFormBuilder.java b/tds/src/integrationTests/java/ucar/nc2/util/net/TestFormBuilder.java index 7a71babe67..c4986e3f96 100644 --- a/tds/src/integrationTests/java/ucar/nc2/util/net/TestFormBuilder.java +++ b/tds/src/integrationTests/java/ucar/nc2/util/net/TestFormBuilder.java @@ -15,8 +15,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import thredds.test.util.TdsUnitTestCommon; +import thredds.test.util.TestOnLocalServer; import ucar.httpservices.*; -import ucar.unidata.util.test.TestDir; import java.io.*; import java.lang.invoke.MethodHandles; @@ -58,7 +58,7 @@ public class TestFormBuilder extends TdsUnitTestCommon { // This needs to be a real site in order to get // the request info - static final String NULLURL = "http://" + TestDir.remoteTestServer; + static final String NULLURL = "http://" + TestOnLocalServer.server; ////////////////////////////////////////////////// // Static Fields diff --git a/tds/src/integrationTests/java/ucar/nc2/util/net/TestMisc.java b/tds/src/integrationTests/java/ucar/nc2/util/net/TestMisc.java index 1ec7b1a76d..413505fbe8 100644 --- a/tds/src/integrationTests/java/ucar/nc2/util/net/TestMisc.java +++ b/tds/src/integrationTests/java/ucar/nc2/util/net/TestMisc.java @@ -12,13 +12,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import thredds.test.util.TdsUnitTestCommon; +import thredds.test.util.TestOnLocalServer; import ucar.httpservices.HTTPException; import ucar.httpservices.HTTPFactory; import ucar.httpservices.HTTPMethod; import ucar.httpservices.HTTPSession; import ucar.nc2.dataset.DatasetUrl; import ucar.nc2.util.EscapeStrings; -import ucar.unidata.util.test.TestDir; import java.lang.invoke.MethodHandles; import java.util.List; @@ -47,7 +47,7 @@ public TestMisc() { setTitle("HTTP Session tests"); } - static protected final String server = "http://" + TestDir.remoteTestServer; + static protected final String server = "http://" + TestOnLocalServer.server; static final String[] esinputs = {server + "/dts/test.01", server + "///xx/", server + "/<>^/`/",}; static final String[] esoutputs = {server + "/dts/test.01", server + "///xx/", server + "/%3c%3e%5e/%60/",}; @@ -72,7 +72,7 @@ public void testEscapeStrings() throws Exception { public void testUTF8Stream() throws Exception { pass = true; - String catalogName = "http://" + TestDir.remoteTestServer + "/thredds/catalog.xml"; + String catalogName = "http://" + TestOnLocalServer.server + "catalog.xml"; try (HTTPMethod m = HTTPFactory.Get(catalogName)) { int statusCode = m.execute(); @@ -109,7 +109,7 @@ public void testGetProtocols() { String tag = "TestMisc.testGetProtocols"; Assert.assertTrue(tag, protocheck("http://server/thredds/dodsC/", "http:")); Assert.assertTrue(tag, - protocheck("dods://" + TestDir.remoteTestServer + "/thredds/dodsC/grib/NCEP/NAM/CONUS_12km/best", "dods:")); + protocheck("dods://" + TestOnLocalServer.server + "dodsC/grib/NCEP/NAM/CONUS_12km/best", "dods:")); Assert.assertTrue(tag, protocheck("dap4://ucar.edu:8080/x/y/z", "dap4:")); Assert.assertTrue(tag, protocheck("dap4:https://ucar.edu:8080/x/y/z", "dap4:https:")); Assert.assertTrue(tag, protocheck("file:///x/y/z", "file:")); @@ -128,7 +128,7 @@ public void testGetProtocols() { @Test public void testByteRange() { - String file = "http://" + TestDir.remoteTestServer + "/thredds/fileServer/scanLocal/testData.nc"; + String file = "http://" + TestOnLocalServer.server + "fileServer/scanLocal/testData.nc"; try { try (HTTPMethod m = HTTPFactory.Get(file)) { m.setRange(0, 9); @@ -147,7 +147,7 @@ public void testByteRange() { * This test uses a single HTTPSession. */ - static String CLOSEFILE = "http://" + TestDir.remoteTestServer + "/thredds/fileServer/scanLocal/testData.nc"; + static String CLOSEFILE = "http://" + TestOnLocalServer.server + "fileServer/scanLocal/testData.nc"; // "http://rdavm.ucar.edu:8443/thredds/admin/collection/trigger?trigger=never&collection=ds083.2_Grib1"; @Test diff --git a/tds/src/integrationTests/java/ucar/nc2/util/net/TestTomcatAuth.java b/tds/src/integrationTests/java/ucar/nc2/util/net/TestTomcatAuth.java index 83ba220e9e..b45167ab4a 100644 --- a/tds/src/integrationTests/java/ucar/nc2/util/net/TestTomcatAuth.java +++ b/tds/src/integrationTests/java/ucar/nc2/util/net/TestTomcatAuth.java @@ -17,10 +17,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import thredds.test.util.TdsUnitTestCommon; +import thredds.test.util.TestOnLocalServer; import ucar.httpservices.HTTPFactory; import ucar.httpservices.HTTPMethod; import ucar.httpservices.HTTPSession; -import ucar.unidata.util.test.TestDir; import ucar.unidata.util.test.category.NotPullRequest; import java.io.IOException; @@ -148,7 +148,7 @@ public TestTomcatAuth() { setTitle("Authorization tests"); // HTTPSession.debugHeaders(true); HTTPSession.TESTING = true; - this.server = TestDir.remoteTestServer; + this.server = TestOnLocalServer.server; defineTestCases(); } @@ -214,8 +214,8 @@ public String inline() throws Exception { protected List basictests = new ArrayList<>(); protected void defineTestCases() { - basictests.add(new AuthDataBasic("http://" + this.server + "/thredds/dodsC/containerauth/testData2.nc.dds", "tds", - "secret666")); + basictests + .add(new AuthDataBasic("http://" + this.server + "dodsC/containerauth/testData2.nc.dds", "tds", "secret666")); } @Test diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/AllVariablesSubsettingTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/AllVariablesSubsettingTest.java index 01c51347e6..21e82ac4e0 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/AllVariablesSubsettingTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/AllVariablesSubsettingTest.java @@ -21,7 +21,6 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import thredds.test.util.TdsTestDir; import thredds.mock.params.GridPathParams; import thredds.mock.web.MockTdsContextLoader; import ucar.nc2.NetcdfFile; diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/FmrcHorizSubsettingTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/FmrcHorizSubsettingTest.java index 5cef6c2c4b..9037c8991b 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/FmrcHorizSubsettingTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/FmrcHorizSubsettingTest.java @@ -21,7 +21,6 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import thredds.test.util.TdsTestDir; import thredds.junit4.SpringJUnit4ParameterizedClassRunner; import thredds.mock.web.MockTdsContextLoader; import ucar.nc2.NetcdfFile; diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/SpatialSubsettingTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/SpatialSubsettingTest.java index e5ab46188d..aa7f576082 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/SpatialSubsettingTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/SpatialSubsettingTest.java @@ -23,7 +23,6 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import thredds.test.util.TdsTestDir; import thredds.junit4.SpringJUnit4ParameterizedClassRunner; import thredds.junit4.SpringJUnit4ParameterizedClassRunner.Parameters; import thredds.mock.params.GridDataParameters; diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/TemporalSpaceSubsettingTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/TemporalSpaceSubsettingTest.java index 8fc6d108f4..a5ad28bd30 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/TemporalSpaceSubsettingTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/TemporalSpaceSubsettingTest.java @@ -20,7 +20,6 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import thredds.test.util.TdsTestDir; import thredds.junit4.SpringJUnit4ParameterizedClassRunner; import thredds.junit4.SpringJUnit4ParameterizedClassRunner.Parameters; import thredds.mock.params.GridPathParams; diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/VariableSpaceSubsettingTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/VariableSpaceSubsettingTest.java index 413643b375..1a47f2f0d9 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/VariableSpaceSubsettingTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/VariableSpaceSubsettingTest.java @@ -22,7 +22,6 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import thredds.test.util.TdsTestDir; import thredds.junit4.SpringJUnit4ParameterizedClassRunner; import thredds.junit4.SpringJUnit4ParameterizedClassRunner.Parameters; import thredds.mock.params.GridDataParameters; diff --git a/tds/src/test/java/thredds/server/ncss/controller/grid/VerticalStrideSubsettingTest.java b/tds/src/test/java/thredds/server/ncss/controller/grid/VerticalStrideSubsettingTest.java index a33ac9e0c7..61a3ff4bfd 100644 --- a/tds/src/test/java/thredds/server/ncss/controller/grid/VerticalStrideSubsettingTest.java +++ b/tds/src/test/java/thredds/server/ncss/controller/grid/VerticalStrideSubsettingTest.java @@ -17,7 +17,6 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import thredds.test.util.TdsTestDir; import thredds.junit4.SpringJUnit4ParameterizedClassRunner.Parameters; import thredds.mock.params.GridDataParameters; import thredds.mock.params.GridPathParams; diff --git a/tds/src/test/java/thredds/server/opendap/TestCEEvaluator.java b/tds/src/test/java/thredds/server/opendap/TestCEEvaluator.java index ee9c2a75b9..df4ceb91a9 100644 --- a/tds/src/test/java/thredds/server/opendap/TestCEEvaluator.java +++ b/tds/src/test/java/thredds/server/opendap/TestCEEvaluator.java @@ -14,7 +14,6 @@ import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import thredds.test.util.TdsTestDir; import thredds.test.util.TdsUnitTestCommon; import ucar.nc2.NetcdfFile; import ucar.nc2.dataset.NetcdfDataset; From f80361401c6d74eb78427bea94c83424719470f9 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 10 Apr 2024 17:51:23 -0500 Subject: [PATCH 091/120] Gradle whitespace fixes (#491) --- dap4/d4servlet/build.gradle | 12 ++++---- dap4/d4ts/build.gradle | 26 ++++++++-------- gradle/root/publishing.gradle | 56 +++++++++++++++++------------------ opendap/dtswar/build.gradle | 20 ++++++------- opendap/server/build.gradle | 20 ++++++------- tdm/build.gradle | 36 +++++++++++----------- tds-test-utils/build.gradle | 16 +++++----- tds-ui/build.gradle | 12 ++++---- 8 files changed, 99 insertions(+), 99 deletions(-) diff --git a/dap4/d4servlet/build.gradle b/dap4/d4servlet/build.gradle index e5c57fec19..56700bf7d5 100644 --- a/dap4/d4servlet/build.gradle +++ b/dap4/d4servlet/build.gradle @@ -2,12 +2,12 @@ apply from: "$rootDir/gradle/any/dependencies.gradle" apply from: "$rootDir/gradle/any/java-published.gradle" dependencies { - implementation enforcedPlatform(project(':tds-platform')) + implementation enforcedPlatform(project(':tds-platform')) - implementation 'edu.ucar:dap4' - implementation 'edu.ucar:httpservices' - implementation 'edu.ucar:cdm-core' + implementation 'edu.ucar:dap4' + implementation 'edu.ucar:httpservices' + implementation 'edu.ucar:cdm-core' - compileOnly 'jakarta.servlet:jakarta.servlet-api' - compileOnly 'org.slf4j:slf4j-api' + compileOnly 'jakarta.servlet:jakarta.servlet-api' + compileOnly 'org.slf4j:slf4j-api' } diff --git a/dap4/d4ts/build.gradle b/dap4/d4ts/build.gradle index 23ca998d68..7b02b113e3 100644 --- a/dap4/d4ts/build.gradle +++ b/dap4/d4ts/build.gradle @@ -3,19 +3,19 @@ apply from: "$rootDir/gradle/any/war-published.gradle" apply from: "$rootDir/gradle/any/gretty.gradle" dependencies { - implementation enforcedPlatform(project(':tds-platform')) + implementation enforcedPlatform(project(':tds-platform')) - implementation 'edu.ucar:dap4' - implementation project(":dap4:d4servlet") + implementation 'edu.ucar:dap4' + implementation project(":dap4:d4servlet") - providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}" + providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}" - compileOnly 'org.slf4j:slf4j-api' + compileOnly 'org.slf4j:slf4j-api' - runtime 'org.apache.logging.log4j:log4j-slf4j-impl' - runtime 'org.apache.logging.log4j:log4j-web' + runtime 'org.apache.logging.log4j:log4j-slf4j-impl' + runtime 'org.apache.logging.log4j:log4j-web' - compileOnly 'org.slf4j:slf4j-api' + compileOnly 'org.slf4j:slf4j-api' } // This specifies the resources from ":dap4" that we need to include in the d4ts war and inplaceWebapp. @@ -57,10 +57,10 @@ war { } gretty { - httpPort = 8083 - contextPath = '/d4ts' + httpPort = 8083 + contextPath = '/d4ts' - afterEvaluate { - prepareInplaceWebAppFolder.with d4testsResourcesCopySpec - } + afterEvaluate { + prepareInplaceWebAppFolder.with d4testsResourcesCopySpec + } } diff --git a/gradle/root/publishing.gradle b/gradle/root/publishing.gradle index e38dfe2744..507b3cebd0 100644 --- a/gradle/root/publishing.gradle +++ b/gradle/root/publishing.gradle @@ -114,39 +114,39 @@ def publishDownloadsTask = tasks.register('publishDownloads', PublishToRawRepoTa publish.dependsOn publishDownloadsTask def publishReleaseInfoAndLatestTask = tasks.register('publishReleaseInfoAndLatest', PublishToRawRepoTask) { - group = 'publishing' - description = 'Publish release_info.json and startup/latest.xml to Nexus downloads.' - host = 'https://artifacts.unidata.ucar.edu/' - repoName = 'downloads-tds' - - publishSrc = new File(rootProject.getProjectDir(), "project-files/downloads/") - - onlyIf { - // Will be evaluated at task execution time, not during configuration. - // Fails the build if the specified properties haven't been provided. - username = getPropertyOrFailBuild NEXUS_USERNAME_KEY - password = getPropertyOrFailBuild NEXUS_PASSWORD_KEY - return true - } + group = 'publishing' + description = 'Publish release_info.json and startup/latest.xml to Nexus downloads.' + host = 'https://artifacts.unidata.ucar.edu/' + repoName = 'downloads-tds' + + publishSrc = new File(rootProject.getProjectDir(), "project-files/downloads/") + + onlyIf { + // Will be evaluated at task execution time, not during configuration. + // Fails the build if the specified properties haven't been provided. + username = getPropertyOrFailBuild NEXUS_USERNAME_KEY + password = getPropertyOrFailBuild NEXUS_PASSWORD_KEY + return true + } } publish.dependsOn publishReleaseInfoAndLatestTask def publishVersionInfoTask = tasks.register('publishVersionInfo', PublishToRawRepoTask) { - group = 'publishing' - description = 'Publish version-info.json to Nexus docs.' - host = 'https://artifacts.unidata.ucar.edu/' - repoName = 'docs-tds' - - publishSrc = new File(rootProject.getProjectDir(), "project-files/docs/") - - onlyIf { - // Will be evaluated at task execution time, not during configuration. - // Fails the build if the specified properties haven't been provided. - username = getPropertyOrFailBuild NEXUS_USERNAME_KEY - password = getPropertyOrFailBuild NEXUS_PASSWORD_KEY - return true - } + group = 'publishing' + description = 'Publish version-info.json to Nexus docs.' + host = 'https://artifacts.unidata.ucar.edu/' + repoName = 'docs-tds' + + publishSrc = new File(rootProject.getProjectDir(), "project-files/docs/") + + onlyIf { + // Will be evaluated at task execution time, not during configuration. + // Fails the build if the specified properties haven't been provided. + username = getPropertyOrFailBuild NEXUS_USERNAME_KEY + password = getPropertyOrFailBuild NEXUS_PASSWORD_KEY + return true + } } publish.dependsOn publishVersionInfoTask diff --git a/opendap/dtswar/build.gradle b/opendap/dtswar/build.gradle index 9eb52bced3..4c8a399d81 100644 --- a/opendap/dtswar/build.gradle +++ b/opendap/dtswar/build.gradle @@ -5,20 +5,20 @@ apply from: "$rootDir/gradle/any/dependencies.gradle" apply from: "$rootDir/gradle/any/war-published.gradle" dependencies { - implementation enforcedPlatform(project(':tds-platform')) + implementation enforcedPlatform(project(':tds-platform')) - compile project(':opendap:opendap-servlet') + compile project(':opendap:opendap-servlet') - compile 'edu.ucar:cdm-core' - compile 'edu.ucar:opendap' - compile 'org.slf4j:slf4j-api' + compile 'edu.ucar:cdm-core' + compile 'edu.ucar:opendap' + compile 'org.slf4j:slf4j-api' - providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}" + providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}" - runtime 'org.apache.taglibs:taglibs-standard-spec' - runtime 'org.apache.taglibs:taglibs-standard-impl' + runtime 'org.apache.taglibs:taglibs-standard-spec' + runtime 'org.apache.taglibs:taglibs-standard-impl' - runtime 'org.apache.logging.log4j:log4j-slf4j-impl' - runtime 'org.apache.logging.log4j:log4j-web' + runtime 'org.apache.logging.log4j:log4j-slf4j-impl' + runtime 'org.apache.logging.log4j:log4j-web' } diff --git a/opendap/server/build.gradle b/opendap/server/build.gradle index 88400ab6f0..f7ebe02d2c 100644 --- a/opendap/server/build.gradle +++ b/opendap/server/build.gradle @@ -5,17 +5,17 @@ apply from: "$rootDir/gradle/any/dependencies.gradle" apply from: "$rootDir/gradle/any/java-published.gradle" dependencies { - implementation enforcedPlatform(project(':tds-platform')) - testImplementation enforcedPlatform (project(':tds-testing-platform')) + implementation enforcedPlatform(project(':tds-platform')) + testImplementation enforcedPlatform (project(':tds-testing-platform')) - compile 'edu.ucar:cdm-core' - compile 'edu.ucar:opendap' - compile 'org.slf4j:slf4j-api' + compile 'edu.ucar:cdm-core' + compile 'edu.ucar:opendap' + compile 'org.slf4j:slf4j-api' - compileOnly 'jakarta.servlet:jakarta.servlet-api' + compileOnly 'jakarta.servlet:jakarta.servlet-api' - testImplementation project(':tds-test-utils'); - testImplementation 'junit:junit' - testImplementation 'com.google.truth:truth' - testRuntimeOnly 'ch.qos.logback:logback-classic' + testImplementation project(':tds-test-utils'); + testImplementation 'junit:junit' + testImplementation 'com.google.truth:truth' + testRuntimeOnly 'ch.qos.logback:logback-classic' } diff --git a/tdm/build.gradle b/tdm/build.gradle index 51537c6bfe..324744740e 100644 --- a/tdm/build.gradle +++ b/tdm/build.gradle @@ -11,24 +11,24 @@ apply from: "$rootDir/gradle/any/java-published.gradle" apply plugin: 'com.github.johnrengelman.shadow' dependencies { - implementation enforcedPlatform(project(':tds-platform')) - - compile project(':tdcommon') - compile 'edu.ucar:httpservices' - compile 'edu.ucar:cdm-core' - compile 'edu.ucar:grib' - - compile 'org.apache.httpcomponents:httpclient' - compile 'org.jdom:jdom2' - compile 'org.springframework:spring-beans' - compile 'org.springframework:spring-core' - compile 'org.springframework:spring-context' - compile 'com.google.protobuf:protobuf-java' - compile 'com.beust:jcommander' - compile 'com.google.guava:guava' - - compile 'org.slf4j:slf4j-api' - runtime 'org.apache.logging.log4j:log4j-slf4j-impl' + implementation enforcedPlatform(project(':tds-platform')) + + compile project(':tdcommon') + compile 'edu.ucar:httpservices' + compile 'edu.ucar:cdm-core' + compile 'edu.ucar:grib' + + compile 'org.apache.httpcomponents:httpclient' + compile 'org.jdom:jdom2' + compile 'org.springframework:spring-beans' + compile 'org.springframework:spring-core' + compile 'org.springframework:spring-context' + compile 'com.google.protobuf:protobuf-java' + compile 'com.beust:jcommander' + compile 'com.google.guava:guava' + + compile 'org.slf4j:slf4j-api' + runtime 'org.apache.logging.log4j:log4j-slf4j-impl' } shadowJar { diff --git a/tds-test-utils/build.gradle b/tds-test-utils/build.gradle index 6600ba50b3..6033d3f8f5 100644 --- a/tds-test-utils/build.gradle +++ b/tds-test-utils/build.gradle @@ -5,15 +5,15 @@ apply from: "$rootDir/gradle/any/dependencies.gradle" apply from: "$rootDir/gradle/any/java-internal.gradle" dependencies { - implementation enforcedPlatform(project(':tds-testing-platform')) - implementation enforcedPlatform(project(':tds-platform')) + implementation enforcedPlatform(project(':tds-testing-platform')) + implementation enforcedPlatform(project(':tds-platform')) - implementation 'edu.ucar:cdm-core' - implementation 'edu.ucar:httpservices' - implementation 'edu.ucar:cdm-test-utils' + implementation 'edu.ucar:cdm-core' + implementation 'edu.ucar:httpservices' + implementation 'edu.ucar:cdm-test-utils' - implementation project(':tdcommon') + implementation project(':tdcommon') - implementation 'org.slf4j:slf4j-api' - implementation 'junit:junit' + implementation 'org.slf4j:slf4j-api' + implementation 'junit:junit' } diff --git a/tds-ui/build.gradle b/tds-ui/build.gradle index 7dc9d3ef3e..ec26ca56e0 100644 --- a/tds-ui/build.gradle +++ b/tds-ui/build.gradle @@ -8,14 +8,14 @@ apply from: "$rootDir/gradle/any/dependencies.gradle" apply plugin: 'application' dependencies { - implementation enforcedPlatform(project(':tds-platform')) - testCompile enforcedPlatform(project(':tds-testing-platform')) + implementation enforcedPlatform(project(':tds-platform')) + testCompile enforcedPlatform(project(':tds-testing-platform')) - runtime 'edu.ucar:uicdm' - runtime 'edu.ucar:cdm-s3' - runtime project(':tds-ugrid') + runtime 'edu.ucar:uicdm' + runtime 'edu.ucar:cdm-s3' + runtime project(':tds-ugrid') } application { - mainClass.set("ucar.nc2.ui.ToolsUI") + mainClass.set("ucar.nc2.ui.ToolsUI") } From 66baab436310dd1bcadb95110b1f5e0b235d10b0 Mon Sep 17 00:00:00 2001 From: Benjamin Root Date: Thu, 28 Mar 2024 16:27:11 -0400 Subject: [PATCH 092/120] Add some null checks in DatasetTrackerChronicle --- .../tracker/DatasetTrackerChronicle.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetTrackerChronicle.java b/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetTrackerChronicle.java index 4b3fbf7ace..0f81548262 100644 --- a/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetTrackerChronicle.java +++ b/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetTrackerChronicle.java @@ -132,6 +132,9 @@ private void open() throws IOException { ChronicleMapBuilder builder = ChronicleMapBuilder.of(String.class, DatasetExt.class) .averageValueSize(averageValueSize).entries(maxDatasets).averageKeySize(averagePathLength) .valueMarshaller(DatasetExtBytesMarshaller.INSTANCE).skipCloseOnExitHook(true); + if (builder == null) { + throw new IOException("Failed to create Dataset catalog tracker"); + } datasetMap = builder.createPersistedTo(dbFile); changed = false; } @@ -207,12 +210,19 @@ else if (!path.equals(accessPath)) { // LOOK must put all for restrict // changed = true; DatasetExt dsext = new DatasetExt(catId, dataset.getRestrictAccess(), ncml); + if (datasetMap == null) { + catalogInitLog.error("Catalog chronicle map not properly initialized. Can't track dataset {}", dataset); + return false; + } datasetMap.put(path, dsext); changed = true; return true; } public String findResourceControl(String path) { + if (datasetMap == null) { + return null; + } DatasetExt dext = datasetMap.get(path); if (dext == null) return null; @@ -220,6 +230,9 @@ public String findResourceControl(String path) { } public String findNcml(String path) { + if (datasetMap == null) { + return null; + } DatasetExt dext = datasetMap.get(path); if (dext == null) return null; @@ -228,6 +241,9 @@ public String findNcml(String path) { @Override public void showDB(Formatter f) { + if (datasetMap == null) { + return; + } f.format("ChronicleMap %s%n", dbFile.getPath()); int count = 0; for (Map.Entry entry : datasetMap.entrySet()) { @@ -239,6 +255,6 @@ public void showDB(Formatter f) { // Package private for testing long getCount() { - return datasetMap.longSize(); + return datasetMap != null ? datasetMap.longSize() : -1; } } From ce023e0e5105508057e73f3abf4b2ef81825c93c Mon Sep 17 00:00:00 2001 From: Benjamin Root Date: Fri, 12 Apr 2024 10:40:41 -0400 Subject: [PATCH 093/120] Take out an unneeded null check in dataset tracker chronicle --- .../server/catalog/tracker/DatasetTrackerChronicle.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetTrackerChronicle.java b/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetTrackerChronicle.java index 0f81548262..fd60c5f5d8 100644 --- a/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetTrackerChronicle.java +++ b/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetTrackerChronicle.java @@ -132,9 +132,6 @@ private void open() throws IOException { ChronicleMapBuilder builder = ChronicleMapBuilder.of(String.class, DatasetExt.class) .averageValueSize(averageValueSize).entries(maxDatasets).averageKeySize(averagePathLength) .valueMarshaller(DatasetExtBytesMarshaller.INSTANCE).skipCloseOnExitHook(true); - if (builder == null) { - throw new IOException("Failed to create Dataset catalog tracker"); - } datasetMap = builder.createPersistedTo(dbFile); changed = false; } From fa0edd132918fca4526906e4fd9f8589f410feb8 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 15 Apr 2024 16:58:15 +0200 Subject: [PATCH 094/120] Bump spring version (#492) --- tds-platform/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle index 6adf05542b..4b2550821f 100644 --- a/tds-platform/build.gradle +++ b/tds-platform/build.gradle @@ -14,7 +14,7 @@ dependencies { // If there is a conflict (previously hidden by optimistic resolution), we should get an error when we build, and // at that point we can take things on a case-by-case basis. api enforcedPlatform("edu.ucar:netcdf-java-bom:${depVersion.netcdfJava}") - api enforcedPlatform('org.springframework:spring-framework-bom:5.3.32') + api enforcedPlatform('org.springframework:spring-framework-bom:5.3.34') api enforcedPlatform('org.springframework.security:spring-security-bom:5.7.12') api platform('net.openhft:chronicle-bom:2.23.136') api enforcedPlatform("org.apache.logging.log4j:log4j-bom:2.17.1") From 4eab0279c4eab9f57342788d618178bfb651f8e1 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Wed, 17 Apr 2024 18:00:06 +0200 Subject: [PATCH 095/120] Fix javadoc warnings (#493) --- dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java | 8 ++++---- .../d4servlet/src/main/java/dap4/servlet/ChunkWriter.java | 8 ++++---- .../src/main/java/dap4/servlet/DapController.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java b/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java index fe0dcea1ab..850caa9a18 100644 --- a/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java +++ b/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java @@ -184,7 +184,7 @@ public void close() throws IOException { */ /** - * Track generic CDMNode <-> DapNode + * Track generic CDMNode {@literal <->} DapNode */ protected void recordNode(CDMNode cdm, DapNode dap) { assert this.nodemap.get(cdm) == null && this.nodemap.get(dap) == null; @@ -192,7 +192,7 @@ protected void recordNode(CDMNode cdm, DapNode dap) { } /** - * Track Variable <-> DapVariable + * Track Variable {@literal <->} DapVariable */ protected void recordVar(Variable cdm, DapVariable dap) { cdm = CDMUtil.unwrap(cdm); @@ -201,7 +201,7 @@ protected void recordVar(Variable cdm, DapVariable dap) { } /** - * Track Variable <-> DapStructure + * Track Variable {@literal <->} DapStructure */ protected void recordStruct(Variable cdm, DapStructure dap) { cdm = CDMUtil.unwrap(cdm); @@ -210,7 +210,7 @@ protected void recordStruct(Variable cdm, DapStructure dap) { } /** - * Track Variable <-> DapSequence + * Track Variable {@literal <->} DapSequence */ protected void recordSeq(Variable cdm, DapSequence dap) { cdm = CDMUtil.unwrap(cdm); diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/ChunkWriter.java b/dap4/d4servlet/src/main/java/dap4/servlet/ChunkWriter.java index 7fc0409640..b342bb3c0c 100644 --- a/dap4/d4servlet/src/main/java/dap4/servlet/ChunkWriter.java +++ b/dap4/d4servlet/src/main/java/dap4/servlet/ChunkWriter.java @@ -227,10 +227,10 @@ void sendDXR(byte[] dxr8) throws IOException { * else reset the current chunk thus * losing any partial write. * - * @param httpcode The httpcode, 0 => ignore - * @param msg The , null => ignore - * @param cxt The , null => ignore - * @param other The , null => ignore + * @param httpcode The httpcode, 0 {@literal =>} ignore + * @param msg The , null {@literal =>} ignore + * @param cxt The , null {@literal =>} ignore + * @param other The , null {@literal =>} ignore * @throws IOException on IO related errors */ public void writeError(int httpcode, String msg, String cxt, String other) throws IOException { diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java b/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java index 413ddcfe87..f72b36925f 100644 --- a/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java +++ b/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java @@ -435,7 +435,7 @@ protected DapRequest getRequestState(HttpServletRequest rq, HttpServletResponse * Generate an error based on the parameters * * @param drq DapRequest - * @param httpcode 0=>no code specified + * @param httpcode 0 {@literal =>} no code specified * @param t exception that caused the error; may be null * @throws IOException */ From 44056ec1d4d69709ffc58ea67cc1d51c4e898c6e Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 19 Apr 2024 18:50:51 +0200 Subject: [PATCH 096/120] Improve tests (#494) * Ignore test that requires external server that is unavailable * Improve before/after steps of test that checks cache --- .../java/ucar/nc2/dt/grid/TestGridSubsetThredds.java | 1 + .../test/java/thredds/server/wms/TestWmsCache.java | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tds/src/integrationTests/java/ucar/nc2/dt/grid/TestGridSubsetThredds.java b/tds/src/integrationTests/java/ucar/nc2/dt/grid/TestGridSubsetThredds.java index 5a94eb4fdb..c033dc53f6 100644 --- a/tds/src/integrationTests/java/ucar/nc2/dt/grid/TestGridSubsetThredds.java +++ b/tds/src/integrationTests/java/ucar/nc2/dt/grid/TestGridSubsetThredds.java @@ -210,6 +210,7 @@ public void testFindVerticalCoordinate() throws Exception { } } + @Ignore("http://esrl.noaa.gov/psd/thredds not available") @Test @Category(NeedsExternalResource.class) public void testScaleOffset() throws Exception { diff --git a/tds/src/test/java/thredds/server/wms/TestWmsCache.java b/tds/src/test/java/thredds/server/wms/TestWmsCache.java index 715ce260d9..ac6729bb60 100644 --- a/tds/src/test/java/thredds/server/wms/TestWmsCache.java +++ b/tds/src/test/java/thredds/server/wms/TestWmsCache.java @@ -76,6 +76,13 @@ public void createTestFiles() throws IOException { Files.copy(TEST_FILE, TEMP_FILE, StandardCopyOption.REPLACE_EXISTING); } + @Before + public void clearNetcdfFileCache() { + final FileCacheIF cache = NetcdfDatasets.getNetcdfFileCache(); + cache.clearCache(true); + assertNoneLockedInNetcdfFileCache(); + } + @After public void clearCache() { ThreddsWmsServlet.resetCache(); @@ -174,7 +181,10 @@ public void shouldNotLockFileInCacheAfterExceptionIsThrown() throws ServletExcep } private void assertNoneLockedInNetcdfFileCache() { - assertNotLockedInNetcdfFileCache(""); + final FileCacheIF cache = NetcdfDatasets.getNetcdfFileCache(); + final List entries = cache.showCache(); + final boolean isLocked = entries.stream().anyMatch(e -> e.startsWith("true")); + assertWithMessage(cache.showCache().toString()).that(isLocked).isFalse(); } private void assertNotLockedInNetcdfFileCache(String path) { From 4835f99c703bdb205d58512f93303d1a290bb6f8 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 3 May 2024 10:29:07 -0500 Subject: [PATCH 097/120] Fix standard services for nested datasets (#496) * Add test for a nested dataset with a service type inferred from dataType * When adding standard services for a dataType, recursively check child datasets --- .../server/catalog/TestServiceDefaults.java | 17 +++++++++++++ .../java/thredds/core/CatalogManager.java | 25 ++++++++++++------- .../thredds/catalogs5/testServices.xml | 7 ++++++ 3 files changed, 40 insertions(+), 9 deletions(-) diff --git a/tds/src/integrationTests/java/thredds/server/catalog/TestServiceDefaults.java b/tds/src/integrationTests/java/thredds/server/catalog/TestServiceDefaults.java index 6346032894..46b7d30a1a 100644 --- a/tds/src/integrationTests/java/thredds/server/catalog/TestServiceDefaults.java +++ b/tds/src/integrationTests/java/thredds/server/catalog/TestServiceDefaults.java @@ -5,6 +5,8 @@ package thredds.server.catalog; +import static com.google.common.truth.Truth.assertThat; + import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -42,6 +44,18 @@ public void testStandardServices() throws IOException { Assert.assertEquals(7, s.getNestedServices().size()); } + @Test + public void testStandardServicesForNestedDataset() { + String catalog = "/catalog/catalogs5/testServices.xml"; + Catalog cat = TdsLocalCatalog.open(catalog); + Dataset ds = cat.findDatasetByID("testInnerGridDataset"); + assertThat(ds.getFeatureType()).isEqualTo(FeatureType.GRID); + + Service service = ds.getServiceDefault(); + assertThat(service.getType()).isEqualTo(ServiceType.Compound); + assertThat(service.getNestedServices().size()).isEqualTo(7); + } + // Relies on: // @@ -80,6 +94,9 @@ public void testUserDefinedServices() throws IOException { Assert.assertEquals(ServiceType.OPENDAP, localServices.getType()); for (Dataset ds : cat.getDatasetsLocal()) { + if (ds.getId() != null && ds.getId().equals("testNestedGridDataset")) { + continue; + } if (!(ds instanceof CatalogRef)) { Assert.assertTrue(ds.hasAccess()); diff --git a/tds/src/main/java/thredds/core/CatalogManager.java b/tds/src/main/java/thredds/core/CatalogManager.java index 5dd90f48ff..07946d9bf1 100644 --- a/tds/src/main/java/thredds/core/CatalogManager.java +++ b/tds/src/main/java/thredds/core/CatalogManager.java @@ -179,17 +179,24 @@ private void addGlobalServices(CatalogBuilder cat) { // look for datasets that want to use standard services for (DatasetBuilder node : cat.getDatasets()) { - String sname = (String) node.getFldOrInherited(Dataset.ServiceName); - String urlPath = (String) node.get(Dataset.UrlPath); - String ftypeS = (String) node.getFldOrInherited(Dataset.FeatureType); - if (sname == null && urlPath != null && ftypeS != null) { - Service s = globalServices.getStandardServices(ftypeS); - if (s != null) { - node.put(Dataset.ServiceName, s.getName()); - cat.addService(s); - } + addStandardServices(cat, node); + } + } + + private void addStandardServices(CatalogBuilder cat, DatasetBuilder node) { + String sname = (String) node.getFldOrInherited(Dataset.ServiceName); + String urlPath = (String) node.get(Dataset.UrlPath); + String ftypeS = (String) node.getFldOrInherited(Dataset.FeatureType); + if (sname == null && urlPath != null && ftypeS != null) { + Service s = globalServices.getStandardServices(ftypeS); + if (s != null) { + node.put(Dataset.ServiceName, s.getName()); + cat.addService(s); } } + for (DatasetBuilder child : node.getDatasets()) { + addStandardServices(cat, child); + } } private void findServices(Iterable datasets, Set serviceNames) { diff --git a/tds/src/test/content/thredds/catalogs5/testServices.xml b/tds/src/test/content/thredds/catalogs5/testServices.xml index 4f46df10a5..c2aa1ec9ce 100644 --- a/tds/src/test/content/thredds/catalogs5/testServices.xml +++ b/tds/src/test/content/thredds/catalogs5/testServices.xml @@ -7,6 +7,13 @@ + + + Grid + + + + From cc2770139d8f830dfc236f6d65dc3605687770ef Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 3 May 2024 10:58:18 -0500 Subject: [PATCH 098/120] Fix warnings (#497) * Use parametrized list * Use expression lambda * Use parametrized list * Use parametrized vector * Use parametrized vector * Fix unchecked conversion warning --- .../dtswar/src/main/java/opendap/dts/DTSServlet.java | 6 +++--- .../src/main/java/opendap/servers/CEEvaluator.java | 6 +++--- .../src/main/java/opendap/servers/SDSequence.java | 2 +- .../main/java/opendap/servlet/AbstractServlet.java | 6 +++--- .../thredds/server/admin/AdminLogController.java | 12 ++++-------- tds/src/main/java/thredds/servlet/ServletUtil.java | 4 ++-- 6 files changed, 16 insertions(+), 20 deletions(-) diff --git a/opendap/dtswar/src/main/java/opendap/dts/DTSServlet.java b/opendap/dtswar/src/main/java/opendap/dts/DTSServlet.java index 0bbbf5a58a..0e06747c9b 100644 --- a/opendap/dtswar/src/main/java/opendap/dts/DTSServlet.java +++ b/opendap/dtswar/src/main/java/opendap/dts/DTSServlet.java @@ -1448,7 +1448,7 @@ protected void printStatus(PrintWriter os) { int pending = 0; StringBuilder preqs = new StringBuilder(); for (int i = 0; i < n; i++) { - ReqState rs = (ReqState) prArr.get(i); + ReqState rs = prArr.get(i); RequestDebug reqD = (RequestDebug) rs.getUserObject(); if (!reqD.done) { preqs.append("
-----------------------\n");
@@ -1657,7 +1657,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) {
             reqD = new RequestDebug(reqno, Thread.currentThread().toString());
             rs.setUserObject(reqD);
             if (prArr == null)
-              prArr = new ArrayList(10000);
+              prArr = new ArrayList<>(10000);
             prArr.add((int) reqno, rs);
           }
 
@@ -1824,7 +1824,7 @@ private void printBadURLPage(PrintWriter pw) {
   //////////////////////////////////////////////////
   // debug
 
-  private ArrayList prArr = null;
+  private ArrayList prArr = null;
 
   static private class RequestDebug {
     long reqno;
diff --git a/opendap/server/src/main/java/opendap/servers/CEEvaluator.java b/opendap/server/src/main/java/opendap/servers/CEEvaluator.java
index 5ca64a2f99..b8d3accdc6 100644
--- a/opendap/server/src/main/java/opendap/servers/CEEvaluator.java
+++ b/opendap/server/src/main/java/opendap/servers/CEEvaluator.java
@@ -102,7 +102,7 @@ public class CEEvaluator {
   /**
    * The Clause objects which hold the parsed selection information.
    */
-  private Vector _cv;
+  private Vector _cv;
 
   /**
    * The factory which will be used by the parser to construct the clause
@@ -120,7 +120,7 @@ public class CEEvaluator {
    */
   public CEEvaluator(ServerDDS dds) {
     _dds = dds;
-    _cv = new Vector();
+    _cv = new Vector<>();
     _Debug = Debug.isSet("CE");
     if (_Debug)
       System.out.println("CE debugging enabled.");
@@ -140,7 +140,7 @@ public CEEvaluator(ServerDDS dds) {
    */
   public CEEvaluator(ServerDDS dds, ClauseFactory clauseFactory) {
     _dds = dds;
-    _cv = new Vector();
+    _cv = new Vector<>();
     _Debug = Debug.isSet("CE");
     if (_Debug)
       System.out.println("CE debugging enabled.");
diff --git a/opendap/server/src/main/java/opendap/servers/SDSequence.java b/opendap/server/src/main/java/opendap/servers/SDSequence.java
index 14dbc13ed0..cc4a37c35e 100644
--- a/opendap/server/src/main/java/opendap/servers/SDSequence.java
+++ b/opendap/server/src/main/java/opendap/servers/SDSequence.java
@@ -104,7 +104,7 @@ public Vector getRowVector() throws NoSuchVariableException {
       if (_Debug)
         System.out.println("This sequence has " + getRowCount() + " rows.");
 
-      Vector rv = new Vector();
+      Vector rv = new Vector<>();
 
       for (int i = 0; i < elementCount(false); i++) {
         if (_Debug)
diff --git a/opendap/server/src/main/java/opendap/servlet/AbstractServlet.java b/opendap/server/src/main/java/opendap/servlet/AbstractServlet.java
index 63bd62c060..03dbb21b3e 100644
--- a/opendap/server/src/main/java/opendap/servlet/AbstractServlet.java
+++ b/opendap/server/src/main/java/opendap/servlet/AbstractServlet.java
@@ -1391,7 +1391,7 @@ protected void printStatus(PrintWriter os) throws IOException {
       int pending = 0;
       StringBuilder preqs = new StringBuilder();
       for (int i = 0; i < n; i++) {
-        ReqState rs = (ReqState) prArr.get(i);
+        ReqState rs = prArr.get(i);
         RequestDebug reqD = (RequestDebug) rs.getUserObject();
         if (!reqD.done) {
           preqs.append("
-----------------------\n");
@@ -1615,7 +1615,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) {
             reqD = new RequestDebug(reqno, Thread.currentThread().toString());
             rs.setUserObject(reqD);
             if (prArr == null)
-              prArr = new ArrayList(10000);
+              prArr = new ArrayList<>(10000);
             prArr.add((int) reqno, rs);
           }
 
@@ -1782,7 +1782,7 @@ private void printBadURLPage(PrintWriter pw) {
   // **************************************************************************
 
   // debug
-  private ArrayList prArr = null;
+  private ArrayList prArr = null;
 
   private static class RequestDebug {
     long reqno;
diff --git a/tds/src/main/java/thredds/server/admin/AdminLogController.java b/tds/src/main/java/thredds/server/admin/AdminLogController.java
index 647aabcb13..7d1eafaf48 100644
--- a/tds/src/main/java/thredds/server/admin/AdminLogController.java
+++ b/tds/src/main/java/thredds/server/admin/AdminLogController.java
@@ -58,17 +58,15 @@ protected ModelAndView handleRequestInternal(HttpServletRequest req, HttpServlet
     if (path.equals("access/current")) {
 
       File dir = tdsContext.getTomcatLogDirectory();
-      File[] files = dir.listFiles((dir1, name) -> {
-        return name.startsWith("access");
-      });
+      File[] files = dir.listFiles((dir1, name) -> name.startsWith("access"));
       if ((files == null) || (files.length == 0)) {
         res.sendError(HttpServletResponse.SC_NOT_FOUND);
         return null;
       }
 
-      List fileList = Arrays.asList(files);
+      List fileList = Arrays.asList(files);
       Collections.sort(fileList);
-      file = (File) fileList.get(fileList.size() - 1); // last one
+      file = fileList.get(fileList.size() - 1);
 
     } else if (path.equals("access/")) {
       showFiles(tdsContext.getTomcatLogDirectory(), "access", res);
@@ -105,9 +103,7 @@ protected ModelAndView handleRequestInternal(HttpServletRequest req, HttpServlet
   }
 
   private void showFiles(File dir, final String filter, HttpServletResponse res) throws IOException {
-    File[] files = dir.listFiles((dir1, name) -> {
-      return name.contains(filter);
-    });
+    File[] files = dir.listFiles((dir1, name) -> name.contains(filter));
 
     if ((files == null) || (files.length == 0)) {
       res.sendError(HttpServletResponse.SC_NOT_FOUND);
diff --git a/tds/src/main/java/thredds/servlet/ServletUtil.java b/tds/src/main/java/thredds/servlet/ServletUtil.java
index 5bb60aa68e..974c3c45c6 100644
--- a/tds/src/main/java/thredds/servlet/ServletUtil.java
+++ b/tds/src/main/java/thredds/servlet/ServletUtil.java
@@ -394,8 +394,8 @@ public static void forwardToCatalogServices(HttpServletRequest req, HttpServletR
   static public void showSystemProperties(PrintStream out) {
 
     Properties sysp = System.getProperties();
-    Enumeration e = sysp.propertyNames();
-    List list = Collections.list(e);
+    Set propertyNames = sysp.stringPropertyNames();
+    List list = new ArrayList<>(propertyNames);
     Collections.sort(list);
 
     out.println("System Properties:");

From 8cae6fb64ba909cc2bf0ddab2c93b0327e0e80b6 Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Fri, 3 May 2024 17:11:51 -0500
Subject: [PATCH 099/120] Link to required java/tomcat versions on install page
 (#498)

---
 .../src/site/pages/tds_tutorial/production/Upgrade.md          | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md b/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md
index 00f3aae51c..bbf77c20de 100644
--- a/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md
+++ b/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md
@@ -8,8 +8,7 @@ permalink: upgrade.html
 
 ## Requirements
 
-* Java 11 is required
-* Tomcat 8 (servlet 3.1)
+* Java and tomcat versions listed [here](install_java_tomcat.html#system-requirements)
 * On the command line when starting up Tomcat/TDS, you must specify `-Dtds.content.root.path=` where `` points to the top of the content directory.
   Note, in this exmaple, that this is `/data/content/`, not`/data/content/thredds/`. 
   Don't forget the trailing slash. 

From 0265ff37cbed180c961c23ece0330f616bab9855 Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Tue, 7 May 2024 09:12:53 -0600
Subject: [PATCH 100/120] Coverity fixes (#500)

* Fix duplicate condition in if statement

* Fix typo is distance computation

* Remove dead code branch-- new NetcdfDataset never null
---
 .../src/main/java/ucar/nc2/dt/ugrid/geom/LatLonPolygon2D.java   | 2 +-
 tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java     | 2 +-
 tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Polygon2D.java   | 2 +-
 .../main/java/thredds/featurecollection/InvDatasetFcFmrc.java   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonPolygon2D.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonPolygon2D.java
index 7183e064aa..03b16d9455 100644
--- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonPolygon2D.java
+++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/LatLonPolygon2D.java
@@ -631,7 +631,7 @@ public boolean intersects(LatLonPolygon2D poly) {
       int countPoly1 = this.getVertexCount();
       int countPoly2 = poly.getVertexCount();
       /* If either polygon does not have vertices... */
-      if (countPoly1 == 0 || countPoly1 == 0) {
+      if (countPoly1 == 0 || countPoly2 == 0) {
         return false;
       }
 
diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java
index d90999deb6..6b8d97df23 100644
--- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java
+++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java
@@ -348,7 +348,7 @@ public void setLocation(Point3D p) {
   public static double distanceSq(double x1, double y1, double z1, double x2, double y2, double z2) {
     x1 -= x2;
     y1 -= y2;
-    z2 -= z2;
+    z1 -= z2;
     return (x1 * x1 + y1 * y1 + z1 * z1);
   }
 
diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Polygon2D.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Polygon2D.java
index 30b8f699d1..23ff9f8a2e 100644
--- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Polygon2D.java
+++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Polygon2D.java
@@ -783,7 +783,7 @@ public boolean intersects(Polygon2D poly) {
 
 
     /* If either polygon does not have vertices... */
-    if (countPoly1 == 0 || countPoly1 == 0) {
+    if (countPoly1 == 0 || countPoly2 == 0) {
       return false;
     }
 
diff --git a/tds/src/main/java/thredds/featurecollection/InvDatasetFcFmrc.java b/tds/src/main/java/thredds/featurecollection/InvDatasetFcFmrc.java
index 1674181c31..7221ef67ac 100644
--- a/tds/src/main/java/thredds/featurecollection/InvDatasetFcFmrc.java
+++ b/tds/src/main/java/thredds/featurecollection/InvDatasetFcFmrc.java
@@ -472,7 +472,7 @@ public ucar.nc2.dt.grid.GridDataset getGridDataset(String matchPath) throws IOEx
         // the new API, that way we get any new RandomAccessFile implementations that rely
         // on the new API (e.g. S3RandomAccessFile).
         NetcdfDataset ncd = new NetcdfDataset(ncdNew.getReferencedFile(), null);
-        return ncd == null ? null : new ucar.nc2.dt.grid.GridDataset(ncd);
+        return new ucar.nc2.dt.grid.GridDataset(ncd);
       } else if (wantName.equals(hasName + FMRC)
           && wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.TwoD)) {
         return fmrc.getDataset2D(null);

From 750304cdf0bf520801fe9cd3bef6ddf136ebbae3 Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Thu, 23 May 2024 15:34:45 -0600
Subject: [PATCH 101/120] Fix issue with zip files being disallowed with
 fileServer (#501)

* Add test for downloading zip files using fileServer

* Use default test name (test index)

* Add partial content test for zip files

* Allow zip files to be downloaded with fileServer

* Fix test expected length
---
 .../server/fileserver/TestFileServer.java       |   5 +++++
 .../server/fileserver/TestPartialContent.java   |  16 ++++++++++++++--
 .../main/java/thredds/servlet/ServletUtil.java  |   2 +-
 .../content/thredds/public/testdata/oneFile.zip | Bin 0 -> 355 bytes
 .../thredds/public/testdata/twoFiles.zip        | Bin 0 -> 667 bytes
 5 files changed, 20 insertions(+), 3 deletions(-)
 create mode 100644 tds/src/test/content/thredds/public/testdata/oneFile.zip
 create mode 100644 tds/src/test/content/thredds/public/testdata/twoFiles.zip

diff --git a/tds/src/integrationTests/java/thredds/server/fileserver/TestFileServer.java b/tds/src/integrationTests/java/thredds/server/fileserver/TestFileServer.java
index 5187a82a40..b8d46deec1 100644
--- a/tds/src/integrationTests/java/thredds/server/fileserver/TestFileServer.java
+++ b/tds/src/integrationTests/java/thredds/server/fileserver/TestFileServer.java
@@ -67,6 +67,11 @@ public static List getTestParameters() {
     result.add(new Object[] {"fileServer/scanCdmUnitTests/formats/netcdf3/files/ctest0.nc",
         ContentType.netcdf.toString(), "4b514d280c034222e8e5b8401fee268c"});
 
+    result
+        .add(new Object[] {"fileServer/scanLocal/oneFile.zip", "application/zip", "088e88fe16b8cd4ac73b5ef540393439"});
+    result
+        .add(new Object[] {"fileServer/scanLocal/twoFiles.zip", "application/zip", "a9d6538c628654e2840de4afa5d85aad"});
+
     return result;
   }
 
diff --git a/tds/src/integrationTests/java/thredds/server/fileserver/TestPartialContent.java b/tds/src/integrationTests/java/thredds/server/fileserver/TestPartialContent.java
index c1f427a962..c22383d2b9 100644
--- a/tds/src/integrationTests/java/thredds/server/fileserver/TestPartialContent.java
+++ b/tds/src/integrationTests/java/thredds/server/fileserver/TestPartialContent.java
@@ -18,7 +18,7 @@
 public class TestPartialContent {
   private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-  @Parameterized.Parameters(name = "{0}")
+  @Parameterized.Parameters
   static public List getTestParameters() {
     final List result = new ArrayList<>();
 
@@ -38,13 +38,25 @@ public void shouldReturnPartialContent() {
     final String path = "fileServer/scanLocal/mydata1.nc";
     final long maxSize = 66832;
     final String contentType = ContentType.netcdf.toString();
+    checkPartialContent(path, maxSize, contentType);
+  }
+
+  @Test
+  public void shouldReturnPartialContentOfZip() {
+    final String path = "fileServer/scanLocal/twoFiles.zip";
+    final long maxSize = 667;
+    final String contentType = "application/zip";
+    checkPartialContent(path, maxSize, contentType);
+  }
+
+  private void checkPartialContent(String path, long maxSize, String contentType) {
     final String endpoint = TestOnLocalServer.withHttpPath(path);
 
     final byte[] content = TestOnLocalServer.getContent(null, endpoint,
         new int[] {HttpServletResponse.SC_PARTIAL_CONTENT}, contentType, byteRange);
     assertThat(content).isNotNull();
 
-    final long expectedLength = Math.min(byteRange[1] - byteRange[0] + 1, maxSize);
+    final long expectedLength = Math.min(byteRange[1] - byteRange[0] + 1, maxSize - byteRange[0]);
     assertThat(content.length).isEqualTo(expectedLength);
   }
 }
diff --git a/tds/src/main/java/thredds/servlet/ServletUtil.java b/tds/src/main/java/thredds/servlet/ServletUtil.java
index 974c3c45c6..30aecfc505 100644
--- a/tds/src/main/java/thredds/servlet/ServletUtil.java
+++ b/tds/src/main/java/thredds/servlet/ServletUtil.java
@@ -295,7 +295,7 @@ public static void writeMFileToResponse(HttpServletRequest request, HttpServletR
       return;
     }
 
-    if (file.isDirectory()) {
+    if (file.isDirectory() && !file.isZipFile()) {
       response.sendError(HttpServletResponse.SC_BAD_REQUEST,
           "Expected a file name instead of a directory for URL path: " + requestPath);
       return;
diff --git a/tds/src/test/content/thredds/public/testdata/oneFile.zip b/tds/src/test/content/thredds/public/testdata/oneFile.zip
new file mode 100644
index 0000000000000000000000000000000000000000..84b71f4e581eecf1115bd7d18abeb76cae987c02
GIT binary patch
literal 355
zcmWIWW@Zs#U|`^2nASHt?02AYdo+-D1BfjdWEe_PiuH?&lJ!eci%ayA^Ycnl^Gftf
zGKx}DfD#3zNjaGixs=3`M6jatqRbRSy}abm5Kac>GhE&&k`aDsr4`%^j4a<685qD;
z6_*tzr!+9=DWowaJ)3hxh|R*L9gJ2amKc(byB3}ytvdLVrc#9;scRiI@Y

literal 0
HcmV?d00001

diff --git a/tds/src/test/content/thredds/public/testdata/twoFiles.zip b/tds/src/test/content/thredds/public/testdata/twoFiles.zip
new file mode 100644
index 0000000000000000000000000000000000000000..e304aea0da86dc8bac515f26619203877db473e1
GIT binary patch
literal 667
zcmWIWW@Zs#U|`^2nASHt?02AYdo+-D1BfjdWEe_PiuH?&lJ!eci%ayA^Ycnl^Gftf
zGKx}DfD#3zNjaGixs=3`M6jatqRbRSy}abm5Kac>GhE&&t&Bctr4`%^j4a<685qD;
z6_*tzr!+9=DWowaJ)3hxh|R*
Date: Mon, 3 Jun 2024 11:34:15 -0600
Subject: [PATCH 102/120] Upgrade chronicle (#502)

---
 tds-platform/build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle
index 4b2550821f..7da04550bd 100644
--- a/tds-platform/build.gradle
+++ b/tds-platform/build.gradle
@@ -16,7 +16,7 @@ dependencies {
   api enforcedPlatform("edu.ucar:netcdf-java-bom:${depVersion.netcdfJava}")
   api enforcedPlatform('org.springframework:spring-framework-bom:5.3.34')
   api enforcedPlatform('org.springframework.security:spring-security-bom:5.7.12')
-  api platform('net.openhft:chronicle-bom:2.23.136')
+  api platform('net.openhft:chronicle-bom:2.25ea62')
   api enforcedPlatform("org.apache.logging.log4j:log4j-bom:2.17.1")
   api enforcedPlatform("jakarta.platform:jakarta.jakartaee-bom:8.0.0")
 

From 56cafafe8106eee430c213a0708c25fb26b8b698 Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Thu, 27 Jun 2024 12:37:31 -0600
Subject: [PATCH 103/120] Suppress spurious/not applicable jfreechart CVEs
 (#505)

---
 .../dependency-check-suppression.xml                   | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/project-files/owasp-dependency-check/dependency-check-suppression.xml b/project-files/owasp-dependency-check/dependency-check-suppression.xml
index 08eba890ff..baec004591 100644
--- a/project-files/owasp-dependency-check/dependency-check-suppression.xml
+++ b/project-files/owasp-dependency-check/dependency-check-suppression.xml
@@ -146,4 +146,14 @@
     ^pkg:maven/org\.quartz\-scheduler/quartz@.*$
     CVE-2023-39017
   
+  
+    
+    ^pkg:maven/org\.jfree/jfreechart@.*$
+    CVE-2024-23076
+    CVE-2024-22949
+    CVE-2023-52070
+  
 

From 5217eaf2f1aba7825f8fdbd5f94dbcb272ccd373 Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Fri, 12 Jul 2024 12:31:59 -0600
Subject: [PATCH 104/120] Fix compiler warnings about using deprecated boxing
 constructors (#509)

---
 .../src/main/java/dap4/servlet/CDMWrap.java        |  4 ++--
 .../dtswar/src/main/java/opendap/dts/Getopts.java  | 10 +++++-----
 .../dtswar/src/main/java/opendap/dts/SDTest.java   |  6 +++---
 .../src/main/java/opendap/servlet/AsciiWriter.java | 14 +++++++-------
 .../main/java/opendap/servlet/ascii/asciiByte.java |  2 +-
 .../main/java/opendap/servlet/ascii/asciiF32.java  |  2 +-
 .../main/java/opendap/servlet/ascii/asciiF64.java  |  2 +-
 .../main/java/opendap/servlet/ascii/asciiI16.java  |  2 +-
 .../main/java/opendap/servlet/ascii/asciiI32.java  |  2 +-
 .../main/java/opendap/servlet/ascii/asciiUI16.java |  2 +-
 .../main/java/opendap/servlet/ascii/asciiUI32.java |  2 +-
 11 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java b/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java
index 850caa9a18..eb9e60f230 100644
--- a/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java
+++ b/dap4/d4servlet/src/main/java/dap4/servlet/CDMWrap.java
@@ -394,8 +394,8 @@ protected DapEnumeration buildenum(EnumTypedef cdmenum) throws DapException {
     for (Map.Entry entry : ecvalues.entrySet()) {
       String name = entry.getValue();
       assert (name != null);
-      int value = (int) entry.getKey();
-      dapenum.addEnumConst(dmrfactory.newEnumConst(name, new Long(value)));
+      long value = entry.getKey();
+      dapenum.addEnumConst(dmrfactory.newEnumConst(name, value));
     }
     return dapenum;
   }
diff --git a/opendap/dtswar/src/main/java/opendap/dts/Getopts.java b/opendap/dtswar/src/main/java/opendap/dts/Getopts.java
index f9123e7241..d5c23c6513 100644
--- a/opendap/dtswar/src/main/java/opendap/dts/Getopts.java
+++ b/opendap/dtswar/src/main/java/opendap/dts/Getopts.java
@@ -119,7 +119,7 @@ public String getOption(Character sw) {
    * @param sw int value switch whose option is requested
    */
   public String getOption(int sw) {
-    Character opt = new Character((char) sw);
+    Character opt = (char) sw;
     return getOption(opt);
   }
 
@@ -192,7 +192,7 @@ protected void initialize(String progname, String flags, String args[]) throws I
     for (int i = 0; i < flags.length(); i++) {
       boolean found;
       int cc = flags.charAt(i);
-      Character c = new Character((char) cc);
+      Character c = (char) cc;
       char alpha[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
           't', 'u', 'v', 'w', 'x', 'y', 'z'};
 
@@ -205,7 +205,7 @@ protected void initialize(String progname, String flags, String args[]) throws I
 
       found = false;
       for (int j = 0; j < alpha.length; j++) {
-        Character ch = new Character(alpha[j]);
+        Character ch = alpha[j];
         char uc = Character.toUpperCase(ch.charValue());
         if (alpha[j] == cc || uc == cc) {
           found = true;
@@ -228,7 +228,7 @@ protected void initialize(String progname, String flags, String args[]) throws I
           if (prv == ':') {
             throw new InvalidSwitch(throwstring + "Can't have consecutive ':'\n" + usage + "\n");
           } else {
-            Character cp = new Character((char) prv);
+            Character cp = (char) prv;
             OptSwitch sw = (OptSwitch) switchtab.get(cp);
             sw.SetHasValue(OptSwitch.VAL);
           }
@@ -259,7 +259,7 @@ protected void initialize(String progname, String flags, String args[]) throws I
       // more options, iterate them
       for (int j = 1; j < args[i].length(); j++) {
         cc = args[i].charAt(j);
-        Character fc = new Character(cc);
+        Character fc = cc;
         OptSwitch cs = (OptSwitch) switchtab.get(fc);
         if (cs == null) {
           // The supplied switch wasn't recognised.
diff --git a/opendap/dtswar/src/main/java/opendap/dts/SDTest.java b/opendap/dtswar/src/main/java/opendap/dts/SDTest.java
index 7717bbbfbc..58dc45343a 100644
--- a/opendap/dtswar/src/main/java/opendap/dts/SDTest.java
+++ b/opendap/dtswar/src/main/java/opendap/dts/SDTest.java
@@ -162,13 +162,13 @@ public static void parse_options(String[] args) {
     String arg = null;
     try {
       opts = new Getopts("f:c:", args);
-      if (opts.getSwitch(new Character('f')).set) {
-        arg = opts.getSwitch(new Character('f')).val;
+      if (opts.getSwitch('f').set) {
+        arg = opts.getSwitch('f').val;
         if (Debug)
           // System.out.print("DDS File: " + ((arg != null) ? arg : "null") + "\n");
           DDSFile = arg;
       }
-      if (opts.getSwitch(new Character('c')).set) {
+      if (opts.getSwitch('c').set) {
         arg = g.getOptarg();
         if (Debug)
           // System.out.print("Constraint Expression: \"" + ((arg != null) ? arg : "null") + "\"\n");
diff --git a/opendap/server/src/main/java/opendap/servlet/AsciiWriter.java b/opendap/server/src/main/java/opendap/servlet/AsciiWriter.java
index 6d7d172bcf..d63be9536c 100644
--- a/opendap/server/src/main/java/opendap/servlet/AsciiWriter.java
+++ b/opendap/server/src/main/java/opendap/servlet/AsciiWriter.java
@@ -105,19 +105,19 @@ public void showPrimitive(BaseType data, PrintWriter pw, boolean addName, String
     if (data instanceof DString) // covers DURL case
       showString(pw, ((DString) data).getValue());
     else if (data instanceof DFloat32)
-      pw.print((new Float(((DFloat32) data).getValue())).toString());
+      pw.print((Float.valueOf(((DFloat32) data).getValue())).toString());
     else if (data instanceof DFloat64)
-      pw.print((new Double(((DFloat64) data).getValue())).toString());
+      pw.print((Double.valueOf(((DFloat64) data).getValue())).toString());
     else if (data instanceof DUInt32)
-      pw.print((new Long(((DUInt32) data).getValue() & ((long) 0xFFFFFFFF))).toString());
+      pw.print((Long.valueOf(((DUInt32) data).getValue() & ((long) 0xFFFFFFFF))).toString());
     else if (data instanceof DUInt16)
-      pw.print((new Integer(((DUInt16) data).getValue() & 0xFFFF)).toString());
+      pw.print((Integer.valueOf(((DUInt16) data).getValue() & 0xFFFF)).toString());
     else if (data instanceof DInt32)
-      pw.print((new Integer(((DInt32) data).getValue())).toString());
+      pw.print((Integer.valueOf(((DInt32) data).getValue())).toString());
     else if (data instanceof DInt16)
-      pw.print((new Short(((DInt16) data).getValue())).toString());
+      pw.print((Short.valueOf(((DInt16) data).getValue())).toString());
     else if (data instanceof DByte)
-      pw.print((new Integer(((DByte) data).getValue() & 0xFF)).toString());
+      pw.print((Integer.valueOf(((DByte) data).getValue() & 0xFF)).toString());
     else
       pw.print("Not implemented type = " + data.getTypeName() + " " + data.getEncodedName() + "\n");
 
diff --git a/opendap/server/src/main/java/opendap/servlet/ascii/asciiByte.java b/opendap/server/src/main/java/opendap/servlet/ascii/asciiByte.java
index 4fc884b148..9178b8e92b 100644
--- a/opendap/server/src/main/java/opendap/servlet/ascii/asciiByte.java
+++ b/opendap/server/src/main/java/opendap/servlet/ascii/asciiByte.java
@@ -84,7 +84,7 @@ public void toASCII(PrintWriter pw, boolean addName, String rootName, boolean ne
     if (addName)
       pw.print(", ");
 
-    pw.print((new Byte(getValue())).toString());
+    pw.print((Byte.valueOf(getValue())).toString());
 
     if (newLine)
       pw.print("\n");
diff --git a/opendap/server/src/main/java/opendap/servlet/ascii/asciiF32.java b/opendap/server/src/main/java/opendap/servlet/ascii/asciiF32.java
index 683a5d3070..cec2168338 100644
--- a/opendap/server/src/main/java/opendap/servlet/ascii/asciiF32.java
+++ b/opendap/server/src/main/java/opendap/servlet/ascii/asciiF32.java
@@ -83,7 +83,7 @@ public void toASCII(PrintWriter pw, boolean addName, String rootName, boolean ne
       pw.print(", ");
 
 
-    pw.print((new Float(getValue())).toString());
+    pw.print((Float.valueOf(getValue())).toString());
 
     if (newLine)
       pw.print("\n");
diff --git a/opendap/server/src/main/java/opendap/servlet/ascii/asciiF64.java b/opendap/server/src/main/java/opendap/servlet/ascii/asciiF64.java
index bef75d9ee6..0ba1516da9 100644
--- a/opendap/server/src/main/java/opendap/servlet/ascii/asciiF64.java
+++ b/opendap/server/src/main/java/opendap/servlet/ascii/asciiF64.java
@@ -83,7 +83,7 @@ public void toASCII(PrintWriter pw, boolean addName, String rootName, boolean ne
     if (addName)
       pw.print(", ");
 
-    pw.print((new Double(getValue())).toString());
+    pw.print((Double.valueOf(getValue())).toString());
 
     if (newLine)
       pw.print("\n");
diff --git a/opendap/server/src/main/java/opendap/servlet/ascii/asciiI16.java b/opendap/server/src/main/java/opendap/servlet/ascii/asciiI16.java
index 79afd095ee..d9f27c1c31 100644
--- a/opendap/server/src/main/java/opendap/servlet/ascii/asciiI16.java
+++ b/opendap/server/src/main/java/opendap/servlet/ascii/asciiI16.java
@@ -83,7 +83,7 @@ public void toASCII(PrintWriter pw, boolean addName, String rootName, boolean ne
     if (addName)
       pw.print(", ");
 
-    pw.print((new Short(getValue())).toString());
+    pw.print((Short.valueOf(getValue())).toString());
 
     if (newLine)
       pw.print("\n");
diff --git a/opendap/server/src/main/java/opendap/servlet/ascii/asciiI32.java b/opendap/server/src/main/java/opendap/servlet/ascii/asciiI32.java
index c2205376d5..6f3166bdaf 100644
--- a/opendap/server/src/main/java/opendap/servlet/ascii/asciiI32.java
+++ b/opendap/server/src/main/java/opendap/servlet/ascii/asciiI32.java
@@ -84,7 +84,7 @@ public void toASCII(PrintWriter pw, boolean addName, String rootName, boolean ne
     if (addName)
       pw.print(", ");
 
-    pw.print((new Long(getValue())).toString());
+    pw.print((Long.valueOf(getValue())).toString());
 
     if (newLine)
       pw.print("\n");
diff --git a/opendap/server/src/main/java/opendap/servlet/ascii/asciiUI16.java b/opendap/server/src/main/java/opendap/servlet/ascii/asciiUI16.java
index 55da5d375b..28bdcb9243 100644
--- a/opendap/server/src/main/java/opendap/servlet/ascii/asciiUI16.java
+++ b/opendap/server/src/main/java/opendap/servlet/ascii/asciiUI16.java
@@ -83,7 +83,7 @@ public void toASCII(PrintWriter pw, boolean addName, String rootName, boolean ne
     if (addName)
       pw.print(", ");
 
-    pw.print((new Integer(getValue() & 0xFFFF)).toString());
+    pw.print((Integer.valueOf(getValue() & 0xFFFF)).toString());
 
     if (newLine)
       pw.print("\n");
diff --git a/opendap/server/src/main/java/opendap/servlet/ascii/asciiUI32.java b/opendap/server/src/main/java/opendap/servlet/ascii/asciiUI32.java
index fc7a9f225c..c903ad3775 100644
--- a/opendap/server/src/main/java/opendap/servlet/ascii/asciiUI32.java
+++ b/opendap/server/src/main/java/opendap/servlet/ascii/asciiUI32.java
@@ -83,7 +83,7 @@ public void toASCII(PrintWriter pw, boolean addName, String rootName, boolean ne
     if (addName)
       pw.print(", ");
 
-    pw.print((new Long(getValue() & ((long) 0xFFFFFFFF))).toString());
+    pw.print((Long.valueOf(getValue() & ((long) 0xFFFFFFFF))).toString());
 
     if (newLine)
       pw.print("\n");

From 2084d6c2c53768bdcffdf5f7ac4dda9ee70fa0d8 Mon Sep 17 00:00:00 2001
From: Hailey Johnson 
Date: Wed, 10 Jul 2024 15:30:56 -0700
Subject: [PATCH 105/120] fix DSG subet writer tests

---
 .../main/java/thredds/core/DatasetManager.java    |  2 +-
 .../AbstractStationProfileSubsetWriter.java       | 12 +++++-------
 .../station/StationProfileSubsetWriterNetcdf.java |  8 +++++---
 .../server/ncss/view/dsg/DsgSubsetWriterTest.java |  8 ++++----
 .../ncss/view/dsg/point/netcdf3/outputAll.ncml    |  2 +-
 .../ncss/view/dsg/point/netcdf3/outputSubset.ncml |  2 +-
 .../ncss/view/dsg/point/netcdf4/outputAll.ncml    |  2 +-
 .../ncss/view/dsg/point/netcdf4/outputSubset.ncml |  2 +-
 .../ncss/view/dsg/station/netcdf3/outputAll.ncml  |  5 ++---
 .../view/dsg/station/netcdf3/outputSubset1.ncml   |  5 ++---
 .../view/dsg/station/netcdf3/outputSubset2.ncml   |  5 ++---
 .../ncss/view/dsg/station/netcdf4/outputAll.ncml  |  5 ++---
 .../view/dsg/station/netcdf4/outputSubset1.ncml   |  5 ++---
 .../view/dsg/station/netcdf4/outputSubset2.ncml   |  5 ++---
 .../ncss/view/dsg/station_profile/input.ncml      |  2 +-
 .../dsg/station_profile/netcdf3/outputAll.ncml    | 14 +++++++++++---
 .../station_profile/netcdf3/outputSubset1.ncml    | 13 ++++++++++---
 .../station_profile/netcdf3/outputSubset2.ncml    | 12 +++++++++---
 .../dsg/station_profile/netcdf4/outputAll.ncml    | 15 ++++++++++++---
 .../station_profile/netcdf4/outputSubset1.ncml    | 12 ++++++++++--
 .../station_profile/netcdf4/outputSubset2.ncml    | 13 ++++++++++---
 21 files changed, 94 insertions(+), 55 deletions(-)

diff --git a/tds/src/main/java/thredds/core/DatasetManager.java b/tds/src/main/java/thredds/core/DatasetManager.java
index aaaeca3911..ba9a648ee8 100644
--- a/tds/src/main/java/thredds/core/DatasetManager.java
+++ b/tds/src/main/java/thredds/core/DatasetManager.java
@@ -400,7 +400,7 @@ public CoverageCollection openCoverageDataset(HttpServletRequest req, HttpServle
     String ncml = datasetTracker.findNcml(reqPath);
     if (ncml != null) {
       Optional opt =
-          CoverageDatasetFactory.openNcmlString(ncml, DatasetUrl.findDatasetUrl(reqPath).getTrueurl());
+          CoverageDatasetFactory.openNcmlString(ncml);//, DatasetUrl.findDatasetUrl(reqPath).getTrueurl());
       if (!opt.isPresent())
         throw new FileNotFoundException("NcML is not a Grid Dataset " + reqPath + " err=" + opt.getErrorMessage());
 
diff --git a/tds/src/main/java/thredds/server/ncss/view/dsg/station/AbstractStationProfileSubsetWriter.java b/tds/src/main/java/thredds/server/ncss/view/dsg/station/AbstractStationProfileSubsetWriter.java
index e617ed907f..7ef6785ec8 100644
--- a/tds/src/main/java/thredds/server/ncss/view/dsg/station/AbstractStationProfileSubsetWriter.java
+++ b/tds/src/main/java/thredds/server/ncss/view/dsg/station/AbstractStationProfileSubsetWriter.java
@@ -65,22 +65,20 @@ public void write() throws Exception {
 
     for (StationFeature profileFeat : subsettedStationFeatCol.getStationFeatures()) {
       assert profileFeat instanceof StationProfileFeature : "Expected StationProfileFeature, not "
-          + profileFeat.getClass().toString();
+              + profileFeat.getClass().toString();
       // Perform temporal subset. We do this even when a time instant is specified, in which case wantedRange
       // represents a sanity check (i.e. "give me the feature closest to the specified time, but it must at least be
       // within an hour").
-      StationProfileFeature subsettedStationProfileFeat = ((StationProfileFeature) profileFeat);
       if (wantedRange != null) {
-        subsettedStationProfileFeat = subsettedStationProfileFeat.subset(wantedRange);
+        profileFeat = ((StationProfileFeature)profileFeat).subset(wantedRange);
       }
 
       if (ncssParams.getTime() != null) {
         CalendarDate wantedTime = ncssParams.getTime();
-        subsettedStationProfileFeat = new ClosestTimeStationProfileFeatureSubset(
-            (StationProfileFeatureImpl) subsettedStationProfileFeat, wantedTime);
+        profileFeat = new ClosestTimeStationProfileFeatureSubset(
+                (StationProfileFeatureImpl) profileFeat, wantedTime);
       }
-
-      count += writeStationProfileTimeSeriesFeature(subsettedStationProfileFeat);
+      count += writeStationProfileTimeSeriesFeature((StationProfileFeature) profileFeat);
     }
 
     if (count == 0) {
diff --git a/tds/src/main/java/thredds/server/ncss/view/dsg/station/StationProfileSubsetWriterNetcdf.java b/tds/src/main/java/thredds/server/ncss/view/dsg/station/StationProfileSubsetWriterNetcdf.java
index d4754e5ee7..58a0471089 100644
--- a/tds/src/main/java/thredds/server/ncss/view/dsg/station/StationProfileSubsetWriterNetcdf.java
+++ b/tds/src/main/java/thredds/server/ncss/view/dsg/station/StationProfileSubsetWriterNetcdf.java
@@ -86,7 +86,9 @@ public HttpHeaders getHttpHeaders(String datasetPath, boolean isStream) {
 
   @Override
   protected void writeHeader(StationProfileFeature stn) throws Exception {
-    return;
+    ArrayList asList = new ArrayList<>();
+    asList.add(stn);
+    cfWriter.writeHeader(asList);
   }
 
   @Override
@@ -95,8 +97,8 @@ protected void writeProfileFeature(StationProfileFeature stn, ProfileFeature pro
   }
 
   @Override
-  protected void writeStationPointFeature(StationProfileFeature stn, StationPointFeature stationPointFeat) {
-    return;
+  protected void writeStationPointFeature(StationProfileFeature stn, StationPointFeature stationPointFeat) throws Exception {
+    cfWriter.writeObsData(stationPointFeat);
   }
 
   @Override
diff --git a/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java b/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java
index 4cd4aa0a0d..982bd5855b 100644
--- a/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java
+++ b/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java
@@ -40,7 +40,6 @@
  * Created by cwardgar on 2014/05/27.
  */
 @RunWith(Parameterized.class)
-@Ignore("TODO: fix to work with new cfpointwriters")
 public class DsgSubsetWriterTest {
   private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   @Rule
@@ -115,7 +114,7 @@ public static List getTestParameters() {
     // I like this workaround better than  because subclasses can potentially override setupClass().
     setupClass();
 
-    return Arrays.asList(new Object[][] {
+    return Arrays.asList(new Object[][]{
         // Point
         {FeatureType.POINT, SupportedFormat.CSV_FILE, subsetParamsAll, "outputAll.csv"},
         {FeatureType.POINT, SupportedFormat.CSV_FILE, subsetParamsPoint, "outputSubset.csv"},
@@ -165,7 +164,8 @@ public static List getTestParameters() {
 
         {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsAll, "outputAll.ncml"},
         {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsProfile1, "outputSubset1.ncml"},
-        {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsProfile2, "outputSubset2.ncml"}});
+        {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsProfile2, "outputSubset2.ncml"},
+    });
   }
 
   private final FeatureType wantedType;
@@ -192,7 +192,7 @@ public void testWrite() throws Exception {
 
     File datasetFile = new File(getClass().getResource(datasetResource).toURI());
     File expectedResultFile = new File(getClass().getResource(expectedResultResource).toURI());
-    File actualResultFile = tempFolder.newFile();
+    File actualResultFile = File.createTempFile("test", null);//tempFolder.newFile();
 
     try (FeatureDatasetPoint fdPoint = openPointDataset(wantedType, datasetFile);
         OutputStream outFileStream = new BufferedOutputStream(new FileOutputStream(actualResultFile))) {
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf3/outputAll.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf3/outputAll.ncml
index 702c5b15e2..c089b43269 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf3/outputAll.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf3/outputAll.ncml
@@ -44,7 +44,7 @@
 	10.0 40.0 70.0 100.0 130.0 160.0 190.0 220.0 250.0 280.0 310.0 340.0 370.0 400.0 430.0
   
   
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf3/outputSubset.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf3/outputSubset.ncml
index 44450ab792..9ced4f4214 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf3/outputSubset.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf3/outputSubset.ncml
@@ -36,7 +36,7 @@
 	10.0 13.0 16.0 19.0
   
   
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf4/outputAll.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf4/outputAll.ncml
index c09c07f24c..602bc4b5ea 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf4/outputAll.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf4/outputAll.ncml
@@ -50,7 +50,7 @@
 	10.0 40.0 70.0 100.0 130.0 160.0 190.0 220.0 250.0 280.0 310.0 340.0 370.0 400.0 430.0
   
     
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf4/outputSubset.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf4/outputSubset.ncml
index 1b4a785aa1..cdf53edfac 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf4/outputSubset.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/point/netcdf4/outputSubset.ncml
@@ -41,7 +41,7 @@
 	10.0 13.0 16.0 19.0
   
   
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputAll.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputAll.ncml
index e7912d7e7b..a64637029b 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputAll.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputAll.ncml
@@ -20,8 +20,7 @@
   
     
     
-    
-    
+    
 	100.0 106.0 112.0
   
   
@@ -66,7 +65,7 @@
 	10.0 40.0 70.0 100.0 130.0 160.0 190.0 220.0 250.0 280.0 310.0 340.0 370.0 400.0 430.0
   
     
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputSubset1.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputSubset1.ncml
index d49224226f..5c804c4cc2 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputSubset1.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputSubset1.ncml
@@ -20,8 +20,7 @@
   
     
     
-    
-    
+    
 	100.0 112.0
   
   
@@ -58,7 +57,7 @@
 	40.0 70.0 100.0 340.0 370.0 400.0
   
   
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputSubset2.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputSubset2.ncml
index a59ba9c855..0e53303b1a 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputSubset2.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf3/outputSubset2.ncml
@@ -20,8 +20,7 @@
   
     
     
-    
-    
+    
 	100.0 106.0 112.0
   
   
@@ -66,7 +65,7 @@
 	70.0 220.0 370.0
   
     
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputAll.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputAll.ncml
index ed4a792f01..99b02dd364 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputAll.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputAll.ncml
@@ -20,8 +20,7 @@
   
     
     
-    
-    
+    
 	100.0 106.0 112.0
   
   
@@ -70,7 +69,7 @@
 	10.0 40.0 70.0 100.0 130.0 160.0 190.0 220.0 250.0 280.0 310.0 340.0 370.0 400.0 430.0
   
     
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputSubset1.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputSubset1.ncml
index 18d68de58d..06389ec700 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputSubset1.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputSubset1.ncml
@@ -20,8 +20,7 @@
   
     
     
-    
-    
+    
 	100.0 112.0
   
   
@@ -61,7 +60,7 @@
 	40.0 70.0 100.0 340.0 370.0 400.0
   
     
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputSubset2.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputSubset2.ncml
index 94a715f23e..e6572042a3 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputSubset2.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station/netcdf4/outputSubset2.ncml
@@ -20,8 +20,7 @@
   
     
     
-    
-    
+    
 	100.0 106.0 112.0
   
   
@@ -70,7 +69,7 @@
 	70.0 220.0 370.0
   
     
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/input.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/input.ncml
index 9e8da6b8e6..4ee07636bb 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/input.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/input.ncml
@@ -60,5 +60,5 @@
     
 
     
-    
+    
 
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputAll.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputAll.ncml
index 7a3b029d56..573246bce0 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputAll.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputAll.ncml
@@ -44,6 +44,14 @@
   3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
   
 
+  
+    
+    
+    0.0 0.0 0.0 10.0 10.0 10.0 20.0 20.0 20.0 30.0 30.0 30.0 40.0 40.0 40.0
+    0.0 0.0 0.0 10.0 10.0 10.0 20.0 20.0 20.0 30.0 30.0 30.0 40.0 40.0 40.0
+    0.0 0.0 0.0 10.0 10.0 10.0 20.0 20.0 20.0 30.0 30.0 30.0 40.0 40.0 40.0
+  
+
   
     
     
@@ -69,7 +77,7 @@
     
     
     
-    
+    
 	1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 118 121 124 127 130 133
   
 
@@ -77,11 +85,11 @@
     
     
     
-    
+    
 	10 40 70 100 130 160 190 220 250 280 310 340 370 400 430 460 490 520 550 580 610 640 670 700 730 760 790 820 850 880 910 940 970 1000 1030 1060 1090 1120 1150 1180 1210 1240 1270 1300 1330
   
 
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputSubset1.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputSubset1.ncml
index 5114f4df1e..a0fdaf33f1 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputSubset1.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputSubset1.ncml
@@ -48,7 +48,14 @@
     
     
     
-    10.0 20.0 30.0 10.0 20.0 30.0
+  10.0 20.0 30.0 10.0 20.0 30.0
+  
+
+  
+    
+    
+    10.0 10.0 10.0 20.0 20.0 20.0 30.0 30.0 30.0
+    10.0 10.0 10.0 20.0 20.0 20.0 30.0 30.0 30.0
   
 
   
@@ -69,11 +76,11 @@
     
     
     
-    
+    
 	100 130 160 190 220 250 280 310 340 1000 1030 1060 1090 1120 1150 1180 1210 1240
   
 
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputSubset2.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputSubset2.ncml
index 6ed263cd9a..6c7cc614b6 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputSubset2.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf3/outputSubset2.ncml
@@ -51,6 +51,12 @@
   20.0 20.0 20.0
   
 
+  
+    
+    
+    20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0
+  
+
   
     
     
@@ -69,7 +75,7 @@
     
     
     
-    
+    
 	19 22 25 64 67 70 109 112 115
   
 
@@ -77,11 +83,11 @@
     
     
     
-    
+    
 	190 220 250 640 670 700 1090 1120 1150
   
 
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputAll.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputAll.ncml
index 4605e9c145..a8cf33e5f0 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputAll.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputAll.ncml
@@ -57,6 +57,15 @@
 	0 0 0 0 0 1 1 1 1 1 2 2 2 2 2
   
 
+  
+    
+    
+    
+    0.0 0.0 0.0 10.0 10.0 10.0 20.0 20.0 20.0 30.0 30.0 30.0 40.0 40.0 40.0
+    0.0 0.0 0.0 10.0 10.0 10.0 20.0 20.0 20.0 30.0 30.0 30.0 40.0 40.0 40.0
+    0.0 0.0 0.0 10.0 10.0 10.0 20.0 20.0 20.0 30.0 30.0 30.0 40.0 40.0 40.0
+  
+
   
     
     
@@ -70,7 +79,7 @@
     
     
     
-    
+    
     
 	1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 118 121 124 127 130 133
   
@@ -79,12 +88,12 @@
     
     
     
-    
+    
     
     10 40 70 100 130 160 190 220 250 280 310 340 370 400 430 460 490 520 550 580 610 640 670 700 730 760 790 820 850 880 910 940 970 1000 1030 1060 1090 1120 1150 1180 1210 1240 1270 1300 1330
   
 
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputSubset1.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputSubset1.ncml
index e8adf33dce..22bdc035f9 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputSubset1.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputSubset1.ncml
@@ -44,6 +44,14 @@
   3 3 3 3 3 3
   
 
+  
+    
+    
+    
+    10.0 10.0 10.0 20.0 20.0 20.0 30.0 30.0 30.0
+    10.0 10.0 10.0 20.0 20.0 20.0 30.0 30.0 30.0
+  
+
   
     
     
@@ -70,12 +78,12 @@
     
     
     
-    
+    
     
 	100 130 160 190 220 250 280 310 340 1000 1030 1060 1090 1120 1150 1180 1210 1240
 	
 
-  
+  
   
   
   
diff --git a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputSubset2.ncml b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputSubset2.ncml
index 7ac53c80c5..0b1c447b74 100644
--- a/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputSubset2.ncml
+++ b/tds/src/test/resources/thredds/server/ncss/view/dsg/station_profile/netcdf4/outputSubset2.ncml
@@ -57,6 +57,13 @@
 	0 1 2
   
 
+  
+    
+    
+    
+    20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0
+  
+
   
     
     
@@ -70,7 +77,7 @@
     
     
     
-    
+    
     
 	19 22 25 64 67 70 109 112 115
   
@@ -79,12 +86,12 @@
     
     
     
-    
+    
     
 	190 220 250 640 670 700 1090 1120 1150
   
 
-  
+  
   
   
   

From 77ad6135eee9ea063a488d382ec15e3ff81063eb Mon Sep 17 00:00:00 2001
From: Hailey Johnson 
Date: Fri, 12 Jul 2024 11:30:06 -0700
Subject: [PATCH 106/120] spotless

---
 tds/src/main/java/thredds/core/DatasetManager.java         | 4 ++--
 .../dsg/station/AbstractStationProfileSubsetWriter.java    | 7 +++----
 .../view/dsg/station/StationProfileSubsetWriterNetcdf.java | 3 ++-
 .../thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java  | 7 +++----
 4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tds/src/main/java/thredds/core/DatasetManager.java b/tds/src/main/java/thredds/core/DatasetManager.java
index ba9a648ee8..65ba6738a0 100644
--- a/tds/src/main/java/thredds/core/DatasetManager.java
+++ b/tds/src/main/java/thredds/core/DatasetManager.java
@@ -399,8 +399,8 @@ public CoverageCollection openCoverageDataset(HttpServletRequest req, HttpServle
     // since the urlPath doesn't need to point to a file if there is ncml
     String ncml = datasetTracker.findNcml(reqPath);
     if (ncml != null) {
-      Optional opt =
-          CoverageDatasetFactory.openNcmlString(ncml);//, DatasetUrl.findDatasetUrl(reqPath).getTrueurl());
+      Optional opt = CoverageDatasetFactory.openNcmlString(ncml);// ,
+                                                                                         // DatasetUrl.findDatasetUrl(reqPath).getTrueurl());
       if (!opt.isPresent())
         throw new FileNotFoundException("NcML is not a Grid Dataset " + reqPath + " err=" + opt.getErrorMessage());
 
diff --git a/tds/src/main/java/thredds/server/ncss/view/dsg/station/AbstractStationProfileSubsetWriter.java b/tds/src/main/java/thredds/server/ncss/view/dsg/station/AbstractStationProfileSubsetWriter.java
index 7ef6785ec8..14ec31bb15 100644
--- a/tds/src/main/java/thredds/server/ncss/view/dsg/station/AbstractStationProfileSubsetWriter.java
+++ b/tds/src/main/java/thredds/server/ncss/view/dsg/station/AbstractStationProfileSubsetWriter.java
@@ -65,18 +65,17 @@ public void write() throws Exception {
 
     for (StationFeature profileFeat : subsettedStationFeatCol.getStationFeatures()) {
       assert profileFeat instanceof StationProfileFeature : "Expected StationProfileFeature, not "
-              + profileFeat.getClass().toString();
+          + profileFeat.getClass().toString();
       // Perform temporal subset. We do this even when a time instant is specified, in which case wantedRange
       // represents a sanity check (i.e. "give me the feature closest to the specified time, but it must at least be
       // within an hour").
       if (wantedRange != null) {
-        profileFeat = ((StationProfileFeature)profileFeat).subset(wantedRange);
+        profileFeat = ((StationProfileFeature) profileFeat).subset(wantedRange);
       }
 
       if (ncssParams.getTime() != null) {
         CalendarDate wantedTime = ncssParams.getTime();
-        profileFeat = new ClosestTimeStationProfileFeatureSubset(
-                (StationProfileFeatureImpl) profileFeat, wantedTime);
+        profileFeat = new ClosestTimeStationProfileFeatureSubset((StationProfileFeatureImpl) profileFeat, wantedTime);
       }
       count += writeStationProfileTimeSeriesFeature((StationProfileFeature) profileFeat);
     }
diff --git a/tds/src/main/java/thredds/server/ncss/view/dsg/station/StationProfileSubsetWriterNetcdf.java b/tds/src/main/java/thredds/server/ncss/view/dsg/station/StationProfileSubsetWriterNetcdf.java
index 58a0471089..671293862c 100644
--- a/tds/src/main/java/thredds/server/ncss/view/dsg/station/StationProfileSubsetWriterNetcdf.java
+++ b/tds/src/main/java/thredds/server/ncss/view/dsg/station/StationProfileSubsetWriterNetcdf.java
@@ -97,7 +97,8 @@ protected void writeProfileFeature(StationProfileFeature stn, ProfileFeature pro
   }
 
   @Override
-  protected void writeStationPointFeature(StationProfileFeature stn, StationPointFeature stationPointFeat) throws Exception {
+  protected void writeStationPointFeature(StationProfileFeature stn, StationPointFeature stationPointFeat)
+      throws Exception {
     cfWriter.writeObsData(stationPointFeat);
   }
 
diff --git a/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java b/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java
index 982bd5855b..cfbad4d057 100644
--- a/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java
+++ b/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java
@@ -114,7 +114,7 @@ public static List getTestParameters() {
     // I like this workaround better than  because subclasses can potentially override setupClass().
     setupClass();
 
-    return Arrays.asList(new Object[][]{
+    return Arrays.asList(new Object[][] {
         // Point
         {FeatureType.POINT, SupportedFormat.CSV_FILE, subsetParamsAll, "outputAll.csv"},
         {FeatureType.POINT, SupportedFormat.CSV_FILE, subsetParamsPoint, "outputSubset.csv"},
@@ -164,8 +164,7 @@ public static List getTestParameters() {
 
         {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsAll, "outputAll.ncml"},
         {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsProfile1, "outputSubset1.ncml"},
-        {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsProfile2, "outputSubset2.ncml"},
-    });
+        {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsProfile2, "outputSubset2.ncml"},});
   }
 
   private final FeatureType wantedType;
@@ -192,7 +191,7 @@ public void testWrite() throws Exception {
 
     File datasetFile = new File(getClass().getResource(datasetResource).toURI());
     File expectedResultFile = new File(getClass().getResource(expectedResultResource).toURI());
-    File actualResultFile = File.createTempFile("test", null);//tempFolder.newFile();
+    File actualResultFile = File.createTempFile("test", null);// tempFolder.newFile();
 
     try (FeatureDatasetPoint fdPoint = openPointDataset(wantedType, datasetFile);
         OutputStream outFileStream = new BufferedOutputStream(new FileOutputStream(actualResultFile))) {

From c5f6bfe6f51d134c6f8282e3d295fd9248360c03 Mon Sep 17 00:00:00 2001
From: Hailey Johnson 
Date: Fri, 12 Jul 2024 11:38:17 -0700
Subject: [PATCH 107/120] clean up

---
 tds/src/main/java/thredds/core/DatasetManager.java            | 4 ++--
 .../thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tds/src/main/java/thredds/core/DatasetManager.java b/tds/src/main/java/thredds/core/DatasetManager.java
index 65ba6738a0..aaaeca3911 100644
--- a/tds/src/main/java/thredds/core/DatasetManager.java
+++ b/tds/src/main/java/thredds/core/DatasetManager.java
@@ -399,8 +399,8 @@ public CoverageCollection openCoverageDataset(HttpServletRequest req, HttpServle
     // since the urlPath doesn't need to point to a file if there is ncml
     String ncml = datasetTracker.findNcml(reqPath);
     if (ncml != null) {
-      Optional opt = CoverageDatasetFactory.openNcmlString(ncml);// ,
-                                                                                         // DatasetUrl.findDatasetUrl(reqPath).getTrueurl());
+      Optional opt =
+          CoverageDatasetFactory.openNcmlString(ncml, DatasetUrl.findDatasetUrl(reqPath).getTrueurl());
       if (!opt.isPresent())
         throw new FileNotFoundException("NcML is not a Grid Dataset " + reqPath + " err=" + opt.getErrorMessage());
 
diff --git a/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java b/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java
index cfbad4d057..a69f2d8b41 100644
--- a/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java
+++ b/tds/src/test/java/thredds/server/ncss/view/dsg/DsgSubsetWriterTest.java
@@ -164,7 +164,7 @@ public static List getTestParameters() {
 
         {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsAll, "outputAll.ncml"},
         {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsProfile1, "outputSubset1.ncml"},
-        {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsProfile2, "outputSubset2.ncml"},});
+        {FeatureType.STATION_PROFILE, SupportedFormat.NETCDF4, subsetParamsProfile2, "outputSubset2.ncml"}});
   }
 
   private final FeatureType wantedType;
@@ -191,7 +191,7 @@ public void testWrite() throws Exception {
 
     File datasetFile = new File(getClass().getResource(datasetResource).toURI());
     File expectedResultFile = new File(getClass().getResource(expectedResultResource).toURI());
-    File actualResultFile = File.createTempFile("test", null);// tempFolder.newFile();
+    File actualResultFile = tempFolder.newFile();
 
     try (FeatureDatasetPoint fdPoint = openPointDataset(wantedType, datasetFile);
         OutputStream outFileStream = new BufferedOutputStream(new FileOutputStream(actualResultFile))) {

From bf0570c31f1b1e5711f540675057d80c11662e2a Mon Sep 17 00:00:00 2001
From: Hailey Johnson 
Date: Fri, 12 Jul 2024 13:42:10 -0600
Subject: [PATCH 108/120] enable two more ignored tests

---
 .../java/thredds/server/services/ConsistentDatesTest.java      | 2 +-
 .../ncss/controller/gridaspoint/TestGridAsPointMisc.java       | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java b/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java
index 24e4ec7624..7c0046dab8 100644
--- a/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java
+++ b/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java
@@ -157,7 +157,7 @@ public void checkNCSSDates() throws JDOMException, IOException {
   }
 
   // PF5_SST_Climatology: :units = "hour since 0000-01-01 00:00:00";
-  @Ignore("TODO: fix to work with new cfpointwriters")
+//  @Ignore("TODO: fix to work with new cfpointwriters")
   @Test
   public void checkNCSSDatesInNetcdf() throws JDOMException, IOException {
     String endpoint = TestOnLocalServer.withHttpPath(
diff --git a/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java b/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java
index 85a78b888a..6b95d33b52 100644
--- a/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java
+++ b/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java
@@ -70,8 +70,7 @@ public void getGridAsPointSubsetAllSupportedFormats() throws Exception {
       Assert.assertTrue(ct.startsWith(sf.getMimeType()));
     }
   }
-
-  @Ignore("TODO: fix to work with new cfpointwriters")
+  
   @Test
   public void getGridAsProfileSubsetAllSupportedFormats() throws Exception {
     for (SupportedFormat sf : SupportedOperation.GRID_AS_POINT_REQUEST.getSupportedFormats()) {

From 6283369f7647d362ce7d9304944291e512a3829a Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Fri, 12 Jul 2024 14:46:43 -0600
Subject: [PATCH 109/120] Remove comment

---
 .../java/thredds/server/services/ConsistentDatesTest.java        | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java b/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java
index 7c0046dab8..f6b8da8c00 100644
--- a/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java
+++ b/tds/src/integrationTests/java/thredds/server/services/ConsistentDatesTest.java
@@ -157,7 +157,6 @@ public void checkNCSSDates() throws JDOMException, IOException {
   }
 
   // PF5_SST_Climatology: :units = "hour since 0000-01-01 00:00:00";
-//  @Ignore("TODO: fix to work with new cfpointwriters")
   @Test
   public void checkNCSSDatesInNetcdf() throws JDOMException, IOException {
     String endpoint = TestOnLocalServer.withHttpPath(

From b20919f23cb0b02584dcccad3bd916aa1f11dd6a Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Fri, 12 Jul 2024 14:49:58 -0600
Subject: [PATCH 110/120] Spotless fix

---
 .../server/ncss/controller/gridaspoint/TestGridAsPointMisc.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java b/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java
index 6b95d33b52..f3395b7f39 100644
--- a/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java
+++ b/tds/src/test/java/thredds/server/ncss/controller/gridaspoint/TestGridAsPointMisc.java
@@ -70,7 +70,7 @@ public void getGridAsPointSubsetAllSupportedFormats() throws Exception {
       Assert.assertTrue(ct.startsWith(sf.getMimeType()));
     }
   }
-  
+
   @Test
   public void getGridAsProfileSubsetAllSupportedFormats() throws Exception {
     for (SupportedFormat sf : SupportedOperation.GRID_AS_POINT_REQUEST.getSupportedFormats()) {

From dbc6762279d0d7c56bbffe8a5a0dccddc34fa763 Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Mon, 15 Jul 2024 14:01:09 -0600
Subject: [PATCH 111/120] Get 3rd party dependencies from nexus (#512)

* Remove JDK 14 from workflows

* Look for missing 3rd party dependencies in own repo
---
 .github/workflows/tds.yml     | 8 --------
 build.gradle                  | 2 ++
 gradle/root/publishing.gradle | 1 +
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/tds.yml b/.github/workflows/tds.yml
index 5d9629e729..174990fa5a 100644
--- a/.github/workflows/tds.yml
+++ b/.github/workflows/tds.yml
@@ -6,18 +6,10 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        # test against latest 11, 14 of zulu and 11 of temurin java
         java-version: [ 11 ]
         java-vendor: [ 'zulu', 'temurin' ]
         # test against tomcat 8.5.x and tomcat 9.x
         servletcontainer: [ 'tomcat85', 'tomcat9' ]
-        include:
-          - java-version: 14
-            java-vendor: 'zulu'
-            servletcontainer: 'tomcat85'
-          - java-version: 14
-            java-vendor: 'zulu'
-            servletcontainer: 'tomcat9'
     steps:
       - uses: actions/checkout@v4
       - name: Build and test with Gradle (${{ matrix.java-vendor }} ${{ matrix.java-version }})
diff --git a/build.gradle b/build.gradle
index 81eb4289b4..89211f20d8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -24,6 +24,8 @@ buildscript {
       }
       // only look for unidata plugin related artifacts from the unidata-all repo
       filter {
+        includeModule 'com.burgstaller', 'okhttp-digest'
+        includeModule 'org.ysb33r.gradle', 'grolifant'
         includeModule 'edu.ucar.unidata.site', 'jekyll-plugin'
         includeModule 'edu.ucar.unidata.site', 'jekyll-gems'
         includeModule 'edu.ucar.unidata', 'unidata-nexus-gradle'
diff --git a/gradle/root/publishing.gradle b/gradle/root/publishing.gradle
index 507b3cebd0..d902818fad 100644
--- a/gradle/root/publishing.gradle
+++ b/gradle/root/publishing.gradle
@@ -17,6 +17,7 @@ buildscript {
       // only look for unidata plugin related artifacts from the unidata-all repo
       filter {
         includeModule 'edu.ucar.unidata', 'unidata-nexus-gradle'
+        includeModule 'com.burgstaller', 'okhttp-digest'
       }
     }
   }

From 892fa5788faa1dbb378dc3023cba4929c66c61aa Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Tue, 16 Jul 2024 09:38:00 -0600
Subject: [PATCH 112/120] Update docset versions to 5.5

---
 docs/adminguide/src/site/_config.yml | 2 +-
 docs/quickstart/src/site/_config.yml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/adminguide/src/site/_config.yml b/docs/adminguide/src/site/_config.yml
index 990b727175..b94b9596a4 100644
--- a/docs/adminguide/src/site/_config.yml
+++ b/docs/adminguide/src/site/_config.yml
@@ -2,7 +2,7 @@
 theme: unidata-jekyll-theme
 
 # this will appear in an HTML meta tag, sidebar, and perhaps elsewhere
-docset_version: 5.4
+docset_version: 5.5
 
 # this appears on the top navigation bar next to the home button
 topnav_title: THREDDS Data Server (TDS)
diff --git a/docs/quickstart/src/site/_config.yml b/docs/quickstart/src/site/_config.yml
index 0172b7e13e..2d2864c2a6 100644
--- a/docs/quickstart/src/site/_config.yml
+++ b/docs/quickstart/src/site/_config.yml
@@ -2,7 +2,7 @@
 theme: unidata-jekyll-theme
 
 # this will appear in an HTML meta tag, sidebar, and perhaps elsewhere
-docset_version: 5.4
+docset_version: 5.5
 
 # this appears on the top navigation bar next to the home button
 topnav_title: THREDDS Data Server (TDS)

From 049b249d8b485656e69d1b32277b2a67f08377e3 Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Tue, 16 Jul 2024 09:39:54 -0600
Subject: [PATCH 113/120] Update netcdf-java docset version to 5.6

---
 docs/adminguide/src/site/_config.yml | 2 +-
 docs/devguide/src/site/_config.yml   | 2 +-
 docs/quickstart/src/site/_config.yml | 2 +-
 docs/userguide/src/site/_config.yml  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/adminguide/src/site/_config.yml b/docs/adminguide/src/site/_config.yml
index b94b9596a4..737295e1b9 100644
--- a/docs/adminguide/src/site/_config.yml
+++ b/docs/adminguide/src/site/_config.yml
@@ -75,7 +75,7 @@ docset_name: adminguide
 ###########################################
 
 # this will appear in the sidebar and various doc pages
-netcdf-java_docset_version: 5.5
+netcdf-java_docset_version: 5.6
 
 # this will appear in various doc pages
 tomcat_version: 9.0
diff --git a/docs/devguide/src/site/_config.yml b/docs/devguide/src/site/_config.yml
index c8b6f293e8..5f0f0077b8 100644
--- a/docs/devguide/src/site/_config.yml
+++ b/docs/devguide/src/site/_config.yml
@@ -75,7 +75,7 @@ docset_name: devguide
 ###########################################
 
 # this will appear in the sidebar and various doc pages
-netcdf-java_docset_version: 5.5
+netcdf-java_docset_version: 5.6
 
 # this will appear in various doc pages
 tomcat_version: 9.0
diff --git a/docs/quickstart/src/site/_config.yml b/docs/quickstart/src/site/_config.yml
index 2d2864c2a6..11079456c3 100644
--- a/docs/quickstart/src/site/_config.yml
+++ b/docs/quickstart/src/site/_config.yml
@@ -75,7 +75,7 @@ docset_name: quickstart
 ###########################################
 
 # this will appear in the sidebar and various doc pages
-netcdf-java_docset_version: 5.5
+netcdf-java_docset_version: 5.6
 
 # this will appear in various doc pages
 tomcat_version: 9.0
diff --git a/docs/userguide/src/site/_config.yml b/docs/userguide/src/site/_config.yml
index 93c54a43e9..6babd53ab7 100644
--- a/docs/userguide/src/site/_config.yml
+++ b/docs/userguide/src/site/_config.yml
@@ -75,7 +75,7 @@ docset_name: userguide
 ###########################################
 
 # this will appear in the sidebar and various doc pages
-netcdf-java_docset_version: 5.5
+netcdf-java_docset_version: 5.6
 
 # this will appear in various doc pages
 tomcat_version: 9.0

From 289191328e2d2aa4e32d0a0774194c6c7b06d46d Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Tue, 16 Jul 2024 09:42:04 -0600
Subject: [PATCH 114/120] Update netcdf-java topnav version

---
 docs/shared/src/site/_data/topnav.yml.golden | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/shared/src/site/_data/topnav.yml.golden b/docs/shared/src/site/_data/topnav.yml.golden
index 744aa3ccb6..9347cd8b42 100644
--- a/docs/shared/src/site/_data/topnav.yml.golden
+++ b/docs/shared/src/site/_data/topnav.yml.golden
@@ -18,9 +18,9 @@ topnav_dropdowns:
         - title: GitHub
           external_url: https://github.com/Unidata/netcdf-java
         - title: User's guide
-          external_url: https://docs.unidata.ucar.edu/netcdf-java/5.5/userguide/index.html
+          external_url: https://docs.unidata.ucar.edu/netcdf-java/5.6/userguide/index.html
         - title: Public API
-          external_url: https://docs.unidata.ucar.edu/netcdf-java/5.5/javadoc/index.html
+          external_url: https://docs.unidata.ucar.edu/netcdf-java/5.6/javadoc/index.html
 
     - title: TDS
       folderitems:

From 4aa020a814d8583b1c1f6de50e76e748d0c644be Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Tue, 16 Jul 2024 09:56:40 -0600
Subject: [PATCH 115/120] Add note about ncISO services to upgrade guide

---
 .../src/site/pages/tds_tutorial/production/Upgrade.md        | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md b/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md
index bbf77c20de..0c39a4a034 100644
--- a/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md
+++ b/docs/userguide/src/site/pages/tds_tutorial/production/Upgrade.md
@@ -70,6 +70,11 @@ As this is a major version change to that library, there may be some breaking ch
 See also the [edal user guide](https://reading-escience-centre.gitbooks.io/edal-user-guide/content/) and the 
 [changes from ncWMS 1.x](https://reading-escience-centre.gitbooks.io/ncwms-user-guide/content/01-ncwms1x.html#changes).
 
+### ncISO services
+To use the ncISO services, you must add the `tds-plugin-jar-with-dependencies.jar` artifact to your TDS for TDS versions >= 5.5.
+For TDS versions prior to 5.5 this artifact was included in the TDS war file.
+See [ncISO configuration](adding_ogc_iso_services.html#nciso-configuration) for more details.
+
 ## Java Web Start
 
 Java Web Start has been [deprecated as of Java 9](https://www.oracle.com/technetwork/java/javase/9-deprecated-features-3745636.html#JDK-8184998){:target="_blank"}, and has been removed in [Java 11](https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html){:target="_blank"}, which is the Long-term Release post-Java 8.

From 8e46541ce197dcd416b62d902ff927aecbf92378 Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Tue, 16 Jul 2024 10:23:13 -0600
Subject: [PATCH 116/120] Use newest netcdf-java and edal-java releases

---
 gradle/any/shared-mvn-coords.gradle | 2 +-
 tds-platform/build.gradle           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gradle/any/shared-mvn-coords.gradle b/gradle/any/shared-mvn-coords.gradle
index c71f835554..c0c27c6da9 100644
--- a/gradle/any/shared-mvn-coords.gradle
+++ b/gradle/any/shared-mvn-coords.gradle
@@ -23,7 +23,7 @@ ext {
   depVersion.slf4j = '1.7.28'
   depVersion.gwt = '2.8.2'
   depVersion.jaxen = '1.1.6'
-  depVersion.netcdfJava = '5.5.4-SNAPSHOT'
+  depVersion.netcdfJava = '5.6.0'
   // gradle seems to have issues with the compileOnly configuration, so we need to provide the full maven
   // coordinates for javax.servlet-api if the gradle plugin in applied. If we don't, we see errors like this:
   depVersion.javaxServletApi = '4.0.3'
diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle
index 7da04550bd..5344cf1fe2 100644
--- a/tds-platform/build.gradle
+++ b/tds-platform/build.gradle
@@ -99,7 +99,7 @@ dependencies {
     api 'org.n52.sensorweb:52n-xml-om-v20'
 
     // edal-java (ncwms)
-    def edalVersion = '1.5.0.6-SNAPSHOT'
+    def edalVersion = '1.5.2.0'
     api "uk.ac.rdg.resc:edal-common:${edalVersion}"
     api "uk.ac.rdg.resc:edal-cdm:${edalVersion}"
     api "uk.ac.rdg.resc:edal-wms:${edalVersion}"

From 898847e9e0d801559221c315dddd07c0edba51c9 Mon Sep 17 00:00:00 2001
From: Tara Drwenski 
Date: Tue, 16 Jul 2024 10:28:59 -0600
Subject: [PATCH 117/120] Update release_info.json for next release

---
 project-files/downloads/release_info.json | 62 +++++++++++------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/project-files/downloads/release_info.json b/project-files/downloads/release_info.json
index 5c0313bfc6..fd0dbe09aa 100644
--- a/project-files/downloads/release_info.json
+++ b/project-files/downloads/release_info.json
@@ -3,74 +3,74 @@
   "packageName": "THREDDS Data Server",
   "releases": [
     {
-      "version": "5.5",
+      "version": "5.6",
       "status": "beta",
-      "description": "This is the current version running at thredds.ucar.edu. It contains several bug fixes compared to version 5.4.",
-      "baseURL": "https://artifacts.unidata.ucar.edu/repository/downloads-tds/5.5/",
+      "description": "This is the current version running at thredds.ucar.edu. It contains several bug fixes compared to version 5.5.",
+      "baseURL": "https://artifacts.unidata.ucar.edu/repository/downloads-tds/5.6/",
       "resources": {
         "tds_war": {
           "type" : "web application",
-          "package": "thredds-5.5-SNAPSHOT.war",
+          "package": "thredds-5.6-SNAPSHOT.war",
           "name": "TDS (Web Application Archive)",
           "hash": {
-            "MD5": "thredds-5.5-SNAPSHOT.war.md5",
-            "SHA1": "thredds-5.5-SNAPSHOT.war.sha1",
-            "SHA256": "thredds-5.5-SNAPSHOT.war.sha256"
+            "MD5": "thredds-5.6-SNAPSHOT.war.md5",
+            "SHA1": "thredds-5.6-SNAPSHOT.war.sha1",
+            "SHA256": "thredds-5.6-SNAPSHOT.war.sha256"
           },
-          "info": "THREDDS Data Server (TDS).
IMPORTANT: Before deploying, rename to thredds##5.5-SNAPSHOT.war or thredds.war" + "info": "THREDDS Data Server (TDS).
IMPORTANT: Before deploying, rename to thredds##5.6-SNAPSHOT.war or thredds.war" }, "tdm_jar": { "type": "library", - "package": "tdm-5.5-SNAPSHOT.jar", + "package": "tdm-5.6-SNAPSHOT.jar", "name": "TDM (Jar file)", "hash": { - "MD5": "tdm-5.5-SNAPSHOT.jar.md5", - "SHA1": "tdm-5.5-SNAPSHOT.jar.sha1", - "SHA256": "tdm-5.5-SNAPSHOT.jar.sha256" + "MD5": "tdm-5.6-SNAPSHOT.jar.md5", + "SHA1": "tdm-5.6-SNAPSHOT.jar.sha1", + "SHA256": "tdm-5.6-SNAPSHOT.jar.sha256" }, - "info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) " + "info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.6 SNAPSHOT) " }, "thredds_iso_jar": { "type": "library", - "package": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar", + "package": "tds-plugin-2.4.7-SNAPSHOT-jar-with-dependencies.jar", "name": "THREDDS ISO Plugin (Jar file)", "hash": { - "MD5": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.md5", - "SHA1": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha1", - "SHA256": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha256" + "MD5": "tds-plugin-2.4.7-SNAPSHOT-jar-with-dependencies.jar.md5", + "SHA1": "tds-plugin-2.4.7-SNAPSHOT-jar-with-dependencies.jar.sha1", + "SHA256": "tds-plugin-2.4.7-SNAPSHOT-jar-with-dependencies.jar.sha256" }, - "info": "THREDDS ISO Plugin for the latest snapshot release (version 2.4.6 SNAPSHOT) " + "info": "THREDDS ISO Plugin for the latest snapshot release (version 2.4.7 SNAPSHOT) " } } }, { - "version": "5.4", - "releaseDate": "2022-07-01", + "version": "5.5", + "releaseDate": "2024-07-16", "status": "current", "description": "", - "baseURL": "https://artifacts.unidata.ucar.edu/repository/downloads-tds/5.4/", + "baseURL": "https://artifacts.unidata.ucar.edu/repository/downloads-tds/5.5/", "resources": { "tds_war": { "type" : "web application", - "package": "thredds-5.4.war", + "package": "thredds-5.5.war", "name": "TDS (Web Application Archive)", "hash": { - "MD5": "thredds-5.4.war.md5", - "SHA1": "thredds-5.4.war.sha1", - "SHA256": "thredds-54.war.sha256" + "MD5": "thredds-5.5.war.md5", + "SHA1": "thredds-5.5.war.sha1", + "SHA256": "thredds-5.5.war.sha256" }, - "info": "THREDDS Data Server (TDS).
IMPORTANT: Before deploying, rename to thredds##5.4.war or thredds.war" + "info": "THREDDS Data Server (TDS).
IMPORTANT: Before deploying, rename to thredds##5.5.war or thredds.war" }, "tdm_jar": { "type": "library", - "package": "tdm-5.4.jar", + "package": "tdm-5.5.jar", "name": "TDM (Jar file)", "hash": { - "MD5": "tdm-5.4.md5", - "SHA1": "tdm-5.4.jar.sha1", - "SHA256": "tdm-5.4.jar.sha256" + "MD5": "tdm-5.5.md5", + "SHA1": "tdm-5.5.jar.sha1", + "SHA256": "tdm-5.5.jar.sha256" }, - "info": "THREDDS Data Manager (TDM) for the current release (version 5.4) " + "info": "THREDDS Data Manager (TDM) for the current release (version 5.5) " } } } From 19a4494209b632e175d59334726c69ffd2a9f07d Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 16 Jul 2024 10:30:02 -0600 Subject: [PATCH 118/120] Update version-info.json for next release --- project-files/docs/version-info.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/project-files/docs/version-info.json b/project-files/docs/version-info.json index f90bd26f04..a82fefa3e4 100644 --- a/project-files/docs/version-info.json +++ b/project-files/docs/version-info.json @@ -3,25 +3,25 @@ "packageName" : "THREDDS Data Server", "releases" : [ { - "version": "5.4", + "version": "5.5", "include": "1", - "releaseDate": "2022-07-01", + "releaseDate": "2024-07-16", "status": "release", "docsets": { "userguide": { - "baseUrl": "https://docs.unidata.ucar.edu/tds/5.4/userguide/index.html", + "baseUrl": "https://docs.unidata.ucar.edu/tds/5.5/userguide/index.html", "docsetName": "TDS User's Guide" } } }, { - "version": "5.5", + "version": "5.6", "include": "1", - "releaseDate": "2024-01-23", + "releaseDate": "2024-07-16", "status": "snapshot", "docsets": { "userguide": { - "baseUrl": "https://docs.unidata.ucar.edu/tds/5.5/userguide/index.html", + "baseUrl": "https://docs.unidata.ucar.edu/tds/5.6/userguide/index.html", "docsetName": "TDS User's Guide" } } From 74af301a49a21870b5dbf3311c8a359ec1911710 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 16 Jul 2024 10:31:01 -0600 Subject: [PATCH 119/120] Update latest.xml for next release --- project-files/downloads/startup/latest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project-files/downloads/startup/latest.xml b/project-files/downloads/startup/latest.xml index 66a13199cb..f9c4f3c557 100644 --- a/project-files/downloads/startup/latest.xml +++ b/project-files/downloads/startup/latest.xml @@ -1,4 +1,4 @@ - - + + From bd96de714a838a2ddd4945ebecc4634f11437687 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Tue, 16 Jul 2024 10:31:08 -0600 Subject: [PATCH 120/120] Release 5.5 --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 89211f20d8..fed28575a4 100644 --- a/build.gradle +++ b/build.gradle @@ -51,9 +51,9 @@ allprojects { // Matches Maven's "project.version". Used in MANIFEST.MF for "Implementation-Version". // We try to follow semantic versioning, and thus we use ..- // may be SNAPSHOT, alphax, betax, etc. - version = '5.5-SNAPSHOT' + version = '5.5' // Eventually, we'll stop appending "SNAPSHOT" to our versions and just use this. - status = 'development' + status = 'release' } // Matches Maven's "project.description".