Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
34986f5
Adding property files for metadataBlock TSV
JayanthyChengan Nov 7, 2018
3c5c24b
Modified the files to show different language values in the UI for th…
JayanthyChengan Nov 7, 2018
44ce15e
showing different language values in the UI for the DatasetFieldType …
JayanthyChengan Nov 8, 2018
f5c4773
showing different language values in the UI for the controlledVocabul…
JayanthyChengan Nov 8, 2018
649d917
to toggle breadcrumbs and info/alert messages corresponding to langua…
JayanthyChengan Nov 9, 2018
416121d
revert
JayanthyChengan Nov 9, 2018
bddeb47
Merge remote-tracking branch 'remotes/origin/develop' into 4684-metad…
JayanthyChengan Nov 9, 2018
2f4efdd
Merge remote-tracking branch 'remotes/origin/develop' into 4684-metad…
JayanthyChengan Nov 13, 2018
cfa43c5
correction
JayanthyChengan Nov 13, 2018
08298d7
updated LocalBundle.java similar to BundleUtil.java
JayanthyChengan Nov 15, 2018
7aa0532
Merge remote-tracking branch 'remotes/origin/develop' into 4684-metad…
JayanthyChengan Nov 15, 2018
fe6ec38
created property file for custom metadata blocks and few corrections …
JayanthyChengan Nov 28, 2018
95ee9de
added try/catch to handle MissingResourceException
JayanthyChengan Nov 30, 2018
9855e7b
Merge remote-tracking branch 'remotes/origin/develop' into 4684-metad…
JayanthyChengan Dec 4, 2018
8dd2593
added instructions to create resourcebundle property files for metada…
JayanthyChengan Dec 5, 2018
297071b
correction
JayanthyChengan Dec 5, 2018
12e3f5f
correction
JayanthyChengan Dec 5, 2018
96bd67b
correction
JayanthyChengan Dec 5, 2018
cf4fd5d
correction
JayanthyChengan Dec 5, 2018
a561055
remove notes about internationalization (done!) #4684
pdurbin Dec 5, 2018
9e91a2d
to toggle the description field in the advanced search page.
JayanthyChengan Dec 11, 2018
5d17e54
Merge remote-tracking branch 'remotes/origin/develop' into 4684-metad…
JayanthyChengan Dec 13, 2018
86e5b7c
replaced with unicode character
JayanthyChengan Dec 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 52 additions & 4 deletions doc/sphinx-guides/source/admin/metadatacustomization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Much more customization of metadata is possible, but this is an advanced topic s
- Editing and adding metadata fields

- Editing and adding instructional text (field label tooltips and text
box watermarks, but see the note below about internationalization)
box watermarks)

- Editing and adding controlled vocabularies

Expand All @@ -40,7 +40,7 @@ good organizational practice to define only one in each file.

The metadata block TSVs shipped with Dataverse are in `this folder in
the Dataverse github
repo <https://github.com/IQSS/dataverse/tree/develop/scripts/api/data/metadatablocks>`__.
repo <https://github.com/IQSS/dataverse/tree/develop/scripts/api/data/metadatablocks>`__ and the corresponding ResourceBundle property files are `here <https://github.com/IQSS/dataverse/tree/develop/src/main/java>`__.
Human-readable copies are available in `this Google Sheets
document <https://docs.google.com/spreadsheets/d/13HP-jI_cwLDHBetn9UKTREPJ_F4iHdAvhjmlvmYdSSw/edit#gid=0>`__ but they tend to get out of sync with the TSV files, which should be considered authoritative. The Dataverse installation process operates on the TSVs, not the Google spreadsheet.

Expand Down Expand Up @@ -522,19 +522,67 @@ Please note that metadata fields share a common namespace so they must be unique

We'll use this command again below to update the Solr schema to accomodate metadata fields we've added.

We are aware that English goes into the TSV files but we are working toward internationalization of metadata blocks in https://github.com/IQSS/dataverse/issues/4684

Loading TSV files into Dataverse
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A number of TSV files are loaded into Dataverse on every new installation, becoming the metadata blocks you see in the UI. For the list of metadata blocks that are included with Dataverse out of the box, see the :doc:`/user/appendix` section of the User Guide.

Along with TSV file, there are corresponding ResourceBundle property files with key=value pair `here <https://github.com/IQSS/dataverse/tree/develop/src/main/java>`__. To add other language files, see the :doc:`/installation/config` for dataverse.lang.directory JVM Options section, and add a file, for example: "citation_lang.properties" to the path you specified for the ``dataverse.lang.directory`` JVM option, and then restart Glassfish.

If you are improving an existing metadata block, the Dataverse installation process will load the TSV for you, assuming you edited the TSV file in place. The TSV file for the Citation metadata block, for example, can be found at ``scripts/api/data/metadatablocks/citation.tsv``.
If any of the below mentioned property values are changed, corresponsing ResourceBundle property file has to be edited and stored under ``dataverse.lang.directory`` location

- name, displayName property under #metadataBlock
- name, title, description, watermark properties under #datasetfield
- DatasetField, Value property under #controlledVocabulary

If you are creating a new custom metadata block (hopefully with the idea of contributing it back to the community if you feel like it would provide value to others), the Dataverse installation process won't know about your new TSV file so you must load it manually. The script that loads the TSV files into the system is ``scripts/api/setup-datasetfields.sh`` and contains a series of curl commands. Here's an example of the necessary curl command with the new custom metadata block in the "/tmp" directory.

``curl http://localhost:8080/api/admin/datasetfield/load -H "Content-type: text/tab-separated-values" -X POST --upload-file /tmp/new-metadata-block.tsv``

To create a new ResourceBundle, here are the steps to generate key=value pair for the three main sections:

#metadataBlock properties
~~~~~~~~~~~~~~~~~~~~~~~~~
metadatablock.name=(the value of **name** property from #metadatablock)

metadatablock.displayName=(the value of **displayName** property from #metadatablock)

example:

metadatablock.name=citation

metadatablock.displayName=Citation Metadata

#datasetField (field) properties
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
datasetfieldtype.(the value of **name** property from #datasetField).title=(the value of **title** property from #datasetField)

datasetfieldtype.(the value of **name** property from #datasetField).description=(the value of **description** property from #datasetField)

datasetfieldtype.(the value of **name** property from #datasetField).watermark=(the value of **watermark** property from #datasetField)

example:

datasetfieldtype.title.title=Title

datasetfieldtype.title.description=Full title by which the Dataset is known.

datasetfieldtype.title.watermark=Enter title...

#controlledVocabulary (enumerated) properties
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
controlledvocabulary.(the value of **DatasetField** property from #controlledVocabulary).(the value of **Value** property from #controlledVocabulary)=(the value of **Value** property from #controlledVocabulary)

Since the **Value** property from #controlledVocabulary is free text, while creating the key, it has to be converted to lowercase, replace space with underscore, and strip accents.

example:

controlledvocabulary.subject.agricultural_sciences=Agricultural Sciences

controlledvocabulary.language.marathi_(marathi)=Marathi (Mar\u0101\u1E6Dh\u012B)


Enabling a Metadata Block
~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
104 changes: 104 additions & 0 deletions src/main/java/astrophysics.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
metadatablock.name=astrophysics
metadatablock.displayName=Astronomy and Astrophysics Metadata
datasetfieldtype.astroType.title=Type
datasetfieldtype.astroFacility.title=Facility
datasetfieldtype.astroInstrument.title=Instrument
datasetfieldtype.astroObject.title=Object
datasetfieldtype.resolution.Spatial.title=Spatial Resolution
datasetfieldtype.resolution.Spectral.title=Spectral Resolution
datasetfieldtype.resolution.Temporal.title=Time Resolution
datasetfieldtype.coverage.Spectral.Bandpass.title=Bandpass
datasetfieldtype.coverage.Spectral.CentralWavelength.title=Central Wavelength (m)
datasetfieldtype.coverage.Spectral.Wavelength.title=Wavelength Range
datasetfieldtype.coverage.Spectral.MinimumWavelength.title=Minimum (m)
datasetfieldtype.coverage.Spectral.MaximumWavelength.title=Maximum (m)
datasetfieldtype.coverage.Temporal.title=Dataset Date Range
datasetfieldtype.coverage.Temporal.StartTime.title=Start
datasetfieldtype.coverage.Temporal.StopTime.title=End
datasetfieldtype.coverage.Spatial.title=Sky Coverage
datasetfieldtype.coverage.Depth.title=Depth Coverage
datasetfieldtype.coverage.ObjectDensity.title=Object Density
datasetfieldtype.coverage.ObjectCount.title=Object Count
datasetfieldtype.coverage.SkyFraction.title=Fraction of Sky
datasetfieldtype.coverage.Polarization.title=Polarization
datasetfieldtype.redshiftType.title=RedshiftType
datasetfieldtype.resolution.Redshift.title=Redshift Resolution
datasetfieldtype.coverage.RedshiftValue.title=Redshift Value
datasetfieldtype.coverage.Redshift.MinimumValue.title=Minimum
datasetfieldtype.coverage.Redshift.MaximumValue.title=Maximum
datasetfieldtype.astroType.description=The nature or genre of the content of the files in the dataset.
datasetfieldtype.astroFacility.description=The observatory or facility where the data was obtained.
datasetfieldtype.astroInstrument.description=The instrument used to collect the data.
datasetfieldtype.astroObject.description=Astronomical Objects represented in the data (Given as SIMBAD recognizable names preferred).
datasetfieldtype.resolution.Spatial.description=The spatial (angular) resolution that is typical of the observations, in decimal degrees.
datasetfieldtype.resolution.Spectral.description=The spectral resolution that is typical of the observations, given as the ratio λ/Δλ.
datasetfieldtype.resolution.Temporal.description=The temporal resolution that is typical of the observations, given in seconds.
datasetfieldtype.coverage.Spectral.Bandpass.description=Conventional bandpass name
datasetfieldtype.coverage.Spectral.CentralWavelength.description=The central wavelength of the spectral bandpass, in meters.
datasetfieldtype.coverage.Spectral.Wavelength.description=The minimum and maximum wavelength of the spectral bandpass.
datasetfieldtype.coverage.Spectral.MinimumWavelength.description=The minimum wavelength of the spectral bandpass, in meters.
datasetfieldtype.coverage.Spectral.MaximumWavelength.description=The maximum wavelength of the spectral bandpass, in meters.
datasetfieldtype.coverage.Temporal.description= Time period covered by the data.
datasetfieldtype.coverage.Temporal.StartTime.description=Dataset Start Date
datasetfieldtype.coverage.Temporal.StopTime.description=Dataset End Date
datasetfieldtype.coverage.Spatial.description=The sky coverage of the data object.
datasetfieldtype.coverage.Depth.description=The (typical) depth coverage, or sensitivity, of the data object in Jy.
datasetfieldtype.coverage.ObjectDensity.description=The (typical) density of objects, catalog entries, telescope pointings, etc., on the sky, in number per square degree.
datasetfieldtype.coverage.ObjectCount.description=The total number of objects, catalog entries, etc., in the data object.
datasetfieldtype.coverage.SkyFraction.description=The fraction of the sky represented in the observations, ranging from 0 to 1.
datasetfieldtype.coverage.Polarization.description=The polarization coverage
datasetfieldtype.redshiftType.description=RedshiftType string C "Redshift"; or "Optical" or "Radio" definitions of Doppler velocity used in the data object.
datasetfieldtype.resolution.Redshift.description=The resolution in redshift (unitless) or Doppler velocity (km/s) in the data object.
datasetfieldtype.coverage.RedshiftValue.description=The value of the redshift (unitless) or Doppler velocity (km/s in the data object.
datasetfieldtype.coverage.Redshift.MinimumValue.description=The minimum value of the redshift (unitless) or Doppler velocity (km/s in the data object.
datasetfieldtype.coverage.Redshift.MaximumValue.description=The maximum value of the redshift (unitless) or Doppler velocity (km/s in the data object.
datasetfieldtype.astroType.watermark=
datasetfieldtype.astroFacility.watermark=
datasetfieldtype.astroInstrument.watermark=
datasetfieldtype.astroObject.watermark=
datasetfieldtype.resolution.Spatial.watermark=
datasetfieldtype.resolution.Spectral.watermark=
datasetfieldtype.resolution.Temporal.watermark=
datasetfieldtype.coverage.Spectral.Bandpass.watermark=
datasetfieldtype.coverage.Spectral.CentralWavelength.watermark=Enter a floating-point number.
datasetfieldtype.coverage.Spectral.Wavelength.watermark=Enter a floating-point number.
datasetfieldtype.coverage.Spectral.MinimumWavelength.watermark=Enter a floating-point number.
datasetfieldtype.coverage.Spectral.MaximumWavelength.watermark=Enter a floating-point number.
datasetfieldtype.coverage.Temporal.watermark=
datasetfieldtype.coverage.Temporal.StartTime.watermark=YYYY-MM-DD
datasetfieldtype.coverage.Temporal.StopTime.watermark=YYYY-MM-DD
datasetfieldtype.coverage.Spatial.watermark=
datasetfieldtype.coverage.Depth.watermark=Enter a floating-point number.
datasetfieldtype.coverage.ObjectDensity.watermark=Enter a floating-point number.
datasetfieldtype.coverage.ObjectCount.watermark=Enter an integer.
datasetfieldtype.coverage.SkyFraction.watermark=Enter a floating-point number.
datasetfieldtype.coverage.Polarization.watermark=
datasetfieldtype.redshiftType.watermark=
datasetfieldtype.resolution.Redshift.watermark=Enter a floating-point number.
datasetfieldtype.coverage.RedshiftValue.watermark=Enter a floating-point number.
datasetfieldtype.coverage.Redshift.MinimumValue.watermark=Enter a floating-point number.
datasetfieldtype.coverage.Redshift.MaximumValue.watermark=Enter a floating-point number.
controlledvocabulary.astroType.image=Image
controlledvocabulary.astroType.mosaic=Mosaic
controlledvocabulary.astroType.eventlist=EventList
controlledvocabulary.astroType.spectrum=Spectrum
controlledvocabulary.astroType.cube=Cube
controlledvocabulary.astroType.table=Table
controlledvocabulary.astroType.catalog=Catalog
controlledvocabulary.astroType.lightcurve=LightCurve
controlledvocabulary.astroType.simulation=Simulation
controlledvocabulary.astroType.figure=Figure
controlledvocabulary.astroType.artwork=Artwork
controlledvocabulary.astroType.animation=Animation
controlledvocabulary.astroType.prettypicture=PrettyPicture
controlledvocabulary.astroType.documentation=Documentation
controlledvocabulary.astroType.other=Other
controlledvocabulary.astroType.library=Library
controlledvocabulary.astroType.press_release=Press Release
controlledvocabulary.astroType.facsimile=Facsimile
controlledvocabulary.astroType.historical=Historical
controlledvocabulary.astroType.observation=Observation
controlledvocabulary.astroType.object=Object
controlledvocabulary.astroType.value=Value
controlledvocabulary.astroType.valuepair=ValuePair
controlledvocabulary.astroType.survey=Survey
Loading