diff --git a/conf/solr/9.3.0/schema.xml b/conf/solr/9.3.0/schema.xml index 3711ffeddba..6f48181e8c0 100644 --- a/conf/solr/9.3.0/schema.xml +++ b/conf/solr/9.3.0/schema.xml @@ -327,7 +327,7 @@ - + @@ -370,7 +370,7 @@ - + @@ -566,7 +566,7 @@ - + @@ -609,7 +609,7 @@ - + diff --git a/doc/release-notes/5645-geospatial-props-nslong-fix.md b/doc/release-notes/5645-geospatial-props-nslong-fix.md new file mode 100644 index 00000000000..a93c3cc531d --- /dev/null +++ b/doc/release-notes/5645-geospatial-props-nslong-fix.md @@ -0,0 +1 @@ +Across the application, the Geospatial metadata block fields for north and south were labeled incorrectly as ‘Longitudes,’ as reported on #5645. After updating to this version of Dataverse, users will need to update all the endpoints that used ‘northLongitude’ and ‘southLongitude’ to ‘northLatitude’ and ‘southLatitude,’ respectively. \ No newline at end of file diff --git a/doc/sphinx-guides/source/api/changelog.rst b/doc/sphinx-guides/source/api/changelog.rst index d272086fa2e..71f43ae384a 100644 --- a/doc/sphinx-guides/source/api/changelog.rst +++ b/doc/sphinx-guides/source/api/changelog.rst @@ -10,6 +10,8 @@ This API changelog is experimental and we would love feedback on its usefulness. v6.2 ---- +- The fields "northLongitude" and "southLongitude" have been deprecated in favor of "northLatitude" and "southLatitude" in the Geolocation metadata block. After upgrading to 6.2 or later, you will need to use the new fields when creating or updating a dataset. + - **/api/datasets/{id}/versions/{versionId}**: The includeFiles parameter has been renamed to excludeFiles. The default behavior remains the same, which is to include files. However, when excludeFiles is set to true, the files will be excluded. A bug that caused the API to only return a deaccessioned dataset if the user had edit privileges has been fixed. - **/api/datasets/{id}/versions**: The includeFiles parameter has been renamed to excludeFiles. The default behavior remains the same, which is to include files. However, when excludeFiles is set to true, the files will be excluded. diff --git a/scripts/api/data/dataset-create-new-all-default-fields.json b/scripts/api/data/dataset-create-new-all-default-fields.json index 1118ed98a03..3bcf134bc76 100644 --- a/scripts/api/data/dataset-create-new-all-default-fields.json +++ b/scripts/api/data/dataset-create-new-all-default-fields.json @@ -907,14 +907,14 @@ "typeClass": "primitive", "value": "-70" }, - "northLongitude": { - "typeName": "northLongitude", + "northLatitude": { + "typeName": "northLatitude", "multiple": false, "typeClass": "primitive", "value": "43" }, - "southLongitude": { - "typeName": "southLongitude", + "southLatitude": { + "typeName": "southLatitude", "multiple": false, "typeClass": "primitive", "value": "42" @@ -933,14 +933,14 @@ "typeClass": "primitive", "value": "-13" }, - "northLongitude": { - "typeName": "northLongitude", + "northLatitude": { + "typeName": "northLatitude", "multiple": false, "typeClass": "primitive", "value": "29" }, - "southLongitude": { - "typeName": "southLongitude", + "southLatitude": { + "typeName": "southLatitude", "multiple": false, "typeClass": "primitive", "value": "28" diff --git a/scripts/api/data/metadatablocks/geospatial.tsv b/scripts/api/data/metadatablocks/geospatial.tsv index ce481c1bf84..09d19c608e5 100644 --- a/scripts/api/data/metadatablocks/geospatial.tsv +++ b/scripts/api/data/metadatablocks/geospatial.tsv @@ -10,8 +10,8 @@ geographicBoundingBox Geographic Bounding Box The fundamental geometric description for any Dataset that models geography is the geographic bounding box. It describes the minimum box, defined by west and east longitudes and north and south latitudes, which includes the largest geographic extent of the Dataset's geographic coverage. This element is used in the first pass of a coordinate-based search. Inclusion of this element in the codebook is recommended, but is required if the bound polygon box is included. none 6 FALSE FALSE TRUE FALSE FALSE FALSE geospatial westLongitude Westernmost (Left) Longitude Westernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180,0 <= West Bounding Longitude Value <= 180,0. text 7 FALSE FALSE FALSE FALSE FALSE FALSE geographicBoundingBox geospatial eastLongitude Easternmost (Right) Longitude Easternmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180,0 <= East Bounding Longitude Value <= 180,0. text 8 FALSE FALSE FALSE FALSE FALSE FALSE geographicBoundingBox geospatial - northLongitude Northernmost (Top) Latitude Northernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= North Bounding Latitude Value <= 90,0. text 9 FALSE FALSE FALSE FALSE FALSE FALSE geographicBoundingBox geospatial - southLongitude Southernmost (Bottom) Latitude Southernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= South Bounding Latitude Value <= 90,0. text 10 FALSE FALSE FALSE FALSE FALSE FALSE geographicBoundingBox geospatial + northLatitude Northernmost (Top) Latitude Northernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= North Bounding Latitude Value <= 90,0. text 9 FALSE FALSE FALSE FALSE FALSE FALSE geographicBoundingBox geospatial + southLatitude Southernmost (Bottom) Latitude Southernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= South Bounding Latitude Value <= 90,0. text 10 FALSE FALSE FALSE FALSE FALSE FALSE geographicBoundingBox geospatial #controlledVocabulary DatasetField Value identifier displayOrder country Afghanistan 0 country Albania 1 diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetFieldConstant.java b/src/main/java/edu/harvard/iq/dataverse/DatasetFieldConstant.java index 1621b80df55..22bad42df96 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetFieldConstant.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetFieldConstant.java @@ -112,8 +112,8 @@ public class DatasetFieldConstant implements java.io.Serializable { public final static String geographicUnit="geographicUnit"; public final static String westLongitude="westLongitude"; public final static String eastLongitude="eastLongitude"; - public final static String northLatitude="northLongitude"; //Changed to match DB - incorrectly entered into DB: https://github.com/IQSS/dataverse/issues/5645 - public final static String southLatitude="southLongitude"; //Incorrect in DB: https://github.com/IQSS/dataverse/issues/5645 + public final static String northLatitude="northLatitude"; + public final static String southLatitude="southLatitude"; public final static String unitOfAnalysis="unitOfAnalysis"; public final static String universe="universe"; public final static String kindOfData="kindOfData"; diff --git a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportDDIServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportDDIServiceBean.java index 73a83035fc5..85d4868605d 100644 --- a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportDDIServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportDDIServiceBean.java @@ -828,9 +828,9 @@ private HashSet processGeoBndBox(XMLStreamReader xmlr) throws XMLStrea } else if (xmlr.getLocalName().equals("eastBL")) { addToSet(set,"eastLongitude", parseText(xmlr)); } else if (xmlr.getLocalName().equals("southBL")) { - addToSet(set,"southLongitude", parseText(xmlr)); + addToSet(set,"southLatitude", parseText(xmlr)); } else if (xmlr.getLocalName().equals("northBL")) { - addToSet(set,"northLongitude", parseText(xmlr)); + addToSet(set,"northLatitude", parseText(xmlr)); } } else if (event == XMLStreamConstants.END_ELEMENT) { if (xmlr.getLocalName().equals("geoBndBox")) break; diff --git a/src/main/java/propertyFiles/geospatial.properties b/src/main/java/propertyFiles/geospatial.properties index 86f297c29b9..ce258071c27 100644 --- a/src/main/java/propertyFiles/geospatial.properties +++ b/src/main/java/propertyFiles/geospatial.properties @@ -10,8 +10,8 @@ datasetfieldtype.geographicUnit.title=Geographic Unit datasetfieldtype.geographicBoundingBox.title=Geographic Bounding Box datasetfieldtype.westLongitude.title=Westernmost (Left) Longitude datasetfieldtype.eastLongitude.title=Easternmost (Right) Longitude -datasetfieldtype.northLongitude.title=Northernmost (Top) Latitude -datasetfieldtype.southLongitude.title=Southernmost (Bottom) Latitude +datasetfieldtype.northLatitude.title=Northernmost (Top) Latitude +datasetfieldtype.southLatitude.title=Southernmost (Bottom) Latitude datasetfieldtype.geographicCoverage.description=Information on the geographic coverage of the data. Includes the total geographic scope of the data. datasetfieldtype.country.description=The country or nation that the Dataset is about. datasetfieldtype.state.description=The state or province that the Dataset is about. Use GeoNames for correct spelling and avoid abbreviations. @@ -21,8 +21,8 @@ datasetfieldtype.geographicUnit.description=Lowest level of geographic aggregati datasetfieldtype.geographicBoundingBox.description=The fundamental geometric description for any Dataset that models geography is the geographic bounding box. It describes the minimum box, defined by west and east longitudes and north and south latitudes, which includes the largest geographic extent of the Dataset's geographic coverage. This element is used in the first pass of a coordinate-based search. Inclusion of this element in the codebook is recommended, but is required if the bound polygon box is included. datasetfieldtype.westLongitude.description=Westernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180,0 <= West Bounding Longitude Value <= 180,0. datasetfieldtype.eastLongitude.description=Easternmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180,0 <= East Bounding Longitude Value <= 180,0. -datasetfieldtype.northLongitude.description=Northernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= North Bounding Latitude Value <= 90,0. -datasetfieldtype.southLongitude.description=Southernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= South Bounding Latitude Value <= 90,0. +datasetfieldtype.northLatitude.description=Northernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= North Bounding Latitude Value <= 90,0. +datasetfieldtype.southLatitude.description=Southernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= South Bounding Latitude Value <= 90,0. datasetfieldtype.geographicCoverage.watermark= datasetfieldtype.country.watermark= datasetfieldtype.state.watermark= @@ -32,8 +32,8 @@ datasetfieldtype.geographicUnit.watermark= datasetfieldtype.geographicBoundingBox.watermark= datasetfieldtype.westLongitude.watermark= datasetfieldtype.eastLongitude.watermark= -datasetfieldtype.northLongitude.watermark= -datasetfieldtype.southLongitude.watermark= +datasetfieldtype.northLatitude.watermark= +datasetfieldtype.southLatitude.watermark= controlledvocabulary.country.afghanistan=Afghanistan controlledvocabulary.country.albania=Albania controlledvocabulary.country.algeria=Algeria diff --git a/src/main/resources/db/migration/V6.1.0.3__5645-geospatial-fieldname-fix.sql b/src/main/resources/db/migration/V6.1.0.3__5645-geospatial-fieldname-fix.sql new file mode 100644 index 00000000000..2ab8cbc802e --- /dev/null +++ b/src/main/resources/db/migration/V6.1.0.3__5645-geospatial-fieldname-fix.sql @@ -0,0 +1,7 @@ +UPDATE datasetfieldtype +SET name = 'northLatitude' +WHERE name = 'northLongitude'; + +UPDATE datasetfieldtype +SET name = 'southLatitude' +WHERE name = 'southLongitude'; \ No newline at end of file diff --git a/src/test/java/edu/harvard/iq/dataverse/api/NetcdfIT.java b/src/test/java/edu/harvard/iq/dataverse/api/NetcdfIT.java index d4dba236051..0455f5e35a4 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/NetcdfIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/NetcdfIT.java @@ -220,8 +220,8 @@ public void testExtraBoundingBoxFromNetcdf() throws IOException { .statusCode(OK.getStatusCode()) .body("data.latestVersion.metadataBlocks.geospatial.fields[0].value[0].westLongitude.value", equalTo("-16.320007")) .body("data.latestVersion.metadataBlocks.geospatial.fields[0].value[0].eastLongitude.value", equalTo("-6.220001")) - .body("data.latestVersion.metadataBlocks.geospatial.fields[0].value[0].northLongitude.value", equalTo("49.62")) - .body("data.latestVersion.metadataBlocks.geospatial.fields[0].value[0].southLongitude.value", equalTo("41.8")); + .body("data.latestVersion.metadataBlocks.geospatial.fields[0].value[0].northLatitude.value", equalTo("49.62")) + .body("data.latestVersion.metadataBlocks.geospatial.fields[0].value[0].southLatitude.value", equalTo("41.8")); } } diff --git a/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java b/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java index 125753296a2..be8d5effbfe 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java @@ -1197,12 +1197,12 @@ public void testGeospatialSearch() { .add("multiple", false) .add("typeName", "westLongitude") ) - .add("southLongitude", + .add("southLatitude", Json.createObjectBuilder() .add("value", "42.33661") .add("typeClass", "primitive") .add("multiple", false) - .add("typeName", "southLongitude") + .add("typeName", "southLatitude") ) .add("eastLongitude", Json.createObjectBuilder() @@ -1211,12 +1211,12 @@ public void testGeospatialSearch() { .add("multiple", false) .add("typeName", "eastLongitude") ) - .add("northLongitude", + .add("northLatitude", Json.createObjectBuilder() .add("value", "42.409599") .add("typeClass", "primitive") .add("multiple", false) - .add("typeName", "northLongitude") + .add("typeName", "northLatitude") ) ) ) diff --git a/src/test/java/edu/harvard/iq/dataverse/export/OpenAireExportUtilTest.java b/src/test/java/edu/harvard/iq/dataverse/export/OpenAireExportUtilTest.java index 76ca853d5cc..4fc84f7e72d 100644 --- a/src/test/java/edu/harvard/iq/dataverse/export/OpenAireExportUtilTest.java +++ b/src/test/java/edu/harvard/iq/dataverse/export/OpenAireExportUtilTest.java @@ -927,15 +927,15 @@ public void testWriteGeoLocationElement() throws XMLStreamException, IOException + "" + "10" + "20" - + "30" + "40" + + "30" + "" + "" + "" + "" + + "60" + "80" + "70" - + "60" + "50" + "" + "", @@ -966,8 +966,8 @@ public void testWriteGeoLocationElement2() throws XMLStreamException, IOExceptio + "" + "23" + "786" - + "45" + "34" + + "45" + "" + "", stringWriter.toString()); diff --git a/src/test/java/edu/harvard/iq/dataverse/export/dataset-all-defaults.txt b/src/test/java/edu/harvard/iq/dataverse/export/dataset-all-defaults.txt index c9e429729df..342d4b6fabf 100644 --- a/src/test/java/edu/harvard/iq/dataverse/export/dataset-all-defaults.txt +++ b/src/test/java/edu/harvard/iq/dataverse/export/dataset-all-defaults.txt @@ -893,14 +893,14 @@ "typeClass": "primitive", "value": "20" }, - "northLongitude": { - "typeName": "northLongitude", + "northLatitude": { + "typeName": "northLatitude", "multiple": false, "typeClass": "primitive", "value": "30" }, - "southLongitude": { - "typeName": "southLongitude", + "southLatitude": { + "typeName": "southLatitude", "multiple": false, "typeClass": "primitive", "value": "40" @@ -919,14 +919,14 @@ "typeClass": "primitive", "value": "60" }, - "northLongitude": { - "typeName": "northLongitude", + "northLatitude": { + "typeName": "northLatitude", "multiple": false, "typeClass": "primitive", "value": "70" }, - "southLongitude": { - "typeName": "southLongitude", + "southLatitude": { + "typeName": "southLatitude", "multiple": false, "typeClass": "primitive", "value": "80" diff --git a/src/test/java/edu/harvard/iq/dataverse/export/dataset-organizations-comma.txt b/src/test/java/edu/harvard/iq/dataverse/export/dataset-organizations-comma.txt index a8b209d379c..dc9ea198f62 100644 --- a/src/test/java/edu/harvard/iq/dataverse/export/dataset-organizations-comma.txt +++ b/src/test/java/edu/harvard/iq/dataverse/export/dataset-organizations-comma.txt @@ -260,16 +260,16 @@ "typeName": "eastLongitude", "value": "23" }, - "northLongitude": { + "northLatitude": { "multiple": false, "typeClass": "primitive", - "typeName": "northLongitude", + "typeName": "northLatitude", "value": "786" }, - "southLongitude": { + "southLatitude": { "multiple": false, "typeClass": "primitive", - "typeName": "southLongitude", + "typeName": "southLatitude", "value": "34" }, "westLongitude": { diff --git a/src/test/java/edu/harvard/iq/dataverse/export/dataset-organizations.txt b/src/test/java/edu/harvard/iq/dataverse/export/dataset-organizations.txt index b852e79c26a..5601cd64161 100644 --- a/src/test/java/edu/harvard/iq/dataverse/export/dataset-organizations.txt +++ b/src/test/java/edu/harvard/iq/dataverse/export/dataset-organizations.txt @@ -292,16 +292,16 @@ "typeName": "eastLongitude", "value": "23" }, - "northLongitude": { + "northLatitude": { "multiple": false, "typeClass": "primitive", - "typeName": "northLongitude", + "typeName": "northLatitude", "value": "786" }, - "southLongitude": { + "southLatitude": { "multiple": false, "typeClass": "primitive", - "typeName": "southLongitude", + "typeName": "southLatitude", "value": "34" }, "westLongitude": { diff --git a/src/test/java/edu/harvard/iq/dataverse/export/dataset-simplified.txt b/src/test/java/edu/harvard/iq/dataverse/export/dataset-simplified.txt index a91099197b9..9bada051c61 100644 --- a/src/test/java/edu/harvard/iq/dataverse/export/dataset-simplified.txt +++ b/src/test/java/edu/harvard/iq/dataverse/export/dataset-simplified.txt @@ -306,16 +306,16 @@ "typeName": "eastLongitude", "value": "23" }, - "northLongitude": { + "northLatitude": { "multiple": false, "typeClass": "primitive", - "typeName": "northLongitude", + "typeName": "northLatitude", "value": "786" }, - "southLongitude": { + "southLatitude": { "multiple": false, "typeClass": "primitive", - "typeName": "southLongitude", + "typeName": "southLatitude", "value": "34" }, "westLongitude": { diff --git a/src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-create-new-all-ddi-fields.json b/src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-create-new-all-ddi-fields.json index bdff949bb36..b23741517c9 100644 --- a/src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-create-new-all-ddi-fields.json +++ b/src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-create-new-all-ddi-fields.json @@ -866,14 +866,14 @@ "typeClass": "primitive", "value": "-70" }, - "northLongitude": { - "typeName": "northLongitude", + "northLatitude": { + "typeName": "northLatitude", "multiple": false, "typeClass": "primitive", "value": "43" }, - "southLongitude": { - "typeName": "southLongitude", + "southLatitude": { + "typeName": "southLatitude", "multiple": false, "typeClass": "primitive", "value": "42" @@ -892,14 +892,14 @@ "typeClass": "primitive", "value": "-13" }, - "northLongitude": { - "typeName": "northLongitude", + "northLatitude": { + "typeName": "northLatitude", "multiple": false, "typeClass": "primitive", "value": "29" }, - "southLongitude": { - "typeName": "southLongitude", + "southLatitude": { + "typeName": "southLatitude", "multiple": false, "typeClass": "primitive", "value": "28" diff --git a/src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-finch1.json b/src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-finch1.json index 9bdc7e45349..f9882aed3dd 100644 --- a/src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-finch1.json +++ b/src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-finch1.json @@ -371,14 +371,14 @@ "typeClass": "primitive", "value": "59.8" }, - "southLongitude": { - "typeName": "southLongitude", + "southLatitude": { + "typeName": "southLatitude", "multiple": false, "typeClass": "primitive", "value": "41.6" }, - "northLongitude": { - "typeName": "northLongitude", + "northLatitude": { + "typeName": "northLatitude", "multiple": false, "typeClass": "primitive", "value": "43.8" diff --git a/src/test/java/edu/harvard/iq/dataverse/util/json/JsonDatasetVersion.txt b/src/test/java/edu/harvard/iq/dataverse/util/json/JsonDatasetVersion.txt index 22eb9af39f1..a144ca9c9b6 100644 --- a/src/test/java/edu/harvard/iq/dataverse/util/json/JsonDatasetVersion.txt +++ b/src/test/java/edu/harvard/iq/dataverse/util/json/JsonDatasetVersion.txt @@ -232,16 +232,16 @@ "typeName": "eastLongitude", "value": "23" }, - "northLongitude": { + "northLatitude": { "multiple": false, "typeClass": "primitive", - "typeName": "northLongitude", + "typeName": "northLatitude", "value": "786" }, - "southLongitude": { + "southLatitude": { "multiple": false, "typeClass": "primitive", - "typeName": "southLongitude", + "typeName": "southLatitude", "value": "34" }, "westLongitude": { diff --git a/src/test/java/edu/harvard/iq/dataverse/util/json/jsondata.txt b/src/test/java/edu/harvard/iq/dataverse/util/json/jsondata.txt index 1edf864e6e4..590a8663c86 100644 --- a/src/test/java/edu/harvard/iq/dataverse/util/json/jsondata.txt +++ b/src/test/java/edu/harvard/iq/dataverse/util/json/jsondata.txt @@ -210,16 +210,16 @@ "typeName": "eastLongitude", "value": "23" }, - "northLongitude": { + "northLatitude": { "multiple": false, "typeClass": "primitive", - "typeName": "northLongitude", + "typeName": "northLatitude", "value": "786" }, - "southLongitude": { + "southLatitude": { "multiple": false, "typeClass": "primitive", - "typeName": "southLongitude", + "typeName": "southLatitude", "value": "34" }, "westLongitude": {