no.difi.begrep.sdp.schema_v10.SDPManifest Maven / Gradle / Ivy
Show all versions of sdp-xsd Show documentation
//
// This file was generated by the Eclipse Implementation of JAXB, v2.3.7
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.11.06 at 01:54:33 PM UTC
//
package no.difi.begrep.sdp.schema_v10;
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.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import no.digipost.xsd.types.HarHoveddokumentOgVedlegg;
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;
/**
*
* Inneholder metadata relatert til hver fil i en forsendelse.
*
*
* Java class for Manifest complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Manifest">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="mottaker" type="{http://begrep.difi.no/sdp/schema_v10}Mottaker" minOccurs="0"/>
* <element name="avsender" type="{http://begrep.difi.no/sdp/schema_v10}Avsender"/>
* <element name="hoveddokument" type="{http://begrep.difi.no/sdp/schema_v10}Dokument"/>
* <element name="vedlegg" type="{http://begrep.difi.no/sdp/schema_v10}Dokument" maxOccurs="200" minOccurs="0"/>
* <element name="lenke" type="{http://begrep.difi.no/sdp/schema_v10}Lenke" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Manifest", propOrder = {
"mottaker",
"avsender",
"hoveddokument",
"vedleggs",
"lenke"
})
@XmlRootElement(name = "manifest")
public class SDPManifest implements HarHoveddokumentOgVedlegg , Equals2, HashCode2, ToString2
{
protected SDPMottaker mottaker;
@XmlElement(required = true)
protected SDPAvsender avsender;
@XmlElement(required = true)
protected SDPDokument hoveddokument;
@XmlElement(name = "vedlegg")
protected List vedleggs;
protected SDPLenke lenke;
/**
* Default no-arg constructor
*
*/
public SDPManifest() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public SDPManifest(final SDPMottaker mottaker, final SDPAvsender avsender, final SDPDokument hoveddokument, final List vedleggs, final SDPLenke lenke) {
this.mottaker = mottaker;
this.avsender = avsender;
this.hoveddokument = hoveddokument;
this.vedleggs = vedleggs;
this.lenke = lenke;
}
/**
* Gets the value of the mottaker property.
*
* @return
* possible object is
* {@link SDPMottaker }
*
*/
public SDPMottaker getMottaker() {
return mottaker;
}
/**
* Sets the value of the mottaker property.
*
* @param value
* allowed object is
* {@link SDPMottaker }
*
*/
public void setMottaker(SDPMottaker value) {
this.mottaker = value;
}
/**
* Gets the value of the avsender property.
*
* @return
* possible object is
* {@link SDPAvsender }
*
*/
public SDPAvsender getAvsender() {
return avsender;
}
/**
* Sets the value of the avsender property.
*
* @param value
* allowed object is
* {@link SDPAvsender }
*
*/
public void setAvsender(SDPAvsender value) {
this.avsender = value;
}
/**
* Gets the value of the hoveddokument property.
*
* @return
* possible object is
* {@link SDPDokument }
*
*/
public SDPDokument getHoveddokument() {
return hoveddokument;
}
/**
* Sets the value of the hoveddokument property.
*
* @param value
* allowed object is
* {@link SDPDokument }
*
*/
public void setHoveddokument(SDPDokument value) {
this.hoveddokument = value;
}
/**
* Gets the value of the vedleggs 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 vedleggs property.
*
*
* For example, to add a new item, do as follows:
*
* getVedleggs().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link SDPDokument }
*
*
*/
public List getVedleggs() {
if (vedleggs == null) {
vedleggs = new ArrayList();
}
return this.vedleggs;
}
/**
* Gets the value of the lenke property.
*
* @return
* possible object is
* {@link SDPLenke }
*
*/
public SDPLenke getLenke() {
return lenke;
}
/**
* Sets the value of the lenke property.
*
* @param value
* allowed object is
* {@link SDPLenke }
*
*/
public void setLenke(SDPLenke value) {
this.lenke = value;
}
public void setVedleggs(List value) {
this.vedleggs = null;
if (value!= null) {
List draftl = this.getVedleggs();
draftl.addAll(value);
}
}
@Override
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
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;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
SDPMottaker theMottaker;
theMottaker = this.getMottaker();
strategy.appendField(locator, this, "mottaker", buffer, theMottaker, (this.mottaker!= null));
}
{
SDPAvsender theAvsender;
theAvsender = this.getAvsender();
strategy.appendField(locator, this, "avsender", buffer, theAvsender, (this.avsender!= null));
}
{
SDPDokument theHoveddokument;
theHoveddokument = this.getHoveddokument();
strategy.appendField(locator, this, "hoveddokument", buffer, theHoveddokument, (this.hoveddokument!= null));
}
{
List theVedleggs;
theVedleggs = (((this.vedleggs!= null)&&(!this.vedleggs.isEmpty()))?this.getVedleggs():null);
strategy.appendField(locator, this, "vedleggs", buffer, theVedleggs, ((this.vedleggs!= null)&&(!this.vedleggs.isEmpty())));
}
{
SDPLenke theLenke;
theLenke = this.getLenke();
strategy.appendField(locator, this, "lenke", buffer, theLenke, (this.lenke!= null));
}
return buffer;
}
@Override
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 SDPManifest that = ((SDPManifest) object);
{
SDPMottaker lhsMottaker;
lhsMottaker = this.getMottaker();
SDPMottaker rhsMottaker;
rhsMottaker = that.getMottaker();
if (!strategy.equals(LocatorUtils.property(thisLocator, "mottaker", lhsMottaker), LocatorUtils.property(thatLocator, "mottaker", rhsMottaker), lhsMottaker, rhsMottaker, (this.mottaker!= null), (that.mottaker!= null))) {
return false;
}
}
{
SDPAvsender lhsAvsender;
lhsAvsender = this.getAvsender();
SDPAvsender rhsAvsender;
rhsAvsender = that.getAvsender();
if (!strategy.equals(LocatorUtils.property(thisLocator, "avsender", lhsAvsender), LocatorUtils.property(thatLocator, "avsender", rhsAvsender), lhsAvsender, rhsAvsender, (this.avsender!= null), (that.avsender!= null))) {
return false;
}
}
{
SDPDokument lhsHoveddokument;
lhsHoveddokument = this.getHoveddokument();
SDPDokument rhsHoveddokument;
rhsHoveddokument = that.getHoveddokument();
if (!strategy.equals(LocatorUtils.property(thisLocator, "hoveddokument", lhsHoveddokument), LocatorUtils.property(thatLocator, "hoveddokument", rhsHoveddokument), lhsHoveddokument, rhsHoveddokument, (this.hoveddokument!= null), (that.hoveddokument!= null))) {
return false;
}
}
{
List lhsVedleggs;
lhsVedleggs = (((this.vedleggs!= null)&&(!this.vedleggs.isEmpty()))?this.getVedleggs():null);
List rhsVedleggs;
rhsVedleggs = (((that.vedleggs!= null)&&(!that.vedleggs.isEmpty()))?that.getVedleggs():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "vedleggs", lhsVedleggs), LocatorUtils.property(thatLocator, "vedleggs", rhsVedleggs), lhsVedleggs, rhsVedleggs, ((this.vedleggs!= null)&&(!this.vedleggs.isEmpty())), ((that.vedleggs!= null)&&(!that.vedleggs.isEmpty())))) {
return false;
}
}
{
SDPLenke lhsLenke;
lhsLenke = this.getLenke();
SDPLenke rhsLenke;
rhsLenke = that.getLenke();
if (!strategy.equals(LocatorUtils.property(thisLocator, "lenke", lhsLenke), LocatorUtils.property(thatLocator, "lenke", rhsLenke), lhsLenke, rhsLenke, (this.lenke!= null), (that.lenke!= null))) {
return false;
}
}
return true;
}
@Override
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = 1;
{
SDPMottaker theMottaker;
theMottaker = this.getMottaker();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "mottaker", theMottaker), currentHashCode, theMottaker, (this.mottaker!= null));
}
{
SDPAvsender theAvsender;
theAvsender = this.getAvsender();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "avsender", theAvsender), currentHashCode, theAvsender, (this.avsender!= null));
}
{
SDPDokument theHoveddokument;
theHoveddokument = this.getHoveddokument();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "hoveddokument", theHoveddokument), currentHashCode, theHoveddokument, (this.hoveddokument!= null));
}
{
List theVedleggs;
theVedleggs = (((this.vedleggs!= null)&&(!this.vedleggs.isEmpty()))?this.getVedleggs():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "vedleggs", theVedleggs), currentHashCode, theVedleggs, ((this.vedleggs!= null)&&(!this.vedleggs.isEmpty())));
}
{
SDPLenke theLenke;
theLenke = this.getLenke();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "lenke", theLenke), currentHashCode, theLenke, (this.lenke!= null));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
public SDPManifest withMottaker(SDPMottaker value) {
setMottaker(value);
return this;
}
public SDPManifest withAvsender(SDPAvsender value) {
setAvsender(value);
return this;
}
public SDPManifest withHoveddokument(SDPDokument value) {
setHoveddokument(value);
return this;
}
public SDPManifest withVedleggs(SDPDokument... values) {
if (values!= null) {
for (SDPDokument value: values) {
getVedleggs().add(value);
}
}
return this;
}
public SDPManifest withVedleggs(Collection values) {
if (values!= null) {
getVedleggs().addAll(values);
}
return this;
}
public SDPManifest withLenke(SDPLenke value) {
setLenke(value);
return this;
}
public SDPManifest withVedleggs(List value) {
setVedleggs(value);
return this;
}
}