# SFB 1280 MetaDataApp

## Introduction and wiki
One of the most important steps in managing research data is the creation of metadata. Metadata represents characteristics of the raw data collected, such as the creator, date, subjects. License, publisher, etc. are also metadata. However, selecting the appropriate metadata fields is a difficult task.  The easiest way is to have a template that contains a [mapping to bibliometric metadata standards](https://gitlab.ruhr-uni-bochum.de/sfb1280/metaapp_2/-/wikis/MetaDataApp-Wiki/Mapping-of-SFB-1280-metadata-to-DublinCore-and-DataCite) such as DublinCore and DataCite: The [SFB 1280 metadata schema](https://gitlab.ruhr-uni-bochum.de/sfb1280/metaapp_2/-/wikis/MetaDataApp-Wiki/SFB-1280-metadata-fields) is such a template with 16 fields developed by SFB representatives. In accordance with the [SFB's research data management policy](https://doi.org/10.5281/zenodo.8004432), storage of this metadata is mandatory for all SFB 1280 groups. 

Please refer to this project's [wiki page for information about the SFB 1280 metadata schema](https://gitlab.ruhr-uni-bochum.de/sfb1280/metaapp_2/-/wikis/home). 


## About this project
To save researchers noticeable routine work in creating metadata in the medium term, the SFB 1280 INF project developed the SFB 1280 MetadataApp. The MetaDataApp is a Java application with a graphical user interface that allows researchers to easily enter metadata, as well as store metadata in local json files along with research data using an inheritance strategy. It allows the input of SFB 1280 metadata, as well as additional DublinCore and DataCite metadata that have no mapping to SFB 1280 metadata but are important for publishing the data according to the FAIR principles later. You can download an already exported version of the program [here](https://gitlab.ruhr-uni-bochum.de/sfb1280/metaapp_2/-/tree/main/builds?ref_type=heads) as a .jar file to get a first overview of the program.

![](/images/ScreenshotMetaDataApp.png)

The MetaDataApp will store the entries in a json file format that allows further use in a database and  repositories. Json is a well-established data-interchange format that can be transformed easily in any pipeline regardless of programming language use. 

## Associated projects
The [SFB 1280 DatabaseCreator](https://gitlab.ruhr-uni-bochum.de/sfb1280/DatabaseCreate) searches a storage or file system for SFB metadata and writes the results to an SQLLite database.  The [SFB 1280 DatabaseApp](https://gitlab.ruhr-uni-bochum.de/sfb1280/databaseapp_2.0) is an additionally developed Java application that makes the database searchable and the search results easily retrievable.



## Structure of the project

#### Important Files and Folders
- **Source code**: The code of the actual project. Found in src/AppJ_V03.java
- **Libaries**: The crucial libaries are
    - gson.2.6.2.jar
    - jcalendar-1.4.jar
    - jgoodies-forms-1.8.0.jar
    - jgoodies-forms-1.8.0-source.jar
    - json-simple-1.1.jar
    - miglayout15-swing.jar
- **.classpath**: Might be important to setup the libs, but this can be done manual as well.    


## Structure of the code

#### Line 0 to 71:
Imports.
External Libaries:
- JSON-Simpel
- GSON

Both for JSON handling

#### Line 92 to 266
Functions for input field formatting.
Those functions get a input component as a parameter and add certain listener to it. For example: This could be a listener, which colours the field red, whenever the input format is not correct.

#### Line 271 to 357
Utilily functions

#### Line 358 to 370
Java main function

#### Line 371 to 470
All used variable, which can be changed and will be saved are declared and initiated here.

#### Line 476 to 584
If there is already a meta.JSON file, then this code area will read the data out of this file into the variables.

#### Line 590 to 1640
UI of the application

#### Line 1641 to 1808
Adding special features to the UI. Such as adding enforced formats to input fields.

#### Line 1809 to 1948
Save the content to a new meta.JSON file.

#### Line 1949 - END
UI (Panels)


## License and Citation
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License: https://creativecommons.org/licenses/by-sa/4.0/

Please cite as: Zomorodpoosh, Setareh, Diers, Erik, Linn, Sandra, Merz, Christian J., Pacharra, Marlene, & Otto, Tobias. (2024). MetaDataApp v3.0. Zenodo. https://doi.org/10.5281/zenodo.11203063

## Contact
If you have any questions about the MetaDataApp, or if you have feature requests or found bugs, please contact the SFB's INF project via email: sfb1280data@rub.de

## Funding
The development of the SFB 1280 subject code generator was carried out as part of the SFB 1280 INF project, supported by the Deutsche Forschungsgemeinschaft DFG (German Research Foundation, project number 316803389). CJM received support by the SFB 1280 A09 project.

