Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove variable metadata API endpoints #8192

Merged
merged 3 commits into from
Nov 15, 2021
Merged
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
28 changes: 0 additions & 28 deletions src/main/java/edu/harvard/iq/dataverse/api/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
29 changes: 0 additions & 29 deletions src/main/java/edu/harvard/iq/dataverse/api/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down