forked from IQSS/dataverse
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ext-api): migrate Exporter and ExportException to module IQSS#9175
- Loading branch information
1 parent
b7f35ff
commit 2b5c486
Showing
3 changed files
with
42 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
modules/extension-api/src/main/java/io/gdcc/dataverse/extension/spi/Exporter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package io.gdcc.dataverse.extension.spi; | ||
|
||
import io.gdcc.dataverse.extension.exceptions.ExportException; | ||
|
||
import javax.json.JsonObject; | ||
import javax.ws.rs.core.MediaType; | ||
import java.io.OutputStream; | ||
|
||
public interface Exporter { | ||
|
||
void exportDataset(JsonObject json, OutputStream outputStream) throws ExportException; | ||
|
||
String getProviderName(); | ||
|
||
String getDisplayName(); | ||
|
||
Boolean isXMLFormat(); | ||
|
||
Boolean isHarvestable(); | ||
|
||
Boolean isAvailableToUsers(); | ||
|
||
/* These should throw an ExportException if called on an Exporter that is not isXMLFormat(): */ | ||
String getXMLNameSpace() throws ExportException; | ||
|
||
String getXMLSchemaLocation() throws ExportException; | ||
|
||
String getXMLSchemaVersion() throws ExportException; | ||
|
||
void setParam(String name, Object value); | ||
|
||
default String getMediaType() { | ||
return MediaType.APPLICATION_XML; | ||
} | ||
|
||
} |
52 changes: 0 additions & 52 deletions
52
src/main/java/edu/harvard/iq/dataverse/export/spi/Exporter.java
This file was deleted.
Oops, something went wrong.