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

com.helger.asic.jaxb.opendocument.manifest.EncryptionData Maven / Gradle / Ivy

Go to download

Generic implementation of ASiC-E archives in accordance with ETSI 102 918 v1.3.1.

There is a newer version: 3.0.1
Show newest version

package com.helger.asic.jaxb.opendocument.manifest;

import java.io.Serializable;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
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.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import com.helger.commons.annotation.CodingStyleguideUnaware;
import com.helger.commons.annotation.ReturnsMutableCopy;
import com.helger.commons.collection.ArrayHelper;
import com.helger.commons.equals.EqualsHelper;
import com.helger.commons.hashcode.HashCodeGenerator;
import com.helger.commons.lang.IExplicitlyCloneable;
import com.helger.commons.string.ToStringGenerator;


/**
 * 

Java class for anonymous complex type. * *

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

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element ref="{urn:oasis:names:tc:opendocument:xmlns:manifest:1.0}algorithm"/>
 *         <element ref="{urn:oasis:names:tc:opendocument:xmlns:manifest:1.0}key-derivation"/>
 *       </sequence>
 *       <attGroup ref="{urn:oasis:names:tc:opendocument:xmlns:manifest:1.0}encryption-data-attlist"/>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
*

This class was annotated by ph-jaxb22-plugin -Xph-annotate

*

This class contains methods created by ph-jaxb22-plugin -Xph-equalshashcode

*

This class contains methods created by ph-jaxb22-plugin -Xph-tostring

*

This class contains methods created by ph-jaxb22-plugin -Xph-cloneable2

* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "algorithm", "keyDerivation" }) @XmlRootElement(name = "encryption-data") @CodingStyleguideUnaware public class EncryptionData implements Serializable, IExplicitlyCloneable { @XmlElement(required = true) private Algorithm algorithm; @XmlElement(name = "key-derivation", required = true) private KeyDerivation keyDerivation; @XmlAttribute(name = "checksum-type", namespace = "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", required = true) private String checksumType; @XmlAttribute(name = "checksum", namespace = "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", required = true) private byte[] checksum; /** * Gets the value of the algorithm property. * * @return * possible object is * {@link Algorithm } * */ @Nullable public Algorithm getAlgorithm() { return algorithm; } /** * Sets the value of the algorithm property. * * @param value * allowed object is * {@link Algorithm } * */ public void setAlgorithm( @Nullable Algorithm value) { this.algorithm = value; } /** * Gets the value of the keyDerivation property. * * @return * possible object is * {@link KeyDerivation } * */ @Nullable public KeyDerivation getKeyDerivation() { return keyDerivation; } /** * Sets the value of the keyDerivation property. * * @param value * allowed object is * {@link KeyDerivation } * */ public void setKeyDerivation( @Nullable KeyDerivation value) { this.keyDerivation = value; } /** * Gets the value of the checksumType property. * * @return * possible object is * {@link String } * */ @Nullable public String getChecksumType() { return checksumType; } /** * Sets the value of the checksumType property. * * @param value * allowed object is * {@link String } * */ public void setChecksumType( @Nullable String value) { this.checksumType = value; } /** * Gets the value of the checksum property. * * @return * possible object is * byte[] */ @Nullable public byte[] getChecksum() { return checksum; } /** * Sets the value of the checksum property. * * @param value * allowed object is * byte[] */ public void setChecksum( @Nullable byte[] value) { this.checksum = value; } /** * Created by ph-jaxb22-plugin -Xph-equalshashcode * */ @Override public boolean equals(final Object o) { if (o == this) { return true; } if ((o == null)||(!getClass().equals(o.getClass()))) { return false; } final EncryptionData rhs = ((EncryptionData) o); if (!EqualsHelper.equals(algorithm, rhs.algorithm)) { return false; } if (!EqualsHelper.equals(checksum, rhs.checksum)) { return false; } if (!EqualsHelper.equals(checksumType, rhs.checksumType)) { return false; } if (!EqualsHelper.equals(keyDerivation, rhs.keyDerivation)) { return false; } return true; } /** * Created by ph-jaxb22-plugin -Xph-equalshashcode * */ @Override public int hashCode() { return new HashCodeGenerator(this).append(algorithm).append(checksum).append(checksumType).append(keyDerivation).getHashCode(); } /** * Created by ph-jaxb22-plugin -Xph-tostring * */ @Override public String toString() { return new ToStringGenerator(this).append("algorithm", algorithm).append("checksum", checksum).append("checksumType", checksumType).append("keyDerivation", keyDerivation).getToString(); } /** * This method clones all values from this to the passed object. All data in the parameter object is overwritten!Created by ph-jaxb22-plugin -Xph-cloneable2 * * @param ret * The target object to clone to. May not be null. */ public void cloneTo( @Nonnull EncryptionData ret) { ret.algorithm = ((algorithm == null)?null:algorithm.clone()); ret.checksum = ArrayHelper.getCopy(checksum); ret.checksumType = checksumType; ret.keyDerivation = ((keyDerivation == null)?null:keyDerivation.clone()); } /** * Created by ph-jaxb22-plugin -Xph-cloneable2 * * @return * The cloned object. Never null. */ @Nonnull @ReturnsMutableCopy @Override public EncryptionData clone() { EncryptionData ret = new EncryptionData(); cloneTo(ret); return ret; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy