|
1 | 1 | package life.qbic.projectmanagement.application.api;
|
2 | 2 |
|
3 | 3 | import static java.util.Objects.nonNull;
|
| 4 | +import static java.util.Objects.requireNonNull; |
4 | 5 |
|
| 6 | +import java.net.URI; |
5 | 7 | import java.nio.ByteBuffer;
|
6 | 8 | import java.util.Collection;
|
7 | 9 | import java.util.List;
|
8 | 10 | import java.util.Map;
|
| 11 | +import java.util.Objects; |
9 | 12 | import java.util.Optional;
|
10 | 13 | import java.util.Set;
|
11 | 14 | import java.util.UUID;
|
@@ -179,6 +182,7 @@ Flux<ByteBuffer> roCrateSummary(String projectId)
|
179 | 182 | * <p>
|
180 | 183 | * Exceptions are wrapped as {@link Mono#error(Throwable)} and are one of the types described in
|
181 | 184 | * the throw section below.
|
| 185 | + * |
182 | 186 | * @param projectId the identifier of the project to get the experiments for
|
183 | 187 | * @return a {@link Flux} of {@link ExperimentDescription}. Exceptions are provided as
|
184 | 188 | * {@link Mono#error(Throwable)}.
|
@@ -624,8 +628,8 @@ record ExperimentalGroups(List<ExperimentalGroup> experimentalGroups) implements
|
624 | 628 | * containing CURIEs.
|
625 | 629 | * @since 1.9.0
|
626 | 630 | */
|
627 |
| - record ExperimentDescription(String experimentName, Set<String> species, Set<String> specimen, |
628 |
| - Set<String> analytes) implements ExperimentUpdateRequestBody, |
| 631 | + record ExperimentDescription(String experimentName, Set<OntologyTerm> species, Set<OntologyTerm> specimen, |
| 632 | + Set<OntologyTerm> analytes) implements ExperimentUpdateRequestBody, |
629 | 633 | ExperimentUpdateResponseBody {
|
630 | 634 |
|
631 | 635 | public ExperimentDescription {
|
@@ -765,6 +769,35 @@ record ExperimentUpdateResponse(String experimentId, ExperimentUpdateResponseBod
|
765 | 769 | */
|
766 | 770 | record ProjectCreationRequest(ProjectDesign design, ProjectContacts contacts,
|
767 | 771 | FundingInformation funding) {
|
| 772 | + } |
| 773 | + |
| 774 | + /** |
| 775 | + * Represents an ontology term definition with a simple label that can be used to display the term |
| 776 | + * for humans, its assigned OBO identifier and its globally unique identifier. |
| 777 | + * |
| 778 | + * @param label an {@link OntologyTerm} label for visualisation |
| 779 | + * @param oboId the assigned OBO identifier |
| 780 | + * @param id the globally unique identifier of the term |
| 781 | + * @since 1.10.0 |
| 782 | + */ |
| 783 | + record OntologyTerm(String label, Curie oboId, URI id) { |
| 784 | + public OntologyTerm { |
| 785 | + requireNonNull(oboId); |
| 786 | + requireNonNull(id); |
| 787 | + } |
| 788 | + } |
| 789 | + |
| 790 | + /** |
| 791 | + * Represents a CURIE in the format <code>IDSPACE:LOCALID</code>. |
| 792 | + * <p> |
| 793 | + * Example: <code>GO:0008150</code> |
| 794 | + * |
| 795 | + * @param idSpace the id space defined that holds a set of local identifiers unique within a |
| 796 | + * space |
| 797 | + * @param localId the local id which is unique within the space |
| 798 | + * @since 1.10.0 |
| 799 | + */ |
| 800 | + record Curie(String idSpace, String localId) { |
768 | 801 |
|
769 | 802 | }
|
770 | 803 |
|
|
0 commit comments