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

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


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

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


/**
 * 

Java class for Body complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Body", namespace = "http://www.w3.org/2003/05/soap-envelope", propOrder = { "any" }) public class Body implements Cloneable, CopyTo, ToString { @XmlAnyElement(lax = true) protected List any; @XmlAnyAttribute private Map otherAttributes = new HashMap<>(); /** * 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 Object } * {@link Element } *

* * * @return * The value of the any property. */ 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; } public void setAny(List value) { this.any = null; if (value!= null) { List draftl = this.getAny(); draftl.addAll(value); } } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final Body that = ((Body) object); { List leftAny; leftAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null); List rightAny; rightAny = (((that.any!= null)&&(!that.any.isEmpty()))?that.getAny():null); if ((this.any!= null)&&(!this.any.isEmpty())) { if ((that.any!= null)&&(!that.any.isEmpty())) { if (!leftAny.equals(rightAny)) { return false; } } else { return false; } } else { if ((that.any!= null)&&(!that.any.isEmpty())) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; { currentHashCode = (currentHashCode* 31); List theAny; theAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null); if ((this.any!= null)&&(!this.any.isEmpty())) { currentHashCode += theAny.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) { { List theAny; theAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null); strategy.appendField(locator, this, "any", buffer, theAny, ((this.any!= null)&&(!this.any.isEmpty()))); } 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 Body) { final Body copy = ((Body) draftCopy); { Boolean anyShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.any!= null)&&(!this.any.isEmpty()))); if (anyShouldBeCopiedAndSet == Boolean.TRUE) { List sourceAny; sourceAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null); @SuppressWarnings("unchecked") List copyAny = ((List ) strategy.copy(LocatorUtils.property(locator, "any", sourceAny), sourceAny, ((this.any!= null)&&(!this.any.isEmpty())))); copy.setAny(copyAny); } else { if (anyShouldBeCopiedAndSet == Boolean.FALSE) { copy.any = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new Body(); } }