Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/release-notes/11580-oai-ore-jsonld-media-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Updates for API Users

- OAI-ORE dataset exports now use the `application/ld+json` media type.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import java.util.Optional;
import java.util.logging.Logger;

import jakarta.ws.rs.core.MediaType;

@AutoService(Exporter.class)
public class OAI_OREExporter implements Exporter {
Expand Down Expand Up @@ -57,7 +56,7 @@ public Boolean isAvailableToUsers() {

@Override
public String getMediaType() {
return MediaType.APPLICATION_JSON;
return "application/ld+json";
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package edu.harvard.iq.dataverse.export;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class OAI_OREExporterTest {

@Test
public void testGetMediaType() {
OAI_OREExporter exporter = new OAI_OREExporter();

assertEquals("application/ld+json", exporter.getMediaType());
}
}
2 changes: 1 addition & 1 deletion src/test/resources/json/export-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"data": {
"OAI_ORE": {
"displayName": "OAI_ORE",
"mediaType": "application/json",
"mediaType": "application/ld+json",
"isHarvestable": false,
"isVisibleInUserInterface": true
},
Expand Down
Loading