Skip to content

Commit 22451e1

Browse files
author
Rob Tjalma
authored
Merge pull request #112 from com-pas/update-xsd
Changed the XML Type name of tSclName/tSclFileType
2 parents e4770e8 + 54695fe commit 22451e1

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

scl-extension/src/main/bindings/scl-extensions.xjb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0
88
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
99
version="2.1">
1010
<jxb:bindings schemaLocation="../resources/xsd/SCL_CoMPAS.xsd">
11-
<jxb:bindings node="//xs:simpleType[@name='tSclFileType']">
11+
<jxb:bindings node="//xs:simpleType[@name='tCompasSclFileType']">
1212
<jxb:typesafeEnumClass ref="org.lfenergy.compas.scl.extensions.model.SclFileType"/>
1313
</jxb:bindings>
1414
</jxb:bindings>

scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/commons/CompasExtensionsField.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@
55

66
/**
77
* The CoMPAS Extension fields that exists. The fieldName is the name how the element is used in the XML.
8+
* For a description of the fields, see the XSD.
89
*/
910
public enum CompasExtensionsField {
10-
/**
11-
* The name of the SCL XML File, will be used in the search and when SCL XML File is saved to the filesystem.
12-
*/
1311
SCL_NAME_EXTENSION("SclName"),
14-
/**
15-
* The type of SCL XML File it is, like IID, SCD and more. TSclFileType indicates which values are allowed.
16-
*/
17-
SCL_FILETYPE_EXTENSION("SclFileType");
12+
SCL_FILETYPE_EXTENSION("SclFileType"),
13+
FLOW("Flow"),
14+
CONNECTIVITY_NODE("ConnectivityNode"),
15+
BAY("Bay"),
16+
L_DEVICE("LDevice"),
17+
CRITERIA("Criteria"),
18+
ICD_HEADER("ICDHeader"),
19+
SYSTEM_VERSION("SystemVersion"),
20+
FUNCTION("Function");
1821

1922
private final String fieldName;
2023

scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/model/SclFileType.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
import javax.xml.bind.annotation.XmlEnum;
77
import javax.xml.bind.annotation.XmlType;
88

9-
@XmlType(name = "tSclFileType", namespace = "https://www.lfenergy.org/compas/extension/v1")
9+
import static org.lfenergy.compas.scl.extensions.commons.CompasExtensionsConstants.COMPAS_EXTENSION_NS_URI;
10+
11+
@XmlType(name = "tCompasSclFileType", namespace = COMPAS_EXTENSION_NS_URI)
1012
@XmlEnum
1113
public enum SclFileType {
1214
SSD("Substation Specification Description"),

scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SPDX-License-Identifier: Apache-2.0
1919
<!--
2020
SCL Name element.
2121
-->
22-
<xs:simpleType name="tSclName">
22+
<xs:simpleType name="tCompasSclName">
2323
<xs:annotation>
2424
<xs:documentation>Name of the SCL configuration, extension excluded</xs:documentation>
2525
</xs:annotation>
@@ -29,7 +29,7 @@ SPDX-License-Identifier: Apache-2.0
2929
<!--
3030
SCL File Type element.
3131
-->
32-
<xs:simpleType name="tSclFileType">
32+
<xs:simpleType name="tCompasSclFileType">
3333
<xs:annotation>
3434
<xs:documentation>File type of the SCL configuration file</xs:documentation>
3535
</xs:annotation>
@@ -263,8 +263,8 @@ SPDX-License-Identifier: Apache-2.0
263263
<xs:attribute name="CriteriaAssociationID" type="xs:string" use="optional"/>
264264
</xs:complexType>
265265

266-
<xs:element name="SclName" type="tSclName"/>
267-
<xs:element name="SclFileType" type="tSclFileType"/>
266+
<xs:element name="SclName" type="tCompasSclName"/>
267+
<xs:element name="SclFileType" type="tCompasSclFileType"/>
268268
<xs:element name="Flow" type="tCompasFlow"/>
269269
<xs:element name="ConnectivityNode" type="tCompasConnectivityNode"/>
270270
<xs:element name="Bay" type="tCompasBay"/>
@@ -273,5 +273,4 @@ SPDX-License-Identifier: Apache-2.0
273273
<xs:element name="ICDHeader" type="tCompasICDHeader"/>
274274
<xs:element name="SystemVersion" type="tCompasSystemVersion"/>
275275
<xs:element name="Function" type="tCompasFunction"/>
276-
277-
</xs:schema>
276+
</xs:schema>

0 commit comments

Comments
 (0)