====== Metadata Management via the Web Portal ======
Using the [[https://research.web.rug.nl/rdmswebapp/rdms.login.page?next=/rdmswebapp/|web portal]] you will have access to basic metadata functionality using a GUI. Specifically, you will be able to create, read, update, and delete (CRUD) metadata attached to your data. The web portal also allows for more complex handling of your metadata, but we will describe this in a different section when we talk about [[rdms:metadata:metadatatemplates|metadata templates]]. Below we show the data browser of the web portal and where you can see the metadata generated by the system.
{{ :rdms:webapp:meta_crud_0.png?direct&800 |}}
==== Create Metadata in the Web Portal====
When you first upload a file to the RDMS, all the metadata attached to it will be related to system information, such as upload time and file size, as shown above. You can easily attach new metadata to your data by right-clicking the object or collection you wish to add metadata to and then selecting ''Add Metadata''. If you click any of the {{:rdms:webapp:interface_info_button.png?direct&20|}} icons highlighted in the screenshot below, the web portal will open a side menu containing all information about the selected data. There you can easily check what metadata is already attached to the data you selected, as described in the [[https://wiki.hpc.rug.nl/rdms/metadata/metadatawebportal#read_metadata|Read Metadata section]].
{{ :rdms:webapp:meta_crud_1.png?direct&800 |}}
Once you select ''Add Metadata'', the menu on the left will open as shown below. This way of inserting metadata is very much free form. The red boxes are mandatory, whereas the blue box can be used to provide additional information that did not fit into the ''Value*'' box. The ''Name*'' box is your metadata tag or label, while the ''Value*'' box is the value you are inputting for the tag. This value can be text, as shown in the example, or it can be numerical. Once again, this method of inputting metadata is free form and the decision of what the different values are is entirely up to you. Of course, the input for ''Extra Value'' can also be a string or numerical.
An example of the usage of the three different fields could be:
* ''Name*'': Distance
* ''Value*'': 1000
* ''Extra value'': nautical miles
which would add ''Distance: 1000 nautical miles'' as a metadata entry for the selected data.
**Note**:\\
Please keep in mind that the character limit for ''Name*'' and ''Value*'' is 2700, while for ''Extra value'' the limit is 250 characters.
When you are done inputting the metadata tag and description, you can click the blue button to commit your metadata entry.
{{ :rdms:webapp:meta_crud_2.png?direct&800 |}}
**Note**:\\
Pressing the blue button will save the metadata and clear the window in order for you to input the next set of metadata. You can close the window when you are done. If you want to check if your metadata has been saved, click the {{:rdms:webapp:interface_info_button.png?direct&20|}} icon (as shown in the first screenshot of this section) and the window shown below will appear. The blue box shows you the tab where the metadata attached to your data is visible, while the red box highlights the metadata entry you just saved.
{{ :rdms:webapp:meta_crud_3.png?direct&800 |}}
==== Read Metadata in the Web Portal ====
Once you created metadata related to your data, you will always be able to display that information by clicking on the {{:rdms:webapp:interface_info_button.png?direct&20|}} icon next to the respective entry in the web portal. In the screenshot below, clicking on the icon in the red box will display the metadata for the selected object, while clicking on the icon in the blue box will display the information of the current collection, in this case the user's home collection.
{{ :rdms:webapp:meta_crud_4.png?direct&800 |}}
When the {{:rdms:webapp:interface_info_button.png?direct&20|}} icon is clicked, a menu will appear on the right side of the portal. The first tab contains the metadata information of the object or collection you selected. Depending on the amount of metadata you recorded for this object, you might need to scroll down to find the entry you are interested in.
**Note**:\\
The metadata entries are ordered based on the time they were created. If you enter ''Test_meta_0'' after ''Test_meta_1'', as is shown in the figure, the system **will not** reorder them numerically.
{{ :rdms:webapp:meta_crud_5.png?direct&800 |}}
==== Update Metadata in the Web Portal ====
Whether it be because you do not always have all the details related to certain data at the time of its storage in the RDMS or because you spot an error, you can change or update metadata you attached to an object or collection in the way described below.
To modify metadata, simply click on the {{:rdms:webapp:interface_info_button.png?direct&20|}} icon as described above to open up the information menu. Select the left-most metadata tab, and finally click on the {{:rdms:webapp:edit_icon.png?direct&20|}} icon beside the metadata entry you wish to modify.
{{ :rdms:webapp:meta_crud_6.png?direct&800 |}}
This will open up a window similar to the window you would get when adding metadata for the first time, as displayed below. Make the desired changes, then click the blue ''Add/Edit metadata'' button to save your changes. The window will close and the system will then reload the right-side menu and display updated metadata.
{{ :rdms:webapp:meta_crud_7.png?direct&800 |}}
==== Delete Metadata in the Web Portal ====
During your data's life cycle, errors can occur or metadata tags can become irrelevant. For those cases, you can easily delete a metadata tag by selecting the {{:rdms:webapp:interface_info_button.png?direct&20|}} icon once again and clicking on the {{:rdms:webapp:delete_icon.png?direct&30|}} button next to a metadata entry in the metadata tab in the right-side window.
{{ :rdms:webapp:meta_crud_8.png?direct&800 |}}
The system will then display a window to ask you for confirmation of the delete action. Clicking ''No'' cancels the action, while clicking ''Yes'' deletes the metadata entry you selected. Please make sure you do not delete metadata that should be kept!
{{ :rdms:webapp:meta_crud_9.png?direct&800 |}}
===== Automatic Extraction of Metadata =====
What we described above is the functionality of the web portal to let the user add metadata entries by hand. However, there are files which require a large amount of metadata to be properly described. Such data often has the information needed to describe stored as metadata in their file header. The web portal offers the user the possibility to extract and import the metadata contained in the file header directly into the RDMS.
To access this functionality, right-click the file you wish to extract metadata from, then scroll down the menu to ''Extract metadata''.
{{ :rdms:webapp:meta_extract_1.png?direct&800 |}}
Once you click on the menu item, the system will display the message below to inform you of the formats that are currently supported for automatic metadata extraction. To check if the extraction was successful, follow the same steps as in [[https://wiki.hpc.rug.nl/rdms/metadata/metadatawebportal#read_metadata|Read Metadata]] and verify that the header in your file and the metadata in the RDMS overlap.
{{ :rdms:webapp:meta_extract_2.png?direct&800 |}}
**Note**: The extract function of the web portal extracts information contained in the file header. If your file does not have a header, no information will be extracted, even when the system reports successfully finishing the extraction.
==== Supported File Formats for automated Metadata Extraction ====
Below you can find the list of file extension for which automatic extraction is supported:
* ''.dcm'' , ''.dcm30'': DICOM (Digital Imaging and Communications in Medicine) images (dicomstandard.org)
* ''.doc'', ''.docx'': Microsoft Word documents (microsoft.com)
* ''.fits'', ''.fit'': FITS (Flexible Image Transport System) images (fits.gsfc.nasa.gov)
* ''.hdr'', ''.nii'': NIfTI (Neuroimaging Informatics Technology Initiative) headers (nifti.nimh.nih.gov)
* ''.jpeg'', ''.jpg'' : Exif (Exchangeable image file format) (en.wikipedia.org/wiki/Exif)
* ''.pdf'': -'description': PDF (Portable Document Format) files (adobe.com/acrobat/about-adobe-pdf.html)
* ''.ppt'', ''.pptx'': Microsoft Powerpoint documents (microsoft.com)
* ''.tif'', ''.tiff'': Exif (Exchangeable image file format) (en.wikipedia.org/wiki/Exif)
* ''.txt'': ASCII text files containing key=value pairs
* ''.xls'', ''.xlsx'': Microsoft Excel documents (microsoft.com)
If the file type you wish to extract metadata from has a readable file structure and is not present in the list above, we can probably add that file type to the list of supported extensions. Please send an e-mail to [[rdms-support@rug.nl|RDMS support]] to let us know that you wish for a file type to be added to the list.
===== Import Metadata =====
Metadata can also be imported from a local file using the web portal. The ''Name'', ''Value'', and ''Extra Value'' are called AVUs for Attribute, Value, Unit combinations in this context. AVUs are defined in a so-called JSON structure as a ''.txt'' file or a ''.json'' file. Multiple AVUs can be added at once with this approach.
The structure of the file should be as followed:
[
{"Attribute" : "Author",
"Value": "Tester_1",
"Unit": ""
},
{"Attribute" : "Distance",
"Value": "100",
"Unit": "km"
},
{"Attribute" : "Location",
"Value": "Groningen",
"Unit": ""
}
]
Metadata from a local file can be added to both collections and objects by right clicking the target of interest and selecting the ''Load metadata'' option.
{{ :rdms:metadata:import_1_new.png?direct&800 |}}
Upon selecting a file with AVUs in a JSON structure as indicated above, the metadata is automatically recognized and can be added by selecting the ''Load metadata'' button. In this example a .txt file was used. **Please note that multiple AVUs can be added at once.**
{{ :rdms:metadata:import_2_new.png?direct&800 |}}
Upon loading the AVU file the metadata is displayed for the selected data.
{{ :rdms:metadata:import_3_new.png?direct&800 |}}