Skip to content

Commit da5c005

Browse files
Dennis LabordusRob Tjalma
authored andcommitted
Configure nicer namespace prefixes.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 35aa87a commit da5c005

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// SPDX-FileCopyrightText: 2021 Alliander N.V.
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
@XmlSchema(
5+
namespace = "https://www.lfenergy.org/compas/SclDataService",
6+
xmlns = {
7+
@XmlNs(prefix = "scl", namespaceURI = "http://www.iec.ch/61850/2003/SCL"),
8+
@XmlNs(prefix = "compas", namespaceURI = "https://www.lfenergy.org/compas/v1"),
9+
@XmlNs(prefix = "sds", namespaceURI = "https://www.lfenergy.org/compas/SclDataService")
10+
})
11+
package org.lfenergy.compas.scl.data.rest.model;
12+
13+
import javax.xml.bind.annotation.XmlNs;
14+
import javax.xml.bind.annotation.XmlSchema;

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.lfenergy.compas.scl.SCL;
77
import org.lfenergy.compas.scl.data.model.SclType;
88
import org.lfenergy.compas.scl.data.model.Version;
9-
import org.lfenergy.compas.scl.data.rest.Constants;
109
import org.lfenergy.compas.scl.data.rest.model.*;
1110
import org.lfenergy.compas.scl.data.service.CompasSclDataService;
1211

@@ -71,7 +70,7 @@ public GetResponse findByUUID(@PathParam(TYPE_PATH_PARAM) SclType type,
7170
@Produces(MediaType.APPLICATION_XML)
7271
public GetResponse findByUUIDAndVersion(@PathParam(TYPE_PATH_PARAM) SclType type,
7372
@PathParam(ID_PATH_PARAM) UUID id,
74-
@PathParam(Constants.VERSION_PATH_PARAM) Version version) {
73+
@PathParam(VERSION_PATH_PARAM) Version version) {
7574
var response = new GetResponse();
7675
response.setScl(compasSclDataService.findByUUID(type, id, version));
7776
return response;
@@ -90,7 +89,7 @@ public SCL findRawSCLByUUID(@PathParam(TYPE_PATH_PARAM) SclType type,
9089
@Produces(MediaType.APPLICATION_XML)
9190
public SCL findRawSCLByUUIDAndVersion(@PathParam(TYPE_PATH_PARAM) SclType type,
9291
@PathParam(ID_PATH_PARAM) UUID id,
93-
@PathParam(Constants.VERSION_PATH_PARAM) Version version) {
92+
@PathParam(VERSION_PATH_PARAM) Version version) {
9493
return compasSclDataService.findByUUID(type, id, version);
9594
}
9695

@@ -117,7 +116,7 @@ public void deleteAll(@PathParam(TYPE_PATH_PARAM) SclType type,
117116
@Produces(MediaType.APPLICATION_XML)
118117
public void deleteVersion(@PathParam(TYPE_PATH_PARAM) SclType type,
119118
@PathParam(ID_PATH_PARAM) UUID id,
120-
@PathParam(Constants.VERSION_PATH_PARAM) Version version) {
119+
@PathParam(VERSION_PATH_PARAM) Version version) {
121120
compasSclDataService.delete(type, id, version);
122121
}
123122
}

0 commit comments

Comments
 (0)