Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add 3d objects metadata block #11167

Merged
merged 10 commits into from
Feb 3, 2025
30 changes: 30 additions & 0 deletions conf/solr/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,21 @@
WARNING: Do not remove the following include guards if you intend to use the neat helper scripts we provide.
-->
<!-- SCHEMA-FIELDS::BEGIN -->
<field name="3d3DTechnique" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="3dAltText" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="3dEquipment" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="3dExportedFileFormat" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="3dExportedFilePolygonCount" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="3dHandling" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="3dHeight" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="3dLength" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="3dLightingSetup" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="3dMasterFilePolygonCount" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="3dMaterialComposition" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="3dObjectDimensions" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="3dUnit" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="3dWeight" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="3dWidth" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="accessToSources" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="actionsToMinimizeLoss" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="alternativeTitle" type="text_en" multiValued="true" stored="true" indexed="true"/>
Expand Down Expand Up @@ -496,6 +511,21 @@
WARNING: Do not remove the following include guards if you intend to use the neat helper scripts we provide.
-->
<!-- SCHEMA-COPY-FIELDS::BEGIN -->
<copyField source="3d3DTechnique" dest="_text_" maxChars="3000"/>
<copyField source="3dAltText" dest="_text_" maxChars="3000"/>
<copyField source="3dEquipment" dest="_text_" maxChars="3000"/>
<copyField source="3dExportedFileFormat" dest="_text_" maxChars="3000"/>
<copyField source="3dExportedFilePolygonCount" dest="_text_" maxChars="3000"/>
<copyField source="3dHandling" dest="_text_" maxChars="3000"/>
<copyField source="3dHeight" dest="_text_" maxChars="3000"/>
<copyField source="3dLength" dest="_text_" maxChars="3000"/>
<copyField source="3dLightingSetup" dest="_text_" maxChars="3000"/>
<copyField source="3dMasterFilePolygonCount" dest="_text_" maxChars="3000"/>
<copyField source="3dMaterialComposition" dest="_text_" maxChars="3000"/>
<copyField source="3dObjectDimensions" dest="_text_" maxChars="3000"/>
<copyField source="3dUnit" dest="_text_" maxChars="3000"/>
<copyField source="3dWeight" dest="_text_" maxChars="3000"/>
<copyField source="3dWidth" dest="_text_" maxChars="3000"/>
<copyField source="accessToSources" dest="_text_" maxChars="3000"/>
<copyField source="actionsToMinimizeLoss" dest="_text_" maxChars="3000"/>
<copyField source="alternativeTitle" dest="_text_" maxChars="3000"/>
Expand Down
60 changes: 60 additions & 0 deletions doc/release-notes/11120-add-3d-object-metadata-block.md
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions doc/sphinx-guides/source/user/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Detailed below are what metadata schemas we support for Citation and Domain Spec
`Virtual Observatory (VO) Discovery and Provenance Metadata <https://perma.cc/H5ZJ-4KKY>`__.
- Life Sciences Metadata (`see .tsv <https://github.com/IQSS/dataverse/blob/master/scripts/api/data/metadatablocks/biomedical.tsv>`__): based on `ISA-Tab Specification <https://isa-specs.readthedocs.io/en/latest/isamodel.html>`__, along with controlled vocabulary from subsets of the `OBI Ontology <https://bioportal.bioontology.org/ontologies/OBI>`__ and the `NCBI Taxonomy for Organisms <https://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/>`__.
- Journal Metadata (`see .tsv <https://github.com/IQSS/dataverse/blob/master/scripts/api/data/metadatablocks/journals.tsv>`__): based on the `Journal Archiving and Interchange Tag Set, version 1.2 <https://jats.nlm.nih.gov/archiving/tag-library/1.2/chapter/how-to-read.html>`__.
- 3D Objects Metadata (`see .tsv <https://github.com/IQSS/dataverse/blob/master/scripts/api/data/metadatablocks/3d_objects.tsv>`__).

Experimental Metadata
~~~~~~~~~~~~~~~~~~~~~
Expand Down
45 changes: 45 additions & 0 deletions scripts/api/data/metadatablocks/3d_objects.tsv
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions scripts/api/setup-datasetfields.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
7 changes: 0 additions & 7 deletions scripts/api/update-datasetfields.sh

This file was deleted.

74 changes: 74 additions & 0 deletions src/main/java/propertyFiles/3dobjects.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down