-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#382 - Change display and translations structure for criteria and con…
…cepts - remove nested declaration from elastic search documents (seems to be unnecessary, but should be monitored) - modify swagger file to match new responses - adapt tests to the new structure - Change responses to codeable concept and terminology replies to the new structure - change de-De to de and en-US to us for the elastic search related entries (the ones sent to the frontend are unchanged...might have to change as well) - modify elastic search tests in integration tests - remove GET of documents with fixed ids from elastic search integration test since those ids differ with each new ontology - add translations to CriteriaProfileData - adapt swagger file
- Loading branch information
1 parent
5792b49
commit 5b7638c
Showing
41 changed files
with
1,908 additions
and
737 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/de/numcodex/feasibility_gui_backend/common/api/DisplayEntry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package de.numcodex.feasibility_gui_backend.common.api; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import de.numcodex.feasibility_gui_backend.dse.api.LocalizedValue; | ||
import de.numcodex.feasibility_gui_backend.terminology.es.model.Display; | ||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@Builder | ||
public record DisplayEntry( | ||
@JsonProperty String original, | ||
@JsonProperty List<LocalizedValue> translations | ||
) { | ||
|
||
public static DisplayEntry of(Display display) { | ||
return DisplayEntry.builder() | ||
.original(display.original()) | ||
.translations(List.of( | ||
LocalizedValue.builder() | ||
.language("de-DE") | ||
.value(display.deDe()) | ||
.build(), | ||
LocalizedValue.builder() | ||
.language("en-US") | ||
.value(display.enUs()) | ||
.build() | ||
)) | ||
.build(); | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
src/main/java/de/numcodex/feasibility_gui_backend/dse/api/DisplayEntry.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/de/numcodex/feasibility_gui_backend/terminology/api/CodeableConceptEntry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package de.numcodex.feasibility_gui_backend.terminology.api; | ||
|
||
import de.numcodex.feasibility_gui_backend.common.api.TermCode; | ||
import de.numcodex.feasibility_gui_backend.common.api.DisplayEntry; | ||
import de.numcodex.feasibility_gui_backend.dse.api.LocalizedValue; | ||
import de.numcodex.feasibility_gui_backend.terminology.es.model.CodeableConceptDocument; | ||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
@Builder | ||
public record CodeableConceptEntry( | ||
TermCode termCode, | ||
DisplayEntry display | ||
) { | ||
public static CodeableConceptEntry of(CodeableConceptDocument document) { | ||
return CodeableConceptEntry.builder() | ||
.termCode(document.termCode()) | ||
.display(DisplayEntry.builder() | ||
.original(document.display().original()) | ||
.translations(List.of( | ||
LocalizedValue.builder() | ||
.language("de-DE") | ||
.value(document.display().deDe()) | ||
.build(), | ||
LocalizedValue.builder() | ||
.language("en-US") | ||
.value(document.display().enUs()) | ||
.build() | ||
)) | ||
.build() | ||
) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/de/numcodex/feasibility_gui_backend/terminology/api/RelationEntry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package de.numcodex.feasibility_gui_backend.terminology.api; | ||
|
||
import de.numcodex.feasibility_gui_backend.common.api.DisplayEntry; | ||
import de.numcodex.feasibility_gui_backend.terminology.es.model.OntologyItemRelationsDocument; | ||
import de.numcodex.feasibility_gui_backend.terminology.es.model.Relative; | ||
import lombok.Builder; | ||
|
||
import java.util.Collection; | ||
|
||
@Builder | ||
public record RelationEntry( | ||
DisplayEntry display, | ||
Collection<Relative> parents, | ||
Collection<Relative> children, | ||
Collection<Relative> relatedTerms | ||
) { | ||
|
||
public static RelationEntry of(OntologyItemRelationsDocument document) { | ||
return RelationEntry.builder() | ||
.display(DisplayEntry.of(document.display())) | ||
.parents(document.parents()) | ||
.children(document.children()) | ||
.relatedTerms(document.relatedTerms()) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.