diff --git a/src/main/java/edu/harvard/iq/dataverse/api/Access.java b/src/main/java/edu/harvard/iq/dataverse/api/Access.java index 71a4443ecc9..081c2105b1a 100644 --- a/src/main/java/edu/harvard/iq/dataverse/api/Access.java +++ b/src/main/java/edu/harvard/iq/dataverse/api/Access.java @@ -509,35 +509,7 @@ public String tabularDatafileMetadataDDI(@PathParam("fileId") String fileId, @Q return retValue; } - - @Path("variable/{varId}/metadata/ddi") - @GET - @Produces({ "application/xml" }) - - public String dataVariableMetadataDDI(@PathParam("varId") Long varId, @QueryParam("fileMetadataId") Long fileMetadataId, @QueryParam("exclude") String exclude, @QueryParam("include") String include, @Context HttpHeaders header, @Context HttpServletResponse response) /*throws NotFoundException, ServiceUnavailableException, PermissionDeniedException, AuthorizationRequiredException*/ { - String retValue = ""; - - ByteArrayOutputStream outStream = null; - try { - outStream = new ByteArrayOutputStream(); - - ddiExportService.exportDataVariable( - varId, - outStream, - exclude, - include, - fileMetadataId); - } catch (Exception e) { - // For whatever reason we've failed to generate a partial - // metadata record requested. We simply return an empty string. - return retValue; - } - retValue = outStream.toString(); - - return retValue; - } - /* * GET method for retrieving various auxiliary files associated with * a tabular datafile. diff --git a/src/main/java/edu/harvard/iq/dataverse/api/Meta.java b/src/main/java/edu/harvard/iq/dataverse/api/Meta.java index 99e2c773b30..1ca97f2ec69 100644 --- a/src/main/java/edu/harvard/iq/dataverse/api/Meta.java +++ b/src/main/java/edu/harvard/iq/dataverse/api/Meta.java @@ -68,35 +68,6 @@ public class Meta { @EJB DatasetServiceBean datasetService; - @Deprecated - @Path("variable/{varId}") - @GET - @Produces({ "application/xml" }) - - public String variable(@PathParam("varId") Long varId, @QueryParam("fileMetadataId") Long fileMetadataId, @QueryParam("exclude") String exclude, @QueryParam("include") String include, @Context HttpHeaders header, @Context HttpServletResponse response) /*throws NotFoundException, ServiceUnavailableException, PermissionDeniedException, AuthorizationRequiredException*/ { - String retValue = ""; - - ByteArrayOutputStream outStream = null; - try { - outStream = new ByteArrayOutputStream(); - - ddiExportService.exportDataVariable( - varId, - outStream, - exclude, - include, - fileMetadataId); - } catch (Exception e) { - // For whatever reason we've failed to generate a partial - // metadata record requested. We simply return an empty string. - return retValue; - } - - retValue = outStream.toString(); - - return retValue; - } - // Because this API is deprecated, we prefer to continue letting it operate on fileId rather adding support for persistent identifiers. @Deprecated @Path("datafile/{fileId}")