diff --git a/Java/ddb.jar b/Java/ddb.jar index d83a7dbc4..ec8384cce 100644 Binary files a/Java/ddb.jar and b/Java/ddb.jar differ diff --git a/Java/src/org/imos/ddb/JDBCDDB.java b/Java/src/org/imos/ddb/JDBCDDB.java index 617ceb8af..387610d88 100644 --- a/Java/src/org/imos/ddb/JDBCDDB.java +++ b/Java/src/org/imos/ddb/JDBCDDB.java @@ -33,6 +33,7 @@ import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; +import java.sql.DatabaseMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; @@ -80,6 +81,10 @@ protected JDBCDDB(String driver, String connection, String user, String password Connection conn = DriverManager.getConnection(connection, user, password); + // get the database's IdentifierQuote + DatabaseMetaData dbmd = conn.getMetaData(); + identQuote = dbmd.getIdentifierQuoteString(); + conn.close(); } @@ -119,7 +124,7 @@ public ArrayList executeQuery( results = new ArrayList(); //build the query - String query = "SELECT * FROM " + tableName; + String query = "SELECT * FROM " + identQuote + tableName + identQuote; if (fieldName != null) { if (fieldValue == null) @@ -127,9 +132,9 @@ public ArrayList executeQuery( //wrap strings in quotes if (fieldValue instanceof String) - query += " WHERE " + fieldName + " = '" + fieldValue + "'"; + query += " WHERE " + identQuote + fieldName + identQuote + " = '" + fieldValue + "'"; else - query += " WHERE " + fieldName + " = " + fieldValue; + query += " WHERE " + identQuote + fieldName + identQuote + " = " + fieldValue; } //execute the query @@ -147,8 +152,8 @@ public ArrayList executeQuery( //types of number or text. Don't tell anyone if (fieldName != null && fieldValue instanceof String) { - query = "SELECT * FROM " + tableName + - " WHERE " + fieldName + " = " + fieldValue; + query = "SELECT * FROM " + identQuote + tableName + identQuote + + " WHERE " + identQuote + fieldName + identQuote + " = " + fieldValue; System.out.println("JDBCDDB::Query : " + query); diff --git a/NetCDF/template/global_attributes_profile.txt b/NetCDF/template/global_attributes_profile.txt index 2dbd23cf1..d5e407989 100644 --- a/NetCDF/template/global_attributes_profile.txt +++ b/NetCDF/template/global_attributes_profile.txt @@ -1,6 +1,6 @@ % what S, project = Integrated Marine Observing System (IMOS) -S, Conventions = CF-1.6,IMOS-1.3 +S, Conventions = CF-1.6,IMOS-1.4 S, standard_name_vocabulary = NetCDF Climate and Forecast (CF) Metadata Convention Standard Name Table 27 S, title = S, institution = @@ -19,7 +19,7 @@ S, site_code = S, platform_code = S, deployment_code = S, featureType = profile -S, cdm_data_type = Profile +S, cdm_data_type = Station S, naming_authority = IMOS S, metadata = S, sensorML = diff --git a/NetCDF/template/global_attributes_timeSeries.txt b/NetCDF/template/global_attributes_timeSeries.txt index d1b9e94b0..46896f80e 100644 --- a/NetCDF/template/global_attributes_timeSeries.txt +++ b/NetCDF/template/global_attributes_timeSeries.txt @@ -1,6 +1,6 @@ % what S, project = Integrated Marine Observing System (IMOS) -S, Conventions = CF-1.6,IMOS-1.3 +S, Conventions = CF-1.6,IMOS-1.4 S, standard_name_vocabulary = NetCDF Climate and Forecast (CF) Metadata Convention Standard Name Table 27 S, title = S, institution = @@ -17,7 +17,7 @@ S, site_code = S, platform_code = S, deployment_code = [ddb Site] S, featureType = [mat sample_data.meta.featureType] -S, cdm_data_type = Station +S, cdm_data_type = S, naming_authority = IMOS S, metadata = S, sensorML = diff --git a/Parser/SBE37SMParse.m b/Parser/SBE37SMParse.m index 629bd43aa..8de28833e 100644 --- a/Parser/SBE37SMParse.m +++ b/Parser/SBE37SMParse.m @@ -197,7 +197,7 @@ end else % use the classic SBE3x ASCII format suggested for IMOS - sample_data = SBE3x(filename); + sample_data = SBE3x(filename, mode); end end diff --git a/Parser/readXR420.m b/Parser/readXR420.m index 7a28713c3..fc1e545aa 100644 --- a/Parser/readXR420.m +++ b/Parser/readXR420.m @@ -73,7 +73,6 @@ sample_data.meta.instrument_firmware = header.firmware; sample_data.meta.instrument_serial_no = header.serial; sample_data.meta.instrument_sample_interval = median(diff(data.time*24*3600)); - sample_data.meta.correction = header.correction; sample_data.meta.featureType = mode; if isfield(header, 'correction'), sample_data.meta.correction = header.correction; end @@ -465,4 +464,4 @@ % generate time stamps from start/interval/end data.time = header.start:header.interval:header.end; data.time = data.time(1:length(samples{1}))'; -end \ No newline at end of file +end diff --git a/Parser/signatureParse.m b/Parser/signatureParse.m index d8d3493c2..32e369f21 100644 --- a/Parser/signatureParse.m +++ b/Parser/signatureParse.m @@ -81,7 +81,8 @@ cellSize = unique(vertcat(structures.(dataRecordType).Data.CellSize))*0.001; % m blankDist = unique(vertcat(structures.(dataRecordType).Data.Blanking))*0.001; % m if length(cellSize) > 1, error('Multiple cell sizes/blanking distance not supported'); end -distance = (blankDist): ... +distance = nan(nCells, 1); +distance(:) = (blankDist): ... (cellSize): ... (blankDist + (nCells-1) * cellSize); diff --git a/Parser/workhorseParse.m b/Parser/workhorseParse.m index 780a9541d..64f1ac154 100644 --- a/Parser/workhorseParse.m +++ b/Parser/workhorseParse.m @@ -243,11 +243,11 @@ otherwise adcpFreq = 2400; - model = 'unknown'; + model = 'Unknown'; end - sample_data.meta.instrument_model = ['Workhorse ADCP model ' model]; + sample_data.meta.instrument_model = [model ' Workhorse ADCP']; sample_data.meta.instrument_serial_no = serial; sample_data.meta.instrument_sample_interval = median(diff(time*24*3600)); sample_data.meta.instrument_firmware = ... diff --git a/Util/multipleLegend.m b/Util/multipleLegend.m index 1ff8684d3..588b6b030 100644 --- a/Util/multipleLegend.m +++ b/Util/multipleLegend.m @@ -1,5 +1,5 @@ -function [leg,labelhandles,outH,outM] = legend(varargin) -%LEGEND Display legend. +function [leg,labelhandles,outH,outM] = multipleLegend(varargin) +%MULTIPLELEGEND Display multiple legends. % LEGEND(string1,string2,string3, ...) puts a legend on the current plot % using the specified strings as labels. LEGEND works on line graphs, % bar graphs, pie graphs, ribbon plots, etc. You can label any diff --git a/imosToolbox.m b/imosToolbox.m index b295b41b4..ea266c816 100644 --- a/imosToolbox.m +++ b/imosToolbox.m @@ -73,7 +73,7 @@ function imosToolbox(auto, varargin) end % Set current toolbox version -toolboxVersion = ['2.5.3 - ' computer]; +toolboxVersion = ['2.5.4 - ' computer]; switch auto case 'auto', autoIMOSToolbox(toolboxVersion, varargin{:}); diff --git a/imosToolbox_Linux64.bin b/imosToolbox_Linux64.bin index ecb538e2e..db417653e 100755 Binary files a/imosToolbox_Linux64.bin and b/imosToolbox_Linux64.bin differ