diff --git a/conf/solr/schema.xml b/conf/solr/schema.xml index 77b7cebdaf3..543bdc698ec 100644 --- a/conf/solr/schema.xml +++ b/conf/solr/schema.xml @@ -254,6 +254,21 @@ WARNING: Do not remove the following include guards if you intend to use the neat helper scripts we provide. --> + + + + + + + + + + + + + + + @@ -496,6 +511,21 @@ WARNING: Do not remove the following include guards if you intend to use the neat helper scripts we provide. --> + + + + + + + + + + + + + + + diff --git a/doc/release-notes/11120-add-3d-object-metadata-block.md b/doc/release-notes/11120-add-3d-object-metadata-block.md new file mode 100644 index 00000000000..a43be86bc7d --- /dev/null +++ b/doc/release-notes/11120-add-3d-object-metadata-block.md @@ -0,0 +1,60 @@ +### New 3D Object Data Metadata Block + +A new metadata block has been added for describing 3D object data. You can download it from the [guides](https://dataverse-guide--11167.org.readthedocs.build/en/11167/user/appendix.html). See also #11120 and #11167. + +All new Dataverse installations will receive this metadata block by default. We recommend adding it by following the upgrade instructions below. + +## Upgrade Instructions + +### For 6.6-Release-notes.md + +6\. Restart Payara + +7\. Update metadata blocks + +These changes reflect incremental improvements made to the handling of core metadata fields. + +```shell +wget https://raw.githubusercontent.com/IQSS/dataverse/v6.6/scripts/api/data/metadatablocks/citation.tsv + +curl http://localhost:8080/api/admin/datasetfield/load -H "Content-type: text/tab-separated-values" -X POST --upload-file citation.tsv +``` +```shell +wget https://raw.githubusercontent.com/IQSS/dataverse/v6.6/scripts/api/data/metadatablocks/3d_objects.tsv + +curl http://localhost:8080/api/admin/datasetfield/load -H "Content-type: text/tab-separated-values" -X POST --upload-file 3d_objects.tsv +``` + +8\. Update Solr schema.xml file. Start with the standard v6.6 schema.xml, then, if your installation uses any custom or experimental metadata blocks, update it to include the extra fields (step 8a). + +Stop Solr (usually `service solr stop`, depending on Solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/6.6/installation/prerequisites.html#solr-init-script)). + +```shell +service solr stop +``` + +Replace schema.xml + +```shell +wget https://raw.githubusercontent.com/IQSS/dataverse/v6.6/conf/solr/schema.xml +cp schema.xml /usr/local/solr/solr-9.4.1/server/solr/collection1/conf +``` + +Start Solr (but if you use any custom metadata blocks or adding 3D Objects, perform the next step, 8a first). + +```shell +service solr start +``` +8a\. For installations with custom or experimental metadata blocks: + +Before starting Solr, update the schema to include all the extra metadata fields that your installation uses. We do this by collecting the output of the Dataverse schema API and feeding it to the `update-fields.sh` script that we supply, as in the example below (modify the command lines as needed to reflect the names of the directories, if different): + +```shell + wget https://raw.githubusercontent.com/IQSS/dataverse/v6.6/conf/solr/update-fields.sh + chmod +x update-fields.sh + curl "http://localhost:8080/api/admin/index/solr/schema" | ./update-fields.sh /usr/local/solr/solr-9.4.1/server/solr/collection1/conf/schema.xml +``` + +Now start Solr. + +9\. Reindex Solr diff --git a/doc/sphinx-guides/source/user/appendix.rst b/doc/sphinx-guides/source/user/appendix.rst index df9b6704209..4521b781475 100755 --- a/doc/sphinx-guides/source/user/appendix.rst +++ b/doc/sphinx-guides/source/user/appendix.rst @@ -30,6 +30,7 @@ Detailed below are what metadata schemas we support for Citation and Domain Spec `Virtual Observatory (VO) Discovery and Provenance Metadata `__. - Life Sciences Metadata (`see .tsv `__): based on `ISA-Tab Specification `__, along with controlled vocabulary from subsets of the `OBI Ontology `__ and the `NCBI Taxonomy for Organisms `__. - Journal Metadata (`see .tsv `__): based on the `Journal Archiving and Interchange Tag Set, version 1.2 `__. +- 3D Objects Metadata (`see .tsv `__). Experimental Metadata ~~~~~~~~~~~~~~~~~~~~~ diff --git a/scripts/api/data/metadatablocks/3d_objects.tsv b/scripts/api/data/metadatablocks/3d_objects.tsv new file mode 100644 index 00000000000..e753e4dfbed --- /dev/null +++ b/scripts/api/data/metadatablocks/3d_objects.tsv @@ -0,0 +1,45 @@ +#metadataBlock name dataverseAlias displayName + 3dobjects 3D Objects Metadata +#datasetField name title description watermark fieldType displayOrder displayFormat advancedSearchField allowControlledVocabulary allowmultiples facetable displayoncreate required parent metadatablock_id termURI + 3d3DTechnique 3D Technique The technique used for capturing the 3D data text 0 #VALUE TRUE TRUE FALSE TRUE FALSE FALSE 3dobjects + 3dEquipment Equipment The equipment used for capturing the 3D data text 1 #VALUE TRUE FALSE FALSE FALSE FALSE FALSE 3dobjects + 3dLightingSetup Lighting Setup The lighting used while capturing the 3D data text 2 #VALUE TRUE TRUE FALSE TRUE FALSE FALSE 3dobjects + 3dMasterFilePolygonCount Master File Polygon Count The high-resolution polygon count text 3 #VALUE TRUE FALSE FALSE FALSE FALSE FALSE 3dobjects + 3dExportedFilePolygonCount Exported File Polygon Count The exported mesh polygon count text 4 #VALUE TRUE FALSE TRUE FALSE FALSE FALSE 3dobjects + 3dExportedFileFormat Exported File Format The format of the exported mesh text 5 #VALUE TRUE TRUE FALSE TRUE FALSE FALSE 3dobjects + 3dAltText Alt-Text A physical description of the object modeled textbox 6 #VALUE FALSE FALSE FALSE FALSE FALSE FALSE 3dobjects + 3dMaterialComposition Material Composition The material used to create the object, e.g. stone text 7 #VALUE TRUE FALSE TRUE TRUE FALSE FALSE 3dobjects + 3dObjectDimensions Object Dimensions The general measurements of the physical object none 8 ; FALSE FALSE FALSE FALSE FALSE FALSE 3dobjects + 3dLength Length The rough length of the object text 9 Length: #VALUE FALSE FALSE FALSE FALSE FALSE FALSE 3dObjectDimensions 3dobjects + 3dWidth Width The rough width of the object text 10 Width: #VALUE FALSE FALSE FALSE FALSE FALSE FALSE 3dObjectDimensions 3dobjects + 3dHeight Height The rough height of the object text 11 Height: #VALUE FALSE FALSE FALSE FALSE FALSE FALSE 3dObjectDimensions 3dobjects + 3dWeight Weight The rough weight of the object text 12 Weight:#VALUE FALSE FALSE FALSE FALSE FALSE FALSE 3dObjectDimensions 3dobjects + 3dUnit Unit The unit of measurement used for the object dimensions text 13 Unit: #VALUE FALSE TRUE FALSE TRUE FALSE FALSE 3dObjectDimensions 3dobjects + 3dHandling Instructions Safety and special handling instructions for the object textbox 14 #VALUE FALSE FALSE FALSE FALSE FALSE FALSE 3dobjects +#controlledVocabulary DatasetField Value identifier displayOrder + 3d3DTechnique IR Scanner 0 + 3d3DTechnique Laser 1 + 3d3DTechnique Modelled 2 + 3d3DTechnique Photogrammetry 3 + 3d3DTechnique RTI 4 + 3d3DTechnique Structured Light 5 + 3d3DTechnique Tomographic 6 + 3d3DTechnique Other 7 + 3dLightingSetup Natural Light 8 + 3dLightingSetup Lightbox 9 + 3dLightingSetup LED 10 + 3dLightingSetup Fluorescent 11 + 3dLightingSetup Other 12 + 3dUnit cm 13 + 3dUnit m 14 + 3dUnit in 15 + 3dUnit ft 16 + 3dUnit lbs 17 + 3dExportedFileFormat .fbx 18 + 3dExportedFileFormat .glb 19 + 3dExportedFileFormat .gltf 20 + 3dExportedFileFormat .obj 21 + 3dExportedFileFormat .stl 22 + 3dExportedFileFormat .usdz 23 + 3dExportedFileFormat .x3d 24 + 3dExportedFileFormat other 25 diff --git a/scripts/api/setup-datasetfields.sh b/scripts/api/setup-datasetfields.sh index 51da677ceb8..908988f8acb 100755 --- a/scripts/api/setup-datasetfields.sh +++ b/scripts/api/setup-datasetfields.sh @@ -11,3 +11,4 @@ curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCR curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCRIPT_PATH"/data/metadatablocks/astrophysics.tsv -H "Content-type: text/tab-separated-values" curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCRIPT_PATH"/data/metadatablocks/biomedical.tsv -H "Content-type: text/tab-separated-values" curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCRIPT_PATH"/data/metadatablocks/journals.tsv -H "Content-type: text/tab-separated-values" +curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCRIPT_PATH"/data/metadatablocks/3d_objects.tsv -H "Content-type: text/tab-separated-values" diff --git a/scripts/api/update-datasetfields.sh b/scripts/api/update-datasetfields.sh deleted file mode 100644 index ae099f8dcfd..00000000000 --- a/scripts/api/update-datasetfields.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/citation.tsv -H "Content-type: text/tab-separated-values" -curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/geospatial.tsv -H "Content-type: text/tab-separated-values" -curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/social_science.tsv -H "Content-type: text/tab-separated-values" -curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/astrophysics.tsv -H "Content-type: text/tab-separated-values" -curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/biomedical.tsv -H "Content-type: text/tab-separated-values" -curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/journals.tsv -H "Content-type: text/tab-separated-values" \ No newline at end of file diff --git a/src/main/java/propertyFiles/3dobjects.properties b/src/main/java/propertyFiles/3dobjects.properties new file mode 100644 index 00000000000..97b8b0698dc --- /dev/null +++ b/src/main/java/propertyFiles/3dobjects.properties @@ -0,0 +1,74 @@ +metadatablock.name=3dobjects +metadatablock.displayName=3D Objects Metadata +metadatablock.displayFacet= +datasetfieldtype.3d3DTechnique.title=3D Technique +datasetfieldtype.3dEquipment.title=Equipment +datasetfieldtype.3dLightingSetup.title=Lighting Setup +datasetfieldtype.3dMasterFilePolygonCount.title=Master File Polygon Count +datasetfieldtype.3dExportedFilePolygonCount.title=Exported File Polygon Count +datasetfieldtype.3dExportedFileFormat.title=Exported File Format +datasetfieldtype.3dAltText.title=Alt-Text +datasetfieldtype.3dMaterialComposition.title=Material Composition +datasetfieldtype.3dObjectDimensions.title=Object Dimensions +datasetfieldtype.3dLength.title=Length +datasetfieldtype.3dWidth.title=Width +datasetfieldtype.3dHeight.title=Height +datasetfieldtype.3dWeight.title=Weight +datasetfieldtype.3dUnit.title=Unit +datasetfieldtype.3dHandling.title=Instructions +datasetfieldtype.3d3DTechnique.description=The technique used for capturing the 3D data +datasetfieldtype.3dEquipment.description=The equipment used for capturing the 3D data +datasetfieldtype.3dLightingSetup.description=The lighting used while capturing the 3D data +datasetfieldtype.3dMasterFilePolygonCount.description=The high-resolution polygon count +datasetfieldtype.3dExportedFilePolygonCount.description=The exported mesh polygon count +datasetfieldtype.3dExportedFileFormat.description=The format of the exported mesh +datasetfieldtype.3dAltText.description=A physical description of the object modeled +datasetfieldtype.3dMaterialComposition.description=The material used to create the object, e.g. stone +datasetfieldtype.3dObjectDimensions.description=The general measurements of the physical object +datasetfieldtype.3dLength.description=The rough length of the object +datasetfieldtype.3dWidth.description=The rough width of the object +datasetfieldtype.3dHeight.description=The rough height of the object +datasetfieldtype.3dWeight.description=The rough weight of the object +datasetfieldtype.3dUnit.description=The unit of measurement used for the object dimensions +datasetfieldtype.3dHandling.description=Safety and special handling instructions for the object +datasetfieldtype.3d3DTechnique.watermark= +datasetfieldtype.3dEquipment.watermark= +datasetfieldtype.3dLightingSetup.watermark= +datasetfieldtype.3dMasterFilePolygonCount.watermark= +datasetfieldtype.3dExportedFilePolygonCount.watermark= +datasetfieldtype.3dExportedFileFormat.watermark= +datasetfieldtype.3dAltText.watermark= +datasetfieldtype.3dMaterialComposition.watermark= +datasetfieldtype.3dObjectDimensions.watermark= +datasetfieldtype.3dLength.watermark= +datasetfieldtype.3dWidth.watermark= +datasetfieldtype.3dHeight.watermark= +datasetfieldtype.3dWeight.watermark= +datasetfieldtype.3dUnit.watermark= +datasetfieldtype.3dHandling.watermark= +controlledvocabulary.3d3DTechnique.ir_scanner=IR Scanner +controlledvocabulary.3d3DTechnique.laser=Laser +controlledvocabulary.3d3DTechnique.modelled=Modelled +controlledvocabulary.3d3DTechnique.photogrammetry=Photogrammetry +controlledvocabulary.3d3DTechnique.rti=RTI +controlledvocabulary.3d3DTechnique.structured_light=Structured Light +controlledvocabulary.3d3DTechnique.tomographic=Tomographic +controlledvocabulary.3d3DTechnique.other=Other +controlledvocabulary.3dLightingSetup.natural_light=Natural Light +controlledvocabulary.3dLightingSetup.lightbox=Lightbox +controlledvocabulary.3dLightingSetup.led=LED +controlledvocabulary.3dLightingSetup.fluorescent=Fluorescent +controlledvocabulary.3dLightingSetup.other=Other +controlledvocabulary.3dUnit.cm=cm +controlledvocabulary.3dUnit.m=m +controlledvocabulary.3dUnit.in=in +controlledvocabulary.3dUnit.ft=ft +controlledvocabulary.3dUnit.lbs=lbs +controlledvocabulary.3dExportedFileFormat..fbx=.fbx +controlledvocabulary.3dExportedFileFormat..glb=.glb +controlledvocabulary.3dExportedFileFormat..gltf=.gltf +controlledvocabulary.3dExportedFileFormat..obj=.obj +controlledvocabulary.3dExportedFileFormat..stl=.stl +controlledvocabulary.3dExportedFileFormat..usdz=.usdz +controlledvocabulary.3dExportedFileFormat..x3d=.x3d +controlledvocabulary.3dExportedFileFormat.other=other diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DatasetFieldsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DatasetFieldsIT.java index ae90ddf0b4c..b70ef04d4c0 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DatasetFieldsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DatasetFieldsIT.java @@ -19,7 +19,7 @@ public static void setUpClass() { void testListAllFacetableDatasetFields() { Response listAllFacetableDatasetFieldsResponse = UtilIT.listAllFacetableDatasetFields(); listAllFacetableDatasetFieldsResponse.then().assertThat().statusCode(OK.getStatusCode()); - int expectedNumberOfFacetableDatasetFields = 59; + int expectedNumberOfFacetableDatasetFields = 64; listAllFacetableDatasetFieldsResponse.then().assertThat() .statusCode(OK.getStatusCode()) .body("data[0].name", equalTo("authorName")) diff --git a/src/test/java/edu/harvard/iq/dataverse/api/MetadataBlocksIT.java b/src/test/java/edu/harvard/iq/dataverse/api/MetadataBlocksIT.java index 316ac579de4..c1a76fd7b15 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/MetadataBlocksIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/MetadataBlocksIT.java @@ -27,7 +27,7 @@ public static void setUpClass() { void testListMetadataBlocks() { // No optional params enabled Response listMetadataBlocksResponse = UtilIT.listMetadataBlocks(false, false); - int expectedDefaultNumberOfMetadataBlocks = 6; + int expectedDefaultNumberOfMetadataBlocks = 7; listMetadataBlocksResponse.then().assertThat() .statusCode(OK.getStatusCode()) .body("data[0].fields", equalTo(null))