All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jdplus.x13.base.xml.XmlEasterSpec Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
/*
 * Copyright 2016 National Bank of Belgium
 * 
 * Licensed under the EUPL, Version 1.1 or – as soon they will be approved 
 * by the European Commission - subsequent versions of the EUPL (the "Licence");
 * You may not use this work except in compliance with the Licence.
 * You may obtain a copy of the Licence at:
 * 
 * http://ec.europa.eu/idabc/eupl
 * 
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the Licence is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the Licence for the specific language governing permissions and 
 * limitations under the Licence.
 */
package jdplus.x13.base.xml;

import jdplus.x13.base.api.regarima.RegressionTestSpec;
import jdplus.x13.base.api.regarima.EasterSpec;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * 

* Java class for EasterSpecType complex type. * *

* The following schema fragment specifies the expected content contained within * this class. * *

 * <complexType name="EasterSpecType">
 *   <complexContent>
 *     <extension base="{ec/eurostat/jdemetra/modelling}EasterSpecType">
 *       <sequence>
 *         <element name="Test" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="option" type="{ec/eurostat/jdemetra/sa/tramoseats}EasterHolidayEnum" default="IncludeEaster" />
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "EasterSpecType", propOrder = { "test" }) public class XmlEasterSpec extends jdplus.toolkit.base.xml.legacy.modelling.XmlEasterSpec { @XmlElement(name = "Test") protected RegressionTestSpec test; /** * Gets the value of the test property. * * @return possible object is {@link Boolean } * */ public RegressionTestSpec getTest() { return test == null ? RegressionTestSpec.None : test; } /** * Sets the value of the test property. * * @param value allowed object is {@link Boolean } * */ public void setTest(RegressionTestSpec value) { if (value == RegressionTestSpec.None) { this.test = null; } else { this.test = value; } } public static final boolean marshal(EasterSpec v, XmlEasterSpec xml) { if (v.isDefault()) { return true; } xml.setJulian(v.getType() == EasterSpec.Type.JulianEaster); xml.setTest(v.getTest()); if (v.getDuration() != EasterSpec.DEF_EASTERDUR) { xml.setDuration(v.getDuration()); } return true; } public static final EasterSpec unmarshal(XmlEasterSpec xml) { if (xml == null) { return EasterSpec.DEFAULT_UNUSED; } return EasterSpec.builder() .type(xml.isJulian() ? EasterSpec.Type.JulianEaster : EasterSpec.Type.Easter) .test(xml.getTest()) .duration(xml.duration != null ? xml.duration : EasterSpec.DEF_EASTERDUR) .build(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy