-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from com-pas/develop
Develop -> Master (Release)
- Loading branch information
Showing
61 changed files
with
11,358 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2021 Alliander N.V. | ||
SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
|
||
# CIM Mapping | ||
|
||
Below is an overview of the mapping done between IEC CIM Classes and IEC 61850 Classes and their properties. | ||
There is an IEC document describing the mapping, namely IEC/TS 62361-102, but not all details are in there. | ||
|
||
## Mapping IEC CIM to IEC 61850 | ||
|
||
| CIM Class | IEC Class | Remark | | ||
| -------------------------------- | -------------------------------- | --------- | | ||
| *cim:Substation* | *TSubstation* | | | ||
| id | name | | | ||
| name | desc | | | ||
| List<cim:VoltageLevel> | List<TVoltageLevel> | (1) | | ||
|
||
(1): The list of VoltageLevels that belong to the Substation. | ||
|
||
| CIM Class | IEC Class | Remark | | ||
| -------------------------------- | -------------------------------- | --------- | | ||
| *cim:VoltageLevel* | *TVoltageLevel* | | | ||
| name or id | name | | | ||
| nominalV | voltage.value | | | ||
| List<Bay> | List<TBay> | (1) | | ||
|
||
(1): The list of Bays that belong to the VoltageLevel. | ||
|
||
| CIM Class | IEC Class | Remark | | ||
| -------------------------------- | -------------------------------- | --------- | | ||
| *cim:Bay* | *TBay* | | | ||
| name or id | name | | | ||
| List<cim:ConnectivityNode> | List<TConnectivityNode> | (1) | | ||
| List<*Switches*> | List<TConductingEquipment> | (2) | | ||
|
||
(1): ConnectivityNode in IEC CIM can be linked to a Bay, but also to the VoltageLevel. In IEC 61850 a ConnectivityNode | ||
can only be added to a Bay, so also the ConnectivityNode from the VoltageLevel are added to the Bay. This causes those | ||
ConnectivityNode to be found under each Bay of that VoltageLevel. | ||
(2): Switches in IEC CIM can be the following types, cim:Switch cim:Breaker cim:Disconnector cim:LoadBreakSwitch cim: | ||
ProtectedSwitch.These classes are all mapped in the same way on IEC 61850 | ||
|
||
| CIM Class | IEC Class | Remark | | ||
| -------------------------------- | -------------------------------- | --------- | | ||
| *cim:ConnectivityNode* | *TConnectivityNode | | | ||
| name or id | name | | | ||
| - | pathName | (1) | | ||
|
||
(1): The path name is derived from the names of all parent of that ConnectivityNode. In the context we keep a list of | ||
all Naming Elements we passed before coming to that ConnectivityNode. In this way we can build the PathName of that | ||
ConnectivityNode. | ||
|
||
| CIM Class | IEC Class | Remark | | ||
| -------------------------------- | -------------------------------- | --------- | | ||
| *Switches* | *TConductingEquipment | (1) | | ||
| name or id | name | | | ||
| type | type | (2) | | ||
| List<cim:Terminal> | List<TTerminal> | (3) | | ||
|
||
(1): Switches in IEC CIM can be the following types, cim:Switch cim:Breaker cim:Disconnector cim:LoadBreakSwitch cim: | ||
ProtectedSwitch.These classes are all mapped in the same way on IEC 61850 | ||
(2): The mapping between types is described in 5.6.2 of IEC/TS 62361-102. | ||
(3): The list of Terminal that belong to the Switch. | ||
|
||
| CIM Class | IEC Class | Remark | | ||
| -------------------------------- | -------------------------------- | --------- | | ||
| *cim:Terminal* | *TTerminal | | | ||
| name or id | name | | | ||
| - | connectivityNode | (1) | | ||
| - | CNodeName | (1) | | ||
|
||
(1): Use the ID of the ConnectivityNode to find the name or pathName of that ConnectivityNode. A map is saved of all | ||
ConnectivityNode that are processed for each Bay. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
app/src/main/java/org/lfenergy/compas/cim/mapping/rest/CompasCimMappingConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-FileCopyrightText: 2021 Alliander N.V. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package org.lfenergy.compas.cim.mapping.rest; | ||
|
||
import org.lfenergy.compas.cim.mapping.mapper.CimToSclMapper; | ||
import org.lfenergy.compas.core.commons.ElementConverter; | ||
|
||
import javax.enterprise.inject.Produces; | ||
|
||
/** | ||
* Create Beans from other dependencies that are used in the application. | ||
*/ | ||
public class CompasCimMappingConfiguration { | ||
@Produces | ||
public ElementConverter createElementConverter() { | ||
return new ElementConverter(); | ||
} | ||
|
||
@Produces | ||
public CimToSclMapper createCimToSclMapper() { | ||
return CimToSclMapper.INSTANCE; | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
app/src/main/java/org/lfenergy/compas/cim/mapping/rest/Constants.java
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
app/src/main/java/org/lfenergy/compas/cim/mapping/rest/model/GetRequest.java
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
app/src/main/java/org/lfenergy/compas/cim/mapping/rest/model/GetResponse.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
app/src/main/java/org/lfenergy/compas/cim/mapping/rest/model/package-info.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/model/MapRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// SPDX-FileCopyrightText: 2021 Alliander N.V. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.cim.mapping.rest.v1.model; | ||
|
||
import org.lfenergy.compas.cim.mapping.model.CimData; | ||
|
||
import javax.validation.Valid; | ||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import java.util.List; | ||
|
||
import static org.lfenergy.compas.cim.mapping.CimMappingConstants.CIM_MAPPING_SERVICE_V1_NS_URI; | ||
|
||
@XmlRootElement(name = "MapRequest", namespace = CIM_MAPPING_SERVICE_V1_NS_URI) | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
public class MapRequest { | ||
@Valid | ||
@XmlElement(name = "CimData", namespace = CIM_MAPPING_SERVICE_V1_NS_URI) | ||
private List<CimData> cimData; | ||
|
||
public List<CimData> getCimData() { | ||
return cimData; | ||
} | ||
|
||
public void setCimData(List<CimData> cimData) { | ||
this.cimData = cimData; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/model/MapResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// SPDX-FileCopyrightText: 2021 Alliander N.V. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.cim.mapping.rest.v1.model; | ||
|
||
import org.eclipse.microprofile.openapi.annotations.media.Schema; | ||
import org.lfenergy.compas.scl2007b4.model.SCL; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import static org.lfenergy.compas.cim.mapping.CimMappingConstants.CIM_MAPPING_SERVICE_V1_NS_URI; | ||
import static org.lfenergy.compas.cim.mapping.CimMappingConstants.SCL_NS_URI; | ||
|
||
@XmlRootElement(name = "MapResponse", namespace = CIM_MAPPING_SERVICE_V1_NS_URI) | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
public class MapResponse { | ||
@Schema(example = "SCL XML") | ||
@XmlElement(name = "SCL", namespace = SCL_NS_URI) | ||
protected SCL scl; | ||
|
||
public SCL getScl() { | ||
return scl; | ||
} | ||
|
||
public void setScl(SCL scl) { | ||
this.scl = scl; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/model/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-FileCopyrightText: 2021 Alliander N.V. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
@XmlSchema( | ||
xmlns = { | ||
@XmlNs(prefix = "cms", namespaceURI = CIM_MAPPING_SERVICE_V1_NS_URI) | ||
} | ||
) | ||
package org.lfenergy.compas.cim.mapping.rest.v1.model; | ||
|
||
import javax.xml.bind.annotation.XmlNs; | ||
import javax.xml.bind.annotation.XmlSchema; | ||
|
||
import static org.lfenergy.compas.cim.mapping.CimMappingConstants.CIM_MAPPING_SERVICE_V1_NS_URI; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SPDX-FileCopyrightText: 2021 Alliander N.V. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
javax.validation.constraints.NotNull.message = Value must not be null. | ||
javax.validation.constraints.NotBlank.message = Value must not be blank. | ||
|
||
org.lfenergy.compas.CimDataNamePattern.message = Invalid name used for this cim data file. | ||
org.lfenergy.compas.XmlAnyElementValid.unexpected.message = The XML Any Element contains unexpected elements. Element Name should be '{elementName}' with namespace '{elementNamespace}'. | ||
org.lfenergy.compas.XmlAnyElementValid.moreElements.message = There are more or less Elements found then expected (between {min} and {max}) in the XML Any Element. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.