diff --git a/src/main/java/eu/dissco/core/translator/terms/media/MediaType.java b/src/main/java/eu/dissco/core/translator/terms/media/MediaType.java index 4ac49fb..78bb64a 100644 --- a/src/main/java/eu/dissco/core/translator/terms/media/MediaType.java +++ b/src/main/java/eu/dissco/core/translator/terms/media/MediaType.java @@ -12,11 +12,11 @@ public class MediaType extends Term { private static final String STILL_IMAGE = "Still_Image"; private static final String SOUND = "Sound"; private static final String MOVING_IMAGE = "Moving_Image"; - private static final String DATASET = "Dataset"; + private static final String INTERACTIVE_RESOURCE = "Interactive_Resource"; private final List dwcaTerms = List.of(TERM, "dc:type"); private final List imageFormats = List.of("IMAGE/JPG", "JPG", "IMAGE/JPEG", "JPEG", "IMAGE/PNG", "PNG", "IMAGE/TIF", "TIF"); - private final List datasetFormats = List.of("APPLICATION/JSON"); + private final List interactiveResourceFormats = List.of("APPLICATION/JSON"); @Override public String retrieveFromDWCA(JsonNode unit) { @@ -53,8 +53,8 @@ public String retrieveFromABCD(JsonNode unit) { format = format.toUpperCase(); if (imageFormats.contains(format)) { return STILL_IMAGE; - } else if (datasetFormats.contains(format)) { - return DATASET; + } else if (interactiveResourceFormats.contains(format)) { + return INTERACTIVE_RESOURCE; } else { log.warn("Unable to determine media type of digital media object"); return null; diff --git a/src/test/java/eu/dissco/core/translator/terms/media/MediaTypeTest.java b/src/test/java/eu/dissco/core/translator/terms/media/MediaTypeTest.java index 513c2ef..18824e7 100644 --- a/src/test/java/eu/dissco/core/translator/terms/media/MediaTypeTest.java +++ b/src/test/java/eu/dissco/core/translator/terms/media/MediaTypeTest.java @@ -40,7 +40,7 @@ private static Stream provideFormatTypes() { private static Stream provideABCDFormats() { return Stream.of( Arguments.of("image/jpeg", "Still_Image"), - Arguments.of("APPLICATION/JSON", "Dataset"), + Arguments.of("APPLICATION/JSON", "Interactive_Resource"), Arguments.of("unknown/format", null), Arguments.of(null, null) );