Skip to content

Commit

Permalink
Merge pull request #112 from com-pas/update-xsd
Browse files Browse the repository at this point in the history
Changed the XML Type name of tSclName/tSclFileType
  • Loading branch information
Flurb authored Feb 8, 2022
2 parents e4770e8 + 54695fe commit 22451e1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion scl-extension/src/main/bindings/scl-extensions.xjb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
version="2.1">
<jxb:bindings schemaLocation="../resources/xsd/SCL_CoMPAS.xsd">
<jxb:bindings node="//xs:simpleType[@name='tSclFileType']">
<jxb:bindings node="//xs:simpleType[@name='tCompasSclFileType']">
<jxb:typesafeEnumClass ref="org.lfenergy.compas.scl.extensions.model.SclFileType"/>
</jxb:bindings>
</jxb:bindings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@

/**
* The CoMPAS Extension fields that exists. The fieldName is the name how the element is used in the XML.
* For a description of the fields, see the XSD.
*/
public enum CompasExtensionsField {
/**
* The name of the SCL XML File, will be used in the search and when SCL XML File is saved to the filesystem.
*/
SCL_NAME_EXTENSION("SclName"),
/**
* The type of SCL XML File it is, like IID, SCD and more. TSclFileType indicates which values are allowed.
*/
SCL_FILETYPE_EXTENSION("SclFileType");
SCL_FILETYPE_EXTENSION("SclFileType"),
FLOW("Flow"),
CONNECTIVITY_NODE("ConnectivityNode"),
BAY("Bay"),
L_DEVICE("LDevice"),
CRITERIA("Criteria"),
ICD_HEADER("ICDHeader"),
SYSTEM_VERSION("SystemVersion"),
FUNCTION("Function");

private final String fieldName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

@XmlType(name = "tSclFileType", namespace = "https://www.lfenergy.org/compas/extension/v1")
import static org.lfenergy.compas.scl.extensions.commons.CompasExtensionsConstants.COMPAS_EXTENSION_NS_URI;

@XmlType(name = "tCompasSclFileType", namespace = COMPAS_EXTENSION_NS_URI)
@XmlEnum
public enum SclFileType {
SSD("Substation Specification Description"),
Expand Down
11 changes: 5 additions & 6 deletions scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SPDX-License-Identifier: Apache-2.0
<!--
SCL Name element.
-->
<xs:simpleType name="tSclName">
<xs:simpleType name="tCompasSclName">
<xs:annotation>
<xs:documentation>Name of the SCL configuration, extension excluded</xs:documentation>
</xs:annotation>
Expand All @@ -29,7 +29,7 @@ SPDX-License-Identifier: Apache-2.0
<!--
SCL File Type element.
-->
<xs:simpleType name="tSclFileType">
<xs:simpleType name="tCompasSclFileType">
<xs:annotation>
<xs:documentation>File type of the SCL configuration file</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -263,8 +263,8 @@ SPDX-License-Identifier: Apache-2.0
<xs:attribute name="CriteriaAssociationID" type="xs:string" use="optional"/>
</xs:complexType>

<xs:element name="SclName" type="tSclName"/>
<xs:element name="SclFileType" type="tSclFileType"/>
<xs:element name="SclName" type="tCompasSclName"/>
<xs:element name="SclFileType" type="tCompasSclFileType"/>
<xs:element name="Flow" type="tCompasFlow"/>
<xs:element name="ConnectivityNode" type="tCompasConnectivityNode"/>
<xs:element name="Bay" type="tCompasBay"/>
Expand All @@ -273,5 +273,4 @@ SPDX-License-Identifier: Apache-2.0
<xs:element name="ICDHeader" type="tCompasICDHeader"/>
<xs:element name="SystemVersion" type="tCompasSystemVersion"/>
<xs:element name="Function" type="tCompasFunction"/>

</xs:schema>
</xs:schema>

0 comments on commit 22451e1

Please sign in to comment.