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

org.somda.sdc.dpws.soap.model.Envelope Maven / Gradle / Ivy


package org.somda.sdc.dpws.soap.model;

import java.util.HashMap;
import java.util.Map;
import javax.xml.namespace.QName;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAnyAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb.lang.CopyStrategy;
import org.jvnet.jaxb.lang.CopyTo;
import org.jvnet.jaxb.lang.JAXBCopyStrategy;
import org.jvnet.jaxb.lang.JAXBToStringStrategy;
import org.jvnet.jaxb.lang.ToString;
import org.jvnet.jaxb.lang.ToStringStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;


/**
 * 

Java class for Envelope complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Envelope", namespace = "http://www.w3.org/2003/05/soap-envelope", propOrder = { "header", "body" }) public class Envelope implements Cloneable, CopyTo, ToString { @XmlElement(name = "Header", namespace = "http://www.w3.org/2003/05/soap-envelope") protected Header header; @XmlElement(name = "Body", namespace = "http://www.w3.org/2003/05/soap-envelope", required = true) protected Body body; @XmlAnyAttribute private Map otherAttributes = new HashMap<>(); /** * Gets the value of the header property. * * @return * possible object is * {@link Header } * */ public Header getHeader() { return header; } /** * Sets the value of the header property. * * @param value * allowed object is * {@link Header } * */ public void setHeader(Header value) { this.header = value; } /** * Gets the value of the body property. * * @return * possible object is * {@link Body } * */ public Body getBody() { return body; } /** * Sets the value of the body property. * * @param value * allowed object is * {@link Body } * */ public void setBody(Body value) { this.body = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * *

* the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map getOtherAttributes() { return otherAttributes; } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final Envelope that = ((Envelope) object); { Header leftHeader; leftHeader = this.getHeader(); Header rightHeader; rightHeader = that.getHeader(); if (this.header!= null) { if (that.header!= null) { if (!leftHeader.equals(rightHeader)) { return false; } } else { return false; } } else { if (that.header!= null) { return false; } } } { Body leftBody; leftBody = this.getBody(); Body rightBody; rightBody = that.getBody(); if (this.body!= null) { if (that.body!= null) { if (!leftBody.equals(rightBody)) { return false; } } else { return false; } } else { if (that.body!= null) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; { currentHashCode = (currentHashCode* 31); Header theHeader; theHeader = this.getHeader(); if (this.header!= null) { currentHashCode += theHeader.hashCode(); } } { currentHashCode = (currentHashCode* 31); Body theBody; theBody = this.getBody(); if (this.body!= null) { currentHashCode += theBody.hashCode(); } } return currentHashCode; } @Override public String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.getInstance(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } @Override public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy 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, ToStringStrategy strategy) { { Header theHeader; theHeader = this.getHeader(); strategy.appendField(locator, this, "header", buffer, theHeader, (this.header!= null)); } { Body theBody; theBody = this.getBody(); strategy.appendField(locator, this, "body", buffer, theBody, (this.body!= null)); } return buffer; } @Override public Object clone() { return copyTo(createNewInstance()); } @Override public Object copyTo(Object target) { final CopyStrategy strategy = JAXBCopyStrategy.getInstance(); return copyTo(null, target, strategy); } @Override public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof Envelope) { final Envelope copy = ((Envelope) draftCopy); { Boolean headerShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.header!= null)); if (headerShouldBeCopiedAndSet == Boolean.TRUE) { Header sourceHeader; sourceHeader = this.getHeader(); Header copyHeader = ((Header) strategy.copy(LocatorUtils.property(locator, "header", sourceHeader), sourceHeader, (this.header!= null))); copy.setHeader(copyHeader); } else { if (headerShouldBeCopiedAndSet == Boolean.FALSE) { copy.header = null; } } } { Boolean bodyShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.body!= null)); if (bodyShouldBeCopiedAndSet == Boolean.TRUE) { Body sourceBody; sourceBody = this.getBody(); Body copyBody = ((Body) strategy.copy(LocatorUtils.property(locator, "body", sourceBody), sourceBody, (this.body!= null))); copy.setBody(copyBody); } else { if (bodyShouldBeCopiedAndSet == Boolean.FALSE) { copy.body = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new Envelope(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy