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

Provide service API for RO-Crate #1059

Merged
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package life.qbic.projectmanagement.application.api;

import java.nio.ByteBuffer;
import java.util.Collection;
import java.util.List;
import static java.util.Objects.nonNull;
Expand Down Expand Up @@ -113,6 +114,34 @@ Mono<ProjectCreationResponse> create(ProjectCreationRequest request)
throws UnknownRequestException, RequestFailedException, AccessDeniedException;


/**
* Returns a reactive stream of a zipped RO-Crate encoded in UTF-8.
* <p>
* The content represents a project summary with information about the research project.
* <p>
* Currently, the RO-Crate contains three files:
*
* <pre>
* ro-crate-metadata.json // required by the RO-Crate specification
* project-summary.docx // docx version of <a href="https://schema.org/ResearchProject">ResearchProject</a>
* project-summary.yml // yaml encoding of <a href="https://schema.org/ResearchProject">ResearchProject</a>
* </pre>
*
* <b>Exceptions</b>
* <p>
* Exceptions are wrapped as {@link Mono#error(Throwable)} and are one of the types described in
* the throw section below.
*
* @param projectId the project ID for the project the RO-Crate
* @return a reactive stream of the zipped RO-Crate. Exceptions are provided as
* {@link Mono#error(Throwable)}.
* @throws RequestFailedException in case the request cannot be processed
* @throws AccessDeniedException in case of insufficient rights
* @since 1.10.0
*/
Flux<ByteBuffer> roCrateSummary(String projectId)
throws RequestFailedException, AccessDeniedException;

/**
* Requests {@link SamplePreview} for a given experiment.
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package life.qbic.projectmanagement.application.api;

import java.nio.ByteBuffer;
import java.util.Objects;
import life.qbic.logging.api.Logger;
import life.qbic.logging.service.LoggerFactory;
Expand Down Expand Up @@ -69,6 +70,11 @@ public Mono<ProjectCreationResponse> create(ProjectCreationRequest request)
throw new RuntimeException("not implemented");
}

@Override
public Flux<ByteBuffer> roCrateSummary(String projectId) {
throw new RuntimeException("not implemented");
}

@Override
public Flux<SamplePreview> getSamplePreviews(String projectId, String experimentId)
throws RequestFailedException {
Expand Down