-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Merge View (RDFA-344) #176
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
Open
kiph-soptim
wants to merge
38
commits into
main
Choose a base branch
from
feature/RDFA-344-Cross-profile-diagrams
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
13194ac
temp
kiph-soptim 19b638d
temp
kiph-soptim 278bba1
Merge remote-tracking branch 'origin/main' into feature/RDFA-344-Cros…
kiph-soptim aeed5ad
temp
kiph-soptim 9dcd36c
Merge remote-tracking branch 'origin/main' into feature/RDFA-344-Cros…
kiph-soptim 096adfa
solved after merge problems
kiph-soptim 1a6ec24
fixed license header
kiph-soptim c4a1d5f
deleted class
kiph-soptim 05ae9e9
added option to disable colored properties
kiph-soptim c157b2c
added color to association edges and fixed tests
kiph-soptim 2d59a0c
fixes
kiph-soptim 53a21f7
fixes
kiph-soptim b93d0a2
ignore not needed fields
kiph-soptim 29068ac
fix
kiph-soptim 498f6bc
fix
kiph-soptim 0db756b
Merge branch 'main' into feature/RDFA-344-Cross-profile-diagrams
kiph-soptim 7660c9b
fix
kiph-soptim 0a8d95d
fix
kiph-soptim 9b6babb
fixed Missing Override annotation
kiph-soptim fd48b2d
format
kiph-soptim 7b30326
Revert "format"
kiph-soptim f892cab
Revert "fixed Missing Override annotation"
kiph-soptim cbbd73f
Merge branch 'main' into feature/RDFA-344-Cross-profile-diagrams
kiph-soptim 82ba9a0
improved loading time of the merged class editor
kiph-soptim 38f6664
added show in diagram to merged classes
kiph-soptim fcec506
refactoring
kiph-soptim 110ee82
added tests
kiph-soptim cab90dc
updated README.md
kiph-soptim 55a872b
Merge branch 'main' into feature/RDFA-344-Cross-profile-diagrams
kiph-soptim 162dd47
format
kiph-soptim 5352a11
Merge branch 'main' into feature/RDFA-344-Cross-profile-diagrams
kiph-soptim f8e6d3b
Merge branch 'main' into feature/RDFA-344-Cross-profile-diagrams
kiph-soptim 33fc270
removed debug messages
kiph-soptim e86aeca
fixed single click expands merge view
kiph-soptim a2a9e9d
fixed enum entry mapping
kiph-soptim aab94ff
Merge branch 'main' into feature/RDFA-344-Cross-profile-diagrams
kiph-soptim f661899
adjusted tests
kiph-soptim 2d93aea
selectedClassUUID and selectedClassType combined to selectedClass
kiph-soptim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
95 changes: 95 additions & 0 deletions
95
...rdfarchitect/api/controller/datasets/diagrams/CrossProfileDiagramColorRestController.java
This file contains hidden or 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,95 @@ | ||
| /* | ||
| * Copyright (c) 2024-2026 SOPTIM AG | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| package org.rdfarchitect.api.controller.datasets.diagrams; | ||
|
|
||
| import io.swagger.v3.oas.annotations.Parameter; | ||
|
|
||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| import org.rdfarchitect.api.dto.crossProfileDiagram.CrossProfileDiagramColorDataDTO; | ||
| import org.rdfarchitect.services.diagrams.CrossProfileColorUseCase; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import org.springframework.http.HttpHeaders; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.PathVariable; | ||
| import org.springframework.web.bind.annotation.PutMapping; | ||
| import org.springframework.web.bind.annotation.RequestBody; | ||
| import org.springframework.web.bind.annotation.RequestHeader; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| @RestController | ||
| @RequestMapping("/api/datasets/{datasetName}/crossprofilediagramColors") | ||
| @RequiredArgsConstructor | ||
| public class CrossProfileDiagramColorRestController { | ||
|
|
||
| private static final Logger logger = | ||
| LoggerFactory.getLogger(CrossProfileDiagramColorRestController.class); | ||
|
|
||
| private final CrossProfileColorUseCase colorUseCase; | ||
|
|
||
| @GetMapping | ||
| public CrossProfileDiagramColorDataDTO getCrossProfileColors( | ||
| @Parameter(description = "The name/url of the inquirer.") | ||
| @RequestHeader( | ||
| value = HttpHeaders.ORIGIN, | ||
| required = false, | ||
| defaultValue = "unknown") | ||
| String originURL, | ||
| @Parameter(description = "The literal name of the dataset.") @PathVariable | ||
| String datasetName) { | ||
| logger.info( | ||
| "Received GET request: \"/api/datasets/{{}}/crossprofilediagramColors\" from \"{}\"", | ||
| datasetName, | ||
| originURL); | ||
|
|
||
| var result = colorUseCase.getCrossProfileColors(datasetName); | ||
|
|
||
| logger.info( | ||
| "Sending response to GET request: \"/api/datasets/{{}}/crossprofilediagramColors\" from \"{}\"", | ||
| datasetName, | ||
| originURL); | ||
| return result; | ||
| } | ||
|
|
||
| @PutMapping | ||
| public void updateCrossProfileColors( | ||
| @Parameter(description = "The name/url of the inquirer.") | ||
| @RequestHeader( | ||
| value = HttpHeaders.ORIGIN, | ||
| required = false, | ||
| defaultValue = "unknown") | ||
| String originURL, | ||
| @Parameter(description = "The literal name of the dataset.") @PathVariable | ||
| String datasetName, | ||
| @RequestBody CrossProfileDiagramColorDataDTO colorData) { | ||
|
|
||
| logger.info( | ||
| "Received PUT request: \"/api/datasets/{{}}/crossprofilediagramColors\" from \"{}\"", | ||
| datasetName, | ||
| originURL); | ||
|
|
||
| colorUseCase.replaceCrossProfileColors(datasetName, colorData); | ||
|
|
||
| logger.info( | ||
| "Sending response to PUT request: \"/api/datasets/{{}}/crossprofilediagramColors\" from \"{}\"", | ||
| datasetName, | ||
| originURL); | ||
| } | ||
| } |
65 changes: 65 additions & 0 deletions
65
...va/org/rdfarchitect/api/controller/datasets/diagrams/CrossProfileDiagramIDController.java
This file contains hidden or 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,65 @@ | ||
| /* | ||
| * Copyright (c) 2024-2026 SOPTIM AG | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| package org.rdfarchitect.api.controller.datasets.diagrams; | ||
|
|
||
| import io.swagger.v3.oas.annotations.Parameter; | ||
|
|
||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| import org.rdfarchitect.database.DatabasePort; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import org.springframework.http.HttpHeaders; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.PathVariable; | ||
| import org.springframework.web.bind.annotation.RequestHeader; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| @RestController | ||
| @RequestMapping("/api/datasets/{datasetName}/crossprofilediagramID") | ||
| @RequiredArgsConstructor | ||
| public class CrossProfileDiagramIDController { | ||
|
|
||
| private static final Logger logger = | ||
| LoggerFactory.getLogger(CrossProfileDiagramIDController.class); | ||
|
|
||
| private final DatabasePort databasePort; | ||
|
|
||
| @GetMapping | ||
| public String getCrossProfileRenderingData( | ||
| @Parameter(description = "The name/url of the inquirer.") | ||
| @RequestHeader( | ||
| value = HttpHeaders.ORIGIN, | ||
| required = false, | ||
| defaultValue = "unknown") | ||
| String originURL, | ||
| @Parameter(description = "The literal name of the dataset.") @PathVariable | ||
| String datasetName) { | ||
| logger.info( | ||
| "Received GET request: \"/api/datasets/{{}}/crossprofilediagram\" from \"{}\"", | ||
| datasetName, | ||
| originURL); | ||
|
|
||
| logger.info( | ||
| "Sending response to GET request: \"/api/datasets/{{}}/crossprofilediagram\" from \"{}\"", | ||
| datasetName, | ||
| originURL); | ||
| return databasePort.getCrossProfileDiagramUUID(datasetName).toString(); | ||
| } | ||
| } | ||
86 changes: 86 additions & 0 deletions
86
...rchitect/api/controller/datasets/diagrams/CrossProfileDiagramRenderingRestController.java
This file contains hidden or 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,86 @@ | ||
| /* | ||
| * Copyright (c) 2024-2026 SOPTIM AG | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| package org.rdfarchitect.api.controller.datasets.diagrams; | ||
|
|
||
| import io.swagger.v3.oas.annotations.Parameter; | ||
|
|
||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| import org.rdfarchitect.api.dto.rendering.RenderingDataDTO; | ||
| import org.rdfarchitect.database.DatabasePort; | ||
| import org.rdfarchitect.models.cim.rendering.RenderCIMCollectionUseCase; | ||
| import org.rdfarchitect.services.diagrams.GetCustomDiagramsUseCase; | ||
| import org.rdfarchitect.services.rendering.DiagramToCIMCollectionConverterUseCase; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import org.springframework.http.HttpHeaders; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.PathVariable; | ||
| import org.springframework.web.bind.annotation.RequestHeader; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| @RestController | ||
| @RequestMapping("/api/datasets/{datasetName}/crossprofilediagramRendering") | ||
| @RequiredArgsConstructor | ||
| public class CrossProfileDiagramRenderingRestController { | ||
|
|
||
| private static final Logger logger = | ||
| LoggerFactory.getLogger(CrossProfileDiagramRenderingRestController.class); | ||
|
|
||
| private final DiagramToCIMCollectionConverterUseCase converter; | ||
|
|
||
| private final RenderCIMCollectionUseCase renderer; | ||
|
|
||
| private final GetCustomDiagramsUseCase getCustomDiagramsUseCase; | ||
|
|
||
| private final DatabasePort databasePort; | ||
|
|
||
| @GetMapping | ||
| public RenderingDataDTO getCrossProfileRenderingData( | ||
| @Parameter(description = "The name/url of the inquirer.") | ||
| @RequestHeader( | ||
| value = HttpHeaders.ORIGIN, | ||
| required = false, | ||
| defaultValue = "unknown") | ||
| String originURL, | ||
| @Parameter(description = "The literal name of the dataset.") @PathVariable | ||
| String datasetName) { | ||
| logger.info( | ||
| "Received GET request: \"/api/datasets/{{}}/crossprofilediagramRendering\" from \"{}\"", | ||
| datasetName, | ||
| originURL); | ||
|
|
||
| var crossProfileDiagram = | ||
| getCustomDiagramsUseCase.getCrossProfileDiagram(datasetName, true, true); | ||
|
|
||
| var cimCollection = converter.convert(crossProfileDiagram); | ||
|
|
||
| var result = | ||
| renderer.renderGlobalUML( | ||
| cimCollection, | ||
| datasetName, | ||
| databasePort.getCrossProfileDiagramUUID(datasetName)); | ||
|
|
||
|
Comment on lines
+69
to
+79
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are 2 separate transactions. preferably they are all called in the same use case in one transaction |
||
| logger.info( | ||
| "Sending response to GET request: \"/api/datasets/{{}}/crossprofilediagramRendering\" from \"{}\"", | ||
| datasetName, | ||
| originURL); | ||
| return result; | ||
| } | ||
| } | ||
68 changes: 68 additions & 0 deletions
68
.../org/rdfarchitect/api/controller/datasets/diagrams/CrossProfileDiagramRestController.java
This file contains hidden or 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,68 @@ | ||
| /* | ||
| * Copyright (c) 2024-2026 SOPTIM AG | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| package org.rdfarchitect.api.controller.datasets.diagrams; | ||
|
|
||
| import io.swagger.v3.oas.annotations.Parameter; | ||
|
|
||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| import org.rdfarchitect.api.dto.crossProfileDiagram.CrossProfileDiagramDTO; | ||
| import org.rdfarchitect.services.diagrams.GetCustomDiagramsUseCase; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import org.springframework.http.HttpHeaders; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.PathVariable; | ||
| import org.springframework.web.bind.annotation.RequestHeader; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| @RestController | ||
| @RequestMapping("/api/datasets/{datasetName}/crossprofilediagram") | ||
| @RequiredArgsConstructor | ||
| public class CrossProfileDiagramRestController { | ||
|
|
||
| private static final Logger logger = | ||
| LoggerFactory.getLogger(CrossProfileDiagramRestController.class); | ||
|
|
||
| private final GetCustomDiagramsUseCase getCustomDiagramsUseCase; | ||
|
|
||
| @GetMapping | ||
| public CrossProfileDiagramDTO getCrossProfileRenderingData( | ||
| @Parameter(description = "The name/url of the inquirer.") | ||
| @RequestHeader( | ||
| value = HttpHeaders.ORIGIN, | ||
| required = false, | ||
| defaultValue = "unknown") | ||
| String originURL, | ||
| @Parameter(description = "The literal name of the dataset.") @PathVariable | ||
| String datasetName) { | ||
| logger.info( | ||
| "Received GET request: \"/api/datasets/{{}}/crossprofilediagram\" from \"{}\"", | ||
| datasetName, | ||
| originURL); | ||
|
|
||
| var result = getCustomDiagramsUseCase.getCrossProfileDiagram(datasetName, false, false); | ||
|
|
||
| logger.info( | ||
| "Sending response to GET request: \"/api/datasets/{{}}/crossprofilediagram\" from \"{}\"", | ||
| datasetName, | ||
| originURL); | ||
| return result; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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
30 changes: 30 additions & 0 deletions
30
backend/src/main/java/org/rdfarchitect/api/dto/crossProfileDiagram/ClassSourceDTO.java
This file contains hidden or 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,30 @@ | ||
| /* | ||
| * Copyright (c) 2024-2026 SOPTIM AG | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| package org.rdfarchitect.api.dto.crossProfileDiagram; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import lombok.Data; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| @Data | ||
| @AllArgsConstructor | ||
| public class ClassSourceDTO { | ||
| private UUID classUUID; | ||
| private String graphUri; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.