Skip to content

Commit 2b5c486

Browse files
committed
feat(ext-api): migrate Exporter and ExportException to module IQSS#9175
1 parent b7f35ff commit 2b5c486

3 files changed

Lines changed: 42 additions & 53 deletions

File tree

src/main/java/edu/harvard/iq/dataverse/export/ExportException.java renamed to modules/extension-api/src/main/java/io/gdcc/dataverse/extension/exceptions/ExportException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* To change this template file, choose Tools | Templates
44
* and open the template in the editor.
55
*/
6-
package edu.harvard.iq.dataverse.export;
6+
package io.gdcc.dataverse.extension.exceptions;
77

88
/**
99
*
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* To change this license header, choose License Headers in Project Properties.
3+
* To change this template file, choose Tools | Templates
4+
* and open the template in the editor.
5+
*/
6+
package io.gdcc.dataverse.extension.spi;
7+
8+
import io.gdcc.dataverse.extension.exceptions.ExportException;
9+
10+
import javax.json.JsonObject;
11+
import javax.ws.rs.core.MediaType;
12+
import java.io.OutputStream;
13+
14+
public interface Exporter {
15+
16+
void exportDataset(JsonObject json, OutputStream outputStream) throws ExportException;
17+
18+
String getProviderName();
19+
20+
String getDisplayName();
21+
22+
Boolean isXMLFormat();
23+
24+
Boolean isHarvestable();
25+
26+
Boolean isAvailableToUsers();
27+
28+
/* These should throw an ExportException if called on an Exporter that is not isXMLFormat(): */
29+
String getXMLNameSpace() throws ExportException;
30+
31+
String getXMLSchemaLocation() throws ExportException;
32+
33+
String getXMLSchemaVersion() throws ExportException;
34+
35+
void setParam(String name, Object value);
36+
37+
default String getMediaType() {
38+
return MediaType.APPLICATION_XML;
39+
}
40+
41+
}

src/main/java/edu/harvard/iq/dataverse/export/spi/Exporter.java

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)