Compare commits
4 Commits
eb66ccbd0d
...
9faf657c59
Author | SHA1 | Date |
---|---|---|
Alan Orth | 9faf657c59 | |
Alan Orth | 7fb78c2722 | |
Alan Orth | 6ef9f521bf | |
Alan Orth | 1a345de36a |
|
@ -4,9 +4,10 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
## [7.6] - 2024-01-02
|
||||
### Updated
|
||||
- `iso_3166-1.json` from iso-codes 4.13.0-SNAPSHOT, which [adds common names for Iran, Laos, and Syria](https://salsa.debian.org/iso-codes-team/iso-codes/-/merge_requests/32)
|
||||
- DSpace 7.6 compatibility
|
||||
|
||||
## [6.2] - 2023-02-20
|
||||
### Updated
|
||||
|
|
|
@ -5,7 +5,7 @@ DSpace curation tasks and other Java-based helpers used on the [CGSpace](https:/
|
|||
- **FixJpgJpgThumbnails**: fix low-quality ".jpg.jpg" thumbnails by replacing them with their originals
|
||||
- **FixLowQualityThumbnails**: remove low-quality thumbnails when PDF bitstreams are present
|
||||
|
||||
Tested on DSpace 6.3. Read more about the [DSpace curation system](https://wiki.lyrasis.org/display/DSDOC6x/Curation+System).
|
||||
Tested on DSpace 7.6. Read more about the [DSpace curation system](https://wiki.lyrasis.org/display/DSDOC7x/Curation+System).
|
||||
|
||||
## Build and Install
|
||||
|
||||
|
@ -16,7 +16,7 @@ To use these curation tasks in a DSpace project add the following dependency to
|
|||
<dependency>
|
||||
<groupId>io.github.ilri.cgspace</groupId>
|
||||
<artifactId>cgspace-java-helpers</artifactId>
|
||||
<version>6.2-SNAPSHOT</version>
|
||||
<version>7.6-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
@ -32,7 +32,7 @@ $ mvn package
|
|||
Copy the resulting jar to the DSpace `lib` directory:
|
||||
|
||||
```console
|
||||
$ cp target/cgspace-java-helpers-6.2-SNAPSHOT.jar ~/dspace/lib/
|
||||
$ cp target/cgspace-java-helpers-7.6-SNAPSHOT.jar ~/dspace/lib/
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
|
15
pom.xml
15
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>io.github.ilri.cgspace</groupId>
|
||||
<artifactId>cgspace-java-helpers</artifactId>
|
||||
<version>6.2-SNAPSHOT</version>
|
||||
<version>7.6-SNAPSHOT</version>
|
||||
|
||||
<name>cgspace-java-helpers</name>
|
||||
<url>https://github.com/ilri/cgspace-java-helpers</url>
|
||||
|
@ -108,4 +108,17 @@
|
|||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<!-- Check Maven Central first (before other repos below) -->
|
||||
<repository>
|
||||
<id>maven-central</id>
|
||||
<url>https://repo.maven.apache.org/maven2</url>
|
||||
</repository>
|
||||
<!-- For Handle Server -->
|
||||
<repository>
|
||||
<id>handle.net</id>
|
||||
<url>https://handle.net/maven</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
|
|
|
@ -10,14 +10,14 @@ import javax.annotation.Nullable;
|
|||
|
||||
public class CountriesVocabulary {
|
||||
|
||||
class Country {
|
||||
private String name; // required
|
||||
private String common_name; // optional
|
||||
private String official_name; // optional
|
||||
private String cgspace_name; // optional
|
||||
private String numeric; // required Hmmmm need to cast this...
|
||||
private String alpha_2; // required
|
||||
private String alpha_3; // required
|
||||
static class Country {
|
||||
private final String name; // required
|
||||
private final String common_name; // optional
|
||||
private final String official_name; // optional
|
||||
private final String cgspace_name; // optional
|
||||
private final String numeric; // required Hmmmm need to cast this...
|
||||
private final String alpha_2; // required
|
||||
private final String alpha_3; // required
|
||||
|
||||
public Country(
|
||||
String name,
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.io.InputStreamReader;
|
|||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class CountryCodeTagger extends AbstractCurationTask {
|
||||
public class CountryCodeTaggerConfig {
|
||||
|
@ -37,7 +38,7 @@ public class CountryCodeTagger extends AbstractCurationTask {
|
|||
private final Logger log = LogManager.getLogger();
|
||||
}
|
||||
|
||||
public class CountryCodeTaggerResult {
|
||||
public static class CountryCodeTaggerResult {
|
||||
private int status = Curator.CURATE_UNSET;
|
||||
private String result = null;
|
||||
|
||||
|
@ -102,7 +103,7 @@ public class CountryCodeTagger extends AbstractCurationTask {
|
|||
BufferedReader reader =
|
||||
new BufferedReader(
|
||||
new InputStreamReader(
|
||||
this.getClass().getResourceAsStream(config.isocodesJsonPath)));
|
||||
Objects.requireNonNull(this.getClass().getResourceAsStream(config.isocodesJsonPath))));
|
||||
ISO3166CountriesVocabulary isocodesCountriesJson =
|
||||
gson.fromJson(reader, ISO3166CountriesVocabulary.class);
|
||||
reader.close();
|
||||
|
@ -110,8 +111,8 @@ public class CountryCodeTagger extends AbstractCurationTask {
|
|||
reader =
|
||||
new BufferedReader(
|
||||
new InputStreamReader(
|
||||
this.getClass()
|
||||
.getResourceAsStream(config.cgspaceCountriesJsonPath)));
|
||||
Objects.requireNonNull(this.getClass()
|
||||
.getResourceAsStream(config.cgspaceCountriesJsonPath))));
|
||||
CGSpaceCountriesVocabulary cgspaceCountriesJson =
|
||||
gson.fromJson(reader, CGSpaceCountriesVocabulary.class);
|
||||
reader.close();
|
||||
|
|
|
@ -3,7 +3,7 @@ DSpace curation tasks used on the [CGSpace](https://cgspace.cgiar.org) instituti
|
|||
|
||||
- **CountryCodeTagger**: add ISO 3166-1 Alpha2 country codes to items based on their existing country metadata
|
||||
|
||||
Tested on DSpace 6.3. Read more about the [DSpace curation system](https://wiki.lyrasis.org/display/DSDOC5x/Curation+System).
|
||||
Tested on DSpace 7.6. Read more about the [DSpace curation system](https://wiki.lyrasis.org/display/DSDOC5x/Curation+System).
|
||||
|
||||
## Build and Install
|
||||
|
||||
|
@ -14,7 +14,7 @@ To use these curation tasks in a DSpace project add the following dependency to
|
|||
<dependency>
|
||||
<groupId>io.github.ilri.cgspace</groupId>
|
||||
<artifactId>cgspace-java-helpers</artifactId>
|
||||
<version>6.2-SNAPSHOT</version>
|
||||
<version>7.6-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
@ -30,7 +30,7 @@ $ mvn package
|
|||
Copy the resulting jar to the DSpace `lib` directory:
|
||||
|
||||
```
|
||||
$ cp target/cgspace-java-helpers-6.2-SNAPSHOT.jar ~/dspace/lib/
|
||||
$ cp target/cgspace-java-helpers-7.6-SNAPSHOT.jar ~/dspace/lib/
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
|
|
@ -4,7 +4,7 @@ Java-based helpers used on the [CGSpace](https://cgspace.cgiar.org) institutiona
|
|||
- **FixJpgJpgThumbnails**: fix low-quality ".jpg.jpg" thumbnails by replacing them with their originals
|
||||
- **FixLowQualityThumbnails**: remove low-quality thumbnails when PDF bitstreams are present
|
||||
|
||||
Tested on DSpace 6.3. Read more about the [DSpace curation system](https://wiki.lyrasis.org/display/DSDOC6x/Curation+System).
|
||||
Tested on DSpace 7.6. Read more about the [DSpace curation system](https://wiki.lyrasis.org/display/DSDOC6x/Curation+System).
|
||||
|
||||
## Build and Install
|
||||
|
||||
|
@ -15,7 +15,7 @@ To use these curation tasks in a DSpace project add the following dependency to
|
|||
<dependency>
|
||||
<groupId>io.github.ilri.cgspace</groupId>
|
||||
<artifactId>cgspace-java-helpers</artifactId>
|
||||
<version>6.2-SNAPSHOT</version>
|
||||
<version>7.6-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
@ -31,7 +31,7 @@ $ mvn package
|
|||
Copy the resulting jar to the DSpace `lib` directory:
|
||||
|
||||
```console
|
||||
$ cp target/cgspace-java-helpers-6.2-SNAPSHOT.jar ~/dspace/lib/
|
||||
$ cp target/cgspace-java-helpers-7.6-SNAPSHOT.jar ~/dspace/lib/
|
||||
```
|
||||
|
||||
## Invocation
|
||||
|
|
|
@ -39,6 +39,6 @@
|
|||
"name": "Russian Federation",
|
||||
"cgspace_name": "Russia",
|
||||
"numeric": "643"
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue