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

org.etsi.uri._01903.v1_3.GenericTimeStampType Maven / Gradle / Ivy

//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0 
// See https://javaee.github.io/jaxb-v2/ 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2022.11.16 at 09:22:53 AM UTC 
//


package org.etsi.uri._01903.v1_3;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import no.digipost.org.w3.xmldsig.CanonicalizationMethod;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;


/**
 * 

Java class for GenericTimeStampType complex type. * *

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

 * <complexType name="GenericTimeStampType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <choice minOccurs="0">
 *           <element ref="{http://uri.etsi.org/01903/v1.3.2#}Include" maxOccurs="unbounded" minOccurs="0"/>
 *           <element ref="{http://uri.etsi.org/01903/v1.3.2#}ReferenceInfo" maxOccurs="unbounded"/>
 *         </choice>
 *         <element ref="{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod" minOccurs="0"/>
 *         <choice maxOccurs="unbounded">
 *           <element name="EncapsulatedTimeStamp" type="{http://uri.etsi.org/01903/v1.3.2#}EncapsulatedPKIDataType"/>
 *           <element name="XMLTimeStamp" type="{http://uri.etsi.org/01903/v1.3.2#}AnyType"/>
 *         </choice>
 *       </sequence>
 *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "GenericTimeStampType", propOrder = { "referenceInfos", "includes", "canonicalizationMethod", "encapsulatedTimeStampsAndXMLTimeStamps" }) @XmlSeeAlso({ XAdESTimeStampType.class, OtherTimeStamp.class }) public abstract class GenericTimeStampType implements Equals2, HashCode2, ToString2 { @XmlElement(name = "ReferenceInfo") protected List referenceInfos; @XmlElement(name = "Include") protected List includes; @XmlElement(name = "CanonicalizationMethod", namespace = "http://www.w3.org/2000/09/xmldsig#") protected CanonicalizationMethod canonicalizationMethod; @XmlElements({ @XmlElement(name = "EncapsulatedTimeStamp", type = EncapsulatedPKIData.class), @XmlElement(name = "XMLTimeStamp", type = Any.class) }) protected List encapsulatedTimeStampsAndXMLTimeStamps; @XmlAttribute(name = "Id") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID @XmlSchemaType(name = "ID") protected String id; /** * Default no-arg constructor * */ public GenericTimeStampType() { super(); } /** * Fully-initialising value constructor * */ public GenericTimeStampType(final List referenceInfos, final List includes, final CanonicalizationMethod canonicalizationMethod, final List encapsulatedTimeStampsAndXMLTimeStamps, final String id) { this.referenceInfos = referenceInfos; this.includes = includes; this.canonicalizationMethod = canonicalizationMethod; this.encapsulatedTimeStampsAndXMLTimeStamps = encapsulatedTimeStampsAndXMLTimeStamps; this.id = id; } /** * Gets the value of the referenceInfos 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 referenceInfos property. * *

* For example, to add a new item, do as follows: *

     *    getReferenceInfos().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ReferenceInfo } * * */ public List getReferenceInfos() { if (referenceInfos == null) { referenceInfos = new ArrayList(); } return this.referenceInfos; } /** * Gets the value of the includes 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 includes property. * *

* For example, to add a new item, do as follows: *

     *    getIncludes().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Include } * * */ public List getIncludes() { if (includes == null) { includes = new ArrayList(); } return this.includes; } /** * Gets the value of the canonicalizationMethod property. * * @return * possible object is * {@link CanonicalizationMethod } * */ public CanonicalizationMethod getCanonicalizationMethod() { return canonicalizationMethod; } /** * Sets the value of the canonicalizationMethod property. * * @param value * allowed object is * {@link CanonicalizationMethod } * */ public void setCanonicalizationMethod(CanonicalizationMethod value) { this.canonicalizationMethod = value; } /** * Gets the value of the encapsulatedTimeStampsAndXMLTimeStamps 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 encapsulatedTimeStampsAndXMLTimeStamps property. * *

* For example, to add a new item, do as follows: *

     *    getEncapsulatedTimeStampsAndXMLTimeStamps().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link EncapsulatedPKIData } * {@link Any } * * */ public List getEncapsulatedTimeStampsAndXMLTimeStamps() { if (encapsulatedTimeStampsAndXMLTimeStamps == null) { encapsulatedTimeStampsAndXMLTimeStamps = new ArrayList(); } return this.encapsulatedTimeStampsAndXMLTimeStamps; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } public void setReferenceInfos(List value) { this.referenceInfos = null; if (value!= null) { List draftl = this.getReferenceInfos(); draftl.addAll(value); } } public void setIncludes(List value) { this.includes = null; if (value!= null) { List draftl = this.getIncludes(); draftl.addAll(value); } } public void setEncapsulatedTimeStampsAndXMLTimeStamps(List value) { this.encapsulatedTimeStampsAndXMLTimeStamps = null; if (value!= null) { List draftl = this.getEncapsulatedTimeStampsAndXMLTimeStamps(); draftl.addAll(value); } } public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE2; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { List theReferenceInfos; theReferenceInfos = (((this.referenceInfos!= null)&&(!this.referenceInfos.isEmpty()))?this.getReferenceInfos():null); strategy.appendField(locator, this, "referenceInfos", buffer, theReferenceInfos, ((this.referenceInfos!= null)&&(!this.referenceInfos.isEmpty()))); } { List theIncludes; theIncludes = (((this.includes!= null)&&(!this.includes.isEmpty()))?this.getIncludes():null); strategy.appendField(locator, this, "includes", buffer, theIncludes, ((this.includes!= null)&&(!this.includes.isEmpty()))); } { CanonicalizationMethod theCanonicalizationMethod; theCanonicalizationMethod = this.getCanonicalizationMethod(); strategy.appendField(locator, this, "canonicalizationMethod", buffer, theCanonicalizationMethod, (this.canonicalizationMethod!= null)); } { List theEncapsulatedTimeStampsAndXMLTimeStamps; theEncapsulatedTimeStampsAndXMLTimeStamps = (((this.encapsulatedTimeStampsAndXMLTimeStamps!= null)&&(!this.encapsulatedTimeStampsAndXMLTimeStamps.isEmpty()))?this.getEncapsulatedTimeStampsAndXMLTimeStamps():null); strategy.appendField(locator, this, "encapsulatedTimeStampsAndXMLTimeStamps", buffer, theEncapsulatedTimeStampsAndXMLTimeStamps, ((this.encapsulatedTimeStampsAndXMLTimeStamps!= null)&&(!this.encapsulatedTimeStampsAndXMLTimeStamps.isEmpty()))); } { String theId; theId = this.getId(); strategy.appendField(locator, this, "id", buffer, theId, (this.id!= null)); } return buffer; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final GenericTimeStampType that = ((GenericTimeStampType) object); { List lhsReferenceInfos; lhsReferenceInfos = (((this.referenceInfos!= null)&&(!this.referenceInfos.isEmpty()))?this.getReferenceInfos():null); List rhsReferenceInfos; rhsReferenceInfos = (((that.referenceInfos!= null)&&(!that.referenceInfos.isEmpty()))?that.getReferenceInfos():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "referenceInfos", lhsReferenceInfos), LocatorUtils.property(thatLocator, "referenceInfos", rhsReferenceInfos), lhsReferenceInfos, rhsReferenceInfos, ((this.referenceInfos!= null)&&(!this.referenceInfos.isEmpty())), ((that.referenceInfos!= null)&&(!that.referenceInfos.isEmpty())))) { return false; } } { List lhsIncludes; lhsIncludes = (((this.includes!= null)&&(!this.includes.isEmpty()))?this.getIncludes():null); List rhsIncludes; rhsIncludes = (((that.includes!= null)&&(!that.includes.isEmpty()))?that.getIncludes():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "includes", lhsIncludes), LocatorUtils.property(thatLocator, "includes", rhsIncludes), lhsIncludes, rhsIncludes, ((this.includes!= null)&&(!this.includes.isEmpty())), ((that.includes!= null)&&(!that.includes.isEmpty())))) { return false; } } { CanonicalizationMethod lhsCanonicalizationMethod; lhsCanonicalizationMethod = this.getCanonicalizationMethod(); CanonicalizationMethod rhsCanonicalizationMethod; rhsCanonicalizationMethod = that.getCanonicalizationMethod(); if (!strategy.equals(LocatorUtils.property(thisLocator, "canonicalizationMethod", lhsCanonicalizationMethod), LocatorUtils.property(thatLocator, "canonicalizationMethod", rhsCanonicalizationMethod), lhsCanonicalizationMethod, rhsCanonicalizationMethod, (this.canonicalizationMethod!= null), (that.canonicalizationMethod!= null))) { return false; } } { List lhsEncapsulatedTimeStampsAndXMLTimeStamps; lhsEncapsulatedTimeStampsAndXMLTimeStamps = (((this.encapsulatedTimeStampsAndXMLTimeStamps!= null)&&(!this.encapsulatedTimeStampsAndXMLTimeStamps.isEmpty()))?this.getEncapsulatedTimeStampsAndXMLTimeStamps():null); List rhsEncapsulatedTimeStampsAndXMLTimeStamps; rhsEncapsulatedTimeStampsAndXMLTimeStamps = (((that.encapsulatedTimeStampsAndXMLTimeStamps!= null)&&(!that.encapsulatedTimeStampsAndXMLTimeStamps.isEmpty()))?that.getEncapsulatedTimeStampsAndXMLTimeStamps():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "encapsulatedTimeStampsAndXMLTimeStamps", lhsEncapsulatedTimeStampsAndXMLTimeStamps), LocatorUtils.property(thatLocator, "encapsulatedTimeStampsAndXMLTimeStamps", rhsEncapsulatedTimeStampsAndXMLTimeStamps), lhsEncapsulatedTimeStampsAndXMLTimeStamps, rhsEncapsulatedTimeStampsAndXMLTimeStamps, ((this.encapsulatedTimeStampsAndXMLTimeStamps!= null)&&(!this.encapsulatedTimeStampsAndXMLTimeStamps.isEmpty())), ((that.encapsulatedTimeStampsAndXMLTimeStamps!= null)&&(!that.encapsulatedTimeStampsAndXMLTimeStamps.isEmpty())))) { return false; } } { String lhsId; lhsId = this.getId(); String rhsId; rhsId = that.getId(); if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId, (this.id!= null), (that.id!= null))) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE2; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { List theReferenceInfos; theReferenceInfos = (((this.referenceInfos!= null)&&(!this.referenceInfos.isEmpty()))?this.getReferenceInfos():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "referenceInfos", theReferenceInfos), currentHashCode, theReferenceInfos, ((this.referenceInfos!= null)&&(!this.referenceInfos.isEmpty()))); } { List theIncludes; theIncludes = (((this.includes!= null)&&(!this.includes.isEmpty()))?this.getIncludes():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "includes", theIncludes), currentHashCode, theIncludes, ((this.includes!= null)&&(!this.includes.isEmpty()))); } { CanonicalizationMethod theCanonicalizationMethod; theCanonicalizationMethod = this.getCanonicalizationMethod(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "canonicalizationMethod", theCanonicalizationMethod), currentHashCode, theCanonicalizationMethod, (this.canonicalizationMethod!= null)); } { List theEncapsulatedTimeStampsAndXMLTimeStamps; theEncapsulatedTimeStampsAndXMLTimeStamps = (((this.encapsulatedTimeStampsAndXMLTimeStamps!= null)&&(!this.encapsulatedTimeStampsAndXMLTimeStamps.isEmpty()))?this.getEncapsulatedTimeStampsAndXMLTimeStamps():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "encapsulatedTimeStampsAndXMLTimeStamps", theEncapsulatedTimeStampsAndXMLTimeStamps), currentHashCode, theEncapsulatedTimeStampsAndXMLTimeStamps, ((this.encapsulatedTimeStampsAndXMLTimeStamps!= null)&&(!this.encapsulatedTimeStampsAndXMLTimeStamps.isEmpty()))); } { String theId; theId = this.getId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId, (this.id!= null)); } return currentHashCode; } public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE2; return this.hashCode(null, strategy); } public GenericTimeStampType withReferenceInfos(ReferenceInfo... values) { if (values!= null) { for (ReferenceInfo value: values) { getReferenceInfos().add(value); } } return this; } public GenericTimeStampType withReferenceInfos(Collection values) { if (values!= null) { getReferenceInfos().addAll(values); } return this; } public GenericTimeStampType withIncludes(Include... values) { if (values!= null) { for (Include value: values) { getIncludes().add(value); } } return this; } public GenericTimeStampType withIncludes(Collection values) { if (values!= null) { getIncludes().addAll(values); } return this; } public GenericTimeStampType withCanonicalizationMethod(CanonicalizationMethod value) { setCanonicalizationMethod(value); return this; } public GenericTimeStampType withEncapsulatedTimeStampsAndXMLTimeStamps(Object... values) { if (values!= null) { for (Object value: values) { getEncapsulatedTimeStampsAndXMLTimeStamps().add(value); } } return this; } public GenericTimeStampType withEncapsulatedTimeStampsAndXMLTimeStamps(Collection values) { if (values!= null) { getEncapsulatedTimeStampsAndXMLTimeStamps().addAll(values); } return this; } public GenericTimeStampType withId(String value) { setId(value); return this; } public GenericTimeStampType withReferenceInfos(List value) { setReferenceInfos(value); return this; } public GenericTimeStampType withIncludes(List value) { setIncludes(value); return this; } public GenericTimeStampType withEncapsulatedTimeStampsAndXMLTimeStamps(List value) { setEncapsulatedTimeStampsAndXMLTimeStamps(value); return this; } }