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

org.xmlsoap.schemas.soap.envelope.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.xmlsoap.schemas.soap.envelope;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
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.XmlAnyElement;
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;
import org.w3c.dom.Element;


/**
 * 

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://schemas.xmlsoap.org/soap/envelope/}Header" minOccurs="0"/>
 *         <element ref="{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
 *         <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *       <anyAttribute processContents='lax' namespace='##other'/>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Envelope", propOrder = { "header", "body", "any" }) public class Envelope { @XmlElement(name = "Header", namespace = "http://schemas.xmlsoap.org/soap/envelope/") protected Header header; @XmlElement(name = "Body", namespace = "http://schemas.xmlsoap.org/soap/envelope/", required = true) protected Body body; @XmlAnyElement(lax = true) protected List any; @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 the value of the any 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 any property. * *

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

     *    getAny().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Element } * {@link Object } * * */ public List getAny() { if (any == null) { any = new ArrayList(); } return this.any; } /** * 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; private List any; 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()); if (this.any!= null) { final List any = new ArrayList(this.any.size()); for (Buildable _item: this.any) { any.add(((Object) _item.build())); } _product.any = any; } 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.xmlsoap.schemas.soap.envelope.Header.Builder#end()} to return to * the current builder. * * @return * A new builder to build the value of the "header" property. * Use {@link org.xmlsoap.schemas.soap.envelope.Header.Builder#end()} to return to * the current builder. */ public Header.Builder> 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.xmlsoap.schemas.soap.envelope.Body.Builder#end()} to return to * the current builder. * * @return * A new builder to build the value of the "body" property. * Use {@link org.xmlsoap.schemas.soap.envelope.Body.Builder#end()} to return to * the current builder. */ public Body.Builder> withBody() { if (this.body!= null) { return this.body; } return this.body = new Body.Builder>(this, null, false); } /** * Adds the given items to the value of "any" * * @param any * Items to add to the value of the "any" property */ public Envelope.Builder<_B> addAny(final Iterable any) { if (any!= null) { if (this.any == null) { this.any = new ArrayList(); } for (Object _item: any) { this.any.add(new Buildable.PrimitiveBuildable(_item)); } } return this; } /** * Sets the new value of "any" (any previous value will be replaced) * * @param any * New value of the "any" property. */ public Envelope.Builder<_B> withAny(final Iterable any) { if (this.any!= null) { this.any.clear(); } return addAny(any); } /** * Adds the given items to the value of "any" * * @param any * Items to add to the value of the "any" property */ public Envelope.Builder<_B> addAny(Object... any) { addAny(Arrays.asList(any)); return this; } /** * Sets the new value of "any" (any previous value will be replaced) * * @param any * New value of the "any" property. */ public Envelope.Builder<_B> withAny(Object... any) { withAny(Arrays.asList(any)); return this; } @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; private com.kscs.util.jaxb.Selector> any = 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()); } if (this.any!= null) { products.put("any", this.any.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); } public com.kscs.util.jaxb.Selector> any() { return ((this.any == null)?this.any = new com.kscs.util.jaxb.Selector>(this._root, this, "any"):this.any); } } }