From 38f26a2dadb1009fbfacaf4a7a54dba006f63129 Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Sat, 8 Jul 2023 13:29:43 -0600 Subject: [PATCH 1/2] ## 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" --- 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 | 71 -- .../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(+), 17968 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 52dcd0b15a..0000000000 --- a/dap4/d4tests/build.gradle +++ /dev/null @@ -1,71 +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' - exclude group: 'EDS', module: 'tds-plugin' - exclude group: 'net.sf.saxon', module: 'Saxon-HE' - } - - 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 3535ade6cb..fd62ba4904 100644 --- a/tds-platform/build.gradle +++ b/tds-platform/build.gradle @@ -75,7 +75,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 ec36c75a3e..99bc3ccf22 100644 --- a/tds-testing-platform/build.gradle +++ b/tds-testing-platform/build.gradle @@ -24,10 +24,6 @@ dependencies { 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) - // 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 diff --git a/tds/build.gradle b/tds/build.gradle index ed0bcdb49e..eba53cd729 100644 --- a/tds/build.gradle +++ b/tds/build.gradle @@ -30,9 +30,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}" @@ -102,6 +101,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 005d477973..3658fc2693 100644 --- a/tds/src/main/java/thredds/server/catalogservice/CatalogViewContextParser.java +++ b/tds/src/main/java/thredds/server/catalogservice/CatalogViewContextParser.java @@ -582,7 +582,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 58d0782631..1a827b1c31 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 6303b63a37..44fd2656ba 100644 --- a/tds/src/test/content/thredds/catalog.xml +++ b/tds/src/test/content/thredds/catalog.xml @@ -9,7 +9,7 @@ - + From 7a7d07b0e6ee1b77d14f094917225b55a3ef7fd4 Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Thu, 28 Dec 2023 13:32:52 -0700 Subject: [PATCH 2/2] Upgrade to latest master --- tds-testing-platform/build.gradle | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tds-testing-platform/build.gradle b/tds-testing-platform/build.gradle index aa0f999449..897aef1944 100644 --- a/tds-testing-platform/build.gradle +++ b/tds-testing-platform/build.gradle @@ -20,14 +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' - - // 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 - // dap4 // defined in tds-platform as well, but using runtime config api 'org.apache.logging.log4j:log4j-web' // api because of :dap4:d4tests)