2020-12-08 11:03:53 +02:00
# CGSpace Java Helpers [](https://github.com/ilri/cgspace-java-helpers/actions)
2020-08-06 15:25:04 +03:00
DSpace curation tasks and other Java-based helpers used on the [CGSpace ](https://cgspace.cgiar.org ) institutional repository:
2020-07-31 21:40:15 +03:00
2020-08-02 23:20:29 +03:00
- **CountryCodeTagger**: add ISO 3166-1 Alpha2 country codes to items based on their existing country metadata
2022-10-05 15:24:08 +03:00
- **FixJpgJpgThumbnails**: fix low-quality ".jpg.jpg" thumbnails by replacing them with their originals
- **FixLowQualityThumbnails**: remove low-quality thumbnails when PDF bitstreams are present
2024-04-23 13:07:55 +03:00
- **NormalizeDOIs**: normalize DOIs by stripping whitespace, lowercasing, and converting to https://doi.org/ format
2020-07-31 21:40:15 +03:00
2024-06-26 16:45:11 +03:00
Tested on DSpace 7.6.1. Read more about the [DSpace curation system ](https://wiki.lyrasis.org/display/DSDOC7x/Curation+System ).
2020-07-31 21:40:15 +03:00
2020-08-02 22:55:23 +03:00
## Build and Install
2020-08-03 14:43:38 +03:00
### Integrate into DSpace Build
To use these curation tasks in a DSpace project add the following dependency to `dspace/modules/additions/pom.xml` :
```
< dependency >
< groupId > io.github.ilri.cgspace< / groupId >
2020-08-06 15:25:04 +03:00
< artifactId > cgspace-java-helpers< / artifactId >
2024-06-26 16:42:30 +03:00
< version > 7.6.1.4-SNAPSHOT< / version >
2020-08-03 14:43:38 +03:00
< / dependency >
```
The jar will be copied to all DSpace applications.
### Manual Build and Install
2020-08-02 22:55:23 +03:00
To build the standalone jar:
2022-10-05 15:24:08 +03:00
```console
2020-08-02 22:55:23 +03:00
$ mvn package
```
Copy the resulting jar to the DSpace `lib` directory:
2022-10-05 15:24:08 +03:00
```console
2024-06-26 16:42:30 +03:00
$ cp target/cgspace-java-helpers-7.6.1.4-SNAPSHOT.jar ~/dspace/lib/
2020-08-02 22:55:23 +03:00
```
2020-08-03 14:43:38 +03:00
## Configuration
2020-08-10 15:55:11 +03:00
Please refer to the appropriate README.md file:
2024-04-23 14:28:27 +03:00
- Curation Tasks: [src/main/java/io/github/ilri/cgspace/ctasks/README.md ](https://github.com/ilri/cgspace-java-helpers/blob/dspace7/src/main/java/io/github/ilri/cgspace/ctasks/README.md )
- Scripts: [src/main/java/io/github/ilri/cgspace/scripts/README.md ](https://github.com/ilri/cgspace-java-helpers/blob/dspace7/src/main/java/io/github/ilri/cgspace/scripts/README.md )
2020-08-10 15:55:11 +03:00
2020-07-31 21:40:15 +03:00
## Notes
This project was initially created according to the [Maven Getting Started Guide ](https://maven.apache.org/guides/getting-started/ ):
```console
2020-08-06 15:25:04 +03:00
$ mvn -B archetype:generate -DgroupId=io.github.ilri.cgspace -DartifactId=cgspace-java-helpers -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4
2020-07-31 21:40:15 +03:00
```
2022-10-31 11:40:59 +03:00
To deploy a new `-SNAPSHOT` release to Maven Central (make sure OSSHRH credentials are in `~/.m2/settings.xml` ):
```console
$ mvn clean deploy
```
See: < a href = "https://central.sonatype.org/publish/publish-maven/ #performing -a-snapshot-deployment" > Performing a Snapshot Deployment</ a >
2020-07-31 21:40:15 +03:00
## License
This work is licensed under the [GPLv3 ](https://www.gnu.org/licenses/gpl-3.0.en.html ).
2020-07-31 22:23:10 +03:00
This repository contains data from the [Debian iso-codes project ](https://salsa.debian.org/iso-codes-team/iso-codes ) project, which is licensed under the [GNU Lesser General Public License v2.1 ](https://salsa.debian.org/iso-codes-team/iso-codes/-/blob/main/COPYING ).