org.w3.soap.Envelope 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: 2023.10.14 at 09:04:34 PM UTC
//
package org.w3.soap;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import com.kscs.util.jaxb.Buildable;
import com.kscs.util.jaxb.PropertyTree;
import com.kscs.util.jaxb.PropertyTreeUse;
/**
* Java class for Envelope complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Envelope">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.w3.org/2003/05/soap-envelope}Header" minOccurs="0"/>
* <element ref="{http://www.w3.org/2003/05/soap-envelope}Body"/>
* </sequence>
* <anyAttribute processContents='lax' namespace='##other'/>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Envelope", propOrder = {
"header",
"body"
})
public class Envelope {
@XmlElement(name = "Header")
protected Header header;
@XmlElement(name = "Body", 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;
}
/**
* Copies all state of this object to a builder. This method is used by the {@link
* #copyOf} method and should not be called directly by client code.
*
* @param _other
* A builder instance to which the state of this object will be copied.
*/
public<_B >void copyTo(final Envelope.Builder<_B> _other) {
_other.header = ((this.header == null)?null:this.header.newCopyBuilder(_other));
_other.body = ((this.body == null)?null:this.body.newCopyBuilder(_other));
}
public<_B >Envelope.Builder<_B> newCopyBuilder(final _B _parentBuilder) {
return new Envelope.Builder<_B>(_parentBuilder, this, true);
}
public Envelope.Builder newCopyBuilder() {
return newCopyBuilder(null);
}
public static Envelope.Builder builder() {
return new Envelope.Builder(null, null, false);
}
public static<_B >Envelope.Builder<_B> copyOf(final Envelope _other) {
final Envelope.Builder<_B> _newBuilder = new Envelope.Builder<_B>(null, null, false);
_other.copyTo(_newBuilder);
return _newBuilder;
}
/**
* Copies all state of this object to a builder. This method is used by the {@link
* #copyOf} method and should not be called directly by client code.
*
* @param _other
* A builder instance to which the state of this object will be copied.
*/
public<_B >void copyTo(final Envelope.Builder<_B> _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) {
final PropertyTree headerPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("header"));
if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(headerPropertyTree!= null):((headerPropertyTree == null)||(!headerPropertyTree.isLeaf())))) {
_other.header = ((this.header == null)?null:this.header.newCopyBuilder(_other, headerPropertyTree, _propertyTreeUse));
}
final PropertyTree bodyPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("body"));
if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(bodyPropertyTree!= null):((bodyPropertyTree == null)||(!bodyPropertyTree.isLeaf())))) {
_other.body = ((this.body == null)?null:this.body.newCopyBuilder(_other, bodyPropertyTree, _propertyTreeUse));
}
}
public<_B >Envelope.Builder<_B> newCopyBuilder(final _B _parentBuilder, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) {
return new Envelope.Builder<_B>(_parentBuilder, this, true, _propertyTree, _propertyTreeUse);
}
public Envelope.Builder newCopyBuilder(final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) {
return newCopyBuilder(null, _propertyTree, _propertyTreeUse);
}
public static<_B >Envelope.Builder<_B> copyOf(final Envelope _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) {
final Envelope.Builder<_B> _newBuilder = new Envelope.Builder<_B>(null, null, false);
_other.copyTo(_newBuilder, _propertyTree, _propertyTreeUse);
return _newBuilder;
}
public static Envelope.Builder copyExcept(final Envelope _other, final PropertyTree _propertyTree) {
return copyOf(_other, _propertyTree, PropertyTreeUse.EXCLUDE);
}
public static Envelope.Builder copyOnly(final Envelope _other, final PropertyTree _propertyTree) {
return copyOf(_other, _propertyTree, PropertyTreeUse.INCLUDE);
}
public static class Builder<_B >implements Buildable
{
protected final _B _parentBuilder;
protected final Envelope _storedValue;
private Header.Builder> header;
private Body.Builder> body;
public Builder(final _B _parentBuilder, final Envelope _other, final boolean _copy) {
this._parentBuilder = _parentBuilder;
if (_other!= null) {
if (_copy) {
_storedValue = null;
this.header = ((_other.header == null)?null:_other.header.newCopyBuilder(this));
this.body = ((_other.body == null)?null:_other.body.newCopyBuilder(this));
} else {
_storedValue = _other;
}
} else {
_storedValue = null;
}
}
public Builder(final _B _parentBuilder, final Envelope _other, final boolean _copy, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) {
this._parentBuilder = _parentBuilder;
if (_other!= null) {
if (_copy) {
_storedValue = null;
final PropertyTree headerPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("header"));
if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(headerPropertyTree!= null):((headerPropertyTree == null)||(!headerPropertyTree.isLeaf())))) {
this.header = ((_other.header == null)?null:_other.header.newCopyBuilder(this, headerPropertyTree, _propertyTreeUse));
}
final PropertyTree bodyPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("body"));
if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(bodyPropertyTree!= null):((bodyPropertyTree == null)||(!bodyPropertyTree.isLeaf())))) {
this.body = ((_other.body == null)?null:_other.body.newCopyBuilder(this, bodyPropertyTree, _propertyTreeUse));
}
} else {
_storedValue = _other;
}
} else {
_storedValue = null;
}
}
public _B end() {
return this._parentBuilder;
}
protected<_P extends Envelope >_P init(final _P _product) {
_product.header = ((this.header == null)?null:this.header.build());
_product.body = ((this.body == null)?null:this.body.build());
return _product;
}
/**
* Sets the new value of "header" (any previous value will be replaced)
*
* @param header
* New value of the "header" property.
*/
public Envelope.Builder<_B> withHeader(final Header header) {
this.header = ((header == null)?null:new Header.Builder>(this, header, false));
return this;
}
/**
* Returns the existing builder or a new builder to build the value of the "header"
* property.
* Use {@link org.w3.soap.Header.Builder#end()} to return to the current builder.
*
* @return
* A new builder to build the value of the "header" property.
* Use {@link org.w3.soap.Header.Builder#end()} to return to the current builder.
*/
public Header.Builder extends Envelope.Builder<_B>> withHeader() {
if (this.header!= null) {
return this.header;
}
return this.header = new Header.Builder>(this, null, false);
}
/**
* Sets the new value of "body" (any previous value will be replaced)
*
* @param body
* New value of the "body" property.
*/
public Envelope.Builder<_B> withBody(final Body body) {
this.body = ((body == null)?null:new Body.Builder>(this, body, false));
return this;
}
/**
* Returns the existing builder or a new builder to build the value of the "body"
* property.
* Use {@link org.w3.soap.Body.Builder#end()} to return to the current builder.
*
* @return
* A new builder to build the value of the "body" property.
* Use {@link org.w3.soap.Body.Builder#end()} to return to the current builder.
*/
public Body.Builder extends Envelope.Builder<_B>> withBody() {
if (this.body!= null) {
return this.body;
}
return this.body = new Body.Builder>(this, null, false);
}
@Override
public Envelope build() {
if (_storedValue == null) {
return this.init(new Envelope());
} else {
return ((Envelope) _storedValue);
}
}
public Envelope.Builder<_B> copyOf(final Envelope _other) {
_other.copyTo(this);
return this;
}
public Envelope.Builder<_B> copyOf(final Envelope.Builder _other) {
return copyOf(_other.build());
}
}
public static class Select
extends Envelope.Selector
{
Select() {
super(null, null, null);
}
public static Envelope.Select _root() {
return new Envelope.Select();
}
}
public static class Selector , TParent >
extends com.kscs.util.jaxb.Selector
{
private Header.Selector> header = null;
private Body.Selector> body = null;
public Selector(final TRoot root, final TParent parent, final String propertyName) {
super(root, parent, propertyName);
}
@Override
public Map buildChildren() {
final Map products = new HashMap();
products.putAll(super.buildChildren());
if (this.header!= null) {
products.put("header", this.header.init());
}
if (this.body!= null) {
products.put("body", this.body.init());
}
return products;
}
public Header.Selector> header() {
return ((this.header == null)?this.header = new Header.Selector>(this._root, this, "header"):this.header);
}
public Body.Selector> body() {
return ((this.body == null)?this.body = new Body.Selector>(this._root, this, "body"):this.body);
}
}
}