Skip to content

Commit 31b9d41

Browse files
authored
Introduces the new features for the release 1.6.0
Release 1.6.0
2 parents 4dae284 + c22759f commit 31b9d41

File tree

85 files changed

+4286
-980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+4286
-980
lines changed

project-management/src/main/java/life/qbic/projectmanagement/application/ProjectInformationService.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,22 @@ public void setResponsibility(ProjectId projectId, Contact contact) {
153153
}
154154

155155
@PreAuthorize("hasPermission(#projectId, 'life.qbic.projectmanagement.domain.model.project.Project', 'WRITE')")
156-
public void stateObjective(ProjectId projectId, String objective) {
156+
public void removeResponsibility(ProjectId projectId) {
157+
Project project = loadProject(projectId);
158+
project.removeResponsiblePerson();
159+
projectRepository.update(project);
160+
}
161+
162+
@PreAuthorize("hasPermission(#projectId, 'life.qbic.projectmanagement.domain.model.project.Project', 'WRITE')")
163+
public void updateObjective(ProjectId projectId, String objective) {
157164
ProjectObjective projectObjective = ProjectObjective.create(objective);
158165
Project project = loadProject(projectId);
159166
project.stateObjective(projectObjective);
160167
projectRepository.update(project);
161168
}
162169

163170
@PreAuthorize("hasPermission(#projectId, 'life.qbic.projectmanagement.domain.model.project.Project', 'WRITE')")
164-
public void addFunding(ProjectId projectId, String label, String referenceId) {
171+
public void setFunding(ProjectId projectId, String label, String referenceId) {
165172
Funding funding = Funding.of(label, referenceId);
166173
var project = loadProject(projectId);
167174
project.setFunding(funding);

project-management/src/main/java/life/qbic/projectmanagement/domain/model/project/Project.java

+8
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ public void addExperiment(Experiment experiment) {
166166
lastModified = Instant.now();
167167
}
168168

169+
public void removeResponsiblePerson() {
170+
responsiblePerson = null;
171+
}
172+
169173
public void stateObjective(ProjectObjective projectObjective) {
170174
Objects.requireNonNull(projectObjective);
171175
if (projectObjective.equals(projectIntent.objective())) {
@@ -278,6 +282,10 @@ public List<ExperimentId> experiments() {
278282
return experiments.stream().map(Experiment::experimentId).toList();
279283
}
280284

285+
public Instant getLastModified() {
286+
return lastModified;
287+
}
288+
281289
@Override
282290
public boolean equals(Object o) {
283291
if (this == o) {

project-management/src/test/groovy/life/qbic/projectmanagement/application/ProjectInformationServiceSpec.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class ProjectInformationServiceSpec extends Specification {
9191

9292
when: "the project objective is updated for a project"
9393
String projectObjective = "All your objectives are belong to us"
94-
projectInformationService.stateObjective(project.getId(), projectObjective)
94+
projectInformationService.updateObjective(project.getId(), projectObjective)
9595

9696
then: "the project intent contains the new project objective"
9797
project.projectIntent.objective().objective() == projectObjective
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
.flex-horizontal {
2+
display: flex;
3+
flex-direction: row;
4+
}
5+
6+
.heading-with-icon {
7+
color: #878787;
8+
column-gap: var(--lumo-space-s);
9+
display: flex;
10+
flex-direction: row;
11+
font-weight: bold;
12+
line-height: 1;
13+
font-size: var(--lumo-space-m);
14+
}
15+
16+
.heading-with-icon vaadin-icon {
17+
height: auto;
18+
}
19+
20+
.section {
21+
width: 100%;
22+
}
23+
24+
.full-width {
25+
width: 100%;
26+
}
27+
28+
.section-header {
29+
display: flex;
30+
flex-direction: column;
31+
width: 100%;
32+
}
33+
34+
35+
.trailing-margin-large {
36+
margin-bottom: var(--lumo-space-xl);
37+
}
38+
39+
.trailing-margin-normal {
40+
margin-bottom: var(--lumo-space-l);
41+
}
42+
43+
.trailing-margin-small {
44+
margin-bottom: var(--lumo-space-s);
45+
}
46+
47+
.section-header-row {
48+
display: flex;
49+
width: 100%;
50+
}
51+
52+
.section-content {
53+
display: flex;
54+
flex-direction: column;
55+
width: 100%;
56+
row-gap: var(--lumo-space-m);
57+
}
58+
59+
.section-title {
60+
font-weight: bold;
61+
color: var(--lumo-secondary-text-color);
62+
margin-bottom: 0.5rem;
63+
width: 100%;
64+
}
65+
66+
.font-size-small {
67+
font-size: var(--lumo-font-size-l);
68+
}
69+
70+
.font-size-medium {
71+
font-size: var(--lumo-font-size-xl);
72+
}
73+
74+
.font-size-large {
75+
font-size: var(--lumo-font-size-xxl);
76+
}
77+
78+
.sub-header {
79+
font-size: var(--lumo-font-size-s);
80+
color: #878787;
81+
margin-bottom: 0.5rem;
82+
}
83+
84+
.tag-list {
85+
width: 100%;
86+
display: flex;
87+
}
88+
89+
.detail-box {
90+
display: flex;
91+
flex-direction: column;
92+
border: 1px solid lightgray;
93+
border-radius: var(--lumo-space-s);
94+
max-height: 10rem;
95+
}
96+
97+
.detail-box-header {
98+
display: flex;
99+
flex-direction: row;
100+
width: 100%;
101+
gap: var(--lumo-space-s);
102+
font-size: var(--lumo-font-size-m);
103+
font-weight: bold;
104+
color: #878787;
105+
line-height: 1;
106+
}
107+
108+
.detail-box-header vaadin-icon {
109+
height: auto;
110+
}
111+
112+
.detail-box-child {
113+
border-width: 1px 1px 1px 1px;
114+
border-color: lightgray;
115+
padding: var(--lumo-space-m) var(--lumo-space-m) var(--lumo-space-m);
116+
}
117+
118+
.detail-box-child:first-child {
119+
border-width: 0 0 1px 0;
120+
border-style: solid;
121+
border-color: lightgray;
122+
}
123+
124+
.icon-label {
125+
font-size: var(--lumo-font-size-m);
126+
line-height: 1;
127+
display: flex;
128+
flex-direction: row;
129+
gap: var(--lumo-space-l);
130+
}
131+
132+
.icon-label-container {
133+
display: flex;
134+
flex-direction: row;
135+
font-size: var(--lumo-font-size-m);
136+
color: #878787;
137+
font-weight: bold;
138+
gap: var(--lumo-space-s);
139+
}
140+
141+
.icon-label-container vaadin-icon {
142+
height: auto;
143+
}
144+
145+
.vertical-list {
146+
display: flex;
147+
flex-direction: column;
148+
width: 100%;
149+
}
150+
151+
.horizontal-list {
152+
display: flex;
153+
flex-direction: row;
154+
width: 100%;
155+
}
156+
157+
.dynamic-growing-flex-item {
158+
flex-grow: 1;
159+
}
160+
161+
.wrapping-flex-container {
162+
flex-wrap: wrap;
163+
}
164+
165+
.overflow-hidden-ellipsis {
166+
white-space: nowrap;
167+
overflow: hidden;
168+
text-overflow: ellipsis;
169+
}
170+
171+
.gap-large {
172+
gap: var(--lumo-space-l);
173+
}
174+
175+
.gap-medium {
176+
gap: var(--lumo-space-m);
177+
}
178+
179+
.gap-small {
180+
gap: var(--lumo-space-s);
181+
}
182+
183+
.allow-row-wrap {
184+
flex-wrap: wrap;
185+
}
186+
187+
.overflow-scroll-height {
188+
overflow: auto;
189+
}
190+
191+
.ontology-term {
192+
width: 100%;
193+
display: flex;
194+
flex-direction: row;
195+
gap: var(--lumo-space-s);
196+
white-space: nowrap;
197+
flex-wrap: wrap;
198+
}
199+
200+
.fixed-medium-width {
201+
width: 25rem;
202+
}
203+
204+
.simple-paragraph {
205+
font-size: var(--lumo-font-size-m);
206+
margin-bottom: var(--lumo-space-m);
207+
max-width: 40em;
208+
}
209+

user-interface/frontend/themes/datamanager/components/custom.css

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* This file defines the styling and layout for all custom components. The components are sorted alphabetically */
22

33
/*Make sure to import the css classes for each custom component to avoid cluttering the master-style-sheet */
4+
@import "all.css";
45
@import "button.css";
56
@import "card.css";
67
@import "combobox.css";

user-interface/frontend/themes/datamanager/components/dialog.css

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ vaadin-dialog-overlay::part(title) {
1818
margin-inline-start: 0;
1919
}
2020

21+
.large-dialog::part(overlay) {
22+
width: 66vw;
23+
}
24+
2125
/* set the width of the notification */
2226
.notification-dialog::part(overlay) {
2327
width: 36.75rem;

user-interface/frontend/themes/datamanager/components/page-area.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
.page-area {
88
background-color: var(--lumo-base-color);
9-
padding: var(--lumo-space-m);
9+
padding: var(--lumo-space-l);
1010
flex-direction: column;
1111
display: flex;
1212
gap: var(--lumo-space-s);
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
@import "theme-editor.css";
12
@import "components/custom.css";
2-
@import "components/vaadin-custom.css";
3+
@import "components/vaadin-custom.css";
1.04 KB
Binary file not shown.

user-interface/src/main/java/life/qbic/datamanager/export/rocrate/ROCreateBuilder.java

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
import edu.kit.datamanager.ro_crate.RoCrate;
77
import edu.kit.datamanager.ro_crate.RoCrate.RoCrateBuilder;
8-
import edu.kit.datamanager.ro_crate.context.CrateMetadataContext;
9-
import edu.kit.datamanager.ro_crate.context.RoCrateMetadataContext;
108
import edu.kit.datamanager.ro_crate.entities.contextual.ContextualEntity;
119
import edu.kit.datamanager.ro_crate.entities.contextual.ContextualEntity.ContextualEntityBuilder;
1210
import edu.kit.datamanager.ro_crate.entities.data.FileEntity.FileEntityBuilder;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package life.qbic.datamanager.parser;
2+
3+
import java.util.Optional;
4+
import life.qbic.datamanager.parser.ExampleProvider.Helper;
5+
6+
/**
7+
* TODO!
8+
* <b>short description</b>
9+
*
10+
* <p>detailed description</p>
11+
*
12+
* @since <version tag>
13+
*/
14+
public interface Column {
15+
16+
Optional<Helper> getFillHelp();
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package life.qbic.datamanager.parser;
2+
3+
/**
4+
* TODO!
5+
* <b>short description</b>
6+
*
7+
* <p>detailed description</p>
8+
*
9+
* @since <version tag>
10+
*/
11+
public interface ExampleProvider {
12+
13+
record Helper(String exampleValue, String description) {
14+
15+
}
16+
17+
Helper getHelper(Column column);
18+
19+
}

user-interface/src/main/java/life/qbic/datamanager/parser/MetadataConverter.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ private List<MeasurementMetadata> convertNewProteomicsMeasurement(ParsingResult
132132
var technicalReplicateName = parsingResult.getValueOrDefault(i,
133133
ProteomicsMeasurementRegisterColumn.TECHNICAL_REPLICATE_NAME.headerName(), "");
134134
var organisationId = parsingResult.getValueOrDefault(i,
135-
ProteomicsMeasurementRegisterColumn.ORGANISATION_ID.headerName(), "");
135+
ProteomicsMeasurementRegisterColumn.ORGANISATION_URL.headerName(), "");
136136
var msDevice = parsingResult.getValueOrDefault(i,
137137
ProteomicsMeasurementRegisterColumn.MS_DEVICE.headerName(), "");
138138
var samplePoolGroup = parsingResult.getValueOrDefault(i,
@@ -192,7 +192,7 @@ private List<MeasurementMetadata> convertExistingProteomicsMeasurement(
192192
var technicalReplicateName = parsingResult.getValueOrDefault(i,
193193
ProteomicsMeasurementEditColumn.TECHNICAL_REPLICATE_NAME.headerName(), "");
194194
var organisationId = parsingResult.getValueOrDefault(i,
195-
ProteomicsMeasurementEditColumn.ORGANISATION_ID.headerName(), "");
195+
ProteomicsMeasurementEditColumn.ORGANISATION_URL.headerName(), "");
196196
var msDevice = parsingResult.getValueOrDefault(i,
197197
ProteomicsMeasurementEditColumn.MS_DEVICE.headerName(), "");
198198
var samplePoolGroup = parsingResult.getValueOrDefault(i,
@@ -252,7 +252,7 @@ private List<MeasurementMetadata> convertExistingNGSMeasurement(ParsingResult pa
252252
""))
253253
);
254254
var organisationId = parsingResult.getValueOrDefault(i,
255-
NGSMeasurementEditColumn.ORGANISATION_ID.headerName(), "");
255+
NGSMeasurementEditColumn.ORGANISATION_URL.headerName(), "");
256256
var instrument = parsingResult.getValueOrDefault(i,
257257
NGSMeasurementEditColumn.INSTRUMENT.headerName(), "");
258258
var facility = parsingResult.getValueOrDefault(i,
@@ -304,7 +304,7 @@ private List<MeasurementMetadata> convertNewNGSMeasurement(ParsingResult parsing
304304
""))
305305
);
306306
var organisationId = parsingResult.getValueOrDefault(i,
307-
NGSMeasurementRegisterColumn.ORGANISATION_ID.headerName(), "");
307+
NGSMeasurementRegisterColumn.ORGANISATION_URL.headerName(), "");
308308
var instrument = parsingResult.getValueOrDefault(i,
309309
NGSMeasurementRegisterColumn.INSTRUMENT.headerName(), "");
310310
var facility = parsingResult.getValueOrDefault(i,

0 commit comments

Comments
 (0)