So far, only the following functions have been tested:
- import of title
- import of author
- import of year
- duplicate checking
All tests have been carried out only for the specific repository used by the developer. For use with other repositories, the metadata schema and the configuration files must be adapted accordingly.
This project is a command-line interface (CLI) tool for importing metadata into the MyCoRe repository system. It supports importing publication metadata from Excel files, performing duplicate checks against the repository, and combining both workflows with reporting.
The tool is designed to be user-friendly and interactive, guiding users through selecting publication types, specifying Excel files, and entering credentials. It uses mapping configurations to translate Excel columns into MODS metadata fields and communicates with MyCoRe via REST API.
Excel files must be in .xlsx format with:
- The first row containing column headers
- Each subsequent row representing one metadata record
- Required columns must be present; optional columns can be omitted
The system automatically recognizes columns in multiple languages through the Column Alias System:
- English: "Title", "Author", "Year", "Publisher", "Abstract", "Keywords", etc.
- German: "Titel", "Autor", "Jahr", "Verlag", "Zusammenfassung", "Schlagwörter", etc.
- Italian: "Titolo", "Autore", "Anno", "Editore", "Riassunto", "Parole chiave", etc.
- Case-insensitive: "TITLE", "Title", "title" are all recognized
The system automatically translates these variations to the canonical German names used in mapping configurations, so you don't need to rename your Excel columns.
For the complete list of recognized aliases, see Configuration Files.
Clone the repository and build using Maven:
# Build with tests
mvn clean package
# Build without tests (faster for deployment)
mvn clean package -DskipTestsThis will produce an executable JAR file in the target/ directory.
Run the application using:
java -jar target/metadata-importer-0.0.1-SNAPSHOT.jar
The repository is configured to be safe-by-default for new contributors:
mycore.import.dry-run=true- Local placeholder endpoints for Solr/MyCoRe
To use real endpoints on your machine, create a local override file:
- Copy
application-local-example.propertiestoapplication-local.propertiesin the project root. - Update values (
solr.server.url,mycore.api.url,mycore.import.dry-run) for your environment.
application-local.properties is automatically loaded if present and is ignored by Git.
Quick launchers (Windows)
- Double-click
Start-ImportApplication.batto open a cmd window and run the CLI. - Double-click
Start-ImportApplication.ps1(or Right-click → Run with PowerShell) to run via PowerShell.
The CLI will prompt you to choose one of three modes:
- Import metadata: Import metadata from an Excel file into MyCoRe.
- Duplicate check only: Check an Excel file for potential duplicates in the repository.
- Import with duplicate check: Perform duplicate check first, then import if confirmed.
You can type stop at any prompt to exit the application.
The CLI offers three main modes:
- Import metadata: Import metadata from an Excel file into MyCoRe.
- Duplicate check only: Check an Excel file for potential duplicates in the repository.
- Import with duplicate check: Perform duplicate check first, then import if confirmed.
For detailed usage instructions, mapping configurations, and troubleshooting, see USAGE.md.
- Mapping configuration files are located in
src/main/resources/mappings/. - Column alias mappings are configured in
src/main/resources/column-aliases.yaml. - Duplicate reports are generated as Excel files in
reports/dubCheckReports/. - Non-duplicate reports are generated alongside duplicate reports in the same folder.
- Import reports are generated as Excel files in
reports/importReports/with animportedObjectUrlcolumn. - Import logs are written to a temp file path printed in the CLI output.
- Enhanced Duplicate Detection: Reports now include actual repository IDs of duplicate documents for precise identification.
- Flexible Column Names: Excel files can use column names in English, German, Italian, or other variants—the system automatically recognizes and translates them.
The application uses the following configuration files:
| File | Location | Purpose |
|---|---|---|
application.properties |
src/main/resources/ |
External service URLs (Solr, MyCoRe API), logging, application settings |
column-aliases.yaml |
src/main/resources/ |
Maps alternative column names to canonical German names used in mappings |
type-labels.yaml |
src/main/resources/ |
Display labels for publication types in CLI menus |
type-normalization.yaml |
src/main/resources/ |
Normalizes publication type values applied during import |
*-thesis.yaml, article.yaml, speech.yaml |
src/main/resources/mappings/ |
Field mappings for each publication type |
For technical architecture details, see HELP.md. For comprehensive testing information, see src/test/TEST_GUIDE.md.
Private helper methods in ImportApplication.java are ordered as follows:
- User input (prompt...)
- Utility/transformation (normalize..., build...)
- Output/report (write...)
This improves code maintainability and readability.
For issues and feature requests, use GitHub Issues.
Before contributing, please read: