From 478f7a4d31acc77174987bb6e8cae7e254cf69f6 Mon Sep 17 00:00:00 2001 From: Nicolas Senave Date: Thu, 17 Aug 2023 10:13:24 +0200 Subject: [PATCH] test: update after removing `SequenceType` --- .../fr/insee/lunatic/conversion/XMLSerializer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/fr/insee/lunatic/conversion/XMLSerializer.java b/src/main/java/fr/insee/lunatic/conversion/XMLSerializer.java index 8c3e352e..f58033ff 100644 --- a/src/main/java/fr/insee/lunatic/conversion/XMLSerializer.java +++ b/src/main/java/fr/insee/lunatic/conversion/XMLSerializer.java @@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory; import fr.insee.lunatic.model.flat.Questionnaire; -import fr.insee.lunatic.model.flat.SequenceType; +import fr.insee.lunatic.model.flat.ComponentType; public class XMLSerializer { @@ -37,19 +37,19 @@ public String serialize(Questionnaire questionnaire) throws JAXBException, Unsup } - public String serialize(SequenceType sequence) throws JAXBException, UnsupportedEncodingException { + public String serialize(ComponentType component) throws JAXBException, UnsupportedEncodingException { - if (sequence == null) return ""; + if (component == null) return ""; - logger.debug("Serializing sequence " + sequence.getId()); + logger.debug("Serializing component " + component.getId()); - JAXBContext context = JAXBContext.newInstance(SequenceType.class); + JAXBContext context = JAXBContext.newInstance(ComponentType.class); Marshaller marshaller = context.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); ByteArrayOutputStream baos = new ByteArrayOutputStream(); - marshaller.marshal(sequence, baos); + marshaller.marshal(component, baos); return baos.toString("UTF-8"); }