Skip to content

Commit

Permalink
feat(ext-api): migrate Exporter and ExportException to module IQSS#9175
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Dec 20, 2022
1 parent b7f35ff commit 2b5c486
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package edu.harvard.iq.dataverse.export;
package io.gdcc.dataverse.extension.exceptions;

/**
*
Expand Down
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 src/main/java/edu/harvard/iq/dataverse/export/spi/Exporter.java

This file was deleted.

0 comments on commit 2b5c486

Please sign in to comment.