diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index 094f61f3d9f8ba9b4cd7460ff13e1de03438b63e..49c5261b6c32b4590f7e3bb130ebbbc67c7ac350 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -88,6 +88,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro-hm + platform: linux/amd64 logging: driver: json-file @@ -111,6 +112,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro-hm + platform: linux/amd64 logging: driver: json-file @@ -131,6 +133,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 logging: driver: json-file @@ -167,6 +170,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-medium + platform: linux/amd64 depends_on: dbrepo-identity-service: condition: service_healthy @@ -190,6 +194,7 @@ services: SYSTEM_PASSWORD: ${SYSTEM_PASSWORD:-admin} deploy: <<: *resources-nano + platform: linux/amd64 depends_on: dbrepo-auth-service: condition: service_healthy @@ -248,6 +253,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-small + platform: linux/amd64 depends_on: dbrepo-auth-service: condition: service_healthy @@ -287,6 +293,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 logging: driver: json-file @@ -314,6 +321,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 logging: driver: json-file @@ -322,6 +330,8 @@ services: container_name: dbrepo-search-db hostname: search-db image: docker.io/bitnami/opensearch:${OPENSEARCH_VERSION} + volumes: + - search-db-data:/bitnami/opensearch/data ports: - "9200:9200" healthcheck: @@ -329,8 +339,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-medium - volumes: - - search-db-data:/bitnami/opensearch/data + platform: linux/amd64 logging: driver: json-file @@ -355,6 +364,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 logging: driver: json-file @@ -381,6 +391,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 depends_on: dbrepo-search-service: condition: service_healthy @@ -403,6 +414,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-nano + platform: linux/amd64 depends_on: dbrepo-analyse-service: condition: service_healthy @@ -441,6 +453,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-nano + platform: linux/amd64 logging: driver: json-file @@ -459,6 +472,7 @@ services: SYSTEM_PASSWORD: "${SYSTEM_PASSWORD:-admin}" deploy: <<: *resources-nano + platform: linux/amd64 depends_on: dbrepo-search-db: condition: service_healthy @@ -481,6 +495,7 @@ services: SYSTEM_PASSWORD: "${SYSTEM_PASSWORD:-admin}" deploy: <<: *resources-nano + platform: linux/amd64 depends_on: dbrepo-dashboard-ui: condition: service_healthy @@ -505,6 +520,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-nano + platform: linux/amd64 logging: driver: json-file @@ -521,6 +537,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-nano + platform: linux/amd64 logging: driver: json-file @@ -537,6 +554,7 @@ services: STORAGE_ENDPOINT: ${STORAGE_ENDPOINT:-http://storage-service:9000} deploy: <<: *resources-nano + platform: linux/amd64 depends_on: dbrepo-storage-service: condition: service_healthy @@ -584,6 +602,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-large + platform: linux/amd64 depends_on: dbrepo-data-db: condition: service_healthy @@ -612,6 +631,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-nano + platform: linux/amd64 extra_hosts: - "localhost:host-gateway" logging: @@ -635,6 +655,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 depends_on: dbrepo-dashboard-ui: condition: service_healthy diff --git a/.docs/.gitignore b/.docs/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7c1e8f2dbd6cd578d9043b4733f599fa5412c65b --- /dev/null +++ b/.docs/.gitignore @@ -0,0 +1,2 @@ +# CSS +stylesheets/.sass-cache/ \ No newline at end of file diff --git a/.docs/changelog.md b/.docs/changelog.md index a77872cd47775032edc1919cb70060ec33698b69..fd2e7b0d9cf3b7852a919c2f05cf11f56a181710 100644 --- a/.docs/changelog.md +++ b/.docs/changelog.md @@ -2,10 +2,28 @@ author: Martin Weise --- -## v1.8.1 (2025-04-??) +## v1.8.2 (2025-04-??) + +#### Features + +* Added structured logging through the `fluentd` protocol via the lightweight fluentbit in a + separate [Logging Service](../api/logging-service) + in [#524](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/524). #### Changes +* Improved internal packaging mechanism that is compatible with multiarch deployments + in [#523](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/523). + +## v1.8.1 (2025-04-13) + +#### Changes + +* Improved default mask for PIDs + in [#521](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/521). +* Added a visual filter for displaying starred/unstarred/all subsets in the UI. +* Specified image platform as `linux/amd64` in `docker-compose.yaml` deployment to enable host platform (e.g. ARM) to + emulate it. * Specified resource limits in the `docker-compose.yaml` deployment in [#517](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/517). @@ -13,9 +31,9 @@ author: Martin Weise * Fixed a bug in the UI that displays the "Create View" button only when the user has at least read access. -#### Changes +#### Removals -* Refactored stale objects scheduler from the Data Service into a separate image. +* Removed the stale objects scheduler from the Data Service and pushed it to next release. ## v1.8.0 (2025-04-04) diff --git a/.docs/images/architecture.drawio b/.docs/images/architecture.drawio index 2559a653790f7a5de96948d00394017982d8073a..588ede83e27578b9cb42d9b10551609333fae6d3 100644 --- a/.docs/images/architecture.drawio +++ b/.docs/images/architecture.drawio @@ -975,113 +975,95 @@ </mxGraphModel> </diagram> <diagram id="DNBJDzVGt1bZ_wE9aRrb" name="Authentication (TU)"> - <mxGraphModel dx="1434" dy="822" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0"> + <mxGraphModel dx="1182" dy="678" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0"> <root> <mxCell id="0" /> <mxCell id="1" parent="0" /> - <mxCell id="UK1E1MY9NPGJr35xhmfM-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="6Mvu0cpha-60HerBRlcp-5" target="QHHrKqhJkxuvhbEd7n-v-1" edge="1"> - <mxGeometry relative="1" as="geometry"> - <mxPoint x="618" y="253" as="sourcePoint" /> - <mxPoint x="677.5" y="221" as="targetPoint" /> - </mxGeometry> - </mxCell> - <mxCell id="6Mvu0cpha-60HerBRlcp-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;" parent="1" source="0UriubutAV_ndhbAIQOG-1" target="lwbPPWB284nzco3shXtu-11" edge="1"> + <mxCell id="H5geC8BQpTcnQeXLB8gK-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="H5geC8BQpTcnQeXLB8gK-1" target="H5geC8BQpTcnQeXLB8gK-2"> <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="0UriubutAV_ndhbAIQOG-1" value="SATOSA" style="rounded=0;whiteSpace=wrap;html=1;fillColor=default;dashed=1;verticalAlign=top;" parent="1" vertex="1"> - <mxGeometry x="447.5" y="414" width="170" height="210" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-4" value="Force" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="H5geC8BQpTcnQeXLB8gK-3"> + <mxGeometry x="0.0781" y="-2" relative="1" as="geometry"> + <mxPoint x="7" y="2" as="offset" /> + </mxGeometry> </mxCell> - <mxCell id="h4DClbYJ9orVhpn0rvY8-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="OTtTGdUG0AnkBV5d_5uu-1" target="OTtTGdUG0AnkBV5d_5uu-2" edge="1"> + <mxCell id="H5geC8BQpTcnQeXLB8gK-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="H5geC8BQpTcnQeXLB8gK-1" target="H5geC8BQpTcnQeXLB8gK-5"> <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="OTtTGdUG0AnkBV5d_5uu-1" value="SAML 2.0 IdP<br>(Frontend)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> - <mxGeometry x="467.5" y="444" width="130" height="40" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-20" value="OIDC" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="H5geC8BQpTcnQeXLB8gK-9"> + <mxGeometry x="-0.0962" y="-1" relative="1" as="geometry"> + <mxPoint x="6" y="-1" as="offset" /> + </mxGeometry> </mxCell> - <mxCell id="h4DClbYJ9orVhpn0rvY8-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="OTtTGdUG0AnkBV5d_5uu-2" target="OTtTGdUG0AnkBV5d_5uu-3" edge="1"> + <mxCell id="H5geC8BQpTcnQeXLB8gK-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="H5geC8BQpTcnQeXLB8gK-1" target="H5geC8BQpTcnQeXLB8gK-7"> <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="OTtTGdUG0AnkBV5d_5uu-2" value="Middleware" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> - <mxGeometry x="467.5" y="504" width="130" height="40" as="geometry" /> - </mxCell> - <mxCell id="OTtTGdUG0AnkBV5d_5uu-3" value="SAML 2.0 SP<br>(Backend)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> - <mxGeometry x="467.5" y="564" width="130" height="40" as="geometry" /> - </mxCell> - <mxCell id="h4DClbYJ9orVhpn0rvY8-2" value="<a href="https://test.dbrepo.tuwien.ac.at/api/auth/realms/dbrepo/.well-known/openid-configuration">JSON<br>Metadata</a>" style="shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;size=17;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" parent="1" vertex="1"> - <mxGeometry x="307.5" y="181" width="70" height="90" as="geometry" /> - </mxCell> - <mxCell id="lwbPPWB284nzco3shXtu-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;" parent="1" source="h4DClbYJ9orVhpn0rvY8-3" target="OTtTGdUG0AnkBV5d_5uu-3" edge="1"> - <mxGeometry relative="1" as="geometry"> - <mxPoint x="410" y="576" as="targetPoint" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-19" value="OIDC" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="H5geC8BQpTcnQeXLB8gK-10"> + <mxGeometry x="-0.1281" y="2" relative="1" as="geometry"> + <mxPoint x="-2" as="offset" /> </mxGeometry> </mxCell> - <mxCell id="h4DClbYJ9orVhpn0rvY8-3" value="<a href="https://test.dbrepo.tuwien.ac.at/saml2/endpoint">XML<br>Metadata</a>" style="shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;size=17;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" parent="1" vertex="1"> - <mxGeometry x="307.5" y="539" width="70" height="90" as="geometry" /> - </mxCell> - <mxCell id="QHHrKqhJkxuvhbEd7n-v-1" value="" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=8.600000000000023;fillColor=#dae8fc;strokeColor=#000000;" parent="1" vertex="1"> - <mxGeometry x="677.5" y="248" width="50" height="64" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="H5geC8BQpTcnQeXLB8gK-1" target="H5geC8BQpTcnQeXLB8gK-6"> + <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="QHHrKqhJkxuvhbEd7n-v-2" value="auth-db" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;spacing=-1;" parent="1" vertex="1"> - <mxGeometry x="660" y="314" width="85" height="20" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-18" value="OIDC" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="H5geC8BQpTcnQeXLB8gK-11"> + <mxGeometry x="0.1536" relative="1" as="geometry"> + <mxPoint x="9" as="offset" /> + </mxGeometry> </mxCell> - <mxCell id="hp2oGXdcphavrsRCR3EN-1" value="<b>EntityID&nbsp;</b>https://test.dbrepo.tuwien.ac.at/saml2/backend" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"> - <mxGeometry x="10" y="10" width="440" height="20" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-1" value="<b>Auth Service</b><br>Keycloak" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="455" y="335" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="lwbPPWB284nzco3shXtu-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;dashed=1;" parent="1" source="lwbPPWB284nzco3shXtu-11" target="h4DClbYJ9orVhpn0rvY8-3" edge="1"> + <mxCell id="H5geC8BQpTcnQeXLB8gK-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="H5geC8BQpTcnQeXLB8gK-2" target="H5geC8BQpTcnQeXLB8gK-8"> <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="lwbPPWB284nzco3shXtu-11" value="TU SSO" style="rounded=0;whiteSpace=wrap;html=1;fillColor=default;dashed=1;verticalAlign=top;" parent="1" vertex="1"> - <mxGeometry x="50" y="474" width="170" height="90" as="geometry" /> - </mxCell> - <mxCell id="lwbPPWB284nzco3shXtu-12" value="SimpleSAML" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1"> - <mxGeometry x="70" y="504" width="130" height="40" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-16" value="LDAP" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="H5geC8BQpTcnQeXLB8gK-12"> + <mxGeometry x="-0.0986" y="-1" relative="1" as="geometry"> + <mxPoint as="offset" /> + </mxGeometry> </mxCell> - <mxCell id="lwbPPWB284nzco3shXtu-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;" parent="1" source="lwbPPWB284nzco3shXtu-18" target="OTtTGdUG0AnkBV5d_5uu-1" edge="1"> + <mxCell id="H5geC8BQpTcnQeXLB8gK-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="H5geC8BQpTcnQeXLB8gK-2" target="H5geC8BQpTcnQeXLB8gK-13"> <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="lwbPPWB284nzco3shXtu-18" value="<a href="https://test.dbrepo.tuwien.ac.at/saml2/backend">XML<br>Metadata</a>" style="shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;size=17;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" parent="1" vertex="1"> - <mxGeometry x="307.5" y="419" width="70" height="90" as="geometry" /> - </mxCell> - <mxCell id="tOMRmRFzJHC1-SXyWV1O-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#000000;startArrow=classic;startFill=1;dashed=1;" parent="1" edge="1"> - <mxGeometry x="-0.028" relative="1" as="geometry"> - <mxPoint x="532" y="126" as="sourcePoint" /> - <mxPoint as="offset" /> - <mxPoint x="532" y="174" as="targetPoint" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-17" value="LDAP" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="H5geC8BQpTcnQeXLB8gK-15"> + <mxGeometry x="0.0932" y="-2" relative="1" as="geometry"> + <mxPoint x="6" y="1" as="offset" /> </mxGeometry> </mxCell> - <mxCell id="tOMRmRFzJHC1-SXyWV1O-4" value="Researcher" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" parent="1" vertex="1"> - <mxGeometry x="517.5" y="42" width="30" height="60" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-2" value="<b>Identity Service</b><br>OpenLDAP" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="224" y="335" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="6Mvu0cpha-60HerBRlcp-4" value="<a href="https://test.dbrepo.tuwien.ac.at/api/auth/realms/dbrepo/broker/saml/endpoint/descriptor">XML<br>Metadata</a>" style="shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;size=17;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" parent="1" vertex="1"> - <mxGeometry x="307.5" y="300" width="70" height="90" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-5" value="<b>UI</b>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="530" y="470" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="6Mvu0cpha-60HerBRlcp-5" value="Keycloak" style="rounded=0;whiteSpace=wrap;html=1;fillColor=default;dashed=1;verticalAlign=top;" parent="1" vertex="1"> - <mxGeometry x="447.5" y="175" width="170" height="210" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-6" value="<b>Metadata Service</b>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="380" y="470" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="6Mvu0cpha-60HerBRlcp-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="6Mvu0cpha-60HerBRlcp-7" target="6Mvu0cpha-60HerBRlcp-10" edge="1"> - <mxGeometry relative="1" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-7" value="<b>Data Service</b>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="455" y="530" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="6Mvu0cpha-60HerBRlcp-7" value="OIDC IdP" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> - <mxGeometry x="467.5" y="205" width="130" height="40" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-8" value="<b>Broker Service</b>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="224" y="530" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="6Mvu0cpha-60HerBRlcp-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="6Mvu0cpha-60HerBRlcp-5" target="0UriubutAV_ndhbAIQOG-1" edge="1"> - <mxGeometry relative="1" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-13" value="<b>Dashboard UI</b>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="150" y="470" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="6Mvu0cpha-60HerBRlcp-10" value="SAML 2.0 SP<br>(Identity Broker)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> - <mxGeometry x="467.5" y="325" width="130" height="40" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="H5geC8BQpTcnQeXLB8gK-21" target="H5geC8BQpTcnQeXLB8gK-1"> + <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="lwbPPWB284nzco3shXtu-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;endArrow=none;endFill=0;" parent="1" source="h4DClbYJ9orVhpn0rvY8-2" edge="1"> - <mxGeometry relative="1" as="geometry"> - <mxPoint x="467.5" y="226" as="targetPoint" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-23" value="SAML 2.0" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="H5geC8BQpTcnQeXLB8gK-22"> + <mxGeometry x="0.0113" y="1" relative="1" as="geometry"> + <mxPoint as="offset" /> </mxGeometry> </mxCell> - <mxCell id="6Mvu0cpha-60HerBRlcp-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;startArrow=classic;startFill=1;endArrow=none;endFill=0;" parent="1" source="6Mvu0cpha-60HerBRlcp-4" target="6Mvu0cpha-60HerBRlcp-10" edge="1"> - <mxGeometry relative="1" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-21" value="<b>IdP</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#000000;" vertex="1" parent="1"> + <mxGeometry x="455" y="190" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="6Mvu0cpha-60HerBRlcp-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="6Mvu0cpha-60HerBRlcp-15" target="OTtTGdUG0AnkBV5d_5uu-1" edge="1"> + <mxCell id="H5geC8BQpTcnQeXLB8gK-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="H5geC8BQpTcnQeXLB8gK-24" target="H5geC8BQpTcnQeXLB8gK-1"> <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="6Mvu0cpha-60HerBRlcp-15" value="JSON<br>(Denylist)" style="shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;size=17;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" parent="1" vertex="1"> - <mxGeometry x="667.5" y="419" width="70" height="90" as="geometry" /> + <mxCell id="H5geC8BQpTcnQeXLB8gK-24" value="Browser / REST API" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="1"> + <mxGeometry x="730" y="325" width="30" height="60" as="geometry" /> </mxCell> </root> </mxGraphModel> diff --git a/.docs/installation.md b/.docs/installation.md index ae807e69d0d980baa972e3010f7a5c0005657a8d..79530f31ee8ee69ffdab2c0078921948229a6db2 100644 --- a/.docs/installation.md +++ b/.docs/installation.md @@ -22,13 +22,10 @@ curl -sSL https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-service ## Requirements -We only support the Debian 12 operating system officially. In theory, any DEB-based operating system (e.g. Ubuntu) -should be compatible. Any modern hardware suffices, we recommend a dedicated virtual machine with the following -settings. +We recommend a dedicated virtual machine with the following system requirements: - min. 8 vCPU cores -- min. 8GB free RAM memory -- min. 200GB free SSD storage +- min. 20GB free RAM memory Since DBRepo is intended to be a publicly available repository, an optional fixed/static IP-address with optional SSL/TLS certificate is recommended. Follow the [secure installation](#secure-installation) guide. diff --git a/.docs/overrides/main.html b/.docs/overrides/main.html new file mode 100644 index 0000000000000000000000000000000000000000..82cc4e788c620af27cbc476e78ab7e33f7bfda45 --- /dev/null +++ b/.docs/overrides/main.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block outdated %} +<strong>WARNING</strong> You're browsing the documentation for an old version of DBRepo. Consider upgrading your project +to <a href="{{ config.site_url }}"> + <strong>the latest version</strong>. +</a> +{% endblock %} \ No newline at end of file diff --git a/.docs/stylesheets/.sass-cache/04e8358553d0156a67b95297c054a24cd7eab863/_colors.scssc b/.docs/stylesheets/.sass-cache/04e8358553d0156a67b95297c054a24cd7eab863/_colors.scssc deleted file mode 100644 index de13f4de6f248642ae9aa84dbd05890d096fb628..0000000000000000000000000000000000000000 Binary files a/.docs/stylesheets/.sass-cache/04e8358553d0156a67b95297c054a24cd7eab863/_colors.scssc and /dev/null differ diff --git a/.docs/stylesheets/.sass-cache/04e8358553d0156a67b95297c054a24cd7eab863/_typeset.scssc b/.docs/stylesheets/.sass-cache/04e8358553d0156a67b95297c054a24cd7eab863/_typeset.scssc deleted file mode 100644 index f6a80da3534c65beab6b28b85ea0a3a10ee15266..0000000000000000000000000000000000000000 Binary files a/.docs/stylesheets/.sass-cache/04e8358553d0156a67b95297c054a24cd7eab863/_typeset.scssc and /dev/null differ diff --git a/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/_config.scssc b/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/_config.scssc deleted file mode 100644 index 20fac36e42b9c065be8d5e1e50ebd22c4e821fdd..0000000000000000000000000000000000000000 Binary files a/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/_config.scssc and /dev/null differ diff --git a/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/custom.scssc b/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/custom.scssc deleted file mode 100644 index ee214c5de92c28b3cbcb078e4d2aa2d2450a4b32..0000000000000000000000000000000000000000 Binary files a/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/custom.scssc and /dev/null differ diff --git a/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/extra.scssc b/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/extra.scssc deleted file mode 100644 index e1e49282b550e2f8aad85cd707f34da6fd703381..0000000000000000000000000000000000000000 Binary files a/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/extra.scssc and /dev/null differ diff --git a/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/main.scssc b/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/main.scssc deleted file mode 100644 index ec1210c17ed880a36d713cdf087f2134f3afaee2..0000000000000000000000000000000000000000 Binary files a/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/main.scssc and /dev/null differ diff --git a/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/palette.scssc b/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/palette.scssc deleted file mode 100644 index 7f71c61f4d4b2e986bb266940ac47ca07d60a0b3..0000000000000000000000000000000000000000 Binary files a/.docs/stylesheets/.sass-cache/10990fa183107f4149f38216a4d00fe324a8131e/palette.scssc and /dev/null differ diff --git a/.docs/stylesheets/.sass-cache/2c2cf16e0f132dd6db83c98c5ec5508783194a8a/_hero.scssc b/.docs/stylesheets/.sass-cache/2c2cf16e0f132dd6db83c98c5ec5508783194a8a/_hero.scssc deleted file mode 100644 index cca5acddb8b8535825e439d898892eadbba973f9..0000000000000000000000000000000000000000 Binary files a/.docs/stylesheets/.sass-cache/2c2cf16e0f132dd6db83c98c5ec5508783194a8a/_hero.scssc and /dev/null differ diff --git a/.docs/stylesheets/.sass-cache/bfcb905bbd9d3baa11ae35b689811451966d11bf/_accent.scssc b/.docs/stylesheets/.sass-cache/bfcb905bbd9d3baa11ae35b689811451966d11bf/_accent.scssc deleted file mode 100644 index 5edd0c57d74b636ef1f7b2f4cea20a558105c465..0000000000000000000000000000000000000000 Binary files a/.docs/stylesheets/.sass-cache/bfcb905bbd9d3baa11ae35b689811451966d11bf/_accent.scssc and /dev/null differ diff --git a/.docs/stylesheets/.sass-cache/bfcb905bbd9d3baa11ae35b689811451966d11bf/_scheme.scssc b/.docs/stylesheets/.sass-cache/bfcb905bbd9d3baa11ae35b689811451966d11bf/_scheme.scssc deleted file mode 100644 index 1ad33e4220951570b80a301e336f7a390c5b7314..0000000000000000000000000000000000000000 Binary files a/.docs/stylesheets/.sass-cache/bfcb905bbd9d3baa11ae35b689811451966d11bf/_scheme.scssc and /dev/null differ diff --git a/.docs/stylesheets/extra.css b/.docs/stylesheets/extra.css index 5219d289c4fc675c873aaedc9f40720564986db8..31429800ab9d179411553e3537debc1dc6e1c538 100644 --- a/.docs/stylesheets/extra.css +++ b/.docs/stylesheets/extra.css @@ -29,8 +29,3 @@ img.img-border { .md-main .md-content a:not(.action-button):not([tabindex]):hover { color: var(--md-primary-fg-color--dark); border-bottom: 2px solid var(--md-primary-fg-color--dark); } - -.md-banner { - background-color: var(--md-primary-fg-color--dark); } - -/*# sourceMappingURL=extra.css.map */ diff --git a/.docs/stylesheets/extra.scss b/.docs/stylesheets/extra.scss index 5ea1aa41fdd09551b18725c036deee01ab31eea0..13615172ff42a2f6337b2f54548ea183fe769fda 100644 --- a/.docs/stylesheets/extra.scss +++ b/.docs/stylesheets/extra.scss @@ -39,6 +39,6 @@ img.img-border { } -.md-banner { - background-color: var(--md-primary-fg-color--dark); -} \ No newline at end of file +//.md-banner { +// background-color: var(--md-primary-fg-color--dark); +//} \ No newline at end of file diff --git a/.gitignore b/.gitignore index c3dd8341c59dbd1975ed8c7175a9d770bcd46317..1d310a889367bcad02106b1465d5b52deecd0cbb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ target/ !**/src/main/**/target/ !**/src/test/**/target/ -.docker/ # generated ready schema.xsd @@ -21,7 +20,6 @@ tmp.yaml .docs/.swagger/dist/ .docs/.swagger/site/ site/ -final/ .$* dbrepo-somapper/ @@ -30,9 +28,6 @@ dbrepo-somapper/ .pytest_cache/ __pycache__/ -# docs -site/ - # Previous directories fda-analyse-service/ fda-authentication-service/ @@ -53,9 +48,6 @@ fda-ui/ # demo .demo -# Generated -ready - # Certificates *.crt *.p12 @@ -106,7 +98,6 @@ table.md /dist/ /nbdist/ /.nb-gradle/ -build/ !**/src/main/**/build/ !**/src/test/**/build/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b2b65dacf5debe50d1961f4478d1e60861e5e30..628e6e1843ea9a30f52b0ac8e5cca305078f0eb1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,6 +15,7 @@ variables: APP_VERSION: "1.8.1" CHART_VERSION: "1.8.1" SUPPORTED_VERSIONS: "1.7.3, 1.8.0, 1.8.1" + SUPPORTED_ARCH: "linux/amd64" MAINTAINED_SERVICES: "analyse-service, auth-service-init, dashboard-service, dashboard-service-init, data-service, metadata-service, search-db, search-service, search-service-init, storage-service-init, ui" CACHE_FALLBACK_KEY: "${CI_DEFAULT_BRANCH}" # This will supress any download for dependencies and plugins or upload messages which would clutter the console log. @@ -154,10 +155,10 @@ build-metadata-service: - master needs: - build-java-lib - dependencies: - - build-java-lib + before_script: + - mvn -f ./lib/java/dbrepo-core/pom.xml -q clean install $MAVEN_OPTS -DskipTests script: - - "mvn -f ./dbrepo-metadata-service/pom.xml clean package $MAVEN_OPTS -DskipTests" + - "mvn -f ./dbrepo-metadata-service/pom.xml -q clean package $MAVEN_OPTS -DskipTests" # Compiled classes are needed for SonarQube in later stages artifacts: when: always @@ -199,11 +200,15 @@ build-java-lib: - merge_requests - master script: - - "mvn -f ./lib/java/dbrepo-core/pom.xml clean install $MAVEN_OPTS -DskipTests" + - "mvn -f ./lib/java/dbrepo-core/pom.xml clean package install $MAVEN_OPTS -DskipTests" + - "mvn deploy:deploy-file $MAVEN_OPTS -Dfile=./lib/java/dbrepo-core/target/dbrepo-core-$APP_VERSION.jar -DgroupId=at.ac.tuwien.ifs.dbrepo -DartifactId=dbrepo-core -Dversion=$APP_VERSION -Dpackaging=jar -Durl=file:./dbrepo-data-service/lib/ -DrepositoryId=maven-repository -DupdateReleaseInfo=true" + - "mvn deploy:deploy-file $MAVEN_OPTS -Dfile=./lib/java/dbrepo-core/target/dbrepo-core-$APP_VERSION.jar -DgroupId=at.ac.tuwien.ifs.dbrepo -DartifactId=dbrepo-core -Dversion=$APP_VERSION -Dpackaging=jar -Durl=file:./dbrepo-metadata-service/lib/ -DrepositoryId=maven-repository -DupdateReleaseInfo=true" artifacts: when: always paths: - ./lib/java/dbrepo-core/target/classes + - ./dbrepo-data-service/lib + - ./dbrepo-metadata-service/lib build-data-service: image: maven:3-openjdk-${JAVA_VERSION} @@ -215,8 +220,10 @@ build-data-service: - build-java-lib dependencies: - build-java-lib + before_script: + - mvn -f ./lib/java/dbrepo-core/pom.xml -q clean install $MAVEN_OPTS -DskipTests script: - - "mvn -f ./dbrepo-data-service/pom.xml clean package $MAVEN_OPTS -DskipTests" + - "mvn -f ./dbrepo-data-service/pom.xml -q clean package $MAVEN_OPTS -DskipTests" # Compiled classes are needed for SonarQube in later stages artifacts: when: always @@ -263,14 +270,13 @@ build-images: only: - merge_requests - master + variables: + DOCKER_BUILDKIT: 1 before_script: - - "apk add --no-cache make" + - "apk add --no-cache make maven openjdk17-jdk" - echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY_URL script: - - docker build --network=host -t dbrepo-core:build --target build ./lib/java/dbrepo-core - - docker build --network=host -t dbrepo-data-service:build --target build dbrepo-data-service - - docker build --network=host -t dbrepo-metadata-service:build --target build dbrepo-metadata-service - - docker compose build -q --parallel + - make build-images build-helm: image: docker.io/docker:${DOCKER_VERSION}-dind @@ -294,6 +300,7 @@ test-metadata-service: - master needs: - build-java-lib + - build-metadata-service dependencies: - build-java-lib script: @@ -316,11 +323,11 @@ test-data-service: - merge_requests - master needs: + - build-java-lib - build-data-service dependencies: - - build-data-service + - build-java-lib script: - - "mvn -f ./dbrepo-metadata-service/pom.xml clean install -DskipTests $MAVEN_OPTS" - "mvn -f ./dbrepo-data-service/pom.xml clean test verify $MAVEN_OPTS" - "cat ./dbrepo-data-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'" artifacts: @@ -521,6 +528,8 @@ clean-images: release-images: stage: release image: docker:${DOCKER_VERSION}-dind + variables: + REPOSITORY_URL: $CI_REGISTRY2_URL dependencies: - clean-images - test-analyse-service @@ -534,37 +543,13 @@ release-images: - tags - dev before_script: + - "apk add --no-cache make maven openjdk17-jdk" - "docker logout ${CI_REGISTRY_URL}" - "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}" - "docker logout ${CI_REGISTRY2_URL}" - "echo ${CI_REGISTRY2_PASSWORD} | docker login --username ${CI_REGISTRY2_USER} --password-stdin ${CI_REGISTRY2_URL}" script: - - docker build --network=host -t dbrepo-core:build --target build ./lib/java/dbrepo-core - - docker build --network=host -t dbrepo-data-service:build --target build dbrepo-data-service - - docker build --network=host -t dbrepo-metadata-service:build --target build dbrepo-metadata-service - - docker compose build -q --parallel - - docker tag dbrepo-analyse-service:latest "${CI_REGISTRY2_URL}/analyse-service:${APP_VERSION}${BUILD_VERSION}" - - docker tag dbrepo-auth-service-init:latest "${CI_REGISTRY2_URL}/auth-service-init:${APP_VERSION}${BUILD_VERSION}" - - docker tag dbrepo-dashboard-service:latest "${CI_REGISTRY2_URL}/dashboard-service:${APP_VERSION}${BUILD_VERSION}" - - docker tag dbrepo-dashboard-service-init:latest "${CI_REGISTRY2_URL}/dashboard-service-init:${APP_VERSION}${BUILD_VERSION}" - - docker tag dbrepo-dashboard-ui:latest "${CI_REGISTRY2_URL}/dashboard-ui:${APP_VERSION}${BUILD_VERSION}" - - docker tag dbrepo-data-service:latest "${CI_REGISTRY2_URL}/data-service:${APP_VERSION}${BUILD_VERSION}" - - docker tag dbrepo-metadata-service:latest "${CI_REGISTRY2_URL}/metadata-service:${APP_VERSION}${BUILD_VERSION}" - - docker tag dbrepo-search-service:latest "${CI_REGISTRY2_URL}/search-service:${APP_VERSION}${BUILD_VERSION}" - - docker tag dbrepo-search-service-init:latest "${CI_REGISTRY2_URL}/search-service-init:${APP_VERSION}${BUILD_VERSION}" - - docker tag dbrepo-storage-service-init:latest "${CI_REGISTRY2_URL}/storage-service-init:${APP_VERSION}${BUILD_VERSION}" - - docker tag dbrepo-ui:latest "${CI_REGISTRY2_URL}/ui:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/analyse-service:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/auth-service-init:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/dashboard-service:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/dashboard-service-init:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/dashboard-ui:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/data-service:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/metadata-service:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/search-service:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/search-service-init:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/storage-service-init:${APP_VERSION}${BUILD_VERSION}" - - docker push "${CI_REGISTRY2_URL}/ui:${APP_VERSION}${BUILD_VERSION}" + - "make release-images" release-helm: stage: release diff --git a/dbrepo-analyse-service/Dockerfile b/dbrepo-analyse-service/Dockerfile index 26ea3ce65c2336bfd065e891c8d88ea47aaf73a3..df313ec934c825ab20b71da9a29f6e3f272a3462 100644 --- a/dbrepo-analyse-service/Dockerfile +++ b/dbrepo-analyse-service/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine3.21 +FROM --platform=$BUILDPLATFORM python:3.11-alpine3.21 LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" RUN apk --no-cache add \ diff --git a/dbrepo-analyse-service/Pipfile.lock b/dbrepo-analyse-service/Pipfile.lock index fe27145c3a4e38ad36c36021cb84bf182c791416..4963f0350992bc1b8618597e18bba7bd55c49b17 100644 --- a/dbrepo-analyse-service/Pipfile.lock +++ b/dbrepo-analyse-service/Pipfile.lock @@ -180,20 +180,19 @@ }, "boto3": { "hashes": [ - "sha256:6f0d3863abfeed366b365fb3ad2fa508d7f2becd64ca712d4b70b593da7f9763", - "sha256:bc08c95a88ffeb51d78d25cb8bd72593b8cce1d8fdcc650030aff98c15437d04" + "sha256:4390317a1578af73f1514651bd180ba25802dcbe0a23deafa13851d54d3c3203", + "sha256:7b1b1bc69762975824e5a5d570880abebf634f7594f88b3dc175e8800f35be1a" ], "index": "pypi", - "markers": "python_version >= '3.8'", - "version": "==1.37.32" + "version": "==1.37.33" }, "botocore": { "hashes": [ - "sha256:3e5d097690b3423adeefdf257384e964d0ba7f9575d77bf3f8998273b92ef700", - "sha256:c25989e09e29b382c1edcc994f795c4faadf2f30470269754024a55269a7a47d" + "sha256:09b213b0d0500040f85c7daee912ea767c724e43ed61909e624c803ff6925222", + "sha256:4a167dfecae51e9140de24067de1c339acde5ade3dad524a4600ac2c72055e23" ], "markers": "python_version >= '3.8'", - "version": "==1.37.32" + "version": "==1.37.33" }, "certifi": { "hashes": [ @@ -273,7 +272,7 @@ "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87", "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b" ], - "markers": "python_version >= '3.8'", + "markers": "platform_python_implementation != 'PyPy'", "version": "==1.17.1" }, "charset-normalizer": { @@ -425,9 +424,10 @@ }, "dbrepo": { "hashes": [ - "sha256:ec9f612e7ab0275ad2326be9e09e513301ffa2598c9dda838e9cc902891db512" + "sha256:4dc7da6e48b618d44e82f3ad392c4d1ef7917a0cd46bb13af78a73f3062d7319" ], - "path": "./lib/dbrepo-1.8.1.tar.gz" + "path": "./lib/dbrepo-1.8.1.tar.gz", + "version": "==1.8.1" }, "events": { "hashes": [ @@ -441,7 +441,6 @@ "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==1.2.2" }, "flasgger": { @@ -457,7 +456,6 @@ "sha256:d667207822eb83f1c4b50949b1623c8fc8d51f2341d65f72e1a1815397551136" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==3.1.0" }, "flask-cors": { @@ -466,7 +464,6 @@ "sha256:fa5cb364ead54bbf401a26dbf03030c6b18fb2fcaf70408096a572b409586b0c" ], "index": "pypi", - "markers": "python_version >= '3.9' and python_version < '4.0'", "version": "==5.0.1" }, "flask-httpauth": { @@ -483,7 +480,6 @@ "sha256:8085d6757505b6f3291a2638c84d207e8f0ad0de662d1f46aa2f77e658a0c976" ], "index": "pypi", - "markers": "python_version >= '3.9' and python_version < '4'", "version": "==4.7.1" }, "frozenlist": { @@ -626,7 +622,6 @@ "sha256:ff96c5739834c9a594db0e12bf59cb3fa0e5102fc7b893972118a3166733d61c" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==24.11.1" }, "greenlet": { @@ -706,7 +701,6 @@ "sha256:f6ff3b14f2df4c41660a7dec01045a045653998784bf8cfcb5a525bdffffbc8f" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==3.1.1" }, "gunicorn": { @@ -715,7 +709,6 @@ "sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==23.0.0" }, "idna": { @@ -771,7 +764,6 @@ "sha256:61c9170f92e736b530655e75374681d4fcca9cfa8763ab42be57353b2b203494" ], "index": "pypi", - "markers": "python_version >= '3.6'", "version": "==1.3.1" }, "markupsafe": { @@ -847,7 +839,6 @@ "sha256:c06ef7a43e5d67107067f77b6c07ebdd68733e5aa7eed03076472410ca19d876" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==7.2.15" }, "mistune": { @@ -1027,7 +1018,6 @@ "sha256:f7de08cbe5551911886d1ab60de58448c6df0f67d9feb7d1fb21e9875ef95e91" ], "index": "pypi", - "markers": "python_version >= '3.10'", "version": "==2.2.4" }, "opensearch-py": { @@ -1036,7 +1026,6 @@ "sha256:6598df0bc7a003294edd0ba88a331e0793acbb8c910c43edf398791e3b2eccda" ], "index": "pypi", - "markers": "python_version >= '3.8' and python_version < '4'", "version": "==2.8.0" }, "packaging": { @@ -1093,7 +1082,6 @@ "sha256:fffb8ae78d8af97f849404f21411c95062db1496aeb3e56f146f0355c9989319" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==2.2.3" }, "pika": { @@ -1273,7 +1261,6 @@ "sha256:a082753436a07f9ba1289c6ffa01cd93db3548776088aa917cc43b63f68fa60f" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==2.11.3" }, "pydantic-core": { @@ -1477,7 +1464,6 @@ "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==2.32.3" }, "rpds-py": { @@ -1939,7 +1925,7 @@ "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87", "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b" ], - "markers": "python_version >= '3.8'", + "markers": "platform_python_implementation != 'PyPy'", "version": "==1.17.1" }, "charset-normalizer": { @@ -2107,7 +2093,6 @@ "sha256:fa260de59dfb143af06dcf30c2be0b200bed2a73737a8a59248fcb9fa601ef0f" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==7.8.0" }, "docker": { @@ -2146,7 +2131,6 @@ "sha256:c06ef7a43e5d67107067f77b6c07ebdd68733e5aa7eed03076472410ca19d876" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==7.2.15" }, "opensearch-py": { @@ -2155,7 +2139,6 @@ "sha256:6598df0bc7a003294edd0ba88a331e0793acbb8c910c43edf398791e3b2eccda" ], "index": "pypi", - "markers": "python_version >= '3.8' and python_version < '4'", "version": "==2.8.0" }, "packaging": { @@ -2223,7 +2206,6 @@ "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==8.3.5" }, "python-dateutil": { @@ -2240,7 +2222,6 @@ "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==2.32.3" }, "requests-mock": { @@ -2249,7 +2230,6 @@ "sha256:e9e12e333b525156e82a3c852f22016b9158220d2f47454de9cae8a77d371401" ], "index": "pypi", - "markers": "python_version >= '3.5'", "version": "==1.12.1" }, "six": { @@ -2272,7 +2252,6 @@ "sha256:54d330d085c0a11fc5da0b001af87aec4dd3e814104376bf7513e8646c77442a" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==0.0.1rc1" }, "testcontainers-opensearch": { @@ -2280,7 +2259,6 @@ "sha256:0bdf270b5b7f53915832f7c31dd2bd3ffdc20b534ea6b32231cc7003049bd0e1" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==0.0.1rc1" }, "typing-extensions": { diff --git a/dbrepo-analyse-service/lib/dbrepo-1.8.1-py3-none-any.whl b/dbrepo-analyse-service/lib/dbrepo-1.8.1-py3-none-any.whl index d06dd866e308e867f0952e12decee9fa90a5344c..289f081b95f69e34e6d8a947642d7966b55a3b68 100644 Binary files a/dbrepo-analyse-service/lib/dbrepo-1.8.1-py3-none-any.whl and b/dbrepo-analyse-service/lib/dbrepo-1.8.1-py3-none-any.whl differ diff --git a/dbrepo-analyse-service/lib/dbrepo-1.8.1.tar.gz b/dbrepo-analyse-service/lib/dbrepo-1.8.1.tar.gz index 4f8d90073fdb8e17f22e04bd74df8ac8815e2ae9..d13869fc6f53ed38c9580789746781d52a6d0b69 100644 Binary files a/dbrepo-analyse-service/lib/dbrepo-1.8.1.tar.gz and b/dbrepo-analyse-service/lib/dbrepo-1.8.1.tar.gz differ diff --git a/dbrepo-auth-service/init/Dockerfile b/dbrepo-auth-service/init/Dockerfile index b325b35435431552c9c5898dc03356f556d1f0c2..bd692732d619340ed2f0ee72ca8cbff7189aa6e2 100644 --- a/dbrepo-auth-service/init/Dockerfile +++ b/dbrepo-auth-service/init/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine +FROM --platform=$BUILDPLATFORM python:3.11-alpine3.21 LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" RUN apk add --no-cache alpine-sdk \ diff --git a/dbrepo-auth-service/listeners/pom.xml b/dbrepo-auth-service/listeners/pom.xml index e70201b96ac3d853a0274c7f06499d336f1c27cf..d70af41ef988cf4f81fc2f559f3a14d1187f22b1 100644 --- a/dbrepo-auth-service/listeners/pom.xml +++ b/dbrepo-auth-service/listeners/pom.xml @@ -10,7 +10,7 @@ <version>24.0.5</version> </parent> - <groupId>at.tuwien</groupId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> <artifactId>create-event-listener</artifactId> <name>dbrepo-auth-service</name> <version>24.0.5</version> diff --git a/dbrepo-auth-service/listeners/target/create-event-listener.jar b/dbrepo-auth-service/listeners/target/create-event-listener.jar deleted file mode 100644 index 6ba9f58a962c7d786d8731418b1312432088baca..0000000000000000000000000000000000000000 Binary files a/dbrepo-auth-service/listeners/target/create-event-listener.jar and /dev/null differ diff --git a/dbrepo-dashboard-service/Dockerfile b/dbrepo-dashboard-service/Dockerfile index e739245d3031956fe99203167a25f72b9c06ed3b..62caad802ff5e7a852e9d47bbd8d41c79bb2e261 100644 --- a/dbrepo-dashboard-service/Dockerfile +++ b/dbrepo-dashboard-service/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine3.21 +FROM --platform=$BUILDPLATFORM python:3.11-alpine3.21 LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" RUN apk add --no-cache \ diff --git a/dbrepo-dashboard-service/Pipfile.lock b/dbrepo-dashboard-service/Pipfile.lock index 797289e71fccbd3c8c330129d7d82efa46fb415d..3daecb8b6ae4e4364ae8c17d13dbfc09eec4f178 100644 --- a/dbrepo-dashboard-service/Pipfile.lock +++ b/dbrepo-dashboard-service/Pipfile.lock @@ -221,7 +221,7 @@ "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87", "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b" ], - "markers": "python_version >= '3.8'", + "markers": "platform_python_implementation != 'PyPy'", "version": "==1.17.1" }, "charset-normalizer": { @@ -373,9 +373,10 @@ }, "dbrepo": { "hashes": [ - "sha256:ec9f612e7ab0275ad2326be9e09e513301ffa2598c9dda838e9cc902891db512" + "sha256:4dc7da6e48b618d44e82f3ad392c4d1ef7917a0cd46bb13af78a73f3062d7319" ], - "path": "./lib/dbrepo-1.8.1.tar.gz" + "path": "./lib/dbrepo-1.8.1.tar.gz", + "version": "==1.8.1" }, "flasgger": { "hashes": [ @@ -390,7 +391,6 @@ "sha256:f69fcd559dc907ed196ab9df0e48471709175e696d6e698dd4dbe940f96ce66b" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==2.3.3" }, "flask-cors": { @@ -415,7 +415,6 @@ "sha256:8085d6757505b6f3291a2638c84d207e8f0ad0de662d1f46aa2f77e658a0c976" ], "index": "pypi", - "markers": "python_version >= '3.9' and python_version < '4'", "version": "==4.7.1" }, "frozenlist": { @@ -522,7 +521,6 @@ "sha256:8cb61bb2a87ec07bca10974df276b9a1a95bfdb63f3a696f065692ffc9b8c389" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==4.3.2" }, "gunicorn": { @@ -531,7 +529,6 @@ "sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==23.0.0" }, "h11": { @@ -697,7 +694,6 @@ "sha256:61c9170f92e736b530655e75374681d4fcca9cfa8763ab42be57353b2b203494" ], "index": "pypi", - "markers": "python_version >= '3.6'", "version": "==1.3.1" }, "markupsafe": { @@ -951,7 +947,7 @@ "sha256:f486038e44caa08dbd97275a9a35a283a8f1d2f0ee60ac260a1790e76660833c", "sha256:f7de08cbe5551911886d1ab60de58448c6df0f67d9feb7d1fb21e9875ef95e91" ], - "markers": "python_version >= '3.10'", + "markers": "python_version == '3.11'", "version": "==2.2.4" }, "packaging": { @@ -1160,7 +1156,6 @@ "sha256:a082753436a07f9ba1289c6ffa01cd93db3548776088aa917cc43b63f68fa60f" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==2.11.3" }, "pydantic-core": { @@ -1282,7 +1277,6 @@ "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==8.3.5" }, "python-dateutil": { @@ -1299,7 +1293,6 @@ "sha256:d7c01d9e2293916c18baf562d95698754b0dbbb5e74d457c45d4f6561fb9d55d" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==1.1.0" }, "pytz": { @@ -1466,7 +1459,7 @@ "sha256:ff0a911de71092966df1abfa6a35180f703fe81e01dc317729132f89e22d6c46", "sha256:ff222c695872ada25369a3ee4e3e3a0fb4ecfe4396aef3900789a0f128a24f16" ], - "markers": "python_version >= '3.7'", + "markers": "(platform_python_implementation != 'CPython' or python_full_version > '3.7.10') and (platform_system == 'Darwin' or platform_system == 'Windows' or platform_system == 'Linux') and (platform_machine == 'x86_64' or platform_machine == 's390x' or platform_machine == 'armv7l' or platform_machine == 'ppc64le' or platform_machine == 'ppc64' or platform_machine == 'AMD64' or platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'ARM64' or platform_machine == 'x86' or platform_machine == 'i686') and (platform_python_implementation == 'CPython' or (platform_python_implementation == 'PyPy' and python_version < '3.12'))", "version": "==1.4.4" }, "referencing": { @@ -2049,7 +2042,6 @@ "sha256:fa260de59dfb143af06dcf30c2be0b200bed2a73737a8a59248fcb9fa601ef0f" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==7.8.0" }, "docker": { @@ -2098,7 +2090,6 @@ "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==8.3.5" }, "python-dotenv": { @@ -2107,7 +2098,6 @@ "sha256:d7c01d9e2293916c18baf562d95698754b0dbbb5e74d457c45d4f6561fb9d55d" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==1.1.0" }, "requests": { @@ -2124,7 +2114,6 @@ "sha256:e9e12e333b525156e82a3c852f22016b9158220d2f47454de9cae8a77d371401" ], "index": "pypi", - "markers": "python_version >= '3.5'", "version": "==1.12.1" }, "testcontainers": { @@ -2133,7 +2122,6 @@ "sha256:31ed1a81238c7e131a2a29df6db8f23717d892b592fa5a1977fd0dcd0c23fc23" ], "index": "pypi", - "markers": "python_version >= '3.9' and python_version < '4.0'", "version": "==4.10.0" }, "typing-extensions": { diff --git a/dbrepo-dashboard-service/init.Dockerfile b/dbrepo-dashboard-service/init.Dockerfile index 487e3e280e245e8f01a2a2caf0c8bf202765bc0c..4d00c467cd4621e894c456e4a7325d87108ccfb3 100644 --- a/dbrepo-dashboard-service/init.Dockerfile +++ b/dbrepo-dashboard-service/init.Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine3.21 +FROM --platform=$BUILDPLATFORM python:3.11-alpine3.21 LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" RUN apk add --no-cache \ diff --git a/dbrepo-dashboard-service/init.py b/dbrepo-dashboard-service/init.py index 294b4802fb82827acefc8bdec4eba850cd9aa0a7..54c01f55ebc063e0b97a4ce799ba4d529e1a5627 100644 --- a/dbrepo-dashboard-service/init.py +++ b/dbrepo-dashboard-service/init.py @@ -57,7 +57,6 @@ def upsert_dashboard(database: Database) -> None: if db is None: db = dashboard_client().create(database.internal_name, database.dashboard_uid) rest_client().update_database_dashboard(database.id, db['uid']) - return dashboard_client().update(database) diff --git a/dbrepo-dashboard-service/lib/dbrepo-1.8.1-py3-none-any.whl b/dbrepo-dashboard-service/lib/dbrepo-1.8.1-py3-none-any.whl index d06dd866e308e867f0952e12decee9fa90a5344c..289f081b95f69e34e6d8a947642d7966b55a3b68 100644 Binary files a/dbrepo-dashboard-service/lib/dbrepo-1.8.1-py3-none-any.whl and b/dbrepo-dashboard-service/lib/dbrepo-1.8.1-py3-none-any.whl differ diff --git a/dbrepo-dashboard-service/lib/dbrepo-1.8.1.tar.gz b/dbrepo-dashboard-service/lib/dbrepo-1.8.1.tar.gz index 4f8d90073fdb8e17f22e04bd74df8ac8815e2ae9..d13869fc6f53ed38c9580789746781d52a6d0b69 100644 Binary files a/dbrepo-dashboard-service/lib/dbrepo-1.8.1.tar.gz and b/dbrepo-dashboard-service/lib/dbrepo-1.8.1.tar.gz differ diff --git a/dbrepo-dashboard-ui/Dockerfile b/dbrepo-dashboard-ui/Dockerfile index daf9ef46dd808a99eb6bb776945f014cdf6f9c8f..83683e3926506228216d274c3d50eea2dbef3d9f 100644 --- a/dbrepo-dashboard-ui/Dockerfile +++ b/dbrepo-dashboard-ui/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/bitnami/grafana:11.5.3 AS runtime +FROM --platform=$BUILDPLATFORM docker.io/bitnami/grafana:11.5.3 AS runtime LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" COPY --chown=grafana:grafana ./grafana.ini ./conf/grafana.ini diff --git a/dbrepo-dashboard-ui/provisioning/datasources/infinity.yaml b/dbrepo-dashboard-ui/provisioning/datasources/infinity.yaml index ce1409240e1f2131cf13ac7bcbe6d5afbebf2a6f..c1f2c78b00842e8b0082a89fd0a59f8ecacff528 100644 --- a/dbrepo-dashboard-ui/provisioning/datasources/infinity.yaml +++ b/dbrepo-dashboard-ui/provisioning/datasources/infinity.yaml @@ -6,12 +6,12 @@ datasources: type: yesoreyeram-infinity-datasource basicAuth: true basicAuthUser: user - url: http://localhost + url: $BASE_URL jsonData: auth_method: 'basicAuth' httpHeaderName1: Accept allowedHosts: - - 'http://localhost' + - '$BASE_URL' secureJsonData: basicAuthPassword: user httpHeaderValue1: application/json diff --git a/dbrepo-data-service/.gitignore b/dbrepo-data-service/.gitignore index d39a47ee0fab72fbe4fd7f5ae968ff2f3bc3de78..3e5eeee0c8f132e1eae76cc90a3f0a418ef5f407 100644 --- a/dbrepo-data-service/.gitignore +++ b/dbrepo-data-service/.gitignore @@ -7,6 +7,9 @@ target/ ### Environment ### .env +### local repo ### +lib/at/ + ### Generated ### ready mapping.xml diff --git a/dbrepo-data-service/Dockerfile b/dbrepo-data-service/Dockerfile index 7468f1c568d033c86d60579ed2c35576bcaac736..537f88fe71ec84b8fcdd29b671c172300df71b8e 100644 --- a/dbrepo-data-service/Dockerfile +++ b/dbrepo-data-service/Dockerfile @@ -1,38 +1,37 @@ ###### FIRST STAGE ###### -FROM dbrepo-core:build AS dependency -LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" - -###### SECOND STAGE ###### -FROM maven:3-amazoncorretto-17 AS build +FROM --platform=$BUILDPLATFORM maven:3-amazoncorretto-17 AS build LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" COPY ./pom.xml ./ RUN mvn -fn dependency:go-offline -COPY --from=dependency /root/.m2/repository/at/ac/tuwien/ifs/dbrepo /root/.m2/repository/at/ac/tuwien/ifs/dbrepo - +COPY ./lib ./lib COPY ./querystore ./querystore COPY ./report ./report COPY ./rest-service ./rest-service COPY ./services ./services # Make sure it compiles -RUN mvn -fn clean package -DskipTests +RUN mvn -q clean package -DskipTests -###### THIRD STAGE ###### -FROM amazoncorretto:17-alpine3.19 AS runtime +###### SECOND STAGE ###### +FROM --platform=$BUILDPLATFORM amazoncorretto:17-alpine3.21 AS runtime LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" -RUN apk add --no-cache curl bash jq +RUN apk --no-cache add \ + bash \ + curl \ + jq WORKDIR /app -RUN adduser -D dbrepo --uid 1001 +RUN adduser -D dbrepo --uid 1001 && \ + chown -R 1001:1001 /app USER 1001 -COPY --from=build --chown=1001 ./rest-service/target/rest-service-*.jar ./data-service.jar +COPY --from=build --chown=1001 ./rest-service/target/*rest-service-*.jar ./data-service.jar # non-root port EXPOSE 8080 diff --git a/dbrepo-data-service/README.md b/dbrepo-data-service/README.md index 68c317174da2f9c5936f70f40f9d74ad7f7d4130..f15c7ff746b07a158bbddd6fc0c2fc4facb6f457 100644 --- a/dbrepo-data-service/README.md +++ b/dbrepo-data-service/README.md @@ -1,5 +1,14 @@ # Data Service +## Build + +Before testing, it is recommended to (re-)build the `MapStruct` mappers in case they were modified using the `package` +target: + +```shell +mvn clean package +``` + ## Test Run all unit and integration tests and create an HTML+TXT coverage report located in the `report` module: diff --git a/dbrepo-data-service/lib/.gitkeep b/dbrepo-data-service/lib/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/dbrepo-data-service/pom.xml b/dbrepo-data-service/pom.xml index 6f67e74b7043a9df43bd38d0a5a2bbd3cd4e1050..4593cb0ae5d7b18c8e1dd09ee8a12bab053fceb6 100644 --- a/dbrepo-data-service/pom.xml +++ b/dbrepo-data-service/pom.xml @@ -13,9 +13,9 @@ <url>https://www.tuwien.ac.at</url> </organization> - <groupId>at.ac.tuwien.ac.at.ifs.dbrepo</groupId> - <artifactId>dbrepo-data-service</artifactId> - <name>dbrepo-data-service</name> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>data-service</artifactId> + <name>data-service</name> <version>1.8.1</version> <description>Service that manages the data</description> @@ -96,11 +96,7 @@ <dependency> <groupId>at.ac.tuwien.ifs.dbrepo</groupId> <artifactId>dbrepo-core</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> + <version>1.8.1</version> </dependency> <!-- Spark --> <dependency> @@ -140,6 +136,13 @@ <artifactId>hadoop-aws</artifactId> <version>${hadoop.version}</version> </dependency> + <!-- Api --> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <version>${lombok.version}</version> + <scope>provided</scope> + </dependency> <!-- Data Source --> <dependency> <groupId>org.mariadb.jdbc</groupId> @@ -330,6 +333,16 @@ </plugins> </build> + <repositories> + <repository> + <id>dbrepo-maven-repo</id> + <url>file:///${project.basedir}/lib</url> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + <licenses> <license> <name>Apache-2.0</name> diff --git a/dbrepo-data-service/querystore/pom.xml b/dbrepo-data-service/querystore/pom.xml index 5f58c03d52f654815cbe7f631f42e00c3ace2e42..df7ebf027142fe95303824142dec822f58bf76bd 100644 --- a/dbrepo-data-service/querystore/pom.xml +++ b/dbrepo-data-service/querystore/pom.xml @@ -4,13 +4,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <groupId>at.ac.tuwien.ac.at.ifs.dbrepo</groupId> - <artifactId>dbrepo-data-service</artifactId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>data-service</artifactId> <version>1.8.1</version> </parent> - <artifactId>dbrepo-data-service-querystore</artifactId> - <name>dbrepo-data-service-querystore</name> + <name>querystore</name> + <artifactId>querystore</artifactId> <version>1.8.1</version> <dependencies/> diff --git a/dbrepo-data-service/querystore/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/querystore/Query.java b/dbrepo-data-service/querystore/src/main/java/at/ac/tuwien/ifs/dbrepo/querystore/Query.java similarity index 97% rename from dbrepo-data-service/querystore/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/querystore/Query.java rename to dbrepo-data-service/querystore/src/main/java/at/ac/tuwien/ifs/dbrepo/querystore/Query.java index 15b96d573982197526ba2ee18ccb8d2d75b43ea5..d6432a40a7b6ba6b252d07b9d6f81c18d2bc008f 100644 --- a/dbrepo-data-service/querystore/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/querystore/Query.java +++ b/dbrepo-data-service/querystore/src/main/java/at/ac/tuwien/ifs/dbrepo/querystore/Query.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.querystore; +package at.ac.tuwien.ifs.dbrepo.querystore; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; diff --git a/dbrepo-data-service/report/pom.xml b/dbrepo-data-service/report/pom.xml index 54eb9dae65f3ab60239db3f63c39e68ee49206d4..31dc7e5dcf938186053181c83c8749e7607a58f2 100644 --- a/dbrepo-data-service/report/pom.xml +++ b/dbrepo-data-service/report/pom.xml @@ -4,14 +4,15 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <groupId>at.ac.tuwien.ac.at.ifs.dbrepo</groupId> - <artifactId>dbrepo-data-service</artifactId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>data-service</artifactId> <version>1.8.1</version> </parent> + <name>report</name> <artifactId>report</artifactId> - <name>dbrepo-data-service-report</name> <version>1.8.1</version> + <description> This module is only intended for the pipeline coverage report. See the detailed report in the respective modules @@ -19,14 +20,14 @@ <dependencies> <dependency> - <groupId>at.ac.tuwien.ac.at.ifs.dbrepo</groupId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> <artifactId>rest-service</artifactId> - <version>${project.version}</version> + <version>1.8.1</version> </dependency> <dependency> - <groupId>at.ac.tuwien.ac.at.ifs.dbrepo</groupId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> <artifactId>services</artifactId> - <version>${project.version}</version> + <version>1.8.1</version> </dependency> </dependencies> diff --git a/dbrepo-data-service/rest-service/pom.xml b/dbrepo-data-service/rest-service/pom.xml index a51ca9424440f89b6ff240832741e4fd4f7f9d23..ab400a68ede799641f8c919a53163099bcf47646 100644 --- a/dbrepo-data-service/rest-service/pom.xml +++ b/dbrepo-data-service/rest-service/pom.xml @@ -4,18 +4,18 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <groupId>at.ac.tuwien.ac.at.ifs.dbrepo</groupId> - <artifactId>dbrepo-data-service</artifactId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>data-service</artifactId> <version>1.8.1</version> </parent> + <name>rest-service</name> <artifactId>rest-service</artifactId> - <name>dbrepo-data-service-rest-service</name> <version>1.8.1</version> <dependencies> <dependency> - <groupId>at.ac.tuwien.ac.at.ifs.dbrepo</groupId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> <artifactId>services</artifactId> <version>1.8.1</version> </dependency> diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/DataServiceApplication.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/DataServiceApplication.java similarity index 99% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/DataServiceApplication.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/DataServiceApplication.java index ec763b9d4ac3efea27e3664fa9bdb40d8b32733b..43908054f1709d831e6d1be0db9f245139c5a266 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/DataServiceApplication.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/DataServiceApplication.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo; +package at.ac.tuwien.ifs.dbrepo; import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/SwaggerConfig.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/config/SwaggerConfig.java similarity index 97% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/SwaggerConfig.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/config/SwaggerConfig.java index 176f3449eebf415c01b0f7785e3e49c2cbbc5dcb..7c1ce104da5e022ce0cb788326799be997917079 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/SwaggerConfig.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/config/SwaggerConfig.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; import io.swagger.v3.oas.models.ExternalDocumentation; import io.swagger.v3.oas.models.OpenAPI; diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/AccessEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/AccessEndpoint.java similarity index 98% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/AccessEndpoint.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/AccessEndpoint.java index 10961b435915fb531ed11c40e0956652a00140f5..70b3e59616d1e73244efe290abe633abcc7d9186 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/AccessEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/AccessEndpoint.java @@ -1,12 +1,12 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoints; +package at.ac.tuwien.ifs.dbrepo.endpoints; import at.ac.tuwien.ifs.dbrepo.core.api.database.CreateAccessDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.AccessService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.service.AccessService; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/DatabaseEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/DatabaseEndpoint.java similarity index 88% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/DatabaseEndpoint.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/DatabaseEndpoint.java index 8ddaf80c102090af32254fc20ad8a9f8954d2084..34f42725c0f1e0f31afa345b2e359a31d288c202 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/DatabaseEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/DatabaseEndpoint.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoints; +package at.ac.tuwien.ifs.dbrepo.endpoints; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto; @@ -7,11 +7,11 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.internal.CreateDatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.internal.UpdateUserPasswordDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MetadataMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.AccessService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.ContainerService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.DatabaseService; +import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; +import at.ac.tuwien.ifs.dbrepo.service.AccessService; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.service.ContainerService; +import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; @@ -36,18 +36,18 @@ import java.util.UUID; @RequestMapping(path = "/api/database") public class DatabaseEndpoint extends RestEndpoint { + private final DataMapper dataMapper; private final CacheService cacheService; private final AccessService accessService; - private final MetadataMapper metadataMapper; private final DatabaseService databaseService; private final ContainerService containerService; @Autowired - public DatabaseEndpoint(CacheService cacheService, AccessService accessService, DatabaseService databaseService, - ContainerService containerService, MetadataMapper metadataMapper) { + public DatabaseEndpoint(DataMapper dataMapper, CacheService cacheService, AccessService accessService, + DatabaseService databaseService, ContainerService containerService) { + this.dataMapper = dataMapper; this.cacheService = cacheService; this.accessService = accessService; - this.metadataMapper = metadataMapper; this.databaseService = databaseService; this.containerService = containerService; } @@ -93,8 +93,8 @@ public class DatabaseEndpoint extends RestEndpoint { try { final DatabaseDto database = containerService.createDatabase(container, data); containerService.createQueryStore(container, data.getInternalName()); - accessService.create(database, metadataMapper.createDatabaseDtoToPrivilegedUserDto(data), AccessTypeDto.WRITE_ALL); - accessService.create(database, metadataMapper.createDatabaseDtoToReadonlyUserDto(data), AccessTypeDto.READ); + accessService.create(database, dataMapper.createDatabaseDtoToPrivilegedUserDto(data), AccessTypeDto.WRITE_ALL); + accessService.create(database, dataMapper.createDatabaseDtoToReadonlyUserDto(data), AccessTypeDto.READ); return ResponseEntity.status(HttpStatus.CREATED) .body(database); } catch (SQLException e) { diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/RestEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/RestEndpoint.java similarity index 98% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/RestEndpoint.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/RestEndpoint.java index 778d38f30fed356bd0e96898e3d0020c5088505b..c8f1e8db6b1f4e132a4a3c4c9c3732aefa189721 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/RestEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/RestEndpoint.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoints; +package at.ac.tuwien.ifs.dbrepo.endpoints; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDetailsDto; import org.apache.spark.sql.Dataset; diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/SubsetEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/SubsetEndpoint.java similarity index 98% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/SubsetEndpoint.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/SubsetEndpoint.java index a66f6f22d9d26d3b24e9b5b3ddf8d126724924f6..8c3656b0cd603f69946a8c69c6b02ff887ede6ad 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/SubsetEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/SubsetEndpoint.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoints; +package at.ac.tuwien.ifs.dbrepo.endpoints; import at.ac.tuwien.ifs.dbrepo.core.api.ExportResourceDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; @@ -9,13 +9,13 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryPersistDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.SubsetDto; import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MariaDbMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.DatabaseService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.StorageService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.SubsetService; -import at.ac.tuwien.ac.at.ifs.dbrepo.validation.EndpointValidator; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; +import at.ac.tuwien.ifs.dbrepo.service.StorageService; +import at.ac.tuwien.ifs.dbrepo.service.SubsetService; +import at.ac.tuwien.ifs.dbrepo.validation.EndpointValidator; import io.micrometer.observation.annotation.Observed; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.headers.Header; diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/TableEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/TableEndpoint.java similarity index 99% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/TableEndpoint.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/TableEndpoint.java index ad401670f2043a7b9d745d60dc0bc8fad1761116..8ea36ff682ace6f66d1744662668b485f61cbc9a 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/TableEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/TableEndpoint.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoints; +package at.ac.tuwien.ifs.dbrepo.endpoints; import at.ac.tuwien.ifs.dbrepo.core.api.ExportResourceDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto; @@ -9,10 +9,10 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.internal.TableCreateDto; import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MariaDbMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.validation.EndpointValidator; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; +import at.ac.tuwien.ifs.dbrepo.service.*; +import at.ac.tuwien.ifs.dbrepo.validation.EndpointValidator; import io.micrometer.observation.annotation.Observed; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.headers.Header; diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/UploadEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/UploadEndpoint.java similarity index 96% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/UploadEndpoint.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/UploadEndpoint.java index 83e2b875d547b3df5b981d76f478d7505e2852e8..b7a88fc3f7c63116689dbbe26d4466ed43e0160b 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/UploadEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/UploadEndpoint.java @@ -1,10 +1,10 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoints; +package at.ac.tuwien.ifs.dbrepo.endpoints; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto; import at.ac.tuwien.ifs.dbrepo.core.api.file.UploadResponseDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.StorageService; +import at.ac.tuwien.ifs.dbrepo.service.StorageService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/ViewEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/ViewEndpoint.java similarity index 98% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/ViewEndpoint.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/ViewEndpoint.java index 09e971a205383bbc2c9f8f529c2fe269f6c69caf..b589d66a06fadd7543ca103217dca41085f6f0a9 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoints/ViewEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/ViewEndpoint.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoints; +package at.ac.tuwien.ifs.dbrepo.endpoints; import at.ac.tuwien.ifs.dbrepo.core.api.ExportResourceDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.CreateViewDto; @@ -8,9 +8,9 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableStatisticDto; import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MariaDbMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.validation.EndpointValidator; +import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; +import at.ac.tuwien.ifs.dbrepo.service.*; +import at.ac.tuwien.ifs.dbrepo.validation.EndpointValidator; import io.micrometer.observation.annotation.Observed; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.headers.Header; diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/handlers/ApiExceptionHandler.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/handlers/ApiExceptionHandler.java similarity index 99% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/handlers/ApiExceptionHandler.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/handlers/ApiExceptionHandler.java index 012123f67142ddc16e22a1373bb72c04d052b45b..6aea3e878221c6766a76d8e1e245b54ac3e1a089 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/handlers/ApiExceptionHandler.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/handlers/ApiExceptionHandler.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.handlers; +package at.ac.tuwien.ifs.dbrepo.handlers; import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; diff --git a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/validation/EndpointValidator.java b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/validation/EndpointValidator.java similarity index 96% rename from dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/validation/EndpointValidator.java rename to dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/validation/EndpointValidator.java index d505a8d36ec58cdab91dbaef07913a27dc3b38f3..009c3b0b3fe5ced4ee469a3d9512d4e92927d3ce 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/validation/EndpointValidator.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/validation/EndpointValidator.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.validation; +package at.ac.tuwien.ifs.dbrepo.validation; import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto; @@ -6,9 +6,9 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.FilterDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.FilterTypeDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.SubsetDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.endpoints.RestEndpoint; +import at.ac.tuwien.ifs.dbrepo.endpoints.RestEndpoint; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; diff --git a/dbrepo-data-service/rest-service/src/main/resources/application.yml b/dbrepo-data-service/rest-service/src/main/resources/application.yml index 41d23f4c7f6cdf97c8c6ebef2becd2f6d82cce8b..d8dec2e455c0d5fb199207deb3fe3ff3dc7fd21f 100644 --- a/dbrepo-data-service/rest-service/src/main/resources/application.yml +++ b/dbrepo-data-service/rest-service/src/main/resources/application.yml @@ -51,7 +51,7 @@ logging: pattern.console: "%d %highlight(%-5level) %msg%n" level: root: warn - at.ac.tuwien.ac.at.ifs.dbrepo.: "${LOG_LEVEL:info}" + at.ac.tuwien.ifs.dbrepo.: "${LOG_LEVEL:info}" org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver: debug dbrepo: endpoints: diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MariaDbConfig.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/config/MariaDbConfig.java similarity index 99% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MariaDbConfig.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/config/MariaDbConfig.java index af4f12dc84bce16f9f13f50447206b258c4ff6d8..eed50bf5fb3995d322f7aea2c679cfa719e1ce22 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MariaDbConfig.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/config/MariaDbConfig.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MariaDbContainerConfig.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/config/MariaDbContainerConfig.java similarity index 98% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MariaDbContainerConfig.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/config/MariaDbContainerConfig.java index 215d0aa146c248a7dde7dff8ecd13fd0f84e5ec3..6a6fbc7476b719be47fa0c17e49e82c65c623c0a 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MariaDbContainerConfig.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/config/MariaDbContainerConfig.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MariadbConfigTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/config/MariadbConfigTest.java similarity index 94% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MariadbConfigTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/config/MariadbConfigTest.java index 4068421d4fd9e1580b56c40ee5c0ac20672083db..eee4b27b4456a696680bb69b3dda49056f493707 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MariadbConfigTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/config/MariadbConfigTest.java @@ -1,6 +1,6 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.DatabaseService; +import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeAll; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/AccessEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/AccessEndpointUnitTest.java similarity index 98% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/AccessEndpointUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/AccessEndpointUnitTest.java index 99d01e5db0ee8ecece70595f38dae2a9f66d5169..a634c2b45239f85fd528cdb697242743d01291ea 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/AccessEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/AccessEndpointUnitTest.java @@ -1,13 +1,13 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoint; +package at.ac.tuwien.ifs.dbrepo.endpoint; import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; -import at.ac.tuwien.ac.at.ifs.dbrepo.endpoints.AccessEndpoint; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.AccessService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.endpoints.AccessEndpoint; +import at.ac.tuwien.ifs.dbrepo.service.AccessService; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/DatabaseEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/DatabaseEndpointUnitTest.java similarity index 96% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/DatabaseEndpointUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/DatabaseEndpointUnitTest.java index 1ced03dff9e9dfc2cb3d0f6820a6947838e45dcd..01a575b4609b4dd2a882f2bae6e40ba520229b74 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/DatabaseEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/DatabaseEndpointUnitTest.java @@ -1,15 +1,15 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoint; +package at.ac.tuwien.ifs.dbrepo.endpoint; import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; -import at.ac.tuwien.ac.at.ifs.dbrepo.endpoints.DatabaseEndpoint; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.AccessService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.ContainerService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.DatabaseService; +import at.ac.tuwien.ifs.dbrepo.endpoints.DatabaseEndpoint; +import at.ac.tuwien.ifs.dbrepo.service.AccessService; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.service.ContainerService; +import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/SubsetEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/SubsetEndpointUnitTest.java similarity index 98% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/SubsetEndpointUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/SubsetEndpointUnitTest.java index e6f5235539bb88e4b6018e301b9097ab74b95b36..023ed55471036fe464f8dea0cd300bb48d899f48 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/SubsetEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/SubsetEndpointUnitTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoint; +package at.ac.tuwien.ifs.dbrepo.endpoint; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryDto; @@ -6,12 +6,12 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryPersistDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.SubsetDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; -import at.ac.tuwien.ac.at.ifs.dbrepo.endpoints.SubsetEndpoint; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.DatabaseService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.StorageService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.SubsetService; +import at.ac.tuwien.ifs.dbrepo.endpoints.SubsetEndpoint; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; +import at.ac.tuwien.ifs.dbrepo.service.StorageService; +import at.ac.tuwien.ifs.dbrepo.service.SubsetService; import jakarta.servlet.http.HttpServletRequest; import lombok.extern.log4j.Log4j2; import org.apache.spark.sql.Dataset; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/TableEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/TableEndpointUnitTest.java similarity index 99% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/TableEndpointUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/TableEndpointUnitTest.java index 74fa52e20e8fba16a0ba5ee994e66439d207fbca..8bfd1c527fc1d4ad772aa22460219b306a611492 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/TableEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/TableEndpointUnitTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoint; +package at.ac.tuwien.ifs.dbrepo.endpoint; import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto; @@ -8,12 +8,12 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.table.*; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.internal.TableCreateDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; -import at.ac.tuwien.ac.at.ifs.dbrepo.endpoints.TableEndpoint; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.DatabaseService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.SubsetService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.TableService; +import at.ac.tuwien.ifs.dbrepo.endpoints.TableEndpoint; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; +import at.ac.tuwien.ifs.dbrepo.service.SubsetService; +import at.ac.tuwien.ifs.dbrepo.service.TableService; import jakarta.servlet.http.HttpServletRequest; import lombok.extern.log4j.Log4j2; import org.apache.spark.sql.Dataset; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/ViewEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/ViewEndpointUnitTest.java similarity index 98% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/ViewEndpointUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/ViewEndpointUnitTest.java index e8e1f2f461c13a6392916fc3c68e11d3aa6aac8a..9e0b1c4454f3a6abd12af702d5658b5b6bec9802 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/endpoint/ViewEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/endpoint/ViewEndpointUnitTest.java @@ -1,14 +1,14 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.endpoint; +package at.ac.tuwien.ifs.dbrepo.endpoint; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; -import at.ac.tuwien.ac.at.ifs.dbrepo.endpoints.ViewEndpoint; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.DatabaseService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.SubsetService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.ViewService; +import at.ac.tuwien.ifs.dbrepo.endpoints.ViewEndpoint; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; +import at.ac.tuwien.ifs.dbrepo.service.SubsetService; +import at.ac.tuwien.ifs.dbrepo.service.ViewService; import jakarta.servlet.http.HttpServletRequest; import lombok.extern.log4j.Log4j2; import org.apache.spark.sql.Dataset; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/InterceptorUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/gateway/InterceptorUnitTest.java similarity index 97% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/InterceptorUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/gateway/InterceptorUnitTest.java index fefc38887a4e288fd32ea6d136f2ce5595c334a2..b56888551b5da6ca4bb34cfb6f3bc96481ba3a04 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/InterceptorUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/gateway/InterceptorUnitTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.gateway; +package at.ac.tuwien.ifs.dbrepo.gateway; import at.ac.tuwien.ifs.dbrepo.core.api.keycloak.TokenDto; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/MetadataServiceGatewayUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/gateway/MetadataServiceGatewayUnitTest.java similarity index 99% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/MetadataServiceGatewayUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/gateway/MetadataServiceGatewayUnitTest.java index b7b8d29337088b950cf2c3e019b6573afa1f83ba..60860315edd4f23aea7dc43fc6960a628c2ef996 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/MetadataServiceGatewayUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/gateway/MetadataServiceGatewayUnitTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.gateway; +package at.ac.tuwien.ifs.dbrepo.gateway; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/handlers/ApiExceptionHandlerTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/handlers/ApiExceptionHandlerTest.java similarity index 99% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/handlers/ApiExceptionHandlerTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/handlers/ApiExceptionHandlerTest.java index a576c566d0919684b7d56c174774e6f4018d3dcb..ede6492560b8f0e76e3a329ef7561c6137d97cd7 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/handlers/ApiExceptionHandlerTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/handlers/ApiExceptionHandlerTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.handlers; +package at.ac.tuwien.ifs.dbrepo.handlers; import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/listener/DefaultListenerIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/listener/DefaultListenerIntegrationTest.java similarity index 90% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/listener/DefaultListenerIntegrationTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/listener/DefaultListenerIntegrationTest.java index a9eaa533fe339a990996496dca2449eff0f45609..dcb0af3d66d698f4db8eeffe6e7e13401848a9d5 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/listener/DefaultListenerIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/listener/DefaultListenerIntegrationTest.java @@ -1,13 +1,13 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.listener; +package at.ac.tuwien.ifs.dbrepo.listener; import at.ac.tuwien.ifs.dbrepo.core.exception.DatabaseNotFoundException; import at.ac.tuwien.ifs.dbrepo.core.exception.MetadataServiceException; import at.ac.tuwien.ifs.dbrepo.core.exception.RemoteUnavailableException; import at.ac.tuwien.ifs.dbrepo.core.exception.TableNotFoundException; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbContainerConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbContainerConfig; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -28,7 +28,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; import java.sql.SQLException; import java.util.HashMap; -import static at.ac.tuwien.ac.at.ifs.dbrepo.utils.RabbitMqUtils.buildMessage; +import static at.ac.tuwien.ifs.dbrepo.utils.RabbitMqUtils.buildMessage; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/listener/DefaultListenerUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/listener/DefaultListenerUnitTest.java similarity index 93% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/listener/DefaultListenerUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/listener/DefaultListenerUnitTest.java index d65af08386063b438e6143f4ca727f22e2f6c412..8b0eedcebebf8a01ef8cd7a42ea916afd30ebf7a 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/listener/DefaultListenerUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/listener/DefaultListenerUnitTest.java @@ -1,7 +1,7 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.listener; +package at.ac.tuwien.ifs.dbrepo.listener; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbContainerConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbContainerConfig; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -19,7 +19,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; import java.util.HashMap; -import static at.ac.tuwien.ac.at.ifs.dbrepo.utils.RabbitMqUtils.buildMessage; +import static at.ac.tuwien.ifs.dbrepo.utils.RabbitMqUtils.buildMessage; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.doThrow; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/MariaDbMapperUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mapper/MariaDbMapperUnitTest.java similarity index 97% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/MariaDbMapperUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mapper/MariaDbMapperUnitTest.java index f7afcd67ea3794dc8773ce9aaf0030239358a095..b85c3935ff93d56d6eae8b4b86356f18d3b33394 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/MariaDbMapperUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mapper/MariaDbMapperUnitTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.mapper; +package at.ac.tuwien.ifs.dbrepo.mapper; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import lombok.extern.log4j.Log4j2; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/ActuatorEndpointMvcTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/ActuatorEndpointMvcTest.java similarity index 97% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/ActuatorEndpointMvcTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/ActuatorEndpointMvcTest.java index 41cdce04d667f0d7aee1700022841af9ed9245f2..7d8c74437a1204dda49c7f18bdaba94ff668d01e 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/ActuatorEndpointMvcTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/ActuatorEndpointMvcTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.mvc; +package at.ac.tuwien.ifs.dbrepo.mvc; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import lombok.extern.log4j.Log4j2; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/OpenApiEndpointMvcTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/OpenApiEndpointMvcTest.java similarity index 98% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/OpenApiEndpointMvcTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/OpenApiEndpointMvcTest.java index 6c2e84044b27a87e2971e860abfb6c2c594d3793..102b50fe745bbe265b9e63d7a41a23008050b2ef 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/OpenApiEndpointMvcTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/OpenApiEndpointMvcTest.java @@ -1,7 +1,7 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.mvc; +package at.ac.tuwien.ifs.dbrepo.mvc; import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.endpoints.*; +import at.ac.tuwien.ifs.dbrepo.endpoints.*; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/PrometheusEndpointMvcTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/PrometheusEndpointMvcTest.java similarity index 94% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/PrometheusEndpointMvcTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/PrometheusEndpointMvcTest.java index 6f0e20b900fc3b4de0bd362eba9fbde0f41f8f0b..956e09e7d684ceb0dce1282a997f7c9dbf0641be 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/PrometheusEndpointMvcTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/PrometheusEndpointMvcTest.java @@ -1,15 +1,15 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.mvc; +package at.ac.tuwien.ifs.dbrepo.mvc; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.ImportDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryPersistDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TupleDeleteDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TupleDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TupleUpdateDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MetricsConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.endpoints.SubsetEndpoint; -import at.ac.tuwien.ac.at.ifs.dbrepo.endpoints.TableEndpoint; -import at.ac.tuwien.ac.at.ifs.dbrepo.endpoints.ViewEndpoint; -import at.ac.tuwien.ac.at.ifs.dbrepo.listener.DefaultListener; +import at.ac.tuwien.ifs.dbrepo.config.MetricsConfig; +import at.ac.tuwien.ifs.dbrepo.endpoints.SubsetEndpoint; +import at.ac.tuwien.ifs.dbrepo.endpoints.TableEndpoint; +import at.ac.tuwien.ifs.dbrepo.endpoints.ViewEndpoint; +import at.ac.tuwien.ifs.dbrepo.listener.DefaultListener; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import io.micrometer.observation.tck.TestObservationRegistry; import jakarta.servlet.http.HttpServletRequest; @@ -30,7 +30,7 @@ import org.springframework.test.web.servlet.MockMvc; import java.util.HashMap; import java.util.List; -import static at.ac.tuwien.ac.at.ifs.dbrepo.utils.RabbitMqUtils.buildMessage; +import static at.ac.tuwien.ifs.dbrepo.utils.RabbitMqUtils.buildMessage; import static io.micrometer.observation.tck.TestObservationRegistryAssert.assertThat; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/SubsetEndpointMvcTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/SubsetEndpointMvcTest.java similarity index 93% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/SubsetEndpointMvcTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/SubsetEndpointMvcTest.java index 42c53604853db64899793cb94da9b31ed4b6f83a..593954df956fc4e599bba665355b01a405e0611e 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/mvc/SubsetEndpointMvcTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/mvc/SubsetEndpointMvcTest.java @@ -1,7 +1,7 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.mvc; +package at.ac.tuwien.ifs.dbrepo.mvc; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.SubsetService; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.service.SubsetService; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.Test; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/AccessServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/AccessServiceIntegrationTest.java similarity index 96% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/AccessServiceIntegrationTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/AccessServiceIntegrationTest.java index 8f4e3af0341110380ac8f23ed6332c088277aad9..0834d8a34ce72be9e8dd2b22d8d49694fdf1d2ae 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/AccessServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/AccessServiceIntegrationTest.java @@ -1,8 +1,8 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbContainerConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbContainerConfig; import at.ac.tuwien.ifs.dbrepo.core.exception.DatabaseMalformedException; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import lombok.extern.log4j.Log4j2; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ContainerServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/ContainerServiceIntegrationTest.java similarity index 95% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ContainerServiceIntegrationTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/ContainerServiceIntegrationTest.java index 281002e157b5685bec2b16eabbbbcac6da2e8fcc..24f8be45f54d5ffc0a4e41f25e546fd8186e71e5 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ContainerServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/ContainerServiceIntegrationTest.java @@ -1,8 +1,8 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbContainerConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbContainerConfig; import at.ac.tuwien.ifs.dbrepo.core.exception.DatabaseMalformedException; import at.ac.tuwien.ifs.dbrepo.core.exception.QueryStoreCreateException; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/CredentialServiceUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/CredentialServiceUnitTest.java similarity index 98% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/CredentialServiceUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/CredentialServiceUnitTest.java index 885a8f4de97c84e8ce513ea853a31fbaeaa1a5a5..febf388d59531bb4e8a831b43a81facf19a7eb01 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/CredentialServiceUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/CredentialServiceUnitTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto; @@ -7,8 +7,8 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.impl.CacheServiceImpl; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.service.impl.CacheServiceImpl; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeEach; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/DatabaseServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/DatabaseServiceIntegrationTest.java similarity index 99% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/DatabaseServiceIntegrationTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/DatabaseServiceIntegrationTest.java index b2648eda53086fb79d63cf65c47442b141a8adfd..db1b29a29e5a4c720969c35b7778c29df347ccfc 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/DatabaseServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/DatabaseServiceIntegrationTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewColumnDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; @@ -16,8 +16,8 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.table.constraints.unique.Unique import at.ac.tuwien.ifs.dbrepo.core.api.database.table.internal.TableCreateDto; import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.internal.UpdateUserPasswordDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbContainerConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbContainerConfig; import at.ac.tuwien.ifs.dbrepo.core.exception.*; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import lombok.extern.log4j.Log4j2; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/QueueServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/QueueServiceIntegrationTest.java similarity index 91% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/QueueServiceIntegrationTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/QueueServiceIntegrationTest.java index 3ffe3a88216c0ef71c0259a5340bf17de0dad004..99e3f77f807c1d5c09c1f58773d31724006c42ee 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/QueueServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/QueueServiceIntegrationTest.java @@ -1,13 +1,13 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbContainerConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbContainerConfig; import at.ac.tuwien.ifs.dbrepo.core.exception.DatabaseNotFoundException; import at.ac.tuwien.ifs.dbrepo.core.exception.MetadataServiceException; import at.ac.tuwien.ifs.dbrepo.core.exception.RemoteUnavailableException; import at.ac.tuwien.ifs.dbrepo.core.exception.TableNotFoundException; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.impl.QueueServiceRabbitMqImpl; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.service.impl.QueueServiceRabbitMqImpl; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeAll; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/StorageServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/StorageServiceIntegrationTest.java similarity index 97% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/StorageServiceIntegrationTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/StorageServiceIntegrationTest.java index 1ebd52e3b8fae44aaf84b21a1d4d576001431181..4f1c6efe40329961c213a463c1aa2fccb2168a33 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/StorageServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/StorageServiceIntegrationTest.java @@ -1,6 +1,6 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.S3Config; +import at.ac.tuwien.ifs.dbrepo.config.S3Config; import at.ac.tuwien.ifs.dbrepo.core.api.ExportResourceDto; import at.ac.tuwien.ifs.dbrepo.core.exception.MalformedException; import at.ac.tuwien.ifs.dbrepo.core.exception.StorageNotFoundException; @@ -28,11 +28,9 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.testcontainers.containers.MinIOContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import software.amazon.awssdk.core.ResponseInputStream; import software.amazon.awssdk.core.sync.RequestBody; import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.s3.model.CreateBucketRequest; -import software.amazon.awssdk.services.s3.model.GetObjectResponse; import software.amazon.awssdk.services.s3.model.PutObjectRequest; import java.io.*; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/SubsetServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/SubsetServiceIntegrationTest.java similarity index 98% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/SubsetServiceIntegrationTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/SubsetServiceIntegrationTest.java index 0e1f9c4f428a832d84a7d130e5c3c095ac630ca5..abc992bf4bdb96233004f20e0bab866f5e2776aa 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/SubsetServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/SubsetServiceIntegrationTest.java @@ -1,11 +1,11 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.*; import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierBriefDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbContainerConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbContainerConfig; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import lombok.extern.log4j.Log4j2; import org.apache.spark.sql.Dataset; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/TableServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/TableServiceIntegrationTest.java similarity index 98% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/TableServiceIntegrationTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/TableServiceIntegrationTest.java index 2dc7fd8bcaf489e04f92a5d7be05083eaf1e7c88..8029dc3081fdb0187decf6028f18a5214448af0b 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/TableServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/TableServiceIntegrationTest.java @@ -1,11 +1,11 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.ImportDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.*; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnStatisticDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbContainerConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.S3Config; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbContainerConfig; +import at.ac.tuwien.ifs.dbrepo.config.S3Config; import at.ac.tuwien.ifs.dbrepo.core.exception.*; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import com.google.common.io.Files; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ViewServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/ViewServiceIntegrationTest.java similarity index 89% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ViewServiceIntegrationTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/ViewServiceIntegrationTest.java index 86152366f8ea417e2bba972ba83b67b891936021..55776ac7118544b10e7c090f8805dfc853d8cf89 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ViewServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/service/ViewServiceIntegrationTest.java @@ -1,7 +1,7 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.MariaDbContainerConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbConfig; +import at.ac.tuwien.ifs.dbrepo.config.MariaDbContainerConfig; import at.ac.tuwien.ifs.dbrepo.core.exception.ViewMalformedException; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import lombok.extern.log4j.Log4j2; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/FileUtils.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/utils/FileUtils.java similarity index 84% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/FileUtils.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/utils/FileUtils.java index e105d6839d03b21431ac651f00391ac8a9b55800..2642b56b96adbda28db3cf8c54f05667a8ab2679 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/FileUtils.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/utils/FileUtils.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.utils; +package at.ac.tuwien.ifs.dbrepo.utils; import java.io.File; import java.io.IOException; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/MariaDbUtilTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/utils/MariaDbUtilTest.java similarity index 97% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/MariaDbUtilTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/utils/MariaDbUtilTest.java index 8a5dcd8ca75d3b4c772d1437f2105e55f7fd9fd8..6880f744d565e592b54baa99e7c1f41601e1edbf 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/MariaDbUtilTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/utils/MariaDbUtilTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.utils; +package at.ac.tuwien.ifs.dbrepo.utils; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnTypeDto; import org.junit.jupiter.api.Test; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/RabbitMqUtils.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/utils/RabbitMqUtils.java similarity index 92% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/RabbitMqUtils.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/utils/RabbitMqUtils.java index f7a9b615c4723fbf36b366e1729886570734b1ac..a85d61b8b3e33c50674f990136541a668a8db724 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/RabbitMqUtils.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/utils/RabbitMqUtils.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.utils; +package at.ac.tuwien.ifs.dbrepo.utils; import org.springframework.amqp.core.Message; import org.springframework.amqp.core.MessageProperties; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/validation/EndpointValidatorUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/validation/EndpointValidatorUnitTest.java similarity index 97% rename from dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/validation/EndpointValidatorUnitTest.java rename to dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/validation/EndpointValidatorUnitTest.java index fba1ee837d90c1f8840686145734c4033ee26455..f63c7618bc3b3583a8e69dfcd7cc8b5f01387185 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ac/at/ifs/dbrepo/validation/EndpointValidatorUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/ac/tuwien/ifs/dbrepo/validation/EndpointValidatorUnitTest.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.validation; +package at.ac.tuwien.ifs.dbrepo.validation; import at.ac.tuwien.ifs.dbrepo.core.exception.PaginationException; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; diff --git a/dbrepo-data-service/rest-service/src/test/resources/application.properties b/dbrepo-data-service/rest-service/src/test/resources/application.properties index 8f658cab55bae085a012cce3706c4908b964451d..5086a6175bbd3c73974bba6d99725bddc3fa7459 100644 --- a/dbrepo-data-service/rest-service/src/test/resources/application.properties +++ b/dbrepo-data-service/rest-service/src/test/resources/application.properties @@ -24,7 +24,7 @@ spring.sql.init.schema-locations=classpath*:init/schema.sql spring.jpa.hibernate.ddl-auto=create # log -logging.level.at.ac.tuwien.ac.at.ifs.dbrepo.=trace +logging.level.at.ac.tuwien.ifs.dbrepo.=trace # rabbitmq spring.rabbitmq.host=localhost diff --git a/dbrepo-data-service/services/pom.xml b/dbrepo-data-service/services/pom.xml index 8d8d0a8edbbe4762a9f303d60854e3970746af93..c423837f3747f6b6ca34963e19883995a02ddcaa 100644 --- a/dbrepo-data-service/services/pom.xml +++ b/dbrepo-data-service/services/pom.xml @@ -4,19 +4,19 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <groupId>at.ac.tuwien.ac.at.ifs.dbrepo</groupId> - <artifactId>dbrepo-data-service</artifactId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>data-service</artifactId> <version>1.8.1</version> </parent> + <name>services</name> <artifactId>services</artifactId> - <name>dbrepo-data-service-services</name> <version>1.8.1</version> <dependencies> <dependency> - <groupId>at.ac.tuwien.ac.at.ifs.dbrepo</groupId> - <artifactId>dbrepo-data-service-querystore</artifactId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>querystore</artifactId> <version>1.8.1</version> </dependency> </dependencies> diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/MetadataMapper.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/MetadataMapper.java deleted file mode 100644 index b5cd8286cd5b4f1560f83b391b4498b122d2c18f..0000000000000000000000000000000000000000 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/MetadataMapper.java +++ /dev/null @@ -1,88 +0,0 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.mapper; - -import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; -import at.ac.tuwien.ifs.dbrepo.core.api.container.image.ImageDto; -import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseBriefDto; -import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; -import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewColumnDto; -import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; -import at.ac.tuwien.ifs.dbrepo.core.api.database.internal.CreateDatabaseDto; -import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableBriefDto; -import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableDto; -import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnDto; -import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierBriefDto; -import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierDto; -import at.ac.tuwien.ifs.dbrepo.core.api.keycloak.TokenDto; -import at.ac.tuwien.ifs.dbrepo.core.api.user.UserBriefDto; -import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; -import org.keycloak.representations.AccessTokenResponse; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.Mappings; - -import java.util.UUID; - -@Mapper(componentModel = "spring", imports = {DatabaseDto.class, ContainerDto.class, ImageDto.class}) -public interface MetadataMapper { - - org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(MetadataMapper.class); - - ContainerDto containerDtoToContainerDto(ContainerDto data); - - @Mappings({ - @Mapping(target = "id", source = "userId"), - @Mapping(target = "username", source = "privilegedUsername"), - @Mapping(target = "password", source = "privilegedPassword"), - }) - UserDto createDatabaseDtoToPrivilegedUserDto(CreateDatabaseDto data); - - @Mappings({ - @Mapping(target = "username", source = "readonlyUsername"), - @Mapping(target = "password", source = "readonlyPassword"), - }) - UserDto createDatabaseDtoToReadonlyUserDto(CreateDatabaseDto data); - - DatabaseBriefDto databaseDtoToDatabaseBriefDto(DatabaseDto data); - - ColumnDto viewColumnDtoToColumnDto(ViewColumnDto data); - - ViewColumnDto columnDtoToViewColumnDto(ColumnDto data); - - TableDto tableDtoToTableDto(TableDto data); - - ViewDto viewDtoToViewDto(ViewDto data); - - ContainerDto ContainerDtoToContainerDto(ContainerDto data); - - UserDto userDtoToUserDto(UserDto data); - - @Mappings({ - @Mapping(target = "accessToken", source = "token") - }) - TokenDto accessTokenResponseToTokenDto(AccessTokenResponse data); - - UserBriefDto userDtoToUserBriefDto(UserDto data); - - TableBriefDto tableDtoToTableBriefDto(TableDto data); - - IdentifierBriefDto identifierDtoToIdentifierBriefDto(IdentifierDto data); - - default String metricToUri(String baseUrl, UUID databaseId, UUID tableId, UUID subsetId, UUID viewId) { - final StringBuilder uri = new StringBuilder(baseUrl) - .append("/database/") - .append(databaseId); - if (tableId != null) { - uri.append("/table/") - .append(tableId); - } else if (subsetId != null) { - uri.append("/subset/") - .append(subsetId); - } else if (viewId != null) { - uri.append("/view/") - .append(viewId); - } - log.trace("count uri: {}", uri); - return uri.toString(); - } - -} diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/auth/AuthTokenFilter.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/auth/AuthTokenFilter.java similarity index 99% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/auth/AuthTokenFilter.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/auth/AuthTokenFilter.java index 2073c384e8722066dfbf627f2dd3fdea16f96d48..1e748a391b887c52769dabfdf74eef5a992ac4fc 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/auth/AuthTokenFilter.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/auth/AuthTokenFilter.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.auth; +package at.ac.tuwien.ifs.dbrepo.auth; import at.ac.tuwien.ifs.dbrepo.core.api.auth.RealmAccessDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDetailsDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/auth/BasicAuthenticationProvider.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/auth/BasicAuthenticationProvider.java similarity index 93% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/auth/BasicAuthenticationProvider.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/auth/BasicAuthenticationProvider.java index b1811dfbf6618433506c770b3eef567f95819003..5ab64107cd4dc80be7b16a8db0db4815372cc3fc 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/auth/BasicAuthenticationProvider.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/auth/BasicAuthenticationProvider.java @@ -1,7 +1,7 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.auth; +package at.ac.tuwien.ifs.dbrepo.auth; import at.ac.tuwien.ifs.dbrepo.core.api.keycloak.TokenDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CredentialService; +import at.ac.tuwien.ifs.dbrepo.service.CredentialService; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AuthenticationManager; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/auth/InternalRequestInterceptor.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/auth/InternalRequestInterceptor.java similarity index 90% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/auth/InternalRequestInterceptor.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/auth/InternalRequestInterceptor.java index 07cf01cc6f26e373f49fa735aa2f2aa99d719bd4..09076f95b993b17f2b53112d96ceb8bd6c4a5dae 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/auth/InternalRequestInterceptor.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/auth/InternalRequestInterceptor.java @@ -1,8 +1,8 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.auth; +package at.ac.tuwien.ifs.dbrepo.auth; import at.ac.tuwien.ifs.dbrepo.core.api.keycloak.TokenDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.GatewayConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CredentialService; +import at.ac.tuwien.ifs.dbrepo.config.GatewayConfig; +import at.ac.tuwien.ifs.dbrepo.service.CredentialService; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/CacheConfig.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/CacheConfig.java similarity index 97% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/CacheConfig.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/CacheConfig.java index 0c8120565a57ce6e4ab06290a29a26f092245182..a40030b8b4dd89e82c5190f060ae970b03f39cb2 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/CacheConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/CacheConfig.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/GatewayConfig.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/GatewayConfig.java similarity index 88% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/GatewayConfig.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/GatewayConfig.java index 09e9a249ffbac16a1b500830ccf1c12572a37cec..12bd674a50388badc118535f9192609adf95d130 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/GatewayConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/GatewayConfig.java @@ -1,7 +1,7 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; -import at.ac.tuwien.ac.at.ifs.dbrepo.auth.InternalRequestInterceptor; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CredentialService; +import at.ac.tuwien.ifs.dbrepo.auth.InternalRequestInterceptor; +import at.ac.tuwien.ifs.dbrepo.service.CredentialService; import lombok.Getter; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/JacksonConfig.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/JacksonConfig.java similarity index 95% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/JacksonConfig.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/JacksonConfig.java index b3e0c0a96630826b7d501a377b0c56fc204771c7..567d223eb31cedc2fb0445854e8da2509f212905 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/JacksonConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/JacksonConfig.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/KeycloakConfig.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/KeycloakConfig.java similarity index 95% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/KeycloakConfig.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/KeycloakConfig.java index 3d006a366568b5000bfd4a0de9555df3351390f8..36077309f8ae54654eef4d9fa66d272f42ff4a62 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/KeycloakConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/KeycloakConfig.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; import lombok.Getter; import org.keycloak.admin.client.Keycloak; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MetricsConfig.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/MetricsConfig.java similarity index 92% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MetricsConfig.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/MetricsConfig.java index 32774b8c16ff2c9866b63dfc0559134106fe008f..4be6cd10e66137817f4a0b4b91ec81a723886648 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/MetricsConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/MetricsConfig.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; import io.micrometer.observation.ObservationRegistry; import io.micrometer.observation.aop.ObservedAspect; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/QueryConfig.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/QueryConfig.java similarity index 94% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/QueryConfig.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/QueryConfig.java index 3b5541d741a65fae1ca485f35be4acb225f09a98..eed47bdf467947c821b2c8ef0be0dfbd4fdbe385 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/QueryConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/QueryConfig.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; import lombok.Getter; import lombok.extern.log4j.Log4j2; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/RabbitConfig.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/RabbitConfig.java similarity index 95% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/RabbitConfig.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/RabbitConfig.java index 2ea4260c335dfb438dd44ce25c48f4c069c1116f..347aca691a734badc1fc9eb9bce86bbc29758bed 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/RabbitConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/RabbitConfig.java @@ -1,6 +1,6 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; -import at.ac.tuwien.ac.at.ifs.dbrepo.listener.DefaultListener; +import at.ac.tuwien.ifs.dbrepo.listener.DefaultListener; import lombok.Getter; import lombok.extern.log4j.Log4j2; import org.springframework.amqp.rabbit.connection.ConnectionFactory; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/S3Config.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/S3Config.java similarity index 96% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/S3Config.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/S3Config.java index c9f8a5d49bc9efcf38b2314a50c4b0540f083d47..e9d1aa41a966c9d907007d7228c6ac72e81f67b6 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/S3Config.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/S3Config.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; import lombok.Getter; import lombok.extern.log4j.Log4j2; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/SparkConfig.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/SparkConfig.java similarity index 97% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/SparkConfig.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/SparkConfig.java index 223df5b1c063312642f8b0dc20247d7863f87dbb..fe9421f2d0746087375e5568f81258b20500a52b 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/SparkConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/SparkConfig.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; import lombok.Getter; import lombok.extern.log4j.Log4j2; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/WebSecurityConfig.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/WebSecurityConfig.java similarity index 94% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/WebSecurityConfig.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/WebSecurityConfig.java index a834ed2d8081dfd3ebcdb69e6dcec3eb57790f04..432326ff78619f58773e06b720c3f24fd9b8a6e5 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/config/WebSecurityConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/config/WebSecurityConfig.java @@ -1,8 +1,8 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.config; +package at.ac.tuwien.ifs.dbrepo.config; -import at.ac.tuwien.ac.at.ifs.dbrepo.auth.AuthTokenFilter; -import at.ac.tuwien.ac.at.ifs.dbrepo.auth.BasicAuthenticationProvider; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CredentialService; +import at.ac.tuwien.ifs.dbrepo.auth.AuthTokenFilter; +import at.ac.tuwien.ifs.dbrepo.auth.BasicAuthenticationProvider; +import at.ac.tuwien.ifs.dbrepo.service.CredentialService; import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; import io.swagger.v3.oas.annotations.security.SecurityScheme; import jakarta.servlet.http.HttpServletResponse; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/KeycloakGateway.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/KeycloakGateway.java similarity index 85% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/KeycloakGateway.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/KeycloakGateway.java index 0577b6a5a9be291e2b723d3b735c9d496b2ccbc2..3d46ddfd9103906023fa4adcb72d72017fd3a7a5 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/KeycloakGateway.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/KeycloakGateway.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.gateway; +package at.ac.tuwien.ifs.dbrepo.gateway; import at.ac.tuwien.ifs.dbrepo.core.api.keycloak.TokenDto; import org.springframework.security.authentication.BadCredentialsException; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/MetadataServiceGateway.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/MetadataServiceGateway.java similarity index 99% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/MetadataServiceGateway.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/MetadataServiceGateway.java index 6a6acdba049fd61db07c024bbfc6163dc268f202..4ea56d15945b07a4d94bb16842d144311975af84 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/MetadataServiceGateway.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/MetadataServiceGateway.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.gateway; +package at.ac.tuwien.ifs.dbrepo.gateway; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/impl/KeycloakGatewayImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/impl/KeycloakGatewayImpl.java similarity index 77% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/impl/KeycloakGatewayImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/impl/KeycloakGatewayImpl.java index e3a439a3765d11b6c9b3080e15608bd55622d4ae..b5b623551137187b33b28e1157f6b6463229db0f 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/impl/KeycloakGatewayImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/impl/KeycloakGatewayImpl.java @@ -1,9 +1,9 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.gateway.impl; +package at.ac.tuwien.ifs.dbrepo.gateway.impl; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.KeycloakConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.KeycloakGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MetadataMapper; +import at.ac.tuwien.ifs.dbrepo.config.KeycloakConfig; +import at.ac.tuwien.ifs.dbrepo.gateway.KeycloakGateway; import at.ac.tuwien.ifs.dbrepo.core.api.keycloak.TokenDto; +import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; import jakarta.ws.rs.NotAuthorizedException; import lombok.extern.log4j.Log4j2; import org.keycloak.OAuth2Constants; @@ -17,13 +17,13 @@ import org.springframework.stereotype.Service; @Service public class KeycloakGatewayImpl implements KeycloakGateway { + private final DataMapper dataMapper; private final KeycloakConfig keycloakConfig; - private final MetadataMapper metadataMapper; @Autowired - public KeycloakGatewayImpl(KeycloakConfig keycloakConfig, MetadataMapper metadataMapper) { + public KeycloakGatewayImpl(DataMapper dataMapper, KeycloakConfig keycloakConfig) { + this.dataMapper = dataMapper; this.keycloakConfig = keycloakConfig; - this.metadataMapper = metadataMapper; } @Override @@ -40,7 +40,7 @@ public class KeycloakGatewayImpl implements KeycloakGateway { .username(username) .password(password) .build()) { - return metadataMapper.accessTokenResponseToTokenDto(userKeycloak.tokenManager() + return dataMapper.accessTokenResponseToTokenDto(userKeycloak.tokenManager() .getAccessToken()); } catch (NotAuthorizedException e) { log.error("Failed to obtain user token: {}", e.getMessage()); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/impl/MetadataServiceGatewayImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/impl/MetadataServiceGatewayImpl.java similarity index 96% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/impl/MetadataServiceGatewayImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/impl/MetadataServiceGatewayImpl.java index a30c782c9dba8a4a662f5f11be2ca530bfe725e0..16e89cfc1a40f01889b23d616db4130d6a4ddd5a 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/gateway/impl/MetadataServiceGatewayImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/gateway/impl/MetadataServiceGatewayImpl.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.gateway.impl; +package at.ac.tuwien.ifs.dbrepo.gateway.impl; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto; @@ -9,9 +9,9 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableDto; import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierBriefDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.GatewayConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MetadataMapper; +import at.ac.tuwien.ifs.dbrepo.config.GatewayConfig; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; import jakarta.validation.constraints.NotNull; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -32,16 +32,16 @@ import java.util.UUID; @Service public class MetadataServiceGatewayImpl implements MetadataServiceGateway { - private final RestTemplate internalRestTemplate; + private final DataMapper dataMapper; private final GatewayConfig gatewayConfig; - private final MetadataMapper metadataMapper; + private final RestTemplate internalRestTemplate; @Autowired - public MetadataServiceGatewayImpl(@Qualifier("internalRestTemplate") RestTemplate internalRestTemplate, - GatewayConfig gatewayConfig, MetadataMapper metadataMapper) { - this.internalRestTemplate = internalRestTemplate; + public MetadataServiceGatewayImpl(DataMapper dataMapper, GatewayConfig gatewayConfig, + @Qualifier("internalRestTemplate") RestTemplate internalRestTemplate) { + this.dataMapper = dataMapper; this.gatewayConfig = gatewayConfig; - this.metadataMapper = metadataMapper; + this.internalRestTemplate = internalRestTemplate; } @Override @@ -75,7 +75,7 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { log.error("Failed to find container with id {}: body is empty", containerId); throw new MetadataServiceException("Failed to find container with id " + containerId + ": body is empty"); } - final ContainerDto container = metadataMapper.containerDtoToContainerDto(response.getBody()); + final ContainerDto container = dataMapper.containerDtoToContainerDto(response.getBody()); container.setHost(response.getHeaders().get("X-Host").get(0)); container.setPort(Integer.parseInt(response.getHeaders().get("X-Port").get(0))); container.setUsername(response.getHeaders().get("X-Username").get(0)); @@ -148,7 +148,7 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { log.error("Failed to find table with id {}: body is empty", id); throw new MetadataServiceException("Failed to find table with id " + id + ": body is empty"); } - final TableDto table = metadataMapper.tableDtoToTableDto(response.getBody()); + final TableDto table = dataMapper.tableDtoToTableDto(response.getBody()); table.setLastRetrieved(Instant.now()); return table; } @@ -176,7 +176,7 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { log.error("Failed to find view with id {}: body is empty", id); throw new MetadataServiceException("Failed to find view with id " + id + ": body is empty"); } - final ViewDto view = metadataMapper.viewDtoToViewDto(response.getBody()); + final ViewDto view = dataMapper.viewDtoToViewDto(response.getBody()); view.setLastRetrieved(Instant.now()); return view; } @@ -211,7 +211,7 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { log.error("Failed to find user with id {}: body is empty", userId); throw new MetadataServiceException("Failed to find user with id " + userId + ": body is empty"); } - final UserDto user = metadataMapper.userDtoToUserDto(response.getBody()); + final UserDto user = dataMapper.userDtoToUserDto(response.getBody()); user.setUsername(response.getHeaders().get("X-Username").get(0)); user.setPassword(response.getHeaders().get("X-Password").get(0)); user.setLastRetrieved(Instant.now()); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/listener/DefaultListener.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/listener/DefaultListener.java similarity index 95% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/listener/DefaultListener.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/listener/DefaultListener.java index 59e34fbe65db283c936b84e64cf7d34b78c86fcd..436cadc3d3e63680b0953cf3633a54b60faa33b4 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/listener/DefaultListener.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/listener/DefaultListener.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.listener; +package at.ac.tuwien.ifs.dbrepo.listener; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableDto; @@ -6,8 +6,8 @@ import at.ac.tuwien.ifs.dbrepo.core.exception.DatabaseNotFoundException; import at.ac.tuwien.ifs.dbrepo.core.exception.MetadataServiceException; import at.ac.tuwien.ifs.dbrepo.core.exception.RemoteUnavailableException; import at.ac.tuwien.ifs.dbrepo.core.exception.TableNotFoundException; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.QueueService; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.service.QueueService; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import io.micrometer.observation.annotation.Observed; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/DataMapper.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/mapper/DataMapper.java similarity index 89% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/DataMapper.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/mapper/DataMapper.java index 5408f338b2ea5b423bec09c7af2fd35e3e9831ee..ddf7f9a882ab9b460f101b09a4a83b7c3b41e410 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/DataMapper.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/mapper/DataMapper.java @@ -1,8 +1,11 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.mapper; +package at.ac.tuwien.ifs.dbrepo.mapper; +import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; +import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseBriefDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewColumnDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; +import at.ac.tuwien.ifs.dbrepo.core.api.database.internal.CreateDatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.*; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.*; @@ -13,12 +16,19 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.table.constraints.foreign.Forei import at.ac.tuwien.ifs.dbrepo.core.api.database.table.constraints.foreign.ReferenceTypeDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.constraints.primary.PrimaryKeyDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.constraints.unique.UniqueDto; +import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierBriefDto; +import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierDto; +import at.ac.tuwien.ifs.dbrepo.core.api.keycloak.TokenDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserBriefDto; +import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; import at.ac.tuwien.ifs.dbrepo.core.exception.TableNotFoundException; import org.apache.hadoop.shaded.com.google.common.hash.Hashing; import org.apache.hadoop.shaded.org.apache.commons.io.FileUtils; import org.jetbrains.annotations.NotNull; +import org.keycloak.representations.AccessTokenResponse; import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.Mappings; import java.io.File; import java.io.IOException; @@ -42,15 +52,64 @@ public interface DataMapper { DateTimeFormatter mariaDbFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss[.SSSSSS]") .withZone(ZoneId.of("UTC")); - /* redundant */ - ColumnBriefDto columnDtoToColumnBriefDto(ColumnDto data); + ContainerDto containerDtoToContainerDto(ContainerDto data); - /* redundant */ - TableBriefDto tableDtoToTableBriefDto(TableDto data); + @Mappings({ + @Mapping(target = "id", source = "userId"), + @Mapping(target = "username", source = "privilegedUsername"), + @Mapping(target = "password", source = "privilegedPassword"), + }) + UserDto createDatabaseDtoToPrivilegedUserDto(CreateDatabaseDto data); + + @Mappings({ + @Mapping(target = "username", source = "readonlyUsername"), + @Mapping(target = "password", source = "readonlyPassword"), + }) + UserDto createDatabaseDtoToReadonlyUserDto(CreateDatabaseDto data); + + DatabaseBriefDto databaseDtoToDatabaseBriefDto(DatabaseDto data); - /* redundant */ ColumnDto viewColumnDtoToColumnDto(ViewColumnDto data); + ViewColumnDto columnDtoToViewColumnDto(ColumnDto data); + + TableDto tableDtoToTableDto(TableDto data); + + ViewDto viewDtoToViewDto(ViewDto data); + + UserDto userDtoToUserDto(UserDto data); + + @Mappings({ + @Mapping(target = "accessToken", source = "token") + }) + TokenDto accessTokenResponseToTokenDto(AccessTokenResponse data); + + UserBriefDto userDtoToUserBriefDto(UserDto data); + + TableBriefDto tableDtoToTableBriefDto(TableDto data); + + IdentifierBriefDto identifierDtoToIdentifierBriefDto(IdentifierDto data); + + default String metricToUri(String baseUrl, UUID databaseId, UUID tableId, UUID subsetId, UUID viewId) { + final StringBuilder uri = new StringBuilder(baseUrl) + .append("/database/") + .append(databaseId); + if (tableId != null) { + uri.append("/table/") + .append(tableId); + } else if (subsetId != null) { + uri.append("/subset/") + .append(subsetId); + } else if (viewId != null) { + uri.append("/view/") + .append(viewId); + } + log.trace("count uri: {}", uri); + return uri.toString(); + } + + ColumnBriefDto columnDtoToColumnBriefDto(ColumnDto data); + ForeignKeyBriefDto foreignKeyDtoToForeignKeyBriefDto(ForeignKeyDto data); default String rabbitMqTupleToInsertOrUpdateQuery(String databaseName, TableDto table, Map<String, Object> data) { diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/MariaDbMapper.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/mapper/MariaDbMapper.java similarity index 99% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/MariaDbMapper.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/mapper/MariaDbMapper.java index 2abcc51ff305b49583937ffb89b38b83832c165a..21707c0b6d35c57c688c27e4434b02123fab3e40 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/mapper/MariaDbMapper.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/mapper/MariaDbMapper.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.mapper; +package at.ac.tuwien.ifs.dbrepo.mapper; import at.ac.tuwien.ifs.dbrepo.core.api.container.image.OperatorDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; @@ -15,7 +15,7 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnTypeDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.CreateTableColumnDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.utils.MariaDbUtil; +import at.ac.tuwien.ifs.dbrepo.utils.MariaDbUtil; import org.jooq.*; import org.jooq.Record; import org.jooq.conf.ParamType; @@ -39,7 +39,7 @@ import java.util.stream.Collectors; import static org.jooq.impl.DSL.field; import static org.jooq.impl.DSL.name; -@Mapper(componentModel = "spring", uses = {MetadataMapper.class, DataMapper.class}) +@Mapper(componentModel = "spring", uses = {DataMapper.class, DataMapper.class}) public interface MariaDbMapper { org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(MariaDbMapper.class); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/AccessService.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/AccessService.java similarity index 97% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/AccessService.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/AccessService.java index 18b821f86d15a0ba12ad1d7cbdac3568ef363405..966aafa6080861e4f88831c238a881d297245128 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/AccessService.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/AccessService.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/CacheService.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/CacheService.java similarity index 98% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/CacheService.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/CacheService.java index 3304ab8e1df25b69bb7d01d5cc434617753ac8d3..efe211491f13cad1c3d824a86b66e71672614e7b 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/CacheService.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/CacheService.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto; @@ -25,7 +25,7 @@ public interface CacheService { * @throws RemoteUnavailableException The remote service is not available. * @throws MetadataServiceException The remote service returned invalid data. */ - DatabaseDto getDatabase(UUID id, Boolean forceReload) throws DatabaseNotFoundException, RemoteUnavailableException, + DatabaseDto getDatabase(UUID id, boolean forceReload) throws DatabaseNotFoundException, RemoteUnavailableException, MetadataServiceException; /** diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ContainerService.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/ContainerService.java similarity index 96% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ContainerService.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/ContainerService.java index 4baf82c7d2bdc2839e20fb73a737ce0f454518b5..a38bc6688bc7680d71a6a10cb51c209a171d73e0 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ContainerService.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/ContainerService.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/CredentialService.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/CredentialService.java similarity index 90% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/CredentialService.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/CredentialService.java index b1da6ede1169a9ae26483c56a7e0c888f4c161eb..4a54849006fa031872af1b1aa43938036e3ac243 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/CredentialService.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/CredentialService.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.keycloak.TokenDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/DatabaseService.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/DatabaseService.java similarity index 98% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/DatabaseService.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/DatabaseService.java index 3f9a8778aa4bc168270115b9f9e0ffaaedd5c8cd..6fc9e273df1c9a4d757ab73fced91a0e2378b6a7 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/DatabaseService.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/DatabaseService.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/QueueService.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/QueueService.java similarity index 92% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/QueueService.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/QueueService.java index dfeb996755a4b400338e131ad0b5613dc51df8f8..2a53210f314d3b826b7d336a759380bdecd47f51 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/QueueService.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/QueueService.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/StorageService.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/StorageService.java similarity index 98% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/StorageService.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/StorageService.java index 88a3fd4d2901e642ab7674988f3f776d687a30b1..19540194abbb08be71fe741e5d0b9586ec992e47 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/StorageService.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/StorageService.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.ExportResourceDto; import at.ac.tuwien.ifs.dbrepo.core.exception.MalformedException; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/SubsetService.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/SubsetService.java similarity index 99% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/SubsetService.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/SubsetService.java index 7b85908a764908c095326abab61330a7f52f2920..eb341c95eb13ddd824f5ec177dd273094e4f47fc 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/SubsetService.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/SubsetService.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/TableService.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/TableService.java similarity index 99% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/TableService.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/TableService.java index 6cc72d52ec2605b3bcea73a0c5348bd2177048b2..f2b246eb8b457d5ec4f337e51cc0a5a8ec723ff3 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/TableService.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/TableService.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.ImportDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ViewService.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/ViewService.java similarity index 96% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ViewService.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/ViewService.java index b2041019713b89a953405b5c8e4bcd3ccc4dc008..60bd5dd180c6f5d4f4f2a1c8332a328586c3078e 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/ViewService.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/ViewService.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service; +package at.ac.tuwien.ifs.dbrepo.service; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/AccessServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/AccessServiceMariaDbImpl.java similarity index 86% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/AccessServiceMariaDbImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/AccessServiceMariaDbImpl.java index 4f1cc7ac6504efe64bfb1ed515cd55e9ccf15fe0..7e02560b78df6a481014433adde1b8952e7286af 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/AccessServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/AccessServiceMariaDbImpl.java @@ -1,11 +1,11 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; import at.ac.tuwien.ifs.dbrepo.core.exception.DatabaseMalformedException; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MariaDbMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.AccessService; +import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; +import at.ac.tuwien.ifs.dbrepo.service.AccessService; import com.mchange.v2.c3p0.ComboPooledDataSource; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -42,22 +42,22 @@ public class AccessServiceMariaDbImpl extends DataConnector implements AccessSer long start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.databaseCreateUserQuery(user.getUsername(), user.getPassword())) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); /* grant access */ final String grants = access != AccessTypeDto.READ ? grantDefaultWrite : grantDefaultRead; start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.databaseGrantPrivilegesQuery(user.getUsername(), grants)) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); /* grant query store */ start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.databaseGrantProcedureQuery(user.getUsername(), "store_query")) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); /* apply access rights */ start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.databaseFlushPrivilegesQuery()); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); @@ -81,7 +81,7 @@ public class AccessServiceMariaDbImpl extends DataConnector implements AccessSer final long start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.databaseGrantPrivilegesQuery(user.getUsername(), grants)) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); /* apply access rights */ connection.prepareStatement(mariaDbMapper.databaseFlushPrivilegesQuery()); connection.commit(); @@ -105,12 +105,12 @@ public class AccessServiceMariaDbImpl extends DataConnector implements AccessSer long start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.databaseRevokePrivilegesQuery(user.getUsername())) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); /* apply access rights */ start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.databaseFlushPrivilegesQuery()) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/CacheServiceImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/CacheServiceImpl.java similarity index 96% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/CacheServiceImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/CacheServiceImpl.java index 44fbfa36f45b965fbb38384a10b9158365e3356b..1ad95511304912d1b4304e0bcbd1d94e1a162b87 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/CacheServiceImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/CacheServiceImpl.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto; @@ -8,9 +8,9 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableStatisticDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CacheService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.TableService; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.service.CacheService; +import at.ac.tuwien.ifs.dbrepo.service.TableService; import com.github.benmanes.caffeine.cache.Cache; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -51,7 +51,7 @@ public class CacheServiceImpl implements CacheService { } @Override - public DatabaseDto getDatabase(UUID id, Boolean forceReload) throws DatabaseNotFoundException, RemoteUnavailableException, + public DatabaseDto getDatabase(UUID id, boolean forceReload) throws DatabaseNotFoundException, RemoteUnavailableException, MetadataServiceException { if (!forceReload) { final DatabaseDto cacheDatabase = databaseCache.getIfPresent(id); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/ContainerServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ContainerServiceMariaDbImpl.java similarity index 85% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/ContainerServiceMariaDbImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ContainerServiceMariaDbImpl.java index 2747b1cdc4b429c620030bea6f8eaa581cc7737d..1860f488d342a1665770b792c91abddf44deed04 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/ContainerServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ContainerServiceMariaDbImpl.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; @@ -6,9 +6,9 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.internal.CreateDatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserBriefDto; import at.ac.tuwien.ifs.dbrepo.core.exception.DatabaseMalformedException; import at.ac.tuwien.ifs.dbrepo.core.exception.QueryStoreCreateException; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.RabbitConfig; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MariaDbMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.ContainerService; +import at.ac.tuwien.ifs.dbrepo.config.RabbitConfig; +import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; +import at.ac.tuwien.ifs.dbrepo.service.ContainerService; import com.mchange.v2.c3p0.ComboPooledDataSource; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -40,7 +40,7 @@ public class ContainerServiceMariaDbImpl extends DataConnector implements Contai final long start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.databaseCreateDatabaseQuery(data.getInternalName())) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); @@ -73,19 +73,19 @@ public class ContainerServiceMariaDbImpl extends DataConnector implements Contai long start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.queryStoreCreateTableRawQuery()) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.queryStoreCreateHashTableProcedureRawQuery()) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.queryStoreCreateStoreQueryProcedureRawQuery()) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.queryStoreCreateInternalStoreQueryProcedureRawQuery()) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/CredentialServiceImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/CredentialServiceImpl.java similarity index 89% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/CredentialServiceImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/CredentialServiceImpl.java index ed9420a984154b84c50cebbacdd704c8f2262ea5..9d708e28d87e963370920e2f1e2cdf2ea71049d1 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/CredentialServiceImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/CredentialServiceImpl.java @@ -1,9 +1,9 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; -import at.ac.tuwien.ac.at.ifs.dbrepo.auth.AuthTokenFilter; +import at.ac.tuwien.ifs.dbrepo.auth.AuthTokenFilter; import at.ac.tuwien.ifs.dbrepo.core.api.keycloak.TokenDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.KeycloakGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.CredentialService; +import at.ac.tuwien.ifs.dbrepo.gateway.KeycloakGateway; +import at.ac.tuwien.ifs.dbrepo.service.CredentialService; import com.github.benmanes.caffeine.cache.Cache; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/DataConnector.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/DataConnector.java similarity index 94% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/DataConnector.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/DataConnector.java index cb476e79ecfb4168c7565226b93d186ee6e32ebb..1100b0e7b98adf975e59c23e61ea4cd9e76ebf19 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/DataConnector.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/DataConnector.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; @@ -14,6 +14,8 @@ import java.sql.SQLException; @Service public abstract class DataConnector { + public static final String EXECUTED_STATEMENT_MS = "executed statement in {} ms"; + public ComboPooledDataSource getDataSource(ContainerDto container, String databaseName) { final ComboPooledDataSource dataSource = new ComboPooledDataSource(); dataSource.setJdbcUrl(getJdbcUrl(container, databaseName)); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/DatabaseServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/DatabaseServiceMariaDbImpl.java similarity index 90% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/DatabaseServiceMariaDbImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/DatabaseServiceMariaDbImpl.java index f4a496b3861ea80e3180f2dbadb689b8a4a32897..5db0fd57136161caf87c6038f201102aafc8c294 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/DatabaseServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/DatabaseServiceMariaDbImpl.java @@ -1,9 +1,8 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.DataMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MariaDbMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MetadataMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.DatabaseService; +import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; +import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; +import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableDto; @@ -31,14 +30,11 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas private final DataMapper dataMapper; private final MariaDbMapper mariaDbMapper; - private final MetadataMapper metadataMapper; @Autowired - public DatabaseServiceMariaDbImpl(DataMapper dataMapper, MariaDbMapper mariaDbMapper, - MetadataMapper metadataMapper) { + public DatabaseServiceMariaDbImpl(DataMapper dataMapper, MariaDbMapper mariaDbMapper) { this.dataMapper = dataMapper; this.mariaDbMapper = mariaDbMapper; - this.metadataMapper = metadataMapper; } @Override @@ -53,7 +49,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas statement1.setString(2, viewName); log.trace("1={}, 2={}", database.getInternalName(), viewName); final ResultSet resultSet1 = statement1.executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); if (!resultSet1.next()) { throw new ViewNotFoundException("Failed to find view in the information schema"); } @@ -67,7 +63,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas statement2.setString(2, view.getInternalName()); log.trace("1={}, 2={}", database.getInternalName(), view.getInternalName()); final ResultSet resultSet2 = statement2.executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); TableDto tmp = TableDto.builder() .columns(new LinkedList<>()) .build(); @@ -76,7 +72,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas } view.setColumns(tmp.getColumns() .stream() - .map(metadataMapper::columnDtoToViewColumnDto) + .map(dataMapper::columnDtoToViewColumnDto) .toList()); view.getColumns() .forEach(column -> column.setDatabaseId(database.getId())); @@ -99,7 +95,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas connection.prepareStatement(mariaDbMapper.tableCreateDtoToCreateTableRawQuery(database.getInternalName(), data)) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); @@ -141,7 +137,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final long start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.viewCreateRawQuery(view.getInternalName(), query)) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); /* select view columns */ final PreparedStatement statement2 = connection.prepareStatement(mariaDbMapper.databaseTableColumnsSelectRawQuery()); statement2.setString(1, database.getInternalName()); @@ -175,7 +171,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas statement.setString(1, database.getInternalName()); final long start = System.currentTimeMillis(); final ResultSet resultSet1 = statement.executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); while (resultSet1.next()) { final String viewName = resultSet1.getString(1); if (viewName.length() == 64) { @@ -212,7 +208,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final PreparedStatement statement = connection.prepareStatement(mariaDbMapper.databaseTablesSelectRawQuery()); statement.setString(1, database.getInternalName()); final ResultSet resultSet1 = statement.executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); while (resultSet1.next()) { final String tableName = resultSet1.getString(1); if (database.getTables().stream().anyMatch(t -> t.getInternalName().equals(tableName))) { @@ -247,7 +243,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas statement1.setString(2, tableName); log.trace("1={}, 2={}", database.getInternalName(), tableName); TableDto table = dataMapper.schemaResultSetToTable(database, statement1.executeQuery()); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); /* obtain columns metadata */ start = System.currentTimeMillis(); final PreparedStatement statement2 = connection.prepareStatement(mariaDbMapper.databaseTableColumnsSelectRawQuery()); @@ -255,7 +251,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas statement2.setString(2, tableName); log.trace("1={}, 2={}", database.getInternalName(), tableName); final ResultSet resultSet2 = statement2.executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); while (resultSet2.next()) { table = dataMapper.resultSetToTable(resultSet2, table); } @@ -266,7 +262,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas statement3.setString(2, tableName); log.trace("1={}, 2={}", database.getInternalName(), tableName); final ResultSet resultSet3 = statement3.executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); while (resultSet3.next()) { final String clause = resultSet3.getString(1); table.getConstraints() @@ -281,11 +277,11 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas statement4.setString(2, tableName); log.trace("1={}, 2={}", database.getInternalName(), tableName); final ResultSet resultSet4 = statement4.executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); while (resultSet4.next()) { table = dataMapper.resultSetToConstraint(resultSet4, table); for (UniqueDto uk : table.getConstraints().getUniques()) { - uk.setTable(metadataMapper.tableDtoToTableBriefDto(table)); + uk.setTable(dataMapper.tableDtoToTableBriefDto(table)); final TableDto tmpTable = table; uk.getColumns() .forEach(column -> { @@ -319,7 +315,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final long start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.databaseSetPasswordQuery(data.getUsername(), data.getPassword())) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/QueueServiceRabbitMqImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/QueueServiceRabbitMqImpl.java similarity index 79% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/QueueServiceRabbitMqImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/QueueServiceRabbitMqImpl.java index e6ad806daa7ba53ab8a4816e7c7130e15d77f7eb..190863696306b1942036a85cf9f7c95847e2f745 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/QueueServiceRabbitMqImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/QueueServiceRabbitMqImpl.java @@ -1,11 +1,10 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnDto; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.DataMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MetadataMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.QueueService; +import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; +import at.ac.tuwien.ifs.dbrepo.service.QueueService; import com.mchange.v2.c3p0.ComboPooledDataSource; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -22,12 +21,10 @@ import java.util.Optional; public class QueueServiceRabbitMqImpl extends DataConnector implements QueueService { private final DataMapper dataMapper; - private final MetadataMapper metadataMapper; @Autowired - public QueueServiceRabbitMqImpl(DataMapper dataMapper, MetadataMapper metadataMapper) { + public QueueServiceRabbitMqImpl(DataMapper dataMapper) { this.dataMapper = dataMapper; - this.metadataMapper = metadataMapper; } @Override @@ -38,7 +35,7 @@ public class QueueServiceRabbitMqImpl extends DataConnector implements QueueServ final int[] idx = new int[]{1}; final PreparedStatement preparedStatement = connection.prepareStatement( dataMapper.rabbitMqTupleToInsertOrUpdateQuery(database.getInternalName(), - metadataMapper.tableDtoToTableDto(table), data)); + dataMapper.tableDtoToTableDto(table), data)); for (Map.Entry<String, Object> entry : data.entrySet()) { final Optional<ColumnDto> optional = table.getColumns().stream().filter(c -> c.getInternalName().equals(entry.getKey())).findFirst(); if (optional.isEmpty()) { @@ -50,7 +47,7 @@ public class QueueServiceRabbitMqImpl extends DataConnector implements QueueServ } final long start = System.currentTimeMillis(); preparedStatement.executeUpdate(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); log.trace("successfully inserted tuple"); } finally { dataSource.close(); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/StorageServiceS3Impl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/StorageServiceS3Impl.java similarity index 97% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/StorageServiceS3Impl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/StorageServiceS3Impl.java index 94cf2b43db8ae6ec3d13da1edaa2eec8bbebbbc8..d29f5e2a2dc8c864402c4d0d66c4ab7de336461b 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/StorageServiceS3Impl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/StorageServiceS3Impl.java @@ -1,7 +1,7 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; -import at.ac.tuwien.ac.at.ifs.dbrepo.config.S3Config; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.StorageService; +import at.ac.tuwien.ifs.dbrepo.config.S3Config; +import at.ac.tuwien.ifs.dbrepo.service.StorageService; import at.ac.tuwien.ifs.dbrepo.core.api.ExportResourceDto; import at.ac.tuwien.ifs.dbrepo.core.exception.MalformedException; import at.ac.tuwien.ifs.dbrepo.core.exception.StorageNotFoundException; @@ -9,7 +9,6 @@ import at.ac.tuwien.ifs.dbrepo.core.exception.StorageUnavailableException; import at.ac.tuwien.ifs.dbrepo.core.exception.TableMalformedException; import lombok.extern.log4j.Log4j2; import org.apache.commons.lang3.RandomStringUtils; -import org.apache.james.mime4j.dom.datetime.DateTime; import org.apache.spark.sql.*; import org.apache.spark.sql.catalyst.ExtendedAnalysisException; import org.apache.spark.sql.types.StructField; @@ -22,8 +21,6 @@ import software.amazon.awssdk.services.s3.model.*; import java.io.*; import java.nio.charset.Charset; -import java.time.Instant; -import java.time.temporal.ChronoUnit; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/SubsetServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/SubsetServiceMariaDbImpl.java similarity index 89% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/SubsetServiceMariaDbImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/SubsetServiceMariaDbImpl.java index d19e18e52a676dfa74d7d6c12f5f3fccb5bee5ad..b8044175dc5abbed006093211e2b89335b90e316 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/SubsetServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/SubsetServiceMariaDbImpl.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryDto; @@ -6,11 +6,10 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.query.SubsetDto; import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierBriefDto; import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierTypeDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.gateway.MetadataServiceGateway; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.DataMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MariaDbMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MetadataMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.SubsetService; +import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; +import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; +import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; +import at.ac.tuwien.ifs.dbrepo.service.SubsetService; import com.mchange.v2.c3p0.ComboPooledDataSource; import lombok.extern.log4j.Log4j2; import org.apache.spark.sql.Dataset; @@ -35,18 +34,15 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer private final DataMapper dataMapper; private final SparkSession sparkSession; private final MariaDbMapper mariaDbMapper; - private final MetadataMapper metadataMapper; private final MetadataServiceGateway metadataServiceGateway; @Autowired public SubsetServiceMariaDbImpl(DSLContext context, DataMapper dataMapper, MariaDbMapper mariaDbMapper, - SparkSession sparkSession, MetadataMapper metadataMapper, - MetadataServiceGateway metadataServiceGateway) { + SparkSession sparkSession, MetadataServiceGateway metadataServiceGateway) { this.context = context; this.dataMapper = dataMapper; this.sparkSession = sparkSession; this.mariaDbMapper = mariaDbMapper; - this.metadataMapper = metadataMapper; this.metadataServiceGateway = metadataServiceGateway; } @@ -98,7 +94,7 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer log.trace("filter persisted only {}", filterPersisted); } final ResultSet resultSet = statement.executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); final List<QueryDto> queries = new LinkedList<>(); while (resultSet.next()) { final QueryDto query = dataMapper.resultSetToQueryDto(resultSet); @@ -127,7 +123,7 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer final long start = System.currentTimeMillis(); final ResultSet resultSet = connection.prepareStatement(mariaDbMapper.countRawSelectQuery(statement, timestamp)) .executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); return mariaDbMapper.resultSetToNumber(resultSet); } catch (SQLException e) { log.error("Failed to map object: {}", e.getMessage()); @@ -147,12 +143,12 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer final PreparedStatement preparedStatement = connection.prepareStatement(mariaDbMapper.queryStoreFindQueryRawQuery()); preparedStatement.setString(1, String.valueOf(queryId)); final ResultSet resultSet = preparedStatement.executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); if (!resultSet.next()) { throw new QueryNotFoundException("Failed to find query"); } final QueryDto query = dataMapper.resultSetToQueryDto(resultSet); - query.setOwner(metadataMapper.userDtoToUserBriefDto(metadataServiceGateway.getUserById(query.getOwner() + query.setOwner(dataMapper.userDtoToUserBriefDto(metadataServiceGateway.getUserById(query.getOwner() .getId()))); query.setDatabaseId(database.getId()); return query; @@ -184,7 +180,7 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer callableStatement.setTimestamp(3, Timestamp.from(timestamp)); callableStatement.registerOutParameter(4, Types.VARCHAR); callableStatement.executeUpdate(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); queryId = UUID.fromString(callableStatement.getString(4)); callableStatement.close(); log.info("Stored query with id {} in database with name {}", queryId, database.getInternalName()); @@ -211,7 +207,7 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer preparedStatement.setBoolean(1, persist); preparedStatement.setString(2, String.valueOf(queryId)); preparedStatement.executeUpdate(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); } catch (SQLException e) { log.error("Failed to (un-)persist query: {}", e.getMessage()); throw new QueryStorePersistException("Failed to (un-)persist query", e); @@ -229,7 +225,7 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer final long start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.queryStoreDeleteStaleQueriesRawQuery()) .executeUpdate(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); } catch (SQLException e) { log.error("Failed to delete stale queries: {}", e.getMessage()); throw new QueryStoreGCException("Failed to delete stale queries: " + e.getMessage(), e); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/TableServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/TableServiceMariaDbImpl.java similarity index 94% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/TableServiceMariaDbImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/TableServiceMariaDbImpl.java index f337cc8b1b7c4b32c00364e29d2050d23c75de44..1ca0da14d8e87972dc58eedc1e139f1da8b62451 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/TableServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/TableServiceMariaDbImpl.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.query.ImportDto; @@ -7,12 +7,12 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnStatisticDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnTypeDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.DataMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MariaDbMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.DatabaseService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.StorageService; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.TableService; -import at.ac.tuwien.ac.at.ifs.dbrepo.utils.MariaDbUtil; +import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; +import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; +import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; +import at.ac.tuwien.ifs.dbrepo.service.StorageService; +import at.ac.tuwien.ifs.dbrepo.service.TableService; +import at.ac.tuwien.ifs.dbrepo.utils.MariaDbUtil; import com.mchange.v2.c3p0.ComboPooledDataSource; import lombok.extern.log4j.Log4j2; import org.apache.spark.sql.AnalysisException; @@ -70,7 +70,7 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi statistic = dataMapper.resultSetToTableStatistic(resultSet); statistic.setTotalColumns(Long.parseLong("" + tmpTable.getColumns() .size())); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); statistic.setAvgRowLength(tmpTable.getAvgRowLength()); statistic.setDataLength(tmpTable.getDataLength()); statistic.setMaxDataLength(tmpTable.getMaxDataLength()); @@ -110,7 +110,7 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi statement.setString(1, data.getDescription()); } statement.executeUpdate(); - log.debug("executed statement in {} ms", System.currentTimeMillis() - start); + log.debug(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); @@ -132,7 +132,7 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi connection.prepareStatement(mariaDbMapper.dropTableRawQuery(database.getInternalName(), table.getInternalName())) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); @@ -156,7 +156,7 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi final ResultSet resultSet = connection.prepareStatement(mariaDbMapper.selectHistoryRawQuery( database.getInternalName(), table.getInternalName(), size)) .executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); history = dataMapper.resultSetToTableHistory(resultSet); connection.commit(); } catch (SQLException e) { @@ -182,7 +182,7 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi final ResultSet resultSet = connection.prepareStatement(mariaDbMapper.selectCountRawQuery( database.getInternalName(), tableName, timestamp)) .executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); queryResult = mariaDbMapper.resultSetToNumber(resultSet); connection.commit(); } catch (SQLException e) { @@ -270,7 +270,7 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi } final long start = System.currentTimeMillis(); statement.executeUpdate(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); @@ -315,7 +315,7 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi } final long start = System.currentTimeMillis(); statement.executeUpdate(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); @@ -352,7 +352,7 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi } final long start = System.currentTimeMillis(); statement.executeUpdate(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/ViewServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ViewServiceMariaDbImpl.java similarity index 90% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/ViewServiceMariaDbImpl.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ViewServiceMariaDbImpl.java index 3122e6fc8b4c5e7d26ff080d2857fdf7bde3847d..5b8f2017aaaa13c02cad9252bed36d8686abec04 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/service/impl/ViewServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ViewServiceMariaDbImpl.java @@ -1,11 +1,11 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.service.impl; +package at.ac.tuwien.ifs.dbrepo.service.impl; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; import at.ac.tuwien.ifs.dbrepo.core.exception.QueryMalformedException; import at.ac.tuwien.ifs.dbrepo.core.exception.ViewMalformedException; -import at.ac.tuwien.ac.at.ifs.dbrepo.mapper.MariaDbMapper; -import at.ac.tuwien.ac.at.ifs.dbrepo.service.ViewService; +import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; +import at.ac.tuwien.ifs.dbrepo.service.ViewService; import com.mchange.v2.c3p0.ComboPooledDataSource; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -37,7 +37,7 @@ public class ViewServiceMariaDbImpl extends DataConnector implements ViewService connection.prepareStatement(mariaDbMapper.dropViewRawQuery(database.getInternalName(), view.getInternalName())) .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); connection.commit(); } catch (SQLException e) { connection.rollback(); @@ -61,7 +61,7 @@ public class ViewServiceMariaDbImpl extends DataConnector implements ViewService final ResultSet resultSet = connection.prepareStatement(mariaDbMapper.selectCountRawQuery( database.getInternalName(), view.getInternalName(), timestamp)) .executeQuery(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); + log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); queryResult = mariaDbMapper.resultSetToNumber(resultSet); connection.commit(); } catch (SQLException e) { diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/MariaDbUtil.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/utils/MariaDbUtil.java similarity index 97% rename from dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/MariaDbUtil.java rename to dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/utils/MariaDbUtil.java index 78f51fee877670f656c594e28e9b91f485177c62..8e27a151d31f75cc745607767cdd842c3df0f355 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ac/at/ifs/dbrepo/utils/MariaDbUtil.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/utils/MariaDbUtil.java @@ -1,4 +1,4 @@ -package at.ac.tuwien.ac.at.ifs.dbrepo.utils; +package at.ac.tuwien.ifs.dbrepo.utils; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnTypeDto; diff --git a/dbrepo-metadata-service/.dockerignore b/dbrepo-metadata-service/.dockerignore index fcdfe8de55e91b3b65fcf598c5980ae256087910..00e85186720976c4dc73fcb71829996845c4fed6 100644 --- a/dbrepo-metadata-service/.dockerignore +++ b/dbrepo-metadata-service/.dockerignore @@ -1 +1 @@ -rest-service/src/main/resources/*.csv \ No newline at end of file +rest-service/src/main/resources/*.csv diff --git a/dbrepo-metadata-service/.gitignore b/dbrepo-metadata-service/.gitignore index d39a47ee0fab72fbe4fd7f5ae968ff2f3bc3de78..3e5eeee0c8f132e1eae76cc90a3f0a418ef5f407 100644 --- a/dbrepo-metadata-service/.gitignore +++ b/dbrepo-metadata-service/.gitignore @@ -7,6 +7,9 @@ target/ ### Environment ### .env +### local repo ### +lib/at/ + ### Generated ### ready mapping.xml diff --git a/dbrepo-metadata-service/Dockerfile b/dbrepo-metadata-service/Dockerfile index 8d01865d85a0d1cad2cad9f2f7849a655b9e0259..2d3acf1bd192eda57a807b8e0be6b48ccde398fc 100644 --- a/dbrepo-metadata-service/Dockerfile +++ b/dbrepo-metadata-service/Dockerfile @@ -1,17 +1,12 @@ ###### FIRST STAGE ###### -FROM dbrepo-core:build AS dependency -LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" - -###### SECOND STAGE ###### -FROM maven:3-amazoncorretto-17 AS build +FROM --platform=$BUILDPLATFORM maven:3-amazoncorretto-17 AS build LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" COPY ./pom.xml ./ RUN mvn -fn dependency:go-offline -COPY --from=dependency /root/.m2/repository/at/ac/tuwien/ifs/dbrepo /root/.m2/repository/at/ac/tuwien/ifs/dbrepo - +COPY ./lib ./lib COPY ./oai ./oai COPY ./report ./report COPY ./repositories ./repositories @@ -19,25 +14,29 @@ COPY ./rest-service ./rest-service COPY ./services ./services # Make sure it compiles -RUN mvn -fn clean package -DskipTests +RUN mvn -q clean package -DskipTests -###### THIRD STAGE ###### -FROM amazoncorretto:17-alpine3.19 AS runtime +###### SECOND STAGE ###### +FROM --platform=$BUILDPLATFORM amazoncorretto:17-alpine3.21 AS runtime LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" -RUN apk add --no-cache curl bash jq +RUN apk --no-cache add \ + bash \ + curl \ + jq WORKDIR /app -RUN adduser -D dbrepo --uid 1001 +RUN adduser -D dbrepo --uid 1001 && \ + chown -R 1001:1001 /app USER 1001 -COPY --from=build --chown=1001 ./rest-service/target/dbrepo-metadata-service-rest-service-*.jar ./metadata-service.jar +COPY --from=build --chown=1001 ./rest-service/target/*rest-service-*.jar ./metadata-service.jar # non-root port EXPOSE 8080 -ENV JAVA_OPTS="-Dlog4j2.formatMsgNoLookups=true" +ENV JAVA_OPTS="" ENTRYPOINT exec java $JAVA_OPTS -jar ./metadata-service.jar \ No newline at end of file diff --git a/dbrepo-metadata-service/README.md b/dbrepo-metadata-service/README.md index 7160f7bbbc743d2bb6425773566c98eb86005143..64e71fbdfb77e345d3e0453a1ac740605b6675c1 100644 --- a/dbrepo-metadata-service/README.md +++ b/dbrepo-metadata-service/README.md @@ -1,5 +1,14 @@ # Metadata Service +## Build + +Before testing, it is recommended to (re-)build the `MapStruct` mappers in case they were modified using the `package` +target: + +```shell +mvn clean package +``` + ## Test Run all unit and integration tests and create an HTML+TXT coverage report located in the `report` module: diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/AffiliationDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/AffiliationDto.java deleted file mode 100644 index 807c03f48df24d122757da14161f0b98404ba5c1..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/AffiliationDto.java +++ /dev/null @@ -1,20 +0,0 @@ -package at.tuwien.api.doi; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class AffiliationDto { - - @Schema(example = "ISE, TU Wien, Data Science Research Unit, Vienna, Austria") - private String name; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/AuthorDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/AuthorDto.java deleted file mode 100644 index 8f8bbb61ffc64341119614f7de3395c40beac92e..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/AuthorDto.java +++ /dev/null @@ -1,35 +0,0 @@ -package at.tuwien.api.doi; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -import java.util.List; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class AuthorDto { - - @Schema(example = "Weise") - private String family; - - @Schema(example = "Martin") - private String given; - - @JsonProperty("ORCID") - @Schema(example = "http://orcid.org/0000-0003-4216-302X") - private String orcid; - - @Schema(example = "first") - private String sequence; - - private List<AffiliationDto> affiliation; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/DoiDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/DoiDto.java deleted file mode 100644 index af0cd5bcc64bf8797c81197fb6e9abc0cede6a7f..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/DoiDto.java +++ /dev/null @@ -1,82 +0,0 @@ -package at.tuwien.api.doi; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -import java.util.List; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class DoiDto { - - @NotNull - @Schema(example = "https://doi.org/10.5334/dsj-2022-004") - private String id; - - @NotNull - private TimeRepresentationDto indexed; - - private TimeRepresentationDto deposited; - - private TimeRepresentationDto issued; - - private TimeRepresentationDto published; - - @JsonProperty("DOI") - @Schema(example = "10.5334/dsj-2022-004") - private String doi; - - @NotNull - @Schema(example = "dataset") - private String type; - - private List<AuthorDto> author; - - @Schema(example = "Crossref") - private String source; - - @Schema(example = "DBRepo: A Data Repository System for Research Data in Databases") - private String title; - - @Schema(example = "10.1109") - private String prefix; - - @Schema(example = "21") - private String volume; - - @JsonProperty("is-referenced-by-count") - @Schema(example = "0") - private Integer isReferencedByCount; - - @JsonProperty("reference-count") - @Schema(example = "28") - private Integer referenceCount; - - @Schema(example = "IEEE") - private String publisher; - - @Schema(example = "322-331") - private String page; - - private String member; - - @Schema(example = "2024 IEEE International Conference on Big Data (BigData)") - private String event; - - private List<ReferenceDto> reference; - - private Integer score; - - @JsonProperty("URL") - private String url; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/LicenseDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/LicenseDto.java deleted file mode 100644 index 32f5ffcd2aced054dfffd72a44a79b9994a6658b..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/LicenseDto.java +++ /dev/null @@ -1,32 +0,0 @@ -package at.tuwien.api.doi; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class LicenseDto { - - private TimeRepresentationDto start; - - @JsonProperty("content-version") - @Schema(example = "stm-asf") - private String contentVersion; - - @JsonProperty("delay-in-days") - @Schema(example = "0") - private Integer delayInDays; - - @JsonProperty("URL") - @Schema(example = "https://doi.org/10.15223/policy-029") - private String url; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/LinkDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/LinkDto.java deleted file mode 100644 index 5f70696091c7cf14abb0c717627f18a1e3eff9de..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/LinkDto.java +++ /dev/null @@ -1,35 +0,0 @@ -package at.tuwien.api.doi; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class LinkDto { - - @JsonProperty("URL") - @Schema(example = "http://xplorestaging.ieee.org/ielx8/10824975/10824942/10825401.pdf?arnumber=10825401") - private String url; - - @JsonProperty("content-type") - @Schema(example = "unspecified") - private String contentType; - - @JsonProperty("content-version") - @Schema(example = "vor") - private String contentVersion; - - @JsonProperty("intended-application") - @Schema(example = "similarity-checking") - private String intendedApplication; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/ReferenceDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/ReferenceDto.java deleted file mode 100644 index 9458c0f9192a2f6fa71adad4e910b4e8e7b609ef..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/ReferenceDto.java +++ /dev/null @@ -1,55 +0,0 @@ -package at.tuwien.api.doi; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -import java.util.List; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class ReferenceDto { - - @NotNull - @Schema(example = "ref1") - private String key; - - @JsonProperty("doi-asserted-by") - @Schema(example = "publisher") - private String doiAssertedBy; - - @JsonProperty("DOI") - @Schema(example = "10.1038/sdata.2016.18") - private String doi; - - @Schema(example = "2024") - private String year; - - @JsonProperty("article-title") - @Schema(example = "The Dryad Data Repository: a Singapore Framework metadata Architecture in a DSpace Environment") - private String articleTitle; - - @JsonProperty("volume-title") - @Schema(example = "Proceedings of the 2008 International Conference on Dublin Core and Metadata Applications") - private String volumeTitle; - - @JsonProperty("journal-title") - @Schema(example = "Libraries Research Publications") - private String journalTitle; - - @Schema(example = "Witt") - private String author; - - @JsonProperty("first-page") - @Schema(example = "157") - private String firstPage; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/ResourceDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/ResourceDto.java deleted file mode 100644 index a2543c2834def88d4ae0421d92dcc1efd34ddaf7..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/ResourceDto.java +++ /dev/null @@ -1,20 +0,0 @@ -package at.tuwien.api.doi; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class ResourceDto { - - private ResourceRepresentationDto primary; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/ResourceRepresentationDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/ResourceRepresentationDto.java deleted file mode 100644 index bf2312a6488a27498b83bd8039064d4c0badd75b..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/ResourceRepresentationDto.java +++ /dev/null @@ -1,20 +0,0 @@ -package at.tuwien.api.doi; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class ResourceRepresentationDto { - - @JsonProperty("URL") - private String url; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/TimeRepresentationDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/TimeRepresentationDto.java deleted file mode 100644 index fe649217e9b6b963138b38702abf39b539ba8d08..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/doi/TimeRepresentationDto.java +++ /dev/null @@ -1,33 +0,0 @@ -package at.tuwien.api.doi; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -import java.time.Instant; -import java.util.List; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class TimeRepresentationDto { - - @JsonProperty("date-parts") - @Schema(example = "[[2025,1,18]]") - private List<List<Integer>> dateParts; - - @JsonProperty("date-time") - @Schema(example = "2021-03-12T15:26:21Z") - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssX", timezone = "UTC") - private Instant dateTime; - - private Long timestamp; - -} diff --git a/dbrepo-metadata-service/lib/.gitkeep b/dbrepo-metadata-service/lib/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/dbrepo-metadata-service/oai/pom.xml b/dbrepo-metadata-service/oai/pom.xml index d14d0bcf615c86d94b1d9d28e8748a574454e274..89391bf8e210663a621f8bdae36bf78c32b685c4 100644 --- a/dbrepo-metadata-service/oai/pom.xml +++ b/dbrepo-metadata-service/oai/pom.xml @@ -4,13 +4,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-metadata-service</artifactId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>metadata-service</artifactId> <version>1.8.1</version> </parent> - <artifactId>dbrepo-metadata-service-oai</artifactId> - <name>dbrepo-metadata-service-oai</name> + <name>oai</name> + <artifactId>metadata-service-oai</artifactId> <version>1.8.1</version> <dependencies/> diff --git a/dbrepo-metadata-service/pom.xml b/dbrepo-metadata-service/pom.xml index 313d6d0db530caa829e6325cef263d1077b954e8..5697be3b2b9e5f5e88762d2781bda8aea15db9b7 100644 --- a/dbrepo-metadata-service/pom.xml +++ b/dbrepo-metadata-service/pom.xml @@ -13,13 +13,13 @@ <url>https://www.tuwien.ac.at</url> </organization> - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-metadata-service</artifactId> - <name>dbrepo-metadata-service</name> - <version>1.8.1</version> - + <name>metadata-service</name> <description>Service that manages the metadata</description> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>metadata-service</artifactId> + <version>1.8.1</version> + <packaging>pom</packaging> <modules> <module>oai</module> @@ -67,14 +67,10 @@ <dependencies> <dependency> - <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <groupId>${project.groupId}</groupId> <artifactId>dbrepo-core</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - </dependency> <!-- Data Source --> <dependency> <groupId>org.mariadb.jdbc</groupId> @@ -168,6 +164,13 @@ <artifactId>amqp-client</artifactId> <version>${rabbitmq.version}</version> </dependency> + <!-- Api --> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <version>${lombok.version}</version> + <scope>provided</scope> + </dependency> <!-- Testing --> <dependency> <groupId>org.springframework</groupId> @@ -181,7 +184,6 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>com.h2database</groupId> @@ -274,6 +276,19 @@ </plugins> </build> + <repositories> + <repository> + <id>dbrepo-maven-repo</id> + <url>file:///${project.basedir}/lib</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + <licenses> <license> <name>Apache-2.0</name> diff --git a/dbrepo-metadata-service/report/pom.xml b/dbrepo-metadata-service/report/pom.xml index 847272f66f1606d6b89feb26444367f1a458514e..10a221ef6c7bfce7327c0e017c5aeb7d2798658e 100644 --- a/dbrepo-metadata-service/report/pom.xml +++ b/dbrepo-metadata-service/report/pom.xml @@ -4,25 +4,20 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>dbrepo-metadata-service</artifactId> - <groupId>at.tuwien</groupId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>metadata-service</artifactId> <version>1.8.1</version> </parent> - <artifactId>dbrepo-metadata-service-report</artifactId> - <name>dbrepo-metadata-service-report</name> + <name>report</name> + <artifactId>metadata-service-report</artifactId> <version>1.8.1</version> <dependencies> <dependency> - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-metadata-service-rest-service</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-metadata-service-services</artifactId> - <version>${project.version}</version> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>metadata-service-services</artifactId> + <version>1.8.1</version> </dependency> </dependencies> diff --git a/dbrepo-metadata-service/repositories/pom.xml b/dbrepo-metadata-service/repositories/pom.xml index 4f9850d3d3d84719c8a3f696d1b5af165e7fe6e1..1928e3b33ffa405d60b58c6970604f0a054bfb79 100644 --- a/dbrepo-metadata-service/repositories/pom.xml +++ b/dbrepo-metadata-service/repositories/pom.xml @@ -4,27 +4,21 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>dbrepo-metadata-service</artifactId> - <groupId>at.tuwien</groupId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>metadata-service</artifactId> <version>1.8.1</version> </parent> - <artifactId>dbrepo-metadata-service-repositories</artifactId> - <name>dbrepo-metadata-service-repositories</name> + <name>repositories</name> + <artifactId>metadata-service-repositories</artifactId> <version>1.8.1</version> <dependencies> <dependency> <groupId>at.ac.tuwien.ifs.dbrepo</groupId> - <artifactId>dbrepo-core</artifactId> - <version>${project.version}</version> + <artifactId>metadata-service-oai</artifactId> + <version>1.8.1</version> </dependency> - <dependency> - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-metadata-service-oai</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> </project> diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/ac/tuwien/ifs/dbrepo/repository/DatabaseRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/ac/tuwien/ifs/dbrepo/repository/DatabaseRepository.java index 2d61108679fffd08c13660d63e91a5e9a1127050..5f1feb7e2df2a75fdfdb84ef05cd111a8dfe1413 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/ac/tuwien/ifs/dbrepo/repository/DatabaseRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/ac/tuwien/ifs/dbrepo/repository/DatabaseRepository.java @@ -5,7 +5,6 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.List; -import java.util.Optional; import java.util.UUID; @Repository diff --git a/dbrepo-metadata-service/rest-service/pom.xml b/dbrepo-metadata-service/rest-service/pom.xml index 0f1abad18e9b440507b45b9328dc2d9b8f669050..bb75d96288c218e1c3dc04cb5c1d2d678e2380a0 100644 --- a/dbrepo-metadata-service/rest-service/pom.xml +++ b/dbrepo-metadata-service/rest-service/pom.xml @@ -4,25 +4,20 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>dbrepo-metadata-service</artifactId> - <groupId>at.tuwien</groupId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>metadata-service</artifactId> <version>1.8.1</version> </parent> - <artifactId>dbrepo-metadata-service-rest-service</artifactId> - <name>dbrepo-metadata-service-rest</name> + <name>rest-service</name> + <artifactId>metadata-service-service</artifactId> <version>1.8.1</version> <dependencies> <dependency> <groupId>at.ac.tuwien.ifs.dbrepo</groupId> - <artifactId>dbrepo-core</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-metadata-service-services</artifactId> - <version>${project.version}</version> + <artifactId>metadata-service-services</artifactId> + <version>1.8.1</version> </dependency> </dependencies> diff --git a/dbrepo-metadata-service/services/pom.xml b/dbrepo-metadata-service/services/pom.xml index db32fbe9ccf05163d56472d2a3bdfda25f9571f4..3c0a3e1bccdcf5d06d7e91004182151be83be260 100644 --- a/dbrepo-metadata-service/services/pom.xml +++ b/dbrepo-metadata-service/services/pom.xml @@ -4,30 +4,25 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>dbrepo-metadata-service</artifactId> - <groupId>at.tuwien</groupId> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>metadata-service</artifactId> <version>1.8.1</version> </parent> - <artifactId>dbrepo-metadata-service-services</artifactId> - <name>dbrepo-metadata-service-services</name> + <name>services</name> + <artifactId>metadata-service-services</artifactId> <version>1.8.1</version> <dependencies> <dependency> <groupId>at.ac.tuwien.ifs.dbrepo</groupId> - <artifactId>dbrepo-core</artifactId> - <version>${project.version}</version> + <artifactId>metadata-service-oai</artifactId> + <version>1.8.1</version> </dependency> <dependency> - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-metadata-service-oai</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-metadata-service-repositories</artifactId> - <version>${project.version}</version> + <groupId>at.ac.tuwien.ifs.dbrepo</groupId> + <artifactId>metadata-service-repositories</artifactId> + <version>1.8.1</version> </dependency> </dependencies> diff --git a/dbrepo-search-service/Dockerfile b/dbrepo-search-service/Dockerfile index 03660245769c484057c002c56ffc60e94370a8ee..1d0862a9e51d82a0f8e8154caea2efec9a51dba0 100644 --- a/dbrepo-search-service/Dockerfile +++ b/dbrepo-search-service/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine3.21 +FROM --platform=$BUILDPLATFORM python:3.11-alpine3.21 LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" RUN apk add --no-cache \ diff --git a/dbrepo-search-service/Pipfile.lock b/dbrepo-search-service/Pipfile.lock index ee8d01ac80b7831865d00dfdca3d658607f8dc41..6a84b140e9721e0d3c18493d86ec7b0b3bd8d862 100644 --- a/dbrepo-search-service/Pipfile.lock +++ b/dbrepo-search-service/Pipfile.lock @@ -221,7 +221,7 @@ "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87", "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b" ], - "markers": "python_version >= '3.8'", + "markers": "platform_python_implementation != 'PyPy'", "version": "==1.17.1" }, "charset-normalizer": { @@ -373,9 +373,10 @@ }, "dbrepo": { "hashes": [ - "sha256:ec9f612e7ab0275ad2326be9e09e513301ffa2598c9dda838e9cc902891db512" + "sha256:4dc7da6e48b618d44e82f3ad392c4d1ef7917a0cd46bb13af78a73f3062d7319" ], - "path": "./lib/dbrepo-1.8.1.tar.gz" + "path": "./lib/dbrepo-1.8.1.tar.gz", + "version": "==1.8.1" }, "events": { "hashes": [ @@ -396,7 +397,6 @@ "sha256:f69fcd559dc907ed196ab9df0e48471709175e696d6e698dd4dbe940f96ce66b" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==2.3.3" }, "flask-cors": { @@ -421,7 +421,6 @@ "sha256:8085d6757505b6f3291a2638c84d207e8f0ad0de662d1f46aa2f77e658a0c976" ], "index": "pypi", - "markers": "python_version >= '3.9' and python_version < '4'", "version": "==4.7.1" }, "flask-sqlalchemy": { @@ -430,7 +429,6 @@ "sha256:e4b68bb881802dda1a7d878b2fc84c06d1ee57fb40b874d3dc97dabfa36b8312" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==3.1.1" }, "frozenlist": { @@ -537,7 +535,6 @@ "sha256:8cb61bb2a87ec07bca10974df276b9a1a95bfdb63f3a696f065692ffc9b8c389" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==4.3.2" }, "greenlet": { @@ -616,7 +613,7 @@ "sha256:f406b22b7c9a9b4f8aa9d2ab13d6ae0ac3e85c9a809bd590ad53fed2bf70dc79", "sha256:f6ff3b14f2df4c41660a7dec01045a045653998784bf8cfcb5a525bdffffbc8f" ], - "markers": "python_version >= '3.7'", + "markers": "python_version < '3.14' and (platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32'))))))", "version": "==3.1.1" }, "gunicorn": { @@ -625,7 +622,6 @@ "sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==23.0.0" }, "h11": { @@ -783,7 +779,6 @@ "sha256:61c9170f92e736b530655e75374681d4fcca9cfa8763ab42be57353b2b203494" ], "index": "pypi", - "markers": "python_version >= '3.6'", "version": "==1.3.1" }, "markupsafe": { @@ -1037,7 +1032,7 @@ "sha256:f486038e44caa08dbd97275a9a35a283a8f1d2f0ee60ac260a1790e76660833c", "sha256:f7de08cbe5551911886d1ab60de58448c6df0f67d9feb7d1fb21e9875ef95e91" ], - "markers": "python_version >= '3.10'", + "markers": "python_version == '3.11'", "version": "==2.2.4" }, "opensearch-py": { @@ -1046,7 +1041,6 @@ "sha256:6598df0bc7a003294edd0ba88a331e0793acbb8c910c43edf398791e3b2eccda" ], "index": "pypi", - "markers": "python_version >= '3.8' and python_version < '4'", "version": "==2.8.0" }, "packaging": { @@ -1384,7 +1378,6 @@ "sha256:d7c01d9e2293916c18baf562d95698754b0dbbb5e74d457c45d4f6561fb9d55d" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==1.1.0" }, "pytz": { @@ -1551,7 +1544,7 @@ "sha256:ff0a911de71092966df1abfa6a35180f703fe81e01dc317729132f89e22d6c46", "sha256:ff222c695872ada25369a3ee4e3e3a0fb4ecfe4396aef3900789a0f128a24f16" ], - "markers": "python_version >= '3.7'", + "markers": "(platform_python_implementation != 'CPython' or python_full_version > '3.7.10') and (platform_system == 'Darwin' or platform_system == 'Windows' or platform_system == 'Linux') and (platform_machine == 'x86_64' or platform_machine == 's390x' or platform_machine == 'armv7l' or platform_machine == 'ppc64le' or platform_machine == 'ppc64' or platform_machine == 'AMD64' or platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'ARM64' or platform_machine == 'x86' or platform_machine == 'i686') and (platform_python_implementation == 'CPython' or (platform_python_implementation == 'PyPy' and python_version < '3.12'))", "version": "==1.4.4" }, "rdflib": { @@ -1560,7 +1553,6 @@ "sha256:fed46e24f26a788e2ab8e445f7077f00edcf95abb73bcef4b86cefa8b62dd174" ], "index": "pypi", - "markers": "python_full_version >= '3.8.1' and python_full_version < '4.0.0'", "version": "==7.1.4" }, "referencing": { @@ -1776,7 +1768,6 @@ "sha256:bc599c8c3b3319e53ce6c5c3c471120bd325d0071fb6f38a10e924e3d07b9990" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==0.41.2" }, "tinydb": { @@ -1824,7 +1815,7 @@ "sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466", "sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813" ], - "markers": "python_version >= '3.9'", + "markers": "python_version >= '3.10'", "version": "==2.4.0" }, "urllib3-future": { @@ -2120,7 +2111,7 @@ "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87", "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b" ], - "markers": "python_version >= '3.8'", + "markers": "platform_python_implementation != 'PyPy'", "version": "==1.17.1" }, "charset-normalizer": { @@ -2288,7 +2279,6 @@ "sha256:fa260de59dfb143af06dcf30c2be0b200bed2a73737a8a59248fcb9fa601ef0f" ], "index": "pypi", - "markers": "python_version >= '3.9'", "version": "==7.8.0" }, "cryptography": { @@ -2367,7 +2357,6 @@ "sha256:61c9170f92e736b530655e75374681d4fcca9cfa8763ab42be57353b2b203494" ], "index": "pypi", - "markers": "python_version >= '3.6'", "version": "==1.3.1" }, "opensearch-py": { @@ -2376,7 +2365,6 @@ "sha256:6598df0bc7a003294edd0ba88a331e0793acbb8c910c43edf398791e3b2eccda" ], "index": "pypi", - "markers": "python_version >= '3.8' and python_version < '4'", "version": "==2.8.0" }, "packaging": { @@ -2409,7 +2397,6 @@ "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==8.3.5" }, "python-dateutil": { @@ -2434,7 +2421,6 @@ "sha256:e9e12e333b525156e82a3c852f22016b9158220d2f47454de9cae8a77d371401" ], "index": "pypi", - "markers": "python_version >= '3.5'", "version": "==1.12.1" }, "six": { @@ -2457,7 +2443,6 @@ "sha256:0bdf270b5b7f53915832f7c31dd2bd3ffdc20b534ea6b32231cc7003049bd0e1" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==0.0.1rc1" }, "urllib3": { @@ -2465,7 +2450,7 @@ "sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466", "sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813" ], - "markers": "python_version >= '3.9'", + "markers": "python_version >= '3.10'", "version": "==2.4.0" }, "wrapt": { diff --git a/dbrepo-search-service/init.Dockerfile b/dbrepo-search-service/init.Dockerfile index cf4cb94d85e4e8c707e6305278a17a7a3cdbfc8e..2099df48cc53586a0cfa64bae3ea1dd4615c6780 100644 --- a/dbrepo-search-service/init.Dockerfile +++ b/dbrepo-search-service/init.Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine3.21 +FROM --platform=$BUILDPLATFORM python:3.11-alpine3.21 LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" RUN apk add --no-cache \ diff --git a/dbrepo-search-service/lib/dbrepo-1.8.1-py3-none-any.whl b/dbrepo-search-service/lib/dbrepo-1.8.1-py3-none-any.whl index d06dd866e308e867f0952e12decee9fa90a5344c..289f081b95f69e34e6d8a947642d7966b55a3b68 100644 Binary files a/dbrepo-search-service/lib/dbrepo-1.8.1-py3-none-any.whl and b/dbrepo-search-service/lib/dbrepo-1.8.1-py3-none-any.whl differ diff --git a/dbrepo-search-service/lib/dbrepo-1.8.1.tar.gz b/dbrepo-search-service/lib/dbrepo-1.8.1.tar.gz index 4f8d90073fdb8e17f22e04bd74df8ac8815e2ae9..d13869fc6f53ed38c9580789746781d52a6d0b69 100644 Binary files a/dbrepo-search-service/lib/dbrepo-1.8.1.tar.gz and b/dbrepo-search-service/lib/dbrepo-1.8.1.tar.gz differ diff --git a/dbrepo-storage-service/init/Dockerfile b/dbrepo-storage-service/init/Dockerfile index d064d048b84444610d3c342b302811dd2044a681..ad0d2ae853b7a0cb9a4aa87c782c939547c3dd4b 100644 --- a/dbrepo-storage-service/init/Dockerfile +++ b/dbrepo-storage-service/init/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/python:3.11-alpine3.21 AS runtime +FROM --platform=$BUILDPLATFORM docker.io/python:3.11-alpine3.21 AS runtime LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" RUN apk --no-cache add \ diff --git a/dbrepo-ui/Dockerfile b/dbrepo-ui/Dockerfile index f76a3d75043932d833865c7d402f8c70abb8f810..966b7dbb3d1a17085732e852bcc64de713655586 100644 --- a/dbrepo-ui/Dockerfile +++ b/dbrepo-ui/Dockerfile @@ -1,4 +1,5 @@ -FROM oven/bun:1.1.40-alpine AS build +###### FIRST STAGE ###### +FROM --platform=$BUILDPLATFORM oven/bun:1.1.40-alpine AS build WORKDIR /app @@ -25,7 +26,8 @@ COPY ./nuxt.config.ts ./nuxt.config.ts RUN bun run build -FROM node:22.9.0-alpine3.20 AS runtime +###### SECOND STAGE ###### +FROM --platform=$BUILDPLATFORM node:22.9.0-alpine3.20 AS runtime ARG APP_VERSION="latest" ARG COMMIT="" diff --git a/dbrepo-ui/components/database/DatabaseToolbar.vue b/dbrepo-ui/components/database/DatabaseToolbar.vue index 09d40abf8ed796f0610ec17e9860141e945c5d8f..028cf4c3e979a81fbc253551599314179efd2550 100644 --- a/dbrepo-ui/components/database/DatabaseToolbar.vue +++ b/dbrepo-ui/components/database/DatabaseToolbar.vue @@ -66,7 +66,7 @@ :text="$t('toolbars.database.views.tab')" :to="`/database/${$route.params.database_id}/view`" /> <v-tab - v-if="database && database.is_public" + v-if="hasReadAccess" :text="$t('toolbars.database.subsets.tab')" :to="`/database/${$route.params.database_id}/subset`" /> <v-tab diff --git a/dbrepo-ui/components/identifier/Persist.vue b/dbrepo-ui/components/identifier/Persist.vue index 004a037c4667fac81bb65d9376d94cfb6a8b80a8..0ba69fcbc2c9f3d29e20bff81aea09b1eeda6a5f 100644 --- a/dbrepo-ui/components/identifier/Persist.vue +++ b/dbrepo-ui/components/identifier/Persist.vue @@ -352,6 +352,7 @@ variant="flat"> <v-stepper-header> <v-stepper-item + :title="descriptionTitle(description)" :value="i+1" /> </v-stepper-header> <v-stepper-window @@ -359,12 +360,12 @@ <v-container> <v-row dense> <v-col cols="8"> - <v-text-field + <v-textarea v-model="description.description" :label="$t('pages.identifier.subpages.create.descriptions.description.label')" clearable :variant="inputVariant" - :hint="$t('pages.identifier.subpages.create.descriptions.description.hint')" + :hint="$t('pages.identifier.subpages.create.descriptions.description.hint', { symbol: '<br>'})" persistent-hint :rules="[v => !!v || $t('validation.required')]" required /> @@ -1155,7 +1156,21 @@ export default { mounted () { this.addCreator() this.addTitle() - this.addDescription() + this.identifier.descriptions.push({ + description: null, + type: 'Abstract', + language: null + }) + this.identifier.descriptions.push({ + description: null, + type: 'Methods', + language: null + }) + this.identifier.descriptions.push({ + description: null, + type: 'Other', + language: null + }) this.fetchLicenses() this.fetchIdentifier() this.$refs.form.validate() @@ -1164,6 +1179,12 @@ export default { cancel () { this.$emit('close', { action: 'closed' }) }, + descriptionTitle (description) { + if (!description.type) { + return null + } + return this.$t(`pages.identifier.subpages.create.descriptions.description.${description.type.toLowerCase()}`) + }, retrieveCreator (creator) { if (!creator || !creator.name_identifier) { creator.name_identifier_scheme = null diff --git a/dbrepo-ui/components/subset/Builder.vue b/dbrepo-ui/components/subset/Builder.vue index 4e4fe21eecb64311937e737fd2a0f7aeaf2f56f3..24e91eec87ae82b75a35aca9f8a9adef4df63c5c 100644 --- a/dbrepo-ui/components/subset/Builder.vue +++ b/dbrepo-ui/components/subset/Builder.vue @@ -590,7 +590,7 @@ export default { return } const tid = this.$route.query.tid - const selection = this.tables.filter(t => t.id === tid) + const selection = this.datasources.filter(t => t.id === tid) if (selection.length === 0) { console.warn('Failed to find table with id', tid) return diff --git a/dbrepo-ui/components/subset/SubsetList.vue b/dbrepo-ui/components/subset/SubsetList.vue index df0948372eed1dbf60260b6f3bd835e51dd93d2a..8c5efe1022189ee56340e419ac6e3e0a080db70b 100644 --- a/dbrepo-ui/components/subset/SubsetList.vue +++ b/dbrepo-ui/components/subset/SubsetList.vue @@ -1,5 +1,17 @@ <template> <div> + <v-toolbar + class="pr-2" + color="secondary" + flat> + <v-spacer /> + <v-btn + :variant="buttonVariant" + :prepend-icon="filterIcon" + @click="switchFilter"> + {{ filterText }} + </v-btn> + </v-toolbar> <v-card v-if="!loadingSubsets && subsets.length === 0" variant="flat" @@ -14,6 +26,7 @@ <Loading /> </v-list-item> <div + v-if="!loadingSubsets" v-for="(subset, i) in subsets" :key="`q-${i}`"> <v-divider v-if="i !== 0" class="mx-4" /> @@ -45,6 +58,7 @@ export default { loadingSubsets: false, loadingIdentifiers: false, subsets: [], + filter: null, cacheStore: useCacheStore() } }, @@ -58,8 +72,35 @@ export default { isDarkTheme () { return this.$vuetify.theme.global.name.toLowerCase().startsWith('dark') }, + buttonVariant () { + const runtimeConfig = useRuntimeConfig() + return this.$vuetify.theme.global.name.toLowerCase().endsWith('contrast') ? runtimeConfig.public.variant.button.contrast : runtimeConfig.public.variant.button.normal + }, colorVariant () { return this.isContrastTheme ? '' : (this.isDarkTheme ? 'tertiary' : 'secondary') + }, + filterIcon () { + if (this.filter === true) { + return 'mdi-star' + } + if (this.filter === false) { + return 'mdi-star-off' + } + return 'mdi-star-outline' + }, + filterText () { + if (this.filter === true) { + return 'Starred' + } + if (this.filter === false) { + return 'Not Starred' + } + return 'All' + } + }, + watch: { + filter () { + this.loadQueries() } }, mounted () { @@ -69,7 +110,7 @@ export default { loadQueries () { this.loadingSubsets = true const queryService = useQueryService() - queryService.findAll(this.$route.params.database_id, true) + queryService.findAll(this.$route.params.database_id, this.filter) .then((subsets) => { this.loadingSubsets = false this.subsets = subsets.map(subset => { @@ -87,6 +128,17 @@ export default { toast.error(this.$t(code)) }) }, + switchFilter () { + if (this.filter === true) { + this.filter = false + return + } + if (this.filter === false) { + this.filter = null + return + } + this.filter = true + }, title (subset) { if (subset.identifiers.length === 0) { return subset.query diff --git a/dbrepo-ui/components/table/TableSchema.vue b/dbrepo-ui/components/table/TableSchema.vue index 62d88647e4c1ee39a51be16ef2e6f50a6c739e86..d6b9c138853e9638ad5291bfd30ccf6b6da09e07 100644 --- a/dbrepo-ui/components/table/TableSchema.vue +++ b/dbrepo-ui/components/table/TableSchema.vue @@ -169,6 +169,7 @@ </v-col> </v-row> <v-row + v-if="columns.length !== 0" dense> <v-col> <v-btn @@ -181,7 +182,8 @@ @click="addColumn()" /> </v-col> </v-row> - <v-row> + <v-row + v-if="columns.length !== 0"> <v-col> <v-btn color="secondary" @@ -250,6 +252,9 @@ export default { return this.$vuetify.theme.global.name.toLowerCase().endsWith('contrast') ? runtimeConfig.public.variant.button.contrast : runtimeConfig.public.variant.button.normal }, showPrimaryKeyWarning () { + if (this.columns.length === 0) { + return false + } return this.columns.filter(c => c.primary_key).length === 0 } }, diff --git a/dbrepo-ui/components/table/TableToolbar.vue b/dbrepo-ui/components/table/TableToolbar.vue index 72d20ebdc259ab52a2d790594b3c2776dcc790d4..70c2165b3078294bacd5a47a9e6caa6a6d3072f2 100644 --- a/dbrepo-ui/components/table/TableToolbar.vue +++ b/dbrepo-ui/components/table/TableToolbar.vue @@ -117,11 +117,14 @@ export default { return this.roles.includes('update-table') && this.table.owner.id === this.cacheUser.uid }, isOwner () { + if (!this.cacheUser || !this.database) { + return false + } const databaseService = useDatabaseService() return databaseService.isOwner(this.database, this.cacheUser) }, canCreateView () { - if (!this.roles || !this.cacheUser || !this.isOwner) { + if (!this.roles || !this.isOwner) { return false } return this.roles.includes('create-database-view') diff --git a/dbrepo-ui/composables/database-service.ts b/dbrepo-ui/composables/database-service.ts index 204f99dd351d1b80df3033e8fda0fd4b21eb235e..77c958fc9266ec0fe94dd7bdc7db7255c03c4990 100644 --- a/dbrepo-ui/composables/database-service.ts +++ b/dbrepo-ui/composables/database-service.ts @@ -214,7 +214,7 @@ export const useDatabaseService = (): any => { if (!database || !user) { return false } - return database.owner.id === user.id + return database.owner.id === user.uid } return { diff --git a/dbrepo-ui/locales/en-US.json b/dbrepo-ui/locales/en-US.json index 3b005cc7592ab670f362491d8551922729046d46..d3918cab602c062a1c902d6afc29a17b0103b8a7 100644 --- a/dbrepo-ui/locales/en-US.json +++ b/dbrepo-ui/locales/en-US.json @@ -137,7 +137,13 @@ "descriptions": { "description": { "label": "Description", - "hint": "Required" + "hint": "Required. Use {symbol} to indicate a line break for improved rendering of multiple paragraphs, but otherwise no HTML markup.", + "abstract": "Data Abstract", + "methods": "Collection Method", + "seriesinformation": "Series Information", + "tableofcontents": "Table of Contents", + "technicalinfo": "Technical Information", + "other": "Description of the Dataset" }, "type": { "label": "Type", @@ -185,7 +191,7 @@ }, "licenses": { "title": "License", - "subtitle": "Identifiers of related resources. These must be globally unique identifiers", + "subtitle": "Rights information of the dataset", "license": { "label": "License" } diff --git a/dbrepo-ui/pages/database/[database_id]/table/[table_id]/import.vue b/dbrepo-ui/pages/database/[database_id]/table/[table_id]/import.vue index efbcd6accf7d3d896769241a7de0d1325a30b3a4..260f2113d1828eb284477f48c021138f4c75ffc0 100644 --- a/dbrepo-ui/pages/database/[database_id]/table/[table_id]/import.vue +++ b/dbrepo-ui/pages/database/[database_id]/table/[table_id]/import.vue @@ -1,7 +1,8 @@ <template> - <div - v-if="canInsertTableData"> - <v-toolbar flat> + <div> + <v-toolbar + v-if="hasReadAccess" + flat> <v-btn class="mr-2" variant="plain" @@ -12,6 +13,7 @@ :text="title" /> </v-toolbar> <v-card + v-if="canInsertTableData" variant="flat" rounded="0"> <v-card-text> @@ -84,6 +86,9 @@ export default { access () { return this.cacheStore.getAccess }, + hasReadAccess () { + return this.access + }, title () { if (!this.table) { return this.$t('pages.table.import.title') @@ -91,7 +96,7 @@ export default { return this.$t('pages.table.import.title') + ' ' + this.table.name }, canInsertTableData () { - if (!this.table || !this.access || !this.cacheUser || !this.roles || !this.roles.includes('insert-table-data')) { + if (!this.table || !this.cacheUser || !this.roles || !this.roles.includes('insert-table-data') || !this.hasReadAccess) { return false } const userService = useUserService() diff --git a/dbrepo-ui/pages/database/[database_id]/table/create/dataset.vue b/dbrepo-ui/pages/database/[database_id]/table/create/dataset.vue index 56db5fdc374cdfd683eb00328f86534cd9fd81bf..088190ac5a2fe8a8c9deb5d943c2069b216d2725 100644 --- a/dbrepo-ui/pages/database/[database_id]/table/create/dataset.vue +++ b/dbrepo-ui/pages/database/[database_id]/table/create/dataset.vue @@ -155,8 +155,7 @@ </v-stepper-header> <v-stepper-window direction="vertical"> - <v-container - v-if="step >= 4"> + <v-container> <TableSchema ref="schema" :back="false" diff --git a/docker-compose.yml b/docker-compose.yml index 196ee28f06ab875f6fa878051855ffa446de1248..b5323e14d8e152661f242c5a22de36fed64e53e6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -88,6 +88,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro-hm + platform: linux/amd64 logging: driver: json-file @@ -111,6 +112,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro-hm + platform: linux/amd64 logging: driver: json-file @@ -133,6 +135,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 logging: driver: json-file @@ -169,6 +172,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-medium + platform: linux/amd64 depends_on: dbrepo-identity-service: condition: service_healthy @@ -195,6 +199,7 @@ services: SYSTEM_PASSWORD: ${SYSTEM_PASSWORD:-admin} deploy: <<: *resources-nano + platform: linux/amd64 depends_on: dbrepo-auth-service: condition: service_healthy @@ -258,6 +263,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-small + platform: linux/amd64 depends_on: dbrepo-auth-service: condition: service_healthy @@ -302,6 +308,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 logging: driver: json-file @@ -330,6 +337,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 logging: driver: json-file @@ -338,6 +346,8 @@ services: container_name: dbrepo-search-db hostname: search-db image: docker.io/bitnami/opensearch:${OPENSEARCH_VERSION} + volumes: + - search-db-data:/bitnami/opensearch/data ports: - "9200:9200" healthcheck: @@ -345,8 +355,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-medium - volumes: - - search-db-data:/bitnami/opensearch/data + platform: linux/amd64 logging: driver: json-file @@ -376,6 +385,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 logging: driver: json-file @@ -408,6 +418,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 depends_on: dbrepo-search-service: condition: service_healthy @@ -430,6 +441,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-nano + platform: linux/amd64 depends_on: dbrepo-analyse-service: condition: service_healthy @@ -471,6 +483,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-nano + platform: linux/amd64 logging: driver: json-file @@ -493,6 +506,7 @@ services: SYSTEM_PASSWORD: "${SYSTEM_PASSWORD:-admin}" deploy: <<: *resources-nano + platform: linux/amd64 depends_on: dbrepo-search-db: condition: service_healthy @@ -519,6 +533,7 @@ services: SYSTEM_PASSWORD: "${SYSTEM_PASSWORD:-admin}" deploy: <<: *resources-nano + platform: linux/amd64 depends_on: dbrepo-dashboard-ui: condition: service_healthy @@ -543,6 +558,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-nano + platform: linux/amd64 logging: driver: json-file @@ -559,6 +575,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-nano + platform: linux/amd64 logging: driver: json-file @@ -578,6 +595,7 @@ services: STORAGE_ENDPOINT: ${STORAGE_ENDPOINT:-http://storage-service:9000} deploy: <<: *resources-nano + platform: linux/amd64 depends_on: dbrepo-storage-service: condition: service_healthy @@ -630,6 +648,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-large + platform: linux/amd64 depends_on: dbrepo-data-db: condition: service_healthy @@ -693,6 +712,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-nano + platform: linux/amd64 extra_hosts: - "localhost:host-gateway" logging: @@ -719,6 +739,7 @@ services: <<: *healthcheck-params deploy: <<: *resources-micro + platform: linux/amd64 depends_on: dbrepo-dashboard-ui: condition: service_healthy diff --git a/grafana/grafana.ini b/grafana/grafana.ini deleted file mode 100644 index df8b9eb1b46e93de904d0c69a448a441f646260f..0000000000000000000000000000000000000000 --- a/grafana/grafana.ini +++ /dev/null @@ -1,5 +0,0 @@ -[server] -domain = grafana -root_url = http://grafana/grafana -serve_from_sub_path = true - diff --git a/helm/dbrepo/files/create-event-listener.jar b/helm/dbrepo/files/create-event-listener.jar index 6ba9f58a962c7d786d8731418b1312432088baca..069d52a2d4e0930349d1cce948e86fca1c5d280a 100644 Binary files a/helm/dbrepo/files/create-event-listener.jar and b/helm/dbrepo/files/create-event-listener.jar differ diff --git a/lib/java/dbrepo-core/.gitignore b/lib/java/dbrepo-core/.gitignore index b425f09ad0e75e91fc43f1aee01bb3a918eec8c0..84f38abb66955bad9e1baa3d4e303cba52a57e66 100644 --- a/lib/java/dbrepo-core/.gitignore +++ b/lib/java/dbrepo-core/.gitignore @@ -9,6 +9,9 @@ target/ *.iml *.ipr +## generated +dependency-reduced-pom.xml + ### Eclipse ### .apt_generated .classpath diff --git a/lib/java/dbrepo-core/Dockerfile b/lib/java/dbrepo-core/Dockerfile deleted file mode 100644 index 8a6348bbcef25836c318e41ae226295f90549a66..0000000000000000000000000000000000000000 --- a/lib/java/dbrepo-core/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -###### FIRST STAGE ###### -FROM maven:3-amazoncorretto-17 AS build -LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" - -COPY ./pom.xml ./ - -RUN mvn dependency:go-offline - -COPY ./src/ ./src/ - -# Make sure it compiles -RUN mvn clean install -DskipTests \ No newline at end of file diff --git a/lib/java/dbrepo-core/pom.xml b/lib/java/dbrepo-core/pom.xml index d86419d19dbb22e8db5ef64f7e8b01d262673bcd..c18cf6a51d69b6a804c67ef87b3c29b0a78c9579 100644 --- a/lib/java/dbrepo-core/pom.xml +++ b/lib/java/dbrepo-core/pom.xml @@ -35,7 +35,6 @@ <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <lombok.version>1.18.36</lombok.version> <keycloak.version>26.0.4</keycloak.version> <mapstruct.version>1.6.3</mapstruct.version> <spring-cloud.version>4.1.4</spring-cloud.version> @@ -43,10 +42,11 @@ <springdoc-openapi.version>2.8.5</springdoc-openapi.version> </properties> - <dependencies><dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-validation</artifactId> - </dependency> + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-validation</artifactId> + </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> @@ -104,7 +104,7 @@ <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> - <scope>compile</scope> + <scope>provided</scope> </dependency> <!-- Entities --> <dependency> @@ -153,6 +153,20 @@ </annotationProcessorPaths> </configuration> </plugin> + <!-- build shaded jar --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>3.6.0</version> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> diff --git a/lib/java/dbrepo-core/src/main/java/at/ac/tuwien/ifs/dbrepo/core/api/database/query/FilterDto.java b/lib/java/dbrepo-core/src/main/java/at/ac/tuwien/ifs/dbrepo/core/api/database/query/FilterDto.java index 2e6b1a03d7b5243612123b97e6df104b182f2807..25d0e83f81b013f68ca6f09189f11ca548747329 100644 --- a/lib/java/dbrepo-core/src/main/java/at/ac/tuwien/ifs/dbrepo/core/api/database/query/FilterDto.java +++ b/lib/java/dbrepo-core/src/main/java/at/ac/tuwien/ifs/dbrepo/core/api/database/query/FilterDto.java @@ -32,7 +32,6 @@ public class FilterDto { @Schema(example = "67c5b54d-2eb0-4f42-8dc1-a504562e9f32") private UUID operatorId; - @NotNull @Schema(example = "1") private String value; diff --git a/lib/python/coverage.xml b/lib/python/coverage.xml deleted file mode 100644 index ba3da4f2e6334a47f8e1fc55af11e024bbf698fc..0000000000000000000000000000000000000000 --- a/lib/python/coverage.xml +++ /dev/null @@ -1,2013 +0,0 @@ -<?xml version="1.0" ?> -<coverage version="7.7.1" timestamp="1743366739557" lines-valid="1967" lines-covered="1831" line-rate="0.9309" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0"> - <!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.7.1 --> - <!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd --> - <sources> - <source>/home/mweise/Projects/fda-services/lib/python</source> - </sources> - <packages> - <package name="dbrepo" line-rate="0.8972" branch-rate="0" complexity="0"> - <classes> - <class name="RestClient.py" filename="dbrepo/RestClient.py" complexity="0" line-rate="0.8972" branch-rate="0"> - <methods/> - <lines> - <line number="1" hits="1"/> - <line number="2" hits="1"/> - <line number="3" hits="1"/> - <line number="4" hits="1"/> - <line number="6" hits="1"/> - <line number="7" hits="1"/> - <line number="8" hits="1"/> - <line number="10" hits="1"/> - <line number="11" hits="1"/> - <line number="14" hits="1"/> - <line number="16" hits="1"/> - <line number="20" hits="1"/> - <line number="32" hits="1"/> - <line number="33" hits="1"/> - <line number="34" hits="1"/> - <line number="35" hits="1"/> - <line number="37" hits="1"/> - <line number="42" hits="1"/> - <line number="43" hits="1"/> - <line number="44" hits="1"/> - <line number="45" hits="1"/> - <line number="46" hits="1"/> - <line number="48" hits="1"/> - <line number="49" hits="1"/> - <line number="52" hits="1"/> - <line number="54" hits="1"/> - <line number="55" hits="1"/> - <line number="56" hits="1"/> - <line number="57" hits="1"/> - <line number="58" hits="1"/> - <line number="59" hits="1"/> - <line number="60" hits="1"/> - <line number="61" hits="1"/> - <line number="62" hits="1"/> - <line number="63" hits="1"/> - <line number="65" hits="1"/> - <line number="66" hits="1"/> - <line number="67" hits="1"/> - <line number="68" hits="1"/> - <line number="69" hits="1"/> - <line number="70" hits="1"/> - <line number="71" hits="1"/> - <line number="72" hits="1"/> - <line number="73" hits="1"/> - <line number="74" hits="1"/> - <line number="75" hits="1"/> - <line number="76" hits="1"/> - <line number="79" hits="1"/> - <line number="85" hits="1"/> - <line number="86" hits="1"/> - <line number="87" hits="1"/> - <line number="88" hits="1"/> - <line number="89" hits="1"/> - <line number="91" hits="1"/> - <line number="99" hits="1"/> - <line number="100" hits="1"/> - <line number="101" hits="1"/> - <line number="102" hits="1"/> - <line number="103" hits="1"/> - <line number="104" hits="1"/> - <line number="107" hits="1"/> - <line number="115" hits="1"/> - <line number="116" hits="1"/> - <line number="117" hits="1"/> - <line number="118" hits="1"/> - <line number="119" hits="1"/> - <line number="120" hits="1"/> - <line number="123" hits="1"/> - <line number="133" hits="1"/> - <line number="134" hits="1"/> - <line number="135" hits="1"/> - <line number="136" hits="1"/> - <line number="137" hits="1"/> - <line number="138" hits="1"/> - <line number="139" hits="1"/> - <line number="140" hits="1"/> - <line number="141" hits="1"/> - <line number="142" hits="1"/> - <line number="145" hits="1"/> - <line number="165" hits="1"/> - <line number="166" hits="1"/> - <line number="169" hits="1"/> - <line number="170" hits="1"/> - <line number="171" hits="1"/> - <line number="172" hits="1"/> - <line number="173" hits="1"/> - <line number="174" hits="1"/> - <line number="175" hits="1"/> - <line number="176" hits="1"/> - <line number="177" hits="1"/> - <line number="178" hits="1"/> - <line number="181" hits="1"/> - <line number="189" hits="1"/> - <line number="190" hits="1"/> - <line number="191" hits="1"/> - <line number="192" hits="1"/> - <line number="193" hits="1"/> - <line number="194" hits="1"/> - <line number="197" hits="1"/> - <line number="206" hits="1"/> - <line number="207" hits="1"/> - <line number="208" hits="1"/> - <line number="209" hits="1"/> - <line number="210" hits="1"/> - <line number="211" hits="1"/> - <line number="212" hits="1"/> - <line number="213" hits="1"/> - <line number="216" hits="1"/> - <line number="224" hits="1"/> - <line number="225" hits="1"/> - <line number="226" hits="1"/> - <line number="227" hits="1"/> - <line number="228" hits="1"/> - <line number="229" hits="1"/> - <line number="232" hits="1"/> - <line number="239" hits="1"/> - <line number="240" hits="1"/> - <line number="241" hits="1"/> - <line number="242" hits="1"/> - <line number="243" hits="1"/> - <line number="246" hits="1"/> - <line number="257" hits="1"/> - <line number="258" hits="1"/> - <line number="259" hits="1"/> - <line number="260" hits="1"/> - <line number="261" hits="1"/> - <line number="262" hits="1"/> - <line number="263" hits="1"/> - <line number="264" hits="1"/> - <line number="265" hits="1"/> - <line number="266" hits="1"/> - <line number="269" hits="1"/> - <line number="289" hits="1"/> - <line number="290" hits="1"/> - <line number="293" hits="1"/> - <line number="294" hits="1"/> - <line number="295" hits="1"/> - <line number="296" hits="1"/> - <line number="297" hits="1"/> - <line number="298" hits="1"/> - <line number="299" hits="1"/> - <line number="300" hits="1"/> - <line number="301" hits="1"/> - <line number="302" hits="1"/> - <line number="303" hits="1"/> - <line number="304" hits="1"/> - <line number="305" hits="1"/> - <line number="306" hits="1"/> - <line number="307" hits="1"/> - <line number="308" hits="1"/> - <line number="311" hits="1"/> - <line number="335" hits="1"/> - <line number="336" hits="1"/> - <line number="341" hits="1"/> - <line number="342" hits="1"/> - <line number="343" hits="1"/> - <line number="344" hits="1"/> - <line number="345" hits="1"/> - <line number="346" hits="1"/> - <line number="347" hits="1"/> - <line number="348" hits="1"/> - <line number="349" hits="1"/> - <line number="350" hits="1"/> - <line number="351" hits="1"/> - <line number="352" hits="1"/> - <line number="355" hits="1"/> - <line number="372" hits="1"/> - <line number="373" hits="1"/> - <line number="375" hits="1"/> - <line number="376" hits="1"/> - <line number="377" hits="1"/> - <line number="378" hits="1"/> - <line number="379" hits="1"/> - <line number="380" hits="1"/> - <line number="381" hits="1"/> - <line number="382" hits="1"/> - <line number="383" hits="1"/> - <line number="384" hits="1"/> - <line number="385" hits="1"/> - <line number="387" hits="1"/> - <line number="388" hits="1"/> - <line number="389" hits="1"/> - <line number="392" hits="1"/> - <line number="408" hits="1"/> - <line number="409" hits="1"/> - <line number="410" hits="1"/> - <line number="411" hits="1"/> - <line number="412" hits="1"/> - <line number="413" hits="1"/> - <line number="414" hits="1"/> - <line number="415" hits="1"/> - <line number="416" hits="1"/> - <line number="417" hits="1"/> - <line number="418" hits="1"/> - <line number="419" hits="1"/> - <line number="420" hits="1"/> - <line number="422" hits="1"/> - <line number="423" hits="1"/> - <line number="425" hits="1"/> - <line number="428" hits="1"/> - <line number="443" hits="1"/> - <line number="444" hits="1"/> - <line number="445" hits="1"/> - <line number="446" hits="1"/> - <line number="447" hits="1"/> - <line number="448" hits="1"/> - <line number="449" hits="1"/> - <line number="450" hits="1"/> - <line number="451" hits="1"/> - <line number="452" hits="1"/> - <line number="453" hits="1"/> - <line number="454" hits="1"/> - <line number="455" hits="1"/> - <line number="456" hits="1"/> - <line number="457" hits="1"/> - <line number="458" hits="1"/> - <line number="459" hits="1"/> - <line number="461" hits="1"/> - <line number="462" hits="1"/> - <line number="463" hits="1"/> - <line number="466" hits="1"/> - <line number="489" hits="1"/> - <line number="490" hits="1"/> - <line number="491" hits="1"/> - <line number="494" hits="1"/> - <line number="495" hits="1"/> - <line number="496" hits="1"/> - <line number="497" hits="1"/> - <line number="498" hits="0"/> - <line number="501" hits="1"/> - <line number="502" hits="1"/> - <line number="503" hits="1"/> - <line number="504" hits="1"/> - <line number="505" hits="1"/> - <line number="506" hits="1"/> - <line number="507" hits="1"/> - <line number="508" hits="1"/> - <line number="509" hits="1"/> - <line number="510" hits="1"/> - <line number="511" hits="1"/> - <line number="512" hits="1"/> - <line number="513" hits="1"/> - <line number="514" hits="1"/> - <line number="517" hits="1"/> - <line number="529" hits="1"/> - <line number="530" hits="1"/> - <line number="531" hits="1"/> - <line number="532" hits="1"/> - <line number="533" hits="1"/> - <line number="534" hits="1"/> - <line number="535" hits="1"/> - <line number="536" hits="1"/> - <line number="537" hits="1"/> - <line number="538" hits="1"/> - <line number="541" hits="1"/> - <line number="554" hits="1"/> - <line number="555" hits="1"/> - <line number="556" hits="1"/> - <line number="557" hits="1"/> - <line number="558" hits="1"/> - <line number="559" hits="1"/> - <line number="560" hits="1"/> - <line number="561" hits="1"/> - <line number="562" hits="1"/> - <line number="563" hits="1"/> - <line number="566" hits="1"/> - <line number="580" hits="1"/> - <line number="581" hits="1"/> - <line number="582" hits="1"/> - <line number="583" hits="1"/> - <line number="584" hits="1"/> - <line number="585" hits="1"/> - <line number="586" hits="1"/> - <line number="587" hits="1"/> - <line number="588" hits="1"/> - <line number="589" hits="1"/> - <line number="590" hits="1"/> - <line number="591" hits="1"/> - <line number="592" hits="1"/> - <line number="593" hits="1"/> - <line number="594" hits="1"/> - <line number="597" hits="1"/> - <line number="610" hits="1"/> - <line number="611" hits="1"/> - <line number="612" hits="1"/> - <line number="613" hits="1"/> - <line number="614" hits="1"/> - <line number="615" hits="1"/> - <line number="616" hits="1"/> - <line number="617" hits="1"/> - <line number="618" hits="1"/> - <line number="619" hits="1"/> - <line number="620" hits="1"/> - <line number="623" hits="1"/> - <line number="637" hits="1"/> - <line number="638" hits="1"/> - <line number="639" hits="1"/> - <line number="640" hits="1"/> - <line number="641" hits="1"/> - <line number="642" hits="1"/> - <line number="643" hits="1"/> - <line number="644" hits="1"/> - <line number="645" hits="1"/> - <line number="646" hits="1"/> - <line number="647" hits="1"/> - <line number="648" hits="1"/> - <line number="649" hits="1"/> - <line number="650" hits="1"/> - <line number="653" hits="1"/> - <line number="664" hits="1"/> - <line number="665" hits="1"/> - <line number="666" hits="1"/> - <line number="667" hits="1"/> - <line number="668" hits="1"/> - <line number="669" hits="1"/> - <line number="670" hits="1"/> - <line number="671" hits="1"/> - <line number="674" hits="1"/> - <line number="687" hits="1"/> - <line number="688" hits="1"/> - <line number="689" hits="1"/> - <line number="690" hits="1"/> - <line number="691" hits="1"/> - <line number="692" hits="1"/> - <line number="693" hits="1"/> - <line number="694" hits="1"/> - <line number="695" hits="1"/> - <line number="696" hits="1"/> - <line number="699" hits="1"/> - <line number="714" hits="1"/> - <line number="715" hits="1"/> - <line number="717" hits="1"/> - <line number="718" hits="1"/> - <line number="719" hits="1"/> - <line number="720" hits="1"/> - <line number="721" hits="1"/> - <line number="722" hits="1"/> - <line number="723" hits="1"/> - <line number="724" hits="1"/> - <line number="727" hits="1"/> - <line number="748" hits="1"/> - <line number="749" hits="1"/> - <line number="750" hits="1"/> - <line number="751" hits="1"/> - <line number="754" hits="1"/> - <line number="755" hits="1"/> - <line number="756" hits="1"/> - <line number="757" hits="1"/> - <line number="758" hits="1"/> - <line number="759" hits="1"/> - <line number="760" hits="1"/> - <line number="761" hits="1"/> - <line number="762" hits="1"/> - <line number="763" hits="1"/> - <line number="764" hits="1"/> - <line number="765" hits="1"/> - <line number="766" hits="1"/> - <line number="767" hits="1"/> - <line number="768" hits="1"/> - <line number="769" hits="1"/> - <line number="772" hits="1"/> - <line number="787" hits="1"/> - <line number="788" hits="1"/> - <line number="789" hits="1"/> - <line number="790" hits="1"/> - <line number="791" hits="1"/> - <line number="792" hits="1"/> - <line number="793" hits="1"/> - <line number="794" hits="1"/> - <line number="795" hits="1"/> - <line number="796" hits="1"/> - <line number="797" hits="1"/> - <line number="798" hits="1"/> - <line number="799" hits="1"/> - <line number="800" hits="1"/> - <line number="801" hits="1"/> - <line number="802" hits="1"/> - <line number="803" hits="1"/> - <line number="806" hits="1"/> - <line number="824" hits="1"/> - <line number="825" hits="1"/> - <line number="826" hits="1"/> - <line number="827" hits="1"/> - <line number="828" hits="1"/> - <line number="829" hits="1"/> - <line number="830" hits="1"/> - <line number="831" hits="1"/> - <line number="832" hits="1"/> - <line number="833" hits="1"/> - <line number="834" hits="1"/> - <line number="835" hits="1"/> - <line number="836" hits="1"/> - <line number="837" hits="1"/> - <line number="838" hits="1"/> - <line number="839" hits="1"/> - <line number="840" hits="1"/> - <line number="841" hits="1"/> - <line number="843" hits="1"/> - <line number="846" hits="1"/> - <line number="865" hits="1"/> - <line number="866" hits="1"/> - <line number="867" hits="1"/> - <line number="868" hits="1"/> - <line number="869" hits="1"/> - <line number="870" hits="1"/> - <line number="871" hits="1"/> - <line number="872" hits="1"/> - <line number="873" hits="1"/> - <line number="874" hits="1"/> - <line number="875" hits="1"/> - <line number="876" hits="1"/> - <line number="877" hits="1"/> - <line number="878" hits="1"/> - <line number="879" hits="1"/> - <line number="880" hits="1"/> - <line number="881" hits="1"/> - <line number="882" hits="1"/> - <line number="884" hits="1"/> - <line number="887" hits="1"/> - <line number="901" hits="1"/> - <line number="902" hits="1"/> - <line number="903" hits="1"/> - <line number="904" hits="1"/> - <line number="905" hits="1"/> - <line number="906" hits="1"/> - <line number="907" hits="1"/> - <line number="908" hits="1"/> - <line number="909" hits="1"/> - <line number="910" hits="1"/> - <line number="911" hits="1"/> - <line number="912" hits="1"/> - <line number="914" hits="1"/> - <line number="917" hits="1"/> - <line number="927" hits="0"/> - <line number="928" hits="0"/> - <line number="929" hits="0"/> - <line number="930" hits="0"/> - <line number="932" hits="0"/> - <line number="933" hits="0"/> - <line number="934" hits="0"/> - <line number="935" hits="0"/> - <line number="938" hits="1"/> - <line number="955" hits="0"/> - <line number="956" hits="0"/> - <line number="959" hits="0"/> - <line number="960" hits="0"/> - <line number="961" hits="0"/> - <line number="962" hits="0"/> - <line number="963" hits="0"/> - <line number="964" hits="0"/> - <line number="965" hits="0"/> - <line number="966" hits="0"/> - <line number="967" hits="0"/> - <line number="968" hits="0"/> - <line number="970" hits="0"/> - <line number="973" hits="1"/> - <line number="987" hits="0"/> - <line number="993" hits="0"/> - <line number="994" hits="0"/> - <line number="995" hits="0"/> - <line number="996" hits="0"/> - <line number="997" hits="0"/> - <line number="998" hits="0"/> - <line number="999" hits="0"/> - <line number="1000" hits="0"/> - <line number="1001" hits="0"/> - <line number="1002" hits="0"/> - <line number="1005" hits="1"/> - <line number="1017" hits="0"/> - <line number="1021" hits="0"/> - <line number="1022" hits="0"/> - <line number="1023" hits="0"/> - <line number="1024" hits="0"/> - <line number="1025" hits="0"/> - <line number="1026" hits="0"/> - <line number="1027" hits="0"/> - <line number="1028" hits="0"/> - <line number="1029" hits="0"/> - <line number="1030" hits="0"/> - <line number="1033" hits="1"/> - <line number="1048" hits="1"/> - <line number="1049" hits="1"/> - <line number="1050" hits="1"/> - <line number="1051" hits="1"/> - <line number="1052" hits="1"/> - <line number="1053" hits="1"/> - <line number="1054" hits="1"/> - <line number="1055" hits="1"/> - <line number="1056" hits="1"/> - <line number="1057" hits="1"/> - <line number="1058" hits="1"/> - <line number="1060" hits="1"/> - <line number="1061" hits="1"/> - <line number="1062" hits="1"/> - <line number="1065" hits="1"/> - <line number="1080" hits="1"/> - <line number="1081" hits="1"/> - <line number="1082" hits="1"/> - <line number="1083" hits="1"/> - <line number="1084" hits="1"/> - <line number="1085" hits="1"/> - <line number="1086" hits="1"/> - <line number="1087" hits="1"/> - <line number="1088" hits="1"/> - <line number="1089" hits="1"/> - <line number="1090" hits="1"/> - <line number="1091" hits="1"/> - <line number="1093" hits="1"/> - <line number="1096" hits="1"/> - <line number="1110" hits="1"/> - <line number="1111" hits="1"/> - <line number="1112" hits="1"/> - <line number="1113" hits="1"/> - <line number="1114" hits="1"/> - <line number="1115" hits="1"/> - <line number="1116" hits="1"/> - <line number="1117" hits="1"/> - <line number="1118" hits="1"/> - <line number="1119" hits="1"/> - <line number="1120" hits="1"/> - <line number="1121" hits="1"/> - <line number="1123" hits="1"/> - <line number="1126" hits="1"/> - <line number="1143" hits="1"/> - <line number="1144" hits="1"/> - <line number="1145" hits="1"/> - <line number="1146" hits="1"/> - <line number="1147" hits="1"/> - <line number="1148" hits="1"/> - <line number="1149" hits="1"/> - <line number="1150" hits="1"/> - <line number="1151" hits="1"/> - <line number="1152" hits="1"/> - <line number="1153" hits="1"/> - <line number="1154" hits="1"/> - <line number="1155" hits="1"/> - <line number="1156" hits="1"/> - <line number="1157" hits="1"/> - <line number="1158" hits="1"/> - <line number="1159" hits="1"/> - <line number="1161" hits="1"/> - <line number="1164" hits="1"/> - <line number="1180" hits="1"/> - <line number="1181" hits="1"/> - <line number="1182" hits="1"/> - <line number="1183" hits="1"/> - <line number="1184" hits="1"/> - <line number="1185" hits="1"/> - <line number="1186" hits="1"/> - <line number="1187" hits="1"/> - <line number="1188" hits="1"/> - <line number="1189" hits="1"/> - <line number="1190" hits="1"/> - <line number="1191" hits="1"/> - <line number="1192" hits="1"/> - <line number="1193" hits="1"/> - <line number="1195" hits="1"/> - <line number="1198" hits="1"/> - <line number="1210" hits="1"/> - <line number="1211" hits="1"/> - <line number="1212" hits="1"/> - <line number="1213" hits="1"/> - <line number="1214" hits="1"/> - <line number="1215" hits="1"/> - <line number="1216" hits="1"/> - <line number="1217" hits="1"/> - <line number="1218" hits="1"/> - <line number="1219" hits="1"/> - <line number="1222" hits="1"/> - <line number="1239" hits="1"/> - <line number="1240" hits="1"/> - <line number="1241" hits="1"/> - <line number="1242" hits="1"/> - <line number="1243" hits="1"/> - <line number="1244" hits="1"/> - <line number="1245" hits="1"/> - <line number="1246" hits="1"/> - <line number="1247" hits="1"/> - <line number="1248" hits="1"/> - <line number="1249" hits="1"/> - <line number="1250" hits="1"/> - <line number="1251" hits="1"/> - <line number="1253" hits="1"/> - <line number="1254" hits="1"/> - <line number="1255" hits="1"/> - <line number="1258" hits="1"/> - <line number="1275" hits="1"/> - <line number="1276" hits="1"/> - <line number="1277" hits="1"/> - <line number="1278" hits="1"/> - <line number="1279" hits="1"/> - <line number="1280" hits="1"/> - <line number="1281" hits="1"/> - <line number="1282" hits="1"/> - <line number="1283" hits="1"/> - <line number="1284" hits="1"/> - <line number="1285" hits="1"/> - <line number="1286" hits="1"/> - <line number="1287" hits="1"/> - <line number="1289" hits="1"/> - <line number="1290" hits="1"/> - <line number="1291" hits="1"/> - <line number="1294" hits="1"/> - <line number="1308" hits="1"/> - <line number="1309" hits="1"/> - <line number="1310" hits="1"/> - <line number="1311" hits="1"/> - <line number="1312" hits="1"/> - <line number="1313" hits="1"/> - <line number="1314" hits="1"/> - <line number="1315" hits="1"/> - <line number="1316" hits="1"/> - <line number="1317" hits="1"/> - <line number="1318" hits="1"/> - <line number="1319" hits="1"/> - <line number="1321" hits="1"/> - <line number="1322" hits="1"/> - <line number="1323" hits="1"/> - <line number="1326" hits="1"/> - <line number="1349" hits="1"/> - <line number="1350" hits="1"/> - <line number="1351" hits="1"/> - <line number="1352" hits="1"/> - <line number="1353" hits="1"/> - <line number="1354" hits="1"/> - <line number="1355" hits="1"/> - <line number="1356" hits="1"/> - <line number="1357" hits="1"/> - <line number="1358" hits="1"/> - <line number="1360" hits="1"/> - <line number="1361" hits="1"/> - <line number="1362" hits="1"/> - <line number="1363" hits="1"/> - <line number="1364" hits="1"/> - <line number="1365" hits="1"/> - <line number="1366" hits="1"/> - <line number="1367" hits="1"/> - <line number="1368" hits="1"/> - <line number="1369" hits="1"/> - <line number="1370" hits="1"/> - <line number="1371" hits="1"/> - <line number="1372" hits="1"/> - <line number="1373" hits="1"/> - <line number="1374" hits="1"/> - <line number="1375" hits="1"/> - <line number="1378" hits="1"/> - <line number="1396" hits="1"/> - <line number="1397" hits="1"/> - <line number="1398" hits="1"/> - <line number="1399" hits="1"/> - <line number="1400" hits="1"/> - <line number="1401" hits="1"/> - <line number="1402" hits="1"/> - <line number="1403" hits="1"/> - <line number="1404" hits="1"/> - <line number="1405" hits="1"/> - <line number="1406" hits="1"/> - <line number="1407" hits="1"/> - <line number="1408" hits="1"/> - <line number="1409" hits="1"/> - <line number="1410" hits="1"/> - <line number="1413" hits="1"/> - <line number="1428" hits="1"/> - <line number="1429" hits="1"/> - <line number="1430" hits="1"/> - <line number="1431" hits="1"/> - <line number="1432" hits="1"/> - <line number="1433" hits="1"/> - <line number="1434" hits="1"/> - <line number="1435" hits="1"/> - <line number="1436" hits="1"/> - <line number="1437" hits="1"/> - <line number="1438" hits="1"/> - <line number="1439" hits="1"/> - <line number="1440" hits="1"/> - <line number="1443" hits="1"/> - <line number="1458" hits="1"/> - <line number="1459" hits="1"/> - <line number="1460" hits="1"/> - <line number="1461" hits="1"/> - <line number="1462" hits="1"/> - <line number="1463" hits="1"/> - <line number="1464" hits="1"/> - <line number="1465" hits="1"/> - <line number="1466" hits="1"/> - <line number="1467" hits="1"/> - <line number="1468" hits="1"/> - <line number="1469" hits="1"/> - <line number="1470" hits="1"/> - <line number="1471" hits="1"/> - <line number="1474" hits="1"/> - <line number="1487" hits="1"/> - <line number="1488" hits="1"/> - <line number="1489" hits="1"/> - <line number="1490" hits="1"/> - <line number="1491" hits="1"/> - <line number="1492" hits="1"/> - <line number="1493" hits="1"/> - <line number="1494" hits="1"/> - <line number="1495" hits="1"/> - <line number="1496" hits="1"/> - <line number="1497" hits="1"/> - <line number="1498" hits="1"/> - <line number="1501" hits="1"/> - <line number="1519" hits="1"/> - <line number="1520" hits="1"/> - <line number="1521" hits="1"/> - <line number="1522" hits="1"/> - <line number="1523" hits="1"/> - <line number="1524" hits="1"/> - <line number="1525" hits="1"/> - <line number="1526" hits="1"/> - <line number="1527" hits="1"/> - <line number="1528" hits="1"/> - <line number="1529" hits="1"/> - <line number="1530" hits="1"/> - <line number="1531" hits="1"/> - <line number="1532" hits="1"/> - <line number="1533" hits="1"/> - <line number="1534" hits="1"/> - <line number="1537" hits="1"/> - <line number="1573" hits="1"/> - <line number="1574" hits="1"/> - <line number="1579" hits="1"/> - <line number="1580" hits="1"/> - <line number="1581" hits="1"/> - <line number="1582" hits="1"/> - <line number="1583" hits="1"/> - <line number="1584" hits="1"/> - <line number="1585" hits="1"/> - <line number="1586" hits="1"/> - <line number="1587" hits="1"/> - <line number="1588" hits="1"/> - <line number="1589" hits="1"/> - <line number="1590" hits="1"/> - <line number="1592" hits="1"/> - <line number="1593" hits="1"/> - <line number="1594" hits="1"/> - <line number="1597" hits="1"/> - <line number="1634" hits="1"/> - <line number="1635" hits="1"/> - <line number="1641" hits="1"/> - <line number="1642" hits="1"/> - <line number="1643" hits="1"/> - <line number="1644" hits="1"/> - <line number="1645" hits="1"/> - <line number="1646" hits="1"/> - <line number="1647" hits="1"/> - <line number="1648" hits="1"/> - <line number="1649" hits="1"/> - <line number="1650" hits="1"/> - <line number="1651" hits="1"/> - <line number="1652" hits="1"/> - <line number="1654" hits="1"/> - <line number="1655" hits="1"/> - <line number="1656" hits="1"/> - <line number="1659" hits="1"/> - <line number="1674" hits="1"/> - <line number="1675" hits="1"/> - <line number="1676" hits="1"/> - <line number="1677" hits="1"/> - <line number="1678" hits="1"/> - <line number="1679" hits="1"/> - <line number="1680" hits="1"/> - <line number="1681" hits="1"/> - <line number="1682" hits="1"/> - <line number="1683" hits="1"/> - <line number="1684" hits="1"/> - <line number="1685" hits="1"/> - <line number="1686" hits="1"/> - <line number="1688" hits="1"/> - <line number="1689" hits="1"/> - <line number="1690" hits="1"/> - <line number="1693" hits="1"/> - <line number="1699" hits="1"/> - <line number="1700" hits="1"/> - <line number="1701" hits="1"/> - <line number="1702" hits="1"/> - <line number="1703" hits="1"/> - <line number="1704" hits="1"/> - <line number="1707" hits="1"/> - <line number="1713" hits="0"/> - <line number="1714" hits="0"/> - <line number="1715" hits="0"/> - <line number="1716" hits="0"/> - <line number="1717" hits="0"/> - <line number="1718" hits="0"/> - <line number="1721" hits="1"/> - <line number="1727" hits="1"/> - <line number="1728" hits="1"/> - <line number="1729" hits="1"/> - <line number="1730" hits="1"/> - <line number="1731" hits="1"/> - <line number="1732" hits="1"/> - <line number="1735" hits="1"/> - <line number="1754" hits="1"/> - <line number="1755" hits="1"/> - <line number="1756" hits="1"/> - <line number="1757" hits="1"/> - <line number="1758" hits="1"/> - <line number="1759" hits="1"/> - <line number="1760" hits="1"/> - <line number="1761" hits="1"/> - <line number="1762" hits="1"/> - <line number="1763" hits="1"/> - <line number="1764" hits="1"/> - <line number="1765" hits="1"/> - <line number="1766" hits="1"/> - <line number="1767" hits="1"/> - <line number="1768" hits="1"/> - <line number="1769" hits="1"/> - <line number="1770" hits="1"/> - <line number="1771" hits="1"/> - <line number="1772" hits="1"/> - <line number="1773" hits="1"/> - <line number="1774" hits="1"/> - <line number="1775" hits="1"/> - <line number="1776" hits="1"/> - <line number="1777" hits="1"/> - <line number="1778" hits="1"/> - <line number="1779" hits="1"/> - <line number="1780" hits="1"/> - <line number="1781" hits="1"/> - <line number="1783" hits="1"/> - <line number="1786" hits="1"/> - <line number="1797" hits="0"/> - <line number="1798" hits="0"/> - <line number="1799" hits="0"/> - <line number="1800" hits="0"/> - <line number="1801" hits="0"/> - <line number="1802" hits="0"/> - <line number="1803" hits="0"/> - <line number="1804" hits="0"/> - <line number="1807" hits="1"/> - <line number="1818" hits="0"/> - <line number="1819" hits="0"/> - <line number="1820" hits="0"/> - <line number="1821" hits="0"/> - <line number="1822" hits="0"/> - <line number="1823" hits="0"/> - <line number="1824" hits="0"/> - <line number="1826" hits="0"/> - <line number="1827" hits="0"/> - <line number="1829" hits="0"/> - <line number="1830" hits="0"/> - <line number="1832" hits="0"/> - <line number="1833" hits="0"/> - <line number="1834" hits="0"/> - <line number="1835" hits="0"/> - <line number="1836" hits="0"/> - <line number="1837" hits="0"/> - <line number="1840" hits="1"/> - <line number="1851" hits="1"/> - <line number="1852" hits="1"/> - <line number="1853" hits="1"/> - <line number="1854" hits="1"/> - <line number="1855" hits="1"/> - <line number="1856" hits="0"/> - <line number="1857" hits="0"/> - <line number="1858" hits="0"/> - <line number="1861" hits="1"/> - <line number="1867" hits="1"/> - <line number="1868" hits="1"/> - <line number="1869" hits="1"/> - <line number="1870" hits="1"/> - <line number="1871" hits="1"/> - <line number="1872" hits="0"/> - <line number="1875" hits="1"/> - <line number="1881" hits="1"/> - <line number="1882" hits="1"/> - <line number="1883" hits="1"/> - <line number="1884" hits="1"/> - <line number="1885" hits="1"/> - <line number="1886" hits="0"/> - <line number="1889" hits="1"/> - <line number="1909" hits="1"/> - <line number="1910" hits="1"/> - <line number="1912" hits="1"/> - <line number="1913" hits="1"/> - <line number="1914" hits="1"/> - <line number="1915" hits="1"/> - <line number="1916" hits="1"/> - <line number="1917" hits="1"/> - <line number="1918" hits="1"/> - <line number="1919" hits="1"/> - <line number="1920" hits="1"/> - <line number="1921" hits="1"/> - <line number="1922" hits="1"/> - <line number="1923" hits="1"/> - <line number="1924" hits="1"/> - <line number="1925" hits="1"/> - <line number="1927" hits="1"/> - <line number="1941" hits="0"/> - <line number="1942" hits="0"/> - <line number="1944" hits="0"/> - <line number="1945" hits="0"/> - <line number="1946" hits="0"/> - <line number="1947" hits="0"/> - <line number="1948" hits="0"/> - <line number="1949" hits="0"/> - <line number="1950" hits="0"/> - <line number="1951" hits="0"/> - <line number="1953" hits="0"/> - <line number="1954" hits="0"/> - <line number="1955" hits="0"/> - </lines> - </class> - <class name="__init__.py" filename="dbrepo/__init__.py" complexity="0" line-rate="1" branch-rate="0"> - <methods/> - <lines/> - </class> - </classes> - </package> - <package name="dbrepo.api" line-rate="0.9595" branch-rate="0" complexity="0"> - <classes> - <class name="__init__.py" filename="dbrepo/api/__init__.py" complexity="0" line-rate="1" branch-rate="0"> - <methods/> - <lines/> - </class> - <class name="dto.py" filename="dbrepo/api/dto.py" complexity="0" line-rate="1" branch-rate="0"> - <methods/> - <lines> - <line number="1" hits="1"/> - <line number="3" hits="1"/> - <line number="4" hits="1"/> - <line number="5" hits="1"/> - <line number="6" hits="1"/> - <line number="8" hits="1"/> - <line number="10" hits="1"/> - <line number="15" hits="1"/> - <line number="16" hits="1"/> - <line number="17" hits="1"/> - <line number="18" hits="1"/> - <line number="19" hits="1"/> - <line number="22" hits="1"/> - <line number="23" hits="1"/> - <line number="24" hits="1"/> - <line number="25" hits="1"/> - <line number="26" hits="1"/> - <line number="27" hits="1"/> - <line number="28" hits="1"/> - <line number="31" hits="1"/> - <line number="32" hits="1"/> - <line number="33" hits="1"/> - <line number="34" hits="1"/> - <line number="35" hits="1"/> - <line number="38" hits="1"/> - <line number="39" hits="1"/> - <line number="40" hits="1"/> - <line number="41" hits="1"/> - <line number="42" hits="1"/> - <line number="45" hits="1"/> - <line number="46" hits="1"/> - <line number="47" hits="1"/> - <line number="50" hits="1"/> - <line number="51" hits="1"/> - <line number="52" hits="1"/> - <line number="53" hits="1"/> - <line number="54" hits="1"/> - <line number="55" hits="1"/> - <line number="56" hits="1"/> - <line number="57" hits="1"/> - <line number="58" hits="1"/> - <line number="61" hits="1"/> - <line number="62" hits="1"/> - <line number="63" hits="1"/> - <line number="64" hits="1"/> - <line number="67" hits="1"/> - <line number="68" hits="1"/> - <line number="69" hits="1"/> - <line number="70" hits="1"/> - <line number="71" hits="1"/> - <line number="72" hits="1"/> - <line number="73" hits="1"/> - <line number="76" hits="1"/> - <line number="77" hits="1"/> - <line number="78" hits="1"/> - <line number="79" hits="1"/> - <line number="80" hits="1"/> - <line number="81" hits="1"/> - <line number="82" hits="1"/> - <line number="83" hits="1"/> - <line number="86" hits="1"/> - <line number="87" hits="1"/> - <line number="88" hits="1"/> - <line number="89" hits="1"/> - <line number="90" hits="1"/> - <line number="91" hits="1"/> - <line number="92" hits="1"/> - <line number="95" hits="1"/> - <line number="96" hits="1"/> - <line number="97" hits="1"/> - <line number="98" hits="1"/> - <line number="99" hits="1"/> - <line number="100" hits="1"/> - <line number="101" hits="1"/> - <line number="104" hits="1"/> - <line number="105" hits="1"/> - <line number="106" hits="1"/> - <line number="107" hits="1"/> - <line number="108" hits="1"/> - <line number="109" hits="1"/> - <line number="110" hits="1"/> - <line number="111" hits="1"/> - <line number="114" hits="1"/> - <line number="115" hits="1"/> - <line number="116" hits="1"/> - <line number="117" hits="1"/> - <line number="118" hits="1"/> - <line number="119" hits="1"/> - <line number="120" hits="1"/> - <line number="121" hits="1"/> - <line number="122" hits="1"/> - <line number="123" hits="1"/> - <line number="126" hits="1"/> - <line number="127" hits="1"/> - <line number="128" hits="1"/> - <line number="129" hits="1"/> - <line number="130" hits="1"/> - <line number="133" hits="1"/> - <line number="134" hits="1"/> - <line number="135" hits="1"/> - <line number="136" hits="1"/> - <line number="137" hits="1"/> - <line number="138" hits="1"/> - <line number="139" hits="1"/> - <line number="140" hits="1"/> - <line number="143" hits="1"/> - <line number="144" hits="1"/> - <line number="147" hits="1"/> - <line number="148" hits="1"/> - <line number="151" hits="1"/> - <line number="155" hits="1"/> - <line number="156" hits="1"/> - <line number="158" hits="1"/> - <line number="159" hits="1"/> - <line number="161" hits="1"/> - <line number="162" hits="1"/> - <line number="165" hits="1"/> - <line number="169" hits="1"/> - <line number="170" hits="1"/> - <line number="171" hits="1"/> - <line number="172" hits="1"/> - <line number="173" hits="1"/> - <line number="174" hits="1"/> - <line number="175" hits="1"/> - <line number="176" hits="1"/> - <line number="177" hits="1"/> - <line number="178" hits="1"/> - <line number="179" hits="1"/> - <line number="180" hits="1"/> - <line number="181" hits="1"/> - <line number="182" hits="1"/> - <line number="183" hits="1"/> - <line number="184" hits="1"/> - <line number="185" hits="1"/> - <line number="186" hits="1"/> - <line number="187" hits="1"/> - <line number="188" hits="1"/> - <line number="189" hits="1"/> - <line number="190" hits="1"/> - <line number="191" hits="1"/> - <line number="192" hits="1"/> - <line number="193" hits="1"/> - <line number="194" hits="1"/> - <line number="195" hits="1"/> - <line number="196" hits="1"/> - <line number="197" hits="1"/> - <line number="198" hits="1"/> - <line number="201" hits="1"/> - <line number="205" hits="1"/> - <line number="206" hits="1"/> - <line number="207" hits="1"/> - <line number="208" hits="1"/> - <line number="209" hits="1"/> - <line number="210" hits="1"/> - <line number="211" hits="1"/> - <line number="212" hits="1"/> - <line number="213" hits="1"/> - <line number="214" hits="1"/> - <line number="215" hits="1"/> - <line number="216" hits="1"/> - <line number="217" hits="1"/> - <line number="218" hits="1"/> - <line number="219" hits="1"/> - <line number="220" hits="1"/> - <line number="221" hits="1"/> - <line number="222" hits="1"/> - <line number="223" hits="1"/> - <line number="224" hits="1"/> - <line number="225" hits="1"/> - <line number="226" hits="1"/> - <line number="227" hits="1"/> - <line number="228" hits="1"/> - <line number="229" hits="1"/> - <line number="230" hits="1"/> - <line number="231" hits="1"/> - <line number="232" hits="1"/> - <line number="233" hits="1"/> - <line number="234" hits="1"/> - <line number="235" hits="1"/> - <line number="236" hits="1"/> - <line number="237" hits="1"/> - <line number="238" hits="1"/> - <line number="239" hits="1"/> - <line number="240" hits="1"/> - <line number="241" hits="1"/> - <line number="242" hits="1"/> - <line number="243" hits="1"/> - <line number="244" hits="1"/> - <line number="245" hits="1"/> - <line number="246" hits="1"/> - <line number="247" hits="1"/> - <line number="248" hits="1"/> - <line number="249" hits="1"/> - <line number="250" hits="1"/> - <line number="251" hits="1"/> - <line number="252" hits="1"/> - <line number="253" hits="1"/> - <line number="254" hits="1"/> - <line number="255" hits="1"/> - <line number="256" hits="1"/> - <line number="257" hits="1"/> - <line number="258" hits="1"/> - <line number="259" hits="1"/> - <line number="260" hits="1"/> - <line number="261" hits="1"/> - <line number="262" hits="1"/> - <line number="263" hits="1"/> - <line number="264" hits="1"/> - <line number="265" hits="1"/> - <line number="266" hits="1"/> - <line number="267" hits="1"/> - <line number="268" hits="1"/> - <line number="269" hits="1"/> - <line number="270" hits="1"/> - <line number="271" hits="1"/> - <line number="272" hits="1"/> - <line number="273" hits="1"/> - <line number="274" hits="1"/> - <line number="275" hits="1"/> - <line number="276" hits="1"/> - <line number="277" hits="1"/> - <line number="278" hits="1"/> - <line number="279" hits="1"/> - <line number="280" hits="1"/> - <line number="281" hits="1"/> - <line number="282" hits="1"/> - <line number="283" hits="1"/> - <line number="284" hits="1"/> - <line number="285" hits="1"/> - <line number="286" hits="1"/> - <line number="287" hits="1"/> - <line number="288" hits="1"/> - <line number="289" hits="1"/> - <line number="290" hits="1"/> - <line number="291" hits="1"/> - <line number="292" hits="1"/> - <line number="293" hits="1"/> - <line number="294" hits="1"/> - <line number="295" hits="1"/> - <line number="296" hits="1"/> - <line number="297" hits="1"/> - <line number="298" hits="1"/> - <line number="299" hits="1"/> - <line number="300" hits="1"/> - <line number="301" hits="1"/> - <line number="302" hits="1"/> - <line number="303" hits="1"/> - <line number="304" hits="1"/> - <line number="305" hits="1"/> - <line number="306" hits="1"/> - <line number="307" hits="1"/> - <line number="308" hits="1"/> - <line number="309" hits="1"/> - <line number="310" hits="1"/> - <line number="311" hits="1"/> - <line number="312" hits="1"/> - <line number="313" hits="1"/> - <line number="314" hits="1"/> - <line number="315" hits="1"/> - <line number="316" hits="1"/> - <line number="317" hits="1"/> - <line number="318" hits="1"/> - <line number="319" hits="1"/> - <line number="320" hits="1"/> - <line number="321" hits="1"/> - <line number="322" hits="1"/> - <line number="323" hits="1"/> - <line number="324" hits="1"/> - <line number="325" hits="1"/> - <line number="326" hits="1"/> - <line number="327" hits="1"/> - <line number="328" hits="1"/> - <line number="329" hits="1"/> - <line number="330" hits="1"/> - <line number="331" hits="1"/> - <line number="332" hits="1"/> - <line number="333" hits="1"/> - <line number="334" hits="1"/> - <line number="335" hits="1"/> - <line number="336" hits="1"/> - <line number="337" hits="1"/> - <line number="338" hits="1"/> - <line number="339" hits="1"/> - <line number="340" hits="1"/> - <line number="341" hits="1"/> - <line number="342" hits="1"/> - <line number="343" hits="1"/> - <line number="344" hits="1"/> - <line number="345" hits="1"/> - <line number="346" hits="1"/> - <line number="347" hits="1"/> - <line number="348" hits="1"/> - <line number="349" hits="1"/> - <line number="350" hits="1"/> - <line number="351" hits="1"/> - <line number="352" hits="1"/> - <line number="353" hits="1"/> - <line number="354" hits="1"/> - <line number="355" hits="1"/> - <line number="356" hits="1"/> - <line number="357" hits="1"/> - <line number="358" hits="1"/> - <line number="359" hits="1"/> - <line number="360" hits="1"/> - <line number="361" hits="1"/> - <line number="362" hits="1"/> - <line number="363" hits="1"/> - <line number="364" hits="1"/> - <line number="365" hits="1"/> - <line number="366" hits="1"/> - <line number="367" hits="1"/> - <line number="368" hits="1"/> - <line number="369" hits="1"/> - <line number="370" hits="1"/> - <line number="371" hits="1"/> - <line number="372" hits="1"/> - <line number="373" hits="1"/> - <line number="374" hits="1"/> - <line number="375" hits="1"/> - <line number="376" hits="1"/> - <line number="377" hits="1"/> - <line number="378" hits="1"/> - <line number="379" hits="1"/> - <line number="380" hits="1"/> - <line number="381" hits="1"/> - <line number="382" hits="1"/> - <line number="383" hits="1"/> - <line number="384" hits="1"/> - <line number="385" hits="1"/> - <line number="386" hits="1"/> - <line number="387" hits="1"/> - <line number="388" hits="1"/> - <line number="391" hits="1"/> - <line number="392" hits="1"/> - <line number="393" hits="1"/> - <line number="396" hits="1"/> - <line number="397" hits="1"/> - <line number="400" hits="1"/> - <line number="401" hits="1"/> - <line number="404" hits="1"/> - <line number="408" hits="1"/> - <line number="409" hits="1"/> - <line number="410" hits="1"/> - <line number="411" hits="1"/> - <line number="414" hits="1"/> - <line number="415" hits="1"/> - <line number="416" hits="1"/> - <line number="417" hits="1"/> - <line number="420" hits="1"/> - <line number="421" hits="1"/> - <line number="424" hits="1"/> - <line number="425" hits="1"/> - <line number="426" hits="1"/> - <line number="427" hits="1"/> - <line number="428" hits="1"/> - <line number="431" hits="1"/> - <line number="432" hits="1"/> - <line number="433" hits="1"/> - <line number="434" hits="1"/> - <line number="437" hits="1"/> - <line number="438" hits="1"/> - <line number="441" hits="1"/> - <line number="442" hits="1"/> - <line number="443" hits="1"/> - <line number="444" hits="1"/> - <line number="445" hits="1"/> - <line number="446" hits="1"/> - <line number="447" hits="1"/> - <line number="448" hits="1"/> - <line number="451" hits="1"/> - <line number="452" hits="1"/> - <line number="453" hits="1"/> - <line number="454" hits="1"/> - <line number="455" hits="1"/> - <line number="456" hits="1"/> - <line number="457" hits="1"/> - <line number="460" hits="1"/> - <line number="461" hits="1"/> - <line number="464" hits="1"/> - <line number="465" hits="1"/> - <line number="466" hits="1"/> - <line number="467" hits="1"/> - <line number="470" hits="1"/> - <line number="471" hits="1"/> - <line number="472" hits="1"/> - <line number="473" hits="1"/> - <line number="474" hits="1"/> - <line number="475" hits="1"/> - <line number="476" hits="1"/> - <line number="479" hits="1"/> - <line number="480" hits="1"/> - <line number="483" hits="1"/> - <line number="484" hits="1"/> - <line number="485" hits="1"/> - <line number="488" hits="1"/> - <line number="489" hits="1"/> - <line number="492" hits="1"/> - <line number="493" hits="1"/> - <line number="494" hits="1"/> - <line number="495" hits="1"/> - <line number="496" hits="1"/> - <line number="497" hits="1"/> - <line number="500" hits="1"/> - <line number="501" hits="1"/> - <line number="502" hits="1"/> - <line number="505" hits="1"/> - <line number="506" hits="1"/> - <line number="509" hits="1"/> - <line number="510" hits="1"/> - <line number="511" hits="1"/> - <line number="514" hits="1"/> - <line number="515" hits="1"/> - <line number="518" hits="1"/> - <line number="519" hits="1"/> - <line number="520" hits="1"/> - <line number="521" hits="1"/> - <line number="522" hits="1"/> - <line number="523" hits="1"/> - <line number="524" hits="1"/> - <line number="527" hits="1"/> - <line number="528" hits="1"/> - <line number="529" hits="1"/> - <line number="530" hits="1"/> - <line number="531" hits="1"/> - <line number="532" hits="1"/> - <line number="533" hits="1"/> - <line number="534" hits="1"/> - <line number="535" hits="1"/> - <line number="536" hits="1"/> - <line number="537" hits="1"/> - <line number="538" hits="1"/> - <line number="541" hits="1"/> - <line number="542" hits="1"/> - <line number="543" hits="1"/> - <line number="544" hits="1"/> - <line number="545" hits="1"/> - <line number="548" hits="1"/> - <line number="552" hits="1"/> - <line number="553" hits="1"/> - <line number="554" hits="1"/> - <line number="555" hits="1"/> - <line number="558" hits="1"/> - <line number="562" hits="1"/> - <line number="563" hits="1"/> - <line number="564" hits="1"/> - <line number="567" hits="1"/> - <line number="568" hits="1"/> - <line number="569" hits="1"/> - <line number="570" hits="1"/> - <line number="571" hits="1"/> - <line number="572" hits="1"/> - <line number="573" hits="1"/> - <line number="574" hits="1"/> - <line number="575" hits="1"/> - <line number="576" hits="1"/> - <line number="577" hits="1"/> - <line number="578" hits="1"/> - <line number="579" hits="1"/> - <line number="582" hits="1"/> - <line number="583" hits="1"/> - <line number="584" hits="1"/> - <line number="585" hits="1"/> - <line number="586" hits="1"/> - <line number="587" hits="1"/> - <line number="588" hits="1"/> - <line number="589" hits="1"/> - <line number="590" hits="1"/> - <line number="593" hits="1"/> - <line number="594" hits="1"/> - <line number="595" hits="1"/> - <line number="596" hits="1"/> - <line number="597" hits="1"/> - <line number="598" hits="1"/> - <line number="599" hits="1"/> - <line number="600" hits="1"/> - <line number="601" hits="1"/> - <line number="602" hits="1"/> - <line number="603" hits="1"/> - <line number="604" hits="1"/> - <line number="607" hits="1"/> - <line number="608" hits="1"/> - <line number="611" hits="1"/> - <line number="612" hits="1"/> - <line number="613" hits="1"/> - <line number="614" hits="1"/> - <line number="615" hits="1"/> - <line number="618" hits="1"/> - <line number="619" hits="1"/> - <line number="620" hits="1"/> - <line number="621" hits="1"/> - <line number="624" hits="1"/> - <line number="625" hits="1"/> - <line number="628" hits="1"/> - <line number="629" hits="1"/> - <line number="630" hits="1"/> - <line number="631" hits="1"/> - <line number="632" hits="1"/> - <line number="633" hits="1"/> - <line number="634" hits="1"/> - <line number="635" hits="1"/> - <line number="636" hits="1"/> - <line number="637" hits="1"/> - <line number="638" hits="1"/> - <line number="639" hits="1"/> - <line number="640" hits="1"/> - <line number="641" hits="1"/> - <line number="642" hits="1"/> - <line number="643" hits="1"/> - <line number="644" hits="1"/> - <line number="645" hits="1"/> - <line number="646" hits="1"/> - <line number="647" hits="1"/> - <line number="648" hits="1"/> - <line number="649" hits="1"/> - <line number="650" hits="1"/> - <line number="653" hits="1"/> - <line number="654" hits="1"/> - <line number="657" hits="1"/> - <line number="658" hits="1"/> - <line number="659" hits="1"/> - <line number="660" hits="1"/> - <line number="661" hits="1"/> - <line number="662" hits="1"/> - <line number="663" hits="1"/> - <line number="664" hits="1"/> - <line number="665" hits="1"/> - <line number="666" hits="1"/> - <line number="667" hits="1"/> - <line number="668" hits="1"/> - <line number="669" hits="1"/> - <line number="670" hits="1"/> - <line number="671" hits="1"/> - <line number="672" hits="1"/> - <line number="673" hits="1"/> - <line number="674" hits="1"/> - <line number="675" hits="1"/> - <line number="676" hits="1"/> - <line number="677" hits="1"/> - <line number="678" hits="1"/> - <line number="679" hits="1"/> - <line number="680" hits="1"/> - <line number="681" hits="1"/> - <line number="682" hits="1"/> - <line number="683" hits="1"/> - <line number="686" hits="1"/> - <line number="687" hits="1"/> - <line number="688" hits="1"/> - <line number="689" hits="1"/> - <line number="690" hits="1"/> - <line number="691" hits="1"/> - <line number="692" hits="1"/> - <line number="695" hits="1"/> - <line number="696" hits="1"/> - <line number="697" hits="1"/> - <line number="698" hits="1"/> - <line number="699" hits="1"/> - <line number="700" hits="1"/> - <line number="701" hits="1"/> - <line number="702" hits="1"/> - <line number="703" hits="1"/> - <line number="704" hits="1"/> - <line number="705" hits="1"/> - <line number="706" hits="1"/> - <line number="707" hits="1"/> - <line number="710" hits="1"/> - <line number="711" hits="1"/> - <line number="712" hits="1"/> - <line number="713" hits="1"/> - <line number="714" hits="1"/> - <line number="715" hits="1"/> - <line number="716" hits="1"/> - <line number="717" hits="1"/> - <line number="718" hits="1"/> - <line number="719" hits="1"/> - <line number="720" hits="1"/> - <line number="721" hits="1"/> - <line number="722" hits="1"/> - <line number="725" hits="1"/> - <line number="726" hits="1"/> - <line number="727" hits="1"/> - <line number="728" hits="1"/> - <line number="729" hits="1"/> - <line number="732" hits="1"/> - <line number="733" hits="1"/> - <line number="734" hits="1"/> - <line number="735" hits="1"/> - <line number="738" hits="1"/> - <line number="739" hits="1"/> - <line number="740" hits="1"/> - <line number="741" hits="1"/> - <line number="742" hits="1"/> - <line number="743" hits="1"/> - <line number="744" hits="1"/> - <line number="745" hits="1"/> - <line number="746" hits="1"/> - <line number="747" hits="1"/> - <line number="748" hits="1"/> - <line number="751" hits="1"/> - <line number="752" hits="1"/> - <line number="753" hits="1"/> - <line number="754" hits="1"/> - <line number="755" hits="1"/> - <line number="758" hits="1"/> - <line number="759" hits="1"/> - <line number="760" hits="1"/> - <line number="761" hits="1"/> - <line number="764" hits="1"/> - <line number="765" hits="1"/> - <line number="768" hits="1"/> - <line number="769" hits="1"/> - <line number="770" hits="1"/> - <line number="771" hits="1"/> - <line number="772" hits="1"/> - <line number="773" hits="1"/> - <line number="774" hits="1"/> - <line number="777" hits="1"/> - <line number="778" hits="1"/> - <line number="779" hits="1"/> - <line number="780" hits="1"/> - <line number="783" hits="1"/> - <line number="784" hits="1"/> - <line number="785" hits="1"/> - <line number="786" hits="1"/> - <line number="787" hits="1"/> - <line number="788" hits="1"/> - <line number="789" hits="1"/> - <line number="792" hits="1"/> - <line number="793" hits="1"/> - <line number="794" hits="1"/> - <line number="795" hits="1"/> - <line number="796" hits="1"/> - <line number="799" hits="1"/> - <line number="803" hits="1"/> - <line number="804" hits="1"/> - <line number="805" hits="1"/> - <line number="808" hits="1"/> - <line number="812" hits="1"/> - <line number="813" hits="1"/> - <line number="816" hits="1"/> - <line number="817" hits="1"/> - <line number="818" hits="1"/> - <line number="819" hits="1"/> - <line number="820" hits="1"/> - <line number="823" hits="1"/> - <line number="824" hits="1"/> - <line number="825" hits="1"/> - <line number="826" hits="1"/> - <line number="827" hits="1"/> - <line number="830" hits="1"/> - <line number="831" hits="1"/> - <line number="832" hits="1"/> - <line number="835" hits="1"/> - <line number="836" hits="1"/> - <line number="837" hits="1"/> - <line number="840" hits="1"/> - <line number="841" hits="1"/> - <line number="842" hits="1"/> - <line number="843" hits="1"/> - <line number="844" hits="1"/> - <line number="847" hits="1"/> - <line number="848" hits="1"/> - <line number="849" hits="1"/> - <line number="850" hits="1"/> - <line number="851" hits="1"/> - <line number="854" hits="1"/> - <line number="858" hits="1"/> - <line number="859" hits="1"/> - <line number="860" hits="1"/> - <line number="861" hits="1"/> - <line number="864" hits="1"/> - <line number="868" hits="1"/> - <line number="869" hits="1"/> - <line number="872" hits="1"/> - <line number="876" hits="1"/> - <line number="877" hits="1"/> - <line number="878" hits="1"/> - <line number="879" hits="1"/> - <line number="880" hits="1"/> - <line number="881" hits="1"/> - <line number="882" hits="1"/> - <line number="883" hits="1"/> - <line number="884" hits="1"/> - <line number="885" hits="1"/> - <line number="886" hits="1"/> - <line number="887" hits="1"/> - <line number="888" hits="1"/> - <line number="889" hits="1"/> - <line number="890" hits="1"/> - <line number="891" hits="1"/> - <line number="892" hits="1"/> - <line number="893" hits="1"/> - <line number="896" hits="1"/> - <line number="900" hits="1"/> - <line number="901" hits="1"/> - <line number="902" hits="1"/> - <line number="903" hits="1"/> - <line number="904" hits="1"/> - <line number="905" hits="1"/> - <line number="906" hits="1"/> - <line number="907" hits="1"/> - <line number="908" hits="1"/> - <line number="909" hits="1"/> - <line number="910" hits="1"/> - <line number="911" hits="1"/> - <line number="912" hits="1"/> - <line number="913" hits="1"/> - <line number="914" hits="1"/> - <line number="915" hits="1"/> - <line number="916" hits="1"/> - <line number="917" hits="1"/> - <line number="918" hits="1"/> - <line number="919" hits="1"/> - <line number="920" hits="1"/> - <line number="921" hits="1"/> - <line number="922" hits="1"/> - <line number="923" hits="1"/> - <line number="924" hits="1"/> - <line number="925" hits="1"/> - <line number="926" hits="1"/> - <line number="927" hits="1"/> - <line number="928" hits="1"/> - <line number="929" hits="1"/> - <line number="930" hits="1"/> - <line number="931" hits="1"/> - <line number="932" hits="1"/> - <line number="933" hits="1"/> - <line number="936" hits="1"/> - <line number="940" hits="1"/> - <line number="941" hits="1"/> - <line number="942" hits="1"/> - <line number="943" hits="1"/> - <line number="944" hits="1"/> - <line number="945" hits="1"/> - <line number="948" hits="1"/> - <line number="952" hits="1"/> - <line number="953" hits="1"/> - <line number="955" hits="1"/> - <line number="956" hits="1"/> - <line number="959" hits="1"/> - <line number="963" hits="1"/> - <line number="964" hits="1"/> - <line number="966" hits="1"/> - <line number="967" hits="1"/> - <line number="969" hits="1"/> - <line number="970" hits="1"/> - <line number="972" hits="1"/> - <line number="973" hits="1"/> - <line number="976" hits="1"/> - <line number="980" hits="1"/> - <line number="981" hits="1"/> - <line number="983" hits="1"/> - <line number="984" hits="1"/> - <line number="987" hits="1"/> - <line number="988" hits="1"/> - <line number="989" hits="1"/> - <line number="990" hits="1"/> - <line number="991" hits="1"/> - <line number="992" hits="1"/> - <line number="993" hits="1"/> - <line number="994" hits="1"/> - <line number="995" hits="1"/> - <line number="996" hits="1"/> - <line number="997" hits="1"/> - <line number="998" hits="1"/> - <line number="999" hits="1"/> - <line number="1002" hits="1"/> - <line number="1003" hits="1"/> - <line number="1004" hits="1"/> - <line number="1005" hits="1"/> - <line number="1008" hits="1"/> - <line number="1009" hits="1"/> - <line number="1012" hits="1"/> - <line number="1013" hits="1"/> - <line number="1014" hits="1"/> - <line number="1017" hits="1"/> - <line number="1018" hits="1"/> - <line number="1019" hits="1"/> - <line number="1022" hits="1"/> - <line number="1023" hits="1"/> - <line number="1026" hits="1"/> - <line number="1027" hits="1"/> - <line number="1028" hits="1"/> - <line number="1029" hits="1"/> - <line number="1030" hits="1"/> - <line number="1031" hits="1"/> - <line number="1032" hits="1"/> - <line number="1033" hits="1"/> - <line number="1034" hits="1"/> - <line number="1035" hits="1"/> - <line number="1036" hits="1"/> - <line number="1037" hits="1"/> - <line number="1038" hits="1"/> - <line number="1039" hits="1"/> - <line number="1040" hits="1"/> - <line number="1041" hits="1"/> - <line number="1042" hits="1"/> - <line number="1045" hits="1"/> - <line number="1046" hits="1"/> - <line number="1047" hits="1"/> - <line number="1048" hits="1"/> - <line number="1049" hits="1"/> - <line number="1050" hits="1"/> - <line number="1051" hits="1"/> - <line number="1052" hits="1"/> - <line number="1053" hits="1"/> - <line number="1054" hits="1"/> - <line number="1055" hits="1"/> - <line number="1056" hits="1"/> - <line number="1057" hits="1"/> - <line number="1058" hits="1"/> - <line number="1059" hits="1"/> - <line number="1060" hits="1"/> - <line number="1061" hits="1"/> - <line number="1062" hits="1"/> - <line number="1063" hits="1"/> - <line number="1064" hits="1"/> - <line number="1065" hits="1"/> - <line number="1066" hits="1"/> - <line number="1067" hits="1"/> - <line number="1068" hits="1"/> - <line number="1069" hits="1"/> - <line number="1070" hits="1"/> - <line number="1071" hits="1"/> - <line number="1074" hits="1"/> - <line number="1075" hits="1"/> - <line number="1076" hits="1"/> - <line number="1077" hits="1"/> - <line number="1078" hits="1"/> - <line number="1079" hits="1"/> - <line number="1080" hits="1"/> - <line number="1081" hits="1"/> - <line number="1082" hits="1"/> - <line number="1083" hits="1"/> - <line number="1084" hits="1"/> - <line number="1085" hits="1"/> - <line number="1086" hits="1"/> - <line number="1087" hits="1"/> - <line number="1088" hits="1"/> - <line number="1089" hits="1"/> - <line number="1090" hits="1"/> - <line number="1091" hits="1"/> - <line number="1092" hits="1"/> - <line number="1095" hits="1"/> - <line number="1096" hits="1"/> - <line number="1097" hits="1"/> - <line number="1098" hits="1"/> - <line number="1099" hits="1"/> - <line number="1100" hits="1"/> - <line number="1101" hits="1"/> - <line number="1102" hits="1"/> - <line number="1103" hits="1"/> - <line number="1104" hits="1"/> - <line number="1105" hits="1"/> - <line number="1106" hits="1"/> - <line number="1107" hits="1"/> - <line number="1108" hits="1"/> - <line number="1109" hits="1"/> - <line number="1110" hits="1"/> - <line number="1111" hits="1"/> - <line number="1112" hits="1"/> - <line number="1113" hits="1"/> - <line number="1114" hits="1"/> - <line number="1117" hits="1"/> - <line number="1118" hits="1"/> - <line number="1119" hits="1"/> - <line number="1120" hits="1"/> - <line number="1121" hits="1"/> - <line number="1122" hits="1"/> - <line number="1123" hits="1"/> - <line number="1124" hits="1"/> - <line number="1125" hits="1"/> - <line number="1126" hits="1"/> - <line number="1127" hits="1"/> - <line number="1130" hits="1"/> - <line number="1131" hits="1"/> - <line number="1132" hits="1"/> - <line number="1133" hits="1"/> - <line number="1134" hits="1"/> - <line number="1135" hits="1"/> - <line number="1136" hits="1"/> - <line number="1137" hits="1"/> - <line number="1138" hits="1"/> - <line number="1139" hits="1"/> - <line number="1140" hits="1"/> - <line number="1141" hits="1"/> - <line number="1142" hits="1"/> - <line number="1143" hits="1"/> - <line number="1144" hits="1"/> - <line number="1145" hits="1"/> - <line number="1146" hits="1"/> - <line number="1147" hits="1"/> - <line number="1148" hits="1"/> - <line number="1149" hits="1"/> - <line number="1152" hits="1"/> - <line number="1153" hits="1"/> - <line number="1154" hits="1"/> - <line number="1155" hits="1"/> - <line number="1158" hits="1"/> - <line number="1159" hits="1"/> - <line number="1160" hits="1"/> - <line number="1161" hits="1"/> - <line number="1162" hits="1"/> - <line number="1165" hits="1"/> - <line number="1169" hits="1"/> - <line number="1170" hits="1"/> - <line number="1171" hits="1"/> - <line number="1172" hits="1"/> - <line number="1173" hits="1"/> - <line number="1176" hits="1"/> - <line number="1177" hits="1"/> - <line number="1180" hits="1"/> - <line number="1181" hits="1"/> - <line number="1182" hits="1"/> - <line number="1183" hits="1"/> - <line number="1184" hits="1"/> - <line number="1185" hits="1"/> - <line number="1186" hits="1"/> - <line number="1187" hits="1"/> - <line number="1190" hits="1"/> - <line number="1191" hits="1"/> - <line number="1192" hits="1"/> - <line number="1193" hits="1"/> - <line number="1194" hits="1"/> - <line number="1195" hits="1"/> - <line number="1198" hits="1"/> - <line number="1199" hits="1"/> - <line number="1200" hits="1"/> - <line number="1201" hits="1"/> - <line number="1204" hits="1"/> - <line number="1205" hits="1"/> - <line number="1206" hits="1"/> - <line number="1207" hits="1"/> - <line number="1208" hits="1"/> - </lines> - </class> - <class name="exceptions.py" filename="dbrepo/api/exceptions.py" complexity="0" line-rate="1" branch-rate="0"> - <methods/> - <lines> - <line number="1" hits="1"/> - <line number="5" hits="1"/> - <line number="8" hits="1"/> - <line number="12" hits="1"/> - <line number="15" hits="1"/> - <line number="19" hits="1"/> - <line number="22" hits="1"/> - <line number="26" hits="1"/> - <line number="29" hits="1"/> - <line number="33" hits="1"/> - <line number="36" hits="1"/> - <line number="40" hits="1"/> - <line number="43" hits="1"/> - <line number="47" hits="1"/> - <line number="50" hits="1"/> - <line number="54" hits="1"/> - <line number="57" hits="1"/> - <line number="61" hits="1"/> - <line number="64" hits="1"/> - <line number="68" hits="1"/> - <line number="71" hits="1"/> - <line number="75" hits="1"/> - <line number="78" hits="1"/> - <line number="82" hits="1"/> - <line number="85" hits="1"/> - <line number="89" hits="1"/> - <line number="92" hits="1"/> - <line number="96" hits="1"/> - <line number="99" hits="1"/> - <line number="103" hits="1"/> - <line number="106" hits="1"/> - <line number="110" hits="1"/> - </lines> - </class> - <class name="mapper.py" filename="dbrepo/api/mapper.py" complexity="0" line-rate="0.5567" branch-rate="0"> - <methods/> - <lines> - <line number="1" hits="1"/> - <line number="3" hits="1"/> - <line number="4" hits="1"/> - <line number="5" hits="1"/> - <line number="7" hits="1"/> - <line number="9" hits="1"/> - <line number="12" hits="1"/> - <line number="13" hits="1"/> - <line number="14" hits="0"/> - <line number="15" hits="1"/> - <line number="16" hits="1"/> - <line number="17" hits="0"/> - <line number="18" hits="1"/> - <line number="20" hits="1"/> - <line number="21" hits="0"/> - <line number="22" hits="1"/> - <line number="23" hits="1"/> - <line number="24" hits="1"/> - <line number="26" hits="1"/> - <line number="28" hits="1"/> - <line number="29" hits="0"/> - <line number="31" hits="1"/> - <line number="32" hits="1"/> - <line number="33" hits="0"/> - <line number="34" hits="1"/> - <line number="38" hits="1"/> - <line number="39" hits="1"/> - <line number="40" hits="0"/> - <line number="42" hits="0"/> - <line number="44" hits="0"/> - <line number="45" hits="0"/> - <line number="46" hits="0"/> - <line number="47" hits="1"/> - <line number="50" hits="1"/> - <line number="51" hits="1"/> - <line number="52" hits="1"/> - <line number="53" hits="1"/> - <line number="57" hits="1"/> - <line number="58" hits="1"/> - <line number="59" hits="1"/> - <line number="60" hits="1"/> - <line number="63" hits="1"/> - <line number="64" hits="0"/> - <line number="65" hits="0"/> - <line number="66" hits="0"/> - <line number="67" hits="0"/> - <line number="68" hits="0"/> - <line number="70" hits="0"/> - <line number="71" hits="0"/> - <line number="72" hits="1"/> - <line number="73" hits="1"/> - <line number="74" hits="1"/> - <line number="75" hits="1"/> - <line number="76" hits="0"/> - <line number="77" hits="0"/> - <line number="78" hits="0"/> - <line number="79" hits="0"/> - <line number="80" hits="1"/> - <line number="81" hits="1"/> - <line number="82" hits="1"/> - <line number="83" hits="1"/> - <line number="84" hits="1"/> - <line number="85" hits="0"/> - <line number="86" hits="0"/> - <line number="87" hits="0"/> - <line number="88" hits="0"/> - <line number="89" hits="0"/> - <line number="90" hits="0"/> - <line number="91" hits="0"/> - <line number="92" hits="0"/> - <line number="93" hits="0"/> - <line number="94" hits="1"/> - <line number="95" hits="1"/> - <line number="96" hits="1"/> - <line number="97" hits="1"/> - <line number="98" hits="0"/> - <line number="99" hits="0"/> - <line number="100" hits="0"/> - <line number="101" hits="1"/> - <line number="102" hits="1"/> - <line number="103" hits="1"/> - <line number="104" hits="1"/> - <line number="106" hits="0"/> - <line number="107" hits="0"/> - <line number="108" hits="0"/> - <line number="109" hits="0"/> - <line number="110" hits="0"/> - <line number="111" hits="0"/> - <line number="112" hits="0"/> - <line number="113" hits="0"/> - <line number="115" hits="0"/> - <line number="116" hits="1"/> - <line number="117" hits="1"/> - <line number="119" hits="1"/> - <line number="120" hits="1"/> - <line number="121" hits="0"/> - <line number="122" hits="1"/> - </lines> - </class> - </classes> - </package> - </packages> -</coverage> diff --git a/lib/python/dbrepo/api/dto.py b/lib/python/dbrepo/api/dto.py index c88ad653aaeaa511034f476a8bed247136d9bac4..c9bfb58ff39563df45e2b5038d9124a5f27701ed 100644 --- a/lib/python/dbrepo/api/dto.py +++ b/lib/python/dbrepo/api/dto.py @@ -825,14 +825,14 @@ class Filter(BaseModel): type: FilterType column_id: str operator_id: str - value: str + value: Optional[str] = None class FilterDefinition(BaseModel): type: FilterType column: str operator: str - value: str + value: Optional[str] = None class Order(BaseModel): diff --git a/make/build.mk b/make/build.mk index 311cdecd97ac8e918d50a5fdfd3b44c9749a28fe..ba831dc7c6d56dbd5c8ec9f70a47c0fd31e6a6ee 100644 --- a/make/build.mk +++ b/make/build.mk @@ -1,31 +1,26 @@ ##@ Build .PHONY: build-images -build-images: ## Build Docker images. - docker build --network=host -t dbrepo-core:build --target build ./lib/java/dbrepo-core - docker build --network=host -t dbrepo-data-service:build --target build dbrepo-data-service - docker build --network=host -t dbrepo-metadata-service:build --target build dbrepo-metadata-service - docker compose build --parallel +build-images: build-java-lib ## Build Docker images. + docker compose build -.PHONY: build-data-service -build-data-service: ## Build the Data Service. - mvn -f ./dbrepo-data-service/pom.xml clean package -DskipTests - -.PHONY: build-metadata-service -build-metadata-service: ## Build the Metadata Service. - mvn -f ./dbrepo-metadata-service/pom.xml clean package -DskipTests +.PHONY: build-java-lib +build-java-lib: ## Build the Java Library. + mvn -f ./lib/java/dbrepo-core/pom.xml -q clean package install -DskipTests + mvn deploy:deploy-file -q -Dfile=./lib/java/dbrepo-core/target/dbrepo-core-$(APP_VERSION).jar -DgroupId=at.ac.tuwien.ifs.dbrepo -DartifactId=dbrepo-core -Dversion=$(APP_VERSION) -Dpackaging=jar -Durl=file:./dbrepo-data-service/lib/ -DrepositoryId=maven-repository -DupdateReleaseInfo=true + mvn deploy:deploy-file -q -Dfile=./lib/java/dbrepo-core/target/dbrepo-core-$(APP_VERSION).jar -DgroupId=at.ac.tuwien.ifs.dbrepo -DartifactId=dbrepo-core -Dversion=$(APP_VERSION) -Dpackaging=jar -Durl=file:./dbrepo-metadata-service/lib/ -DrepositoryId=maven-repository -DupdateReleaseInfo=true .PHONY: build-auth-event-listener build-auth-event-listener: ## Build the Auth Service Event Listener. - mvn -f ./dbrepo-auth-service/listeners/pom.xml clean package -DskipTests + mvn -f ./dbrepo-auth-service/listeners/pom.xml -q clean package -DskipTests cp ./dbrepo-auth-service/listeners/target/create-event-listener.jar ./helm/dbrepo/files/create-event-listener.jar .PHONY: build-ui build-ui: ## Build the UI. bun --cwd ./dbrepo-ui build -.PHONY: build-lib -build-lib: ## Build the Python Library. +.PHONY: build-python-lib +build-python-lib: ## Build the Python Library. rm -rf ./dbrepo-analyse-service/venv/ ./dbrepo-analyse-service/Pipfile.lock ./dbrepo-analyse-service/lib/* rm -rf ./dbrepo-search-service/venv/ ./dbrepo-search-service/Pipfile.lock ./dbrepo-search-service/lib/* rm -rf ./dbrepo-dashboard-service/venv/ ./dbrepo-dashboard-service/Pipfile.lock ./dbrepo-dashboard-service/lib/* diff --git a/make/dev.mk b/make/dev.mk index d5a8cd513a7760de0fb4d4c5044d36daebf51d53..e865e2d9dd1116ff801a549811c087ff31056019 100644 --- a/make/dev.mk +++ b/make/dev.mk @@ -1,12 +1,11 @@ ##@ Development .PHONY: start-dev -start-dev: build-images build-auth-event-listener ## Start the development deployment. +start-dev: build-java-lib build-auth-event-listener build-images ## Start the development deployment. docker container stop dbrepo-gateway-service || true docker container rm dbrepo-gateway-service || true docker compose up -d - .PHONY: stop-dev stop-dev: ## Stop the development deployment and remove all data. docker compose down diff --git a/mkdocs.yml b/mkdocs.yml index 5971388b112696fa9bb8fec1ce6b8510d081da84..7060289640e3f0034d0e20405526d9b512aa26ed 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ site_name: Database Repository -site_url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.8/ +site_url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/ repo_url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services repo_name: fda-services site_author: Research Unit Data Science, Technische Universität Wien diff --git a/sonar-project.properties b/sonar-project.properties index 5f921c85c423e3fcca0eab2edd30a05713414f1a..52013fb417ef062f4d8e32e0bf77766bae2229f0 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -7,8 +7,8 @@ sonar.projectVersion=1.8.1 sonar.qualitygate.wait=true sonar.projectCreation.mainBranchName=master # java services -sonar.sources=./dbrepo-metadata-service/test/src/main,./dbrepo-metadata-service/services/src/main,./dbrepo-metadata-service/repositories/src/main,./dbrepo-metadata-service/rest-service/src/main,./dbrepo-metadata-service/api/src/main,./dbrepo-metadata-service/oai/src/main,./dbrepo-metadata-service/entities/src/main,./dbrepo-data-service/services/src/main,./dbrepo-data-service/rest-service/src/main,./dbrepo-data-service/querystore/src/main -sonar.java.binaries=./dbrepo-metadata-service/test/target/classes,./dbrepo-metadata-service/services/target/classes,./dbrepo-metadata-service/repositories/target/classes,./dbrepo-metadata-service/rest-service/target/classes,./dbrepo-metadata-service/api/target/classes,./dbrepo-metadata-service/oai/target/classes,./dbrepo-metadata-service/entities/target/classes,./dbrepo-data-service/services/target/classes,./dbrepo-data-service/rest-service/target/classes,./dbrepo-data-service/querystore/target/classes +sonar.sources=./lib/java/dbrepo-core/src/main,./dbrepo-metadata-service/services/src/main,./dbrepo-metadata-service/repositories/src/main,./dbrepo-metadata-service/rest-service/src/main,./dbrepo-metadata-service/api/src/main,./dbrepo-metadata-service/oai/src/main,./dbrepo-data-service/services/src/main,./dbrepo-data-service/rest-service/src/main,./dbrepo-data-service/querystore/src/main +sonar.java.binaries=./lib/java/dbrepo-core/target/classes,./dbrepo-metadata-service/services/target/classes,./dbrepo-metadata-service/repositories/target/classes,./dbrepo-metadata-service/rest-service/target/classes,./dbrepo-metadata-service/api/target/classes,./dbrepo-metadata-service/oai/target/classes,./dbrepo-data-service/services/target/classes,./dbrepo-data-service/rest-service/target/classes,./dbrepo-data-service/querystore/target/classes sonar.junit.reportPaths=./dbrepo-metadata-service/rest-service/target/surefire-reports,./dbrepo-data-service/rest-service/target/surefire-reports sonar.coverage.jacoco.xmlReportPaths=./dbrepo-metadata-service/report/target/site/jacoco-aggregate/jacoco.xml,./dbrepo-data-service/report/target/site/jacoco-aggregate/jacoco.xml # python services diff --git a/versions.json b/versions.json index 0fafe8664cc9c3d6369b92b643fb53ae98cb1cbf..f2244538ba971ec76911ffacec64c9bf23e5207b 100644 --- a/versions.json +++ b/versions.json @@ -2,7 +2,7 @@ { "version": "1.8", "title": "1.8", - "aliases": [] + "aliases": ["latest"] }, { "version": "1.7",