schemaConfigs) {
- // Convert the SchemaConfig List to a String containing the Import Statements sued to combine multiple
- // XSD Schemas.
- return schemaConfigs.stream()
- .map(schemaConfig ->
- "\n")
- .collect(Collectors.joining());
- }
-
- public MarshallerWrapper build() {
- try {
- // Create the JAXB Context with the configured context paths. The list is separated by a colon
- // as needed by the JAxbContext.
- var schemaConfigs = getSchemaConfigs();
- var contextPaths = String.join(":", getContextPaths(schemaConfigs));
-
- var jaxbContext = JAXBContext.newInstance(contextPaths);
- var jaxbMarshaller = jaxbContext.createMarshaller();
- var jaxbUnmarshaller = jaxbContext.createUnmarshaller();
-
- // Setup schema validator
- var factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- // To make load of all different type of schemas and also make imports/includes in these schemas
- // work the solution is to make a combined XSD Schema containing all other schemas as import.
- // Import is used, because the schemas can have different namespaces.
- var combinedXsdSchema =
- "\n"
- + "\n"
- + getImportStatements(schemaConfigs)
- + "";
- var schema = factory.newSchema(
- new StreamSource(new StringReader(combinedXsdSchema), "topSchema")
- );
- jaxbMarshaller.setSchema(schema);
- jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
- jaxbUnmarshaller.setSchema(schema);
-
- return new MarshallerWrapper(jaxbUnmarshaller,jaxbMarshaller);
-
- } catch (JAXBException | SAXException exp) {
- var message = "Error creating JAXB Marshaller and Unmarshaller.";
- log.error(message, exp);
- throw new CompasException(CompasErrorCode.CREATION_ERROR_CODE, message);
- }
- }
-
- /**
- * POJO Class to hold all the schema configuration, so that we only need to walk through the JSON Content once.
- */
- protected class SchemaConfig {
- private final String xsdPath;
- private final String namespace;
- private final String contextPath;
-
- public SchemaConfig(String xsdPath, String namespace, String contextPath) {
- // Convert the XSD Path to a URL, that will be used in the import statement.
- // If the XSD Path is not correct loading will fail.
- this.xsdPath = xsdPath;
- this.namespace = namespace;
- this.contextPath = contextPath;
- }
-
- public String getXsdPath() {
- try {
- return getResource(xsdPath).getPath();
- } catch (IOException e) {
- log.error(e.getMessage(),e);
- throw new CompasException(CompasErrorCode.RESOURCE_NOT_FOUND_ERROR_CODE,e.getMessage());
- }
- }
-
- public String getNamespace() {
- return namespace;
- }
-
- public String getContextPath() {
- return contextPath;
- }
- }
-}
-
-
diff --git a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/SclTestMarshaller.java b/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/SclTestMarshaller.java
index ac80d9ddb..185f6a868 100644
--- a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/SclTestMarshaller.java
+++ b/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/SclTestMarshaller.java
@@ -12,19 +12,12 @@
public class SclTestMarshaller {
public static SCL getSCLFromFile(String filename) throws Exception {
- MarshallerWrapper marshallerWrapper = createWrapper();
byte[] rawXml = IOUtils.resourceToByteArray(filename);
- return marshallerWrapper.unmarshall(rawXml,SCL.class);
+ return MarshallerWrapper.unmarshall(rawXml, SCL.class);
}
public static String assertIsMarshallable(SCL scl) {
- MarshallerWrapper marshallerWrapper = createWrapper();
- return assertDoesNotThrow(() -> marshallerWrapper.marshall(scl));
+ return assertDoesNotThrow(() -> MarshallerWrapper.marshall(scl));
}
- private static MarshallerWrapper createWrapper() {
- return MarshallerWrapper.builder()
- .withProperties("classpath:scl_schema.yml")
- .build();
- }
}
diff --git a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/Employee.java b/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/Employee.java
deleted file mode 100644
index ed12ba74f..000000000
--- a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/Employee.java
+++ /dev/null
@@ -1,313 +0,0 @@
-// SPDX-FileCopyrightText: 2021 RTE FRANCE
-//
-// SPDX-License-Identifier: Apache-2.0
-
-package org.lfenergy.compas.sct.commons.testhelpers.marshaller;
-
-import java.util.ArrayList;
-import java.util.List;
-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 javax.xml.bind.annotation.XmlType;
-
-
-/**
- * Java class for anonymous complex type.
- *
- *
The following schema fragment specifies the expected content contained within this class.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "name",
- "address",
- "assestsAllocated",
- "id"
-})
-@XmlRootElement(name = "employee")
-public class Employee {
-
- @XmlElement(required = true)
- protected String name;
- @XmlElement(required = true)
- protected Employee.Address address;
- protected List assestsAllocated;
- protected byte id;
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the address property.
- *
- * @return
- * possible object is
- * {@link Employee.Address }
- *
- */
- public Employee.Address getAddress() {
- return address;
- }
-
- /**
- * Sets the value of the address property.
- *
- * @param value
- * allowed object is
- * {@link Employee.Address }
- *
- */
- public void setAddress(Employee.Address value) {
- this.address = value;
- }
-
- /**
- * Gets the value of the assestsAllocated property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the assestsAllocated property.
- *
- *
- * For example, to add a new item, do as follows:
- * getAssestsAllocated().add(newItem);
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link String }
- *
- *
- */
- public List getAssestsAllocated() {
- if (assestsAllocated == null) {
- assestsAllocated = new ArrayList();
- }
- return this.assestsAllocated;
- }
-
- /**
- * Gets the value of the id property.
- *
- */
- public byte getId() {
- return id;
- }
-
- /**
- * Sets the value of the id property.
- *
- */
- public void setId(byte value) {
- this.id = value;
- }
-
-
- /**
- *
Java class for anonymous complex type.
- *
- *
The following schema fragment specifies the expected content contained within this class.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "addressLine1",
- "addressLine2",
- "country",
- "state",
- "zip"
- })
- public static class Address {
-
- @XmlElement(required = true)
- protected String addressLine1;
- @XmlElement(required = true)
- protected String addressLine2;
- @XmlElement(required = true)
- protected String country;
- @XmlElement(required = true)
- protected String state;
- protected short zip;
-
- /**
- * Gets the value of the addressLine1 property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getAddressLine1() {
- return addressLine1;
- }
-
- /**
- * Sets the value of the addressLine1 property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setAddressLine1(String value) {
- this.addressLine1 = value;
- }
-
- /**
- * Gets the value of the addressLine2 property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getAddressLine2() {
- return addressLine2;
- }
-
- /**
- * Sets the value of the addressLine2 property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setAddressLine2(String value) {
- this.addressLine2 = value;
- }
-
- /**
- * Gets the value of the country property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getCountry() {
- return country;
- }
-
- /**
- * Sets the value of the country property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setCountry(String value) {
- this.country = value;
- }
-
- /**
- * Gets the value of the state property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getState() {
- return state;
- }
-
- /**
- * Sets the value of the state property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setState(String value) {
- this.state = value;
- }
-
- /**
- * Gets the value of the zip property.
- *
- */
- public short getZip() {
- return zip;
- }
-
- /**
- * Sets the value of the zip property.
- *
- */
- public void setZip(short value) {
- this.zip = value;
- }
- }
-
-}
diff --git a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/MarshallerWrapper.java b/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/MarshallerWrapper.java
deleted file mode 100644
index 631309c34..000000000
--- a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/MarshallerWrapper.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// SPDX-FileCopyrightText: 2021 RTE FRANCE
-//
-// SPDX-License-Identifier: Apache-2.0
-
-package org.lfenergy.compas.sct.commons.testhelpers.marshaller;
-
-import lombok.extern.slf4j.Slf4j;
-import org.lfenergy.compas.core.commons.exception.CompasErrorCode;
-import org.lfenergy.compas.core.commons.exception.CompasException;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.StringWriter;
-
-@Slf4j
-public class MarshallerWrapper {
- private final Unmarshaller unmarshaller;
- private final Marshaller marshaller;
-
- protected MarshallerWrapper(Unmarshaller unmarshaller, Marshaller marshaller) {
- this.unmarshaller = unmarshaller;
- this.marshaller = marshaller;
- }
-
- public static SclMarshallerBuilder builder(){
- return new SclMarshallerBuilder();
- }
-
- public String marshall(final T obj) {
- try {
- StringWriter sw = new StringWriter();
- Result result = new StreamResult(sw);
- marshaller.marshal(obj, result);
-
- return sw.toString();
- } catch (JAXBException exp) {
- String message = String.format("Error marshalling the Class: %s", exp);
- log.error(message);
- throw new CompasException(CompasErrorCode.MARSHAL_ERROR_CODE, message);
- }
- }
-
- public T unmarshall(final byte[] xml, Class cls) {
- ByteArrayInputStream input = new ByteArrayInputStream(xml);
- return unmarshall(input, cls);
- }
-
- public T unmarshall(final InputStream xml, Class cls) {
- try {
- Object result = unmarshaller.unmarshal(new StreamSource(xml));
- if (!result.getClass().isAssignableFrom(cls)) {
- throw new CompasException(CompasErrorCode.UNMARSHAL_ERROR_CODE,
- "Error unmarshalling to the Class. Invalid class");
- }
- return cls.cast(result);
- } catch (JAXBException exp) {
- String message = String.format("Error unmarshalling to the Class: %s", exp.getLocalizedMessage());
- log.error(message);
- throw new CompasException(CompasErrorCode.UNMARSHAL_ERROR_CODE, message);
- }
- }
-}
diff --git a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/ObjectFactory.java b/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/ObjectFactory.java
deleted file mode 100644
index 2ad2716cf..000000000
--- a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/ObjectFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-// SPDX-FileCopyrightText: 2021 RTE FRANCE
-//
-// SPDX-License-Identifier: Apache-2.0
-
-package org.lfenergy.compas.sct.commons.testhelpers.marshaller;
-
-import javax.xml.bind.annotation.XmlRegistry;
-
-
-/**
- * This object contains factory methods for each
- * Java content interface and Java element interface
- * generated in the com.javacodegeeks.examples.xjc package.
- * An ObjectFactory allows you to programatically
- * construct new instances of the Java representation
- * for XML content. The Java representation of XML
- * content can consist of schema derived interfaces
- * and classes representing the binding of schema
- * type definitions, element declarations and model
- * groups. Factory methods for each of these are
- * provided in this class.
- *
- */
-@XmlRegistry
-public class ObjectFactory {
-
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.javacodegeeks.examples.xjc
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link Employee }
- *
- */
- public Employee createEmployee() {
- return new Employee();
- }
-
- /**
- * Create an instance of {@link Employee.Address }
- *
- */
- public Employee.Address createEmployeeAddress() {
- return new Employee.Address();
- }
-
-}
diff --git a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/SclMarshallerBuilder.java b/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/SclMarshallerBuilder.java
deleted file mode 100644
index 4f71c9a9c..000000000
--- a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/SclMarshallerBuilder.java
+++ /dev/null
@@ -1,206 +0,0 @@
-// SPDX-FileCopyrightText: 2021 RTE FRANCE
-//
-// SPDX-License-Identifier: Apache-2.0
-package org.lfenergy.compas.sct.commons.testhelpers.marshaller;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.JsonNodeType;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.io.IOUtils;
-import org.lfenergy.compas.core.commons.exception.CompasErrorCode;
-import org.lfenergy.compas.core.commons.exception.CompasException;
-import org.xml.sax.SAXException;
-
-import javax.xml.XMLConstants;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.SchemaFactory;
-import java.io.IOException;
-import java.io.StringReader;
-import java.net.URL;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-
-@Slf4j
-public class SclMarshallerBuilder {
-
- private static final String COMPAS_SCL_SCHEMAS_JSONPATH = "/compas/scl/schemas";
- private static final String CONTEXT_PATH_PROP = "contextPath";
- private static final String XSD_PATH_PROP = "xsdPath";
- private static final String NAMESPACE_PROP = "namespace";
-
- // Path to the YAML File containing the schema properties.
- private String yamlFilePath;
- private Map jaxbProperties;
-
- public SclMarshallerBuilder withProperties(String yamlFilePath) {
- this.yamlFilePath = yamlFilePath;
- return this;
- }
-
-
- public URL getResource(String filePath) throws IOException {
- final String clsPathIndicator = "classpath:";
- if(filePath.startsWith(clsPathIndicator)){
- String classPathRes = filePath.substring(clsPathIndicator.length());
- return IOUtils.resourceToURL("/" + classPathRes);
- }
- Path path = Paths.get(filePath).toAbsolutePath();
- if(!Files.exists(path)) {
- throw new IOException(path + ": No such file or directory");
- }
- return path.toUri().toURL();
- }
-
-
- private List getSchemaConfigs() {
- if (yamlFilePath == null || yamlFilePath.isBlank()) {
- throw new CompasException(CompasErrorCode.CONFIGURATION_ERROR_CODE,
- "No configuration file configured (yamlFilePath)");
- }
-
- URL source;
- try {
- source = getResource(yamlFilePath);
- } catch (IOException e){
- String message = String.format("Resource %s not found", yamlFilePath);
- log.error(message, e);
- throw new CompasException(CompasErrorCode.RESOURCE_NOT_FOUND_ERROR_CODE,message);
- }
-
- List schemaConfigs = new ArrayList<>();
- try {
- ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory());
- JsonNode jsonNode = objectMapper.readTree(source);
-
- JsonNode pathsNode = jsonNode.at(COMPAS_SCL_SCHEMAS_JSONPATH);
- if (pathsNode != null && pathsNode.getNodeType() == JsonNodeType.ARRAY) {
- Iterable nodes = pathsNode::elements;
- // Walk through the schemas and check if all needed parameters are filled.
- nodes.forEach(node -> {
- if (node.has(XSD_PATH_PROP) && node.has(NAMESPACE_PROP) && node.has(CONTEXT_PATH_PROP)) {
- schemaConfigs.add(
- new SchemaConfig(node.get(XSD_PATH_PROP).textValue(),
- node.get(NAMESPACE_PROP).textValue(),
- node.get(CONTEXT_PATH_PROP).textValue()));
- } else {
- throw new CompasException(CompasErrorCode.PROPERTY_ERROR_ERROR_CODE,
- String.format("One of the properties (%s, %s, %s) has no value",
- XSD_PATH_PROP, NAMESPACE_PROP, CONTEXT_PATH_PROP));
- }
- });
- } else {
- throw new CompasException(CompasErrorCode.CONFIGURATION_ERROR_CODE,
- String.format("Configuration for marshaller (%s) didn't contain the path %s",
- yamlFilePath, COMPAS_SCL_SCHEMAS_JSONPATH));
- }
- } catch (IOException exp) {
- var message = "I/O Error reading YAML File";
- log.error(message, exp);
- throw new CompasException(CompasErrorCode.INVALID_YML_ERROR_CODE, message);
- }
-
- return schemaConfigs;
- }
-
- private List getContextPaths(List schemaConfigs) {
- // Convert the SchemaConfig List to a List containing only the ContextPaths.
- return schemaConfigs.stream()
- .map(SchemaConfig::getContextPath)
- .collect(Collectors.toList());
- }
-
- private String getImportStatements(List schemaConfigs) {
- // Convert the SchemaConfig List to a String containing the Import Statements sued to combine multiple
- // XSD Schemas.
- return schemaConfigs.stream()
- .map(schemaConfig ->
- "\n")
- .collect(Collectors.joining());
- }
-
- public MarshallerWrapper build() {
- try {
- // Create the JAXB Context with the configured context paths. The list is separated by a colon
- // as needed by the JAxbContext.
- var schemaConfigs = getSchemaConfigs();
- var contextPaths = String.join(":", getContextPaths(schemaConfigs));
-
- var jaxbContext = JAXBContext.newInstance(contextPaths);
- var jaxbMarshaller = jaxbContext.createMarshaller();
- var jaxbUnmarshaller = jaxbContext.createUnmarshaller();
-
- // Setup schema validator
- var factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- // To make load of all different type of schemas and also make imports/includes in these schemas
- // work the solution is to make a combined XSD Schema containing all other schemas as import.
- // Import is used, because the schemas can have different namespaces.
- var combinedXsdSchema =
- "\n"
- + "\n"
- + getImportStatements(schemaConfigs)
- + "";
- var schema = factory.newSchema(
- new StreamSource(new StringReader(combinedXsdSchema), "topSchema")
- );
- jaxbMarshaller.setSchema(schema);
- jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
- jaxbUnmarshaller.setSchema(schema);
-
- return new MarshallerWrapper(jaxbUnmarshaller,jaxbMarshaller);
-
- } catch (JAXBException | SAXException exp) {
- var message = "Error creating JAXB Marshaller and Unmarshaller.";
- log.error(message, exp);
- throw new CompasException(CompasErrorCode.CREATION_ERROR_CODE, message);
- }
- }
-
- /**
- * POJO Class to hold all the schema configuration, so that we only need to walk through the JSON Content once.
- */
- protected class SchemaConfig {
- private final String xsdPath;
- private final String namespace;
- private final String contextPath;
-
- public SchemaConfig(String xsdPath, String namespace, String contextPath) {
- // Convert the XSD Path to a URL, that will be used in the import statement.
- // If the XSD Path is not correct loading will fail.
- this.xsdPath = xsdPath;
- this.namespace = namespace;
- this.contextPath = contextPath;
- }
-
- public String getXsdPath() {
- try {
- return getResource(xsdPath).getPath();
- } catch (IOException e) {
- log.error(e.getMessage(),e);
- throw new CompasException(CompasErrorCode.RESOURCE_NOT_FOUND_ERROR_CODE,e.getMessage());
- }
- }
-
- public String getNamespace() {
- return namespace;
- }
-
- public String getContextPath() {
- return contextPath;
- }
- }
-}
-
-
diff --git a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/SclTestMarshaller.java b/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/SclTestMarshaller.java
deleted file mode 100644
index 90ad71881..000000000
--- a/sct-commons/src/test/java/org/lfenergy/compas/sct/commons/testhelpers/marshaller/SclTestMarshaller.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// SPDX-FileCopyrightText: 2021 RTE FRANCE
-//
-// SPDX-License-Identifier: Apache-2.0
-
-package org.lfenergy.compas.sct.commons.testhelpers.marshaller;
-
-import org.apache.commons.io.IOUtils;
-import org.lfenergy.compas.scl2007b4.model.SCL;
-import org.lfenergy.compas.sct.commons.testhelpers.MarshallerWrapper;
-
-public class SclTestMarshaller {
-
- public static SCL getSCLFromFile(String filename) throws Exception {
- MarshallerWrapper marshallerWrapper = createWrapper();
- byte[] rawXml = IOUtils.resourceToByteArray(filename);
- return marshallerWrapper.unmarshall(rawXml,SCL.class);
- }
-
- public static MarshallerWrapper createWrapper() {
- return MarshallerWrapper.builder()
- .withProperties("classpath:scl_schema.yml")
- .build();
- }
-}
diff --git a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/scd.xml b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/scd.xml
index 5080de6e1..1248f24fb 100644
--- a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/scd.xml
+++ b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/scd.xml
@@ -14,7 +14,7 @@
0
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/scd_lnode_with_many_compas_icdheader.xml b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/scd_lnode_with_many_compas_icdheader.xml
index 393510a21..5542476fb 100644
--- a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/scd_lnode_with_many_compas_icdheader.xml
+++ b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/scd_lnode_with_many_compas_icdheader.xml
@@ -14,7 +14,7 @@
0
-
+
@@ -25,13 +25,13 @@
-
+
-
+
-
+
diff --git a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/ssd.xml b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/ssd.xml
index 7488c9a34..d6f0de482 100644
--- a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/ssd.xml
+++ b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/ssd.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std.xml b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std.xml
index 1e3d4da21..9428ba6d9 100644
--- a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std.xml
+++ b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std.xml
@@ -34,7 +34,7 @@
-
+
@@ -341,4 +341,4 @@
Y
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1GTW1.xml b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1SCU1.xml
similarity index 99%
rename from sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1GTW1.xml
rename to sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1SCU1.xml
index 09d31de67..33c6aa8bb 100644
--- a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1GTW1.xml
+++ b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1SCU1.xml
@@ -34,7 +34,7 @@
-
+
@@ -341,4 +341,4 @@
Y
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1GTW2.xml b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1SCU2.xml
similarity index 99%
rename from sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1GTW2.xml
rename to sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1SCU2.xml
index d9d112f2e..43b7712f7 100644
--- a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1GTW2.xml
+++ b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_SITESITE1SCU2.xml
@@ -34,7 +34,7 @@
-
+
@@ -341,4 +341,4 @@
Y
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_with_same_ICDSystemVersionUUID.xml b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_with_same_ICDSystemVersionUUID.xml
index 48aafb3cb..54a7c0cb7 100644
--- a/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_with_same_ICDSystemVersionUUID.xml
+++ b/sct-commons/src/test/resources/scd-ied-dtt-com-import-stds/std_with_same_ICDSystemVersionUUID.xml
@@ -34,7 +34,7 @@
-
+
@@ -341,4 +341,4 @@
Y
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test1_LD_STATUS_INACTIVE.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test1_LD_STATUS_INACTIVE.scd
index b6f2124f7..9aa92348e 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test1_LD_STATUS_INACTIVE.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test1_LD_STATUS_INACTIVE.scd
@@ -19,7 +19,7 @@
0
-
+
@@ -221,4 +221,4 @@
test/blocked
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test2_LD_STATUS_INACTIVE.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test2_LD_STATUS_INACTIVE.scd
index f94cd1956..316933867 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test2_LD_STATUS_INACTIVE.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test2_LD_STATUS_INACTIVE.scd
@@ -19,7 +19,7 @@
0
-
+
@@ -219,4 +219,4 @@
test/blocked
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_Dai_Not_Updatable.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_Dai_Not_Updatable.scd
index 1de3c1de7..48c81222d 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_Dai_Not_Updatable.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_Dai_Not_Updatable.scd
@@ -19,7 +19,7 @@
0
-
+
@@ -220,4 +220,4 @@
test/blocked
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingBeh.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingBeh.scd
index 068f2cf7f..ee8ac2930 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingBeh.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingBeh.scd
@@ -1,114 +1,114 @@
-
-
-
-
-
-
- SCD
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00000001
-
-
-
-
-
-
- Adresse IP du serveur Syslog
-
-
-
-
-
- SAMU
- SAMU
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01.00.000
-
-
- 01.00.000
-
-
-
-
- off
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- blocked
- test
- test/blocked
- off
- on
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+ SCD
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 00000001
+
+
+
+
+
+
+ Adresse IP du serveur Syslog
+
+
+
+
+
+ SAMU
+ SAMU
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 01.00.000
+
+
+ 01.00.000
+
+
+
+
+ off
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ blocked
+ test
+ test/blocked
+ off
+ on
+
+
+
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingLDevicePrivate.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingLDevicePrivate.scd
index 48877c0b5..eba19585c 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingLDevicePrivate.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingLDevicePrivate.scd
@@ -1,112 +1,112 @@
-
-
-
-
-
-
- SCD
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00000001
-
-
-
-
-
-
- Adresse IP du serveur Syslog
-
-
-
-
-
- SAMU
- SAMU
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01.00.000
-
-
- 01.00.000
-
-
-
-
- off
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- blocked
- test
- test/blocked
- off
- on
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+ SCD
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 00000001
+
+
+
+
+
+
+ Adresse IP du serveur Syslog
+
+
+
+
+
+ SAMU
+ SAMU
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 01.00.000
+
+
+ 01.00.000
+
+
+
+
+ off
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ blocked
+ test
+ test/blocked
+ off
+ on
+
+
+
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingLDevicePrivateAttribute.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingLDevicePrivateAttribute.scd
index 8ab10e71c..c2e919b1b 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingLDevicePrivateAttribute.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingLDevicePrivateAttribute.scd
@@ -1,115 +1,115 @@
-
-
-
-
-
-
- SCD
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00000001
-
-
-
-
-
-
- Adresse IP du serveur Syslog
-
-
-
-
-
- SAMU
- SAMU
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01.00.000
-
-
- 01.00.000
-
-
-
-
- off
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- blocked
- test
- test/blocked
- off
- on
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+ SCD
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 00000001
+
+
+
+
+
+
+ Adresse IP du serveur Syslog
+
+
+
+
+
+ SAMU
+ SAMU
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 01.00.000
+
+
+ 01.00.000
+
+
+
+
+ off
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ blocked
+ test
+ test/blocked
+ off
+ on
+
+
+
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingMod.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingMod.scd
index f6d2f2979..1c6850178 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingMod.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_KO_MissingMod.scd
@@ -1,114 +1,114 @@
-
-
-
-
-
-
- SCD
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00000001
-
-
-
-
-
-
- Adresse IP du serveur Syslog
-
-
-
-
-
- SAMU
- SAMU
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01.00.000
-
-
- 01.00.000
-
-
-
-
- off
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- blocked
- test
- test/blocked
- off
- on
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+ SCD
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 00000001
+
+
+
+
+
+
+ Adresse IP du serveur Syslog
+
+
+
+
+
+ SAMU
+ SAMU
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 01.00.000
+
+
+ 01.00.000
+
+
+
+
+ off
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ blocked
+ test
+ test/blocked
+ off
+ on
+
+
+
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_LD_STATUS_ACTIVE.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_LD_STATUS_ACTIVE.scd
index 0823597c2..85a71fb25 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_LD_STATUS_ACTIVE.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_LD_STATUS_ACTIVE.scd
@@ -19,7 +19,7 @@
0
-
+
@@ -216,4 +216,4 @@
test/blocked
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_LD_STATUS_UNTESTED.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_LD_STATUS_UNTESTED.scd
index 6f2cb7e9d..205bcff51 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_LD_STATUS_UNTESTED.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_LD_STATUS_UNTESTED.scd
@@ -19,7 +19,7 @@
0
-
+
@@ -216,4 +216,4 @@
test/blocked
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_Template.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_Template.scd
index 140e2390d..651c5eff3 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_Template.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue68_Test_Template.scd
@@ -19,7 +19,7 @@
0
-
+
@@ -220,4 +220,4 @@
test/blocked
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-refresh-lnode/issue_165_enhance_68_Test_Dai_Updatable.scd b/sct-commons/src/test/resources/scd-refresh-lnode/issue_165_enhance_68_Test_Dai_Updatable.scd
index 1de3c1de7..48c81222d 100644
--- a/sct-commons/src/test/resources/scd-refresh-lnode/issue_165_enhance_68_Test_Dai_Updatable.scd
+++ b/sct-commons/src/test/resources/scd-refresh-lnode/issue_165_enhance_68_Test_Dai_Updatable.scd
@@ -19,7 +19,7 @@
0
-
+
@@ -220,4 +220,4 @@
test/blocked
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-substation-import-ssd/scd_with_substation.xml b/sct-commons/src/test/resources/scd-substation-import-ssd/scd_with_substation.xml
index 332586e8b..49e15f457 100644
--- a/sct-commons/src/test/resources/scd-substation-import-ssd/scd_with_substation.xml
+++ b/sct-commons/src/test/resources/scd-substation-import-ssd/scd_with_substation.xml
@@ -10,7 +10,7 @@
90
-
+
@@ -37,4 +37,4 @@
-
\ No newline at end of file
+
diff --git a/sct-commons/src/test/resources/scd-substation-import-ssd/ssd.xml b/sct-commons/src/test/resources/scd-substation-import-ssd/ssd.xml
index 7a38e3382..c4688b459 100644
--- a/sct-commons/src/test/resources/scd-substation-import-ssd/ssd.xml
+++ b/sct-commons/src/test/resources/scd-substation-import-ssd/ssd.xml
@@ -12,7 +12,7 @@
0
-
+
@@ -23,7 +23,7 @@
-
+
@@ -40,7 +40,7 @@
90
-
+
@@ -64,7 +64,7 @@
-
+
diff --git a/sct-commons/src/test/resources/scl-remove-controlBlocks-dataSet-extRefSrc/scl-with-control-blocks.xml b/sct-commons/src/test/resources/scl-remove-controlBlocks-dataSet-extRefSrc/scl-with-control-blocks.xml
index a192ae121..94db16aa8 100644
--- a/sct-commons/src/test/resources/scl-remove-controlBlocks-dataSet-extRefSrc/scl-with-control-blocks.xml
+++ b/sct-commons/src/test/resources/scl-remove-controlBlocks-dataSet-extRefSrc/scl-with-control-blocks.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/sct-commons/src/test/resources/scl_schema.yml b/sct-commons/src/test/resources/scl_schema.yml
deleted file mode 100644
index cf53b7c51..000000000
--- a/sct-commons/src/test/resources/scl_schema.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-FileCopyrightText: 2021 RTE FRANCE
-#
-# SPDX-License-Identifier: Apache-2.0
-
----
-compas:
- scl:
- # XsdPath currently is a reference to a XSD on the classpath, searched from the root.
- # ContextPath is the package where the ObjectFactory class can be found, mostly generated there.
- schemas:
- - xsdPath: "target/xsd/SCL2007B4/SCL.xsd"
- namespace: "http://www.iec.ch/61850/2003/SCL"
- contextPath: "org.lfenergy.compas.scl2007b4.model"
\ No newline at end of file