Skip to content

Commit a4c9b1f

Browse files
author
Rob Tjalma
authored
Merge pull request #39 from com-pas/support-multi-versions-scl
Support multi versions SCL
2 parents b922b1f + f12526b commit a4c9b1f

File tree

59 files changed

+1123
-665
lines changed

Some content is hidden

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

59 files changed

+1123
-665
lines changed

.reuse/dep5

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ License: Apache-2.0
1010
Files: .mvn/wrapper/*
1111
Copyright: 2021 Alliander N.V.
1212
License: Apache-2.0
13+
14+
Files: doc/images/*
15+
Copyright: 2021 Alliander N.V.
16+
License: Apache-2.0
17+
18+
Files: doc/drawio/*
19+
Copyright: 2021 Alliander N.V.
20+
License: Apache-2.0

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ SPDX-License-Identifier: Apache-2.0
1111

1212
Service to store and retrieve the SCL XML to a database.
1313

14-
This project uses Quarkus, the Supersonic Subatomic Java Framework. If you want to learn more about Quarkus, please
15-
visit its website: https://quarkus.io/ .
14+
In the standard configuration this component is using Quarkus to run and create a native image from it. The different
15+
parts of this repository can also be used separately in your own component to manage SCL XML Files in a database. The
16+
Service Layer can be used as Java component to manage them.
17+
18+
For more information about the architecture take a look at [documentation](doc/compas-scl-data-service.md)
1619

1720
## Application depends on a running BaseX instance
1821

app/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,25 @@ SPDX-License-Identifier: Apache-2.0
155155
</plugins>
156156
</build>
157157
</profile>
158+
159+
<profile>
160+
<id>sonar</id>
161+
162+
<properties>
163+
<sonar.coverage.jacoco.xmlReportPaths>target/jacoco-report/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
164+
</properties>
165+
166+
<build>
167+
<plugins>
168+
<plugin>
169+
<groupId>org.jacoco</groupId>
170+
<artifactId>jacoco-maven-plugin</artifactId>
171+
<configuration>
172+
<skip>true</skip>
173+
</configuration>
174+
</plugin>
175+
</plugins>
176+
</build>
177+
</profile>
158178
</profiles>
159179
</project>

app/src/main/java/org/lfenergy/compas/scl/data/rest/CompasJAXBContextResolver.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

app/src/main/java/org/lfenergy/compas/scl/data/rest/CompasSclDataConfiguration.java

Lines changed: 0 additions & 15 deletions
This file was deleted.

app/src/main/java/org/lfenergy/compas/scl/data/rest/model/CreateRequest.java

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,21 @@
55
package org.lfenergy.compas.scl.data.rest.model;
66

77
import org.eclipse.microprofile.openapi.annotations.media.Schema;
8-
import org.lfenergy.compas.scl.model.SCL;
8+
import org.w3c.dom.Element;
99

10-
import javax.xml.bind.annotation.XmlAccessType;
11-
import javax.xml.bind.annotation.XmlAccessorType;
12-
import javax.xml.bind.annotation.XmlElement;
13-
import javax.xml.bind.annotation.XmlRootElement;
10+
import javax.xml.bind.annotation.*;
1411

15-
import static org.lfenergy.compas.scl.data.model.Constants.SCL_NAMESPACE;
16-
import static org.lfenergy.compas.scl.data.model.Constants.SDS_NAMESPACE;
12+
import static org.lfenergy.compas.scl.data.Constants.SCL_DATA_SERVICE_NS_URI;
1713

18-
@XmlRootElement(name = "CreateRequest", namespace = SDS_NAMESPACE)
14+
@XmlRootElement(name = "CreateRequest", namespace = SCL_DATA_SERVICE_NS_URI)
1915
@XmlAccessorType(XmlAccessType.FIELD)
2016
public class CreateRequest {
21-
@Schema(example = "SCL XML...")
22-
@XmlElement(name = "SCL", namespace = SCL_NAMESPACE, required = true)
23-
private SCL scl;
2417
@Schema(example = "STATION-0012312")
25-
@XmlElement(name = "Name", namespace = SDS_NAMESPACE, required = true)
18+
@XmlElement(name = "Name", namespace = SCL_DATA_SERVICE_NS_URI, required = true)
2619
private String name;
27-
28-
public SCL getScl() {
29-
return scl;
30-
}
31-
32-
public void setScl(SCL scl) {
33-
this.scl = scl;
34-
}
20+
@Schema(example = "SCL XML...")
21+
@XmlAnyElement
22+
protected Element scl;
3523

3624
public String getName() {
3725
return name;
@@ -40,4 +28,13 @@ public String getName() {
4028
public void setName(String name) {
4129
this.name = name;
4230
}
31+
32+
public Element getScl() {
33+
return scl;
34+
}
35+
36+
public void setScl(Element scl) {
37+
this.scl = scl;
38+
}
4339
}
40+

app/src/main/java/org/lfenergy/compas/scl/data/rest/model/CreateResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
import javax.xml.bind.annotation.XmlRootElement;
1111
import java.util.UUID;
1212

13-
import static org.lfenergy.compas.scl.data.model.Constants.SDS_NAMESPACE;
13+
import static org.lfenergy.compas.scl.data.Constants.SCL_DATA_SERVICE_NS_URI;
1414

15-
@XmlRootElement(name = "CreateResponse", namespace = SDS_NAMESPACE)
15+
@XmlRootElement(name = "CreateResponse", namespace = SCL_DATA_SERVICE_NS_URI)
1616
@XmlAccessorType(XmlAccessType.FIELD)
1717
public class CreateResponse {
18-
@XmlElement(name = "Id", namespace = SDS_NAMESPACE, required = true)
18+
@XmlElement(name = "Id", namespace = SCL_DATA_SERVICE_NS_URI, required = true)
1919
private UUID id;
2020

2121
public UUID getId() {

app/src/main/java/org/lfenergy/compas/scl/data/rest/model/GetResponse.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,27 @@
55
package org.lfenergy.compas.scl.data.rest.model;
66

77
import org.eclipse.microprofile.openapi.annotations.media.Schema;
8-
import org.lfenergy.compas.scl.model.SCL;
8+
import org.w3c.dom.Element;
99

1010
import javax.xml.bind.annotation.XmlAccessType;
1111
import javax.xml.bind.annotation.XmlAccessorType;
12-
import javax.xml.bind.annotation.XmlElement;
12+
import javax.xml.bind.annotation.XmlAnyElement;
1313
import javax.xml.bind.annotation.XmlRootElement;
1414

15-
import static org.lfenergy.compas.scl.data.model.Constants.SCL_NAMESPACE;
16-
import static org.lfenergy.compas.scl.data.model.Constants.SDS_NAMESPACE;
15+
import static org.lfenergy.compas.scl.data.Constants.SCL_DATA_SERVICE_NS_URI;
1716

18-
@XmlRootElement(name = "GetResponse", namespace = SDS_NAMESPACE)
17+
@XmlRootElement(name = "GetResponse", namespace = SCL_DATA_SERVICE_NS_URI)
1918
@XmlAccessorType(XmlAccessType.FIELD)
2019
public class GetResponse {
2120
@Schema(example = "SCL XML...")
22-
@XmlElement(name = "SCL", namespace = SCL_NAMESPACE, required = true)
23-
private SCL scl;
21+
@XmlAnyElement
22+
protected Element scl;
2423

25-
public SCL getScl() {
24+
public Element getScl() {
2625
return scl;
2726
}
2827

29-
public void setScl(SCL scl) {
28+
public void setScl(Element scl) {
3029
this.scl = scl;
3130
}
3231
}

app/src/main/java/org/lfenergy/compas/scl/data/rest/model/ListResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
import javax.xml.bind.annotation.XmlRootElement;
1212
import java.util.List;
1313

14-
import static org.lfenergy.compas.scl.data.model.Constants.SDS_NAMESPACE;
14+
import static org.lfenergy.compas.scl.data.Constants.SCL_DATA_SERVICE_NS_URI;
1515

16-
@XmlRootElement(name = "ListResponse", namespace = SDS_NAMESPACE)
16+
@XmlRootElement(name = "ListResponse", namespace = SCL_DATA_SERVICE_NS_URI)
1717
@XmlAccessorType(XmlAccessType.FIELD)
1818
public class ListResponse {
19-
@XmlElement(name = "Item", namespace = SDS_NAMESPACE)
19+
@XmlElement(name = "Item", namespace = SCL_DATA_SERVICE_NS_URI)
2020
private List<Item> items;
2121

2222
public List<Item> getItems() {

app/src/main/java/org/lfenergy/compas/scl/data/rest/model/ObjectFactory.java

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)