org.somda.sdc.dpws.wsdl.model.TDefinitions Maven / Gradle / Ivy
package org.somda.sdc.dpws.wsdl.model;
import java.util.ArrayList;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElements;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.adapters.CollapsedStringAdapter;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
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 tDefinitions complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "tDefinitions", namespace = "http://schemas.xmlsoap.org/wsdl/", propOrder = {
"anyTopLevelOptionalElement"
})
public class TDefinitions
extends TExtensibleDocumented
implements Cloneable, CopyTo, ToString
{
/**
* Any top level optional element allowed to appear more then once - any child of definitions element except wsdl:types. Any extensibility element is allowed in any place.
*
*/
@XmlElements({
@XmlElement(name = "import", namespace = "http://schemas.xmlsoap.org/wsdl/", type = TImport.class),
@XmlElement(name = "types", namespace = "http://schemas.xmlsoap.org/wsdl/", type = TTypes.class),
@XmlElement(name = "message", namespace = "http://schemas.xmlsoap.org/wsdl/", type = TMessage.class),
@XmlElement(name = "portType", namespace = "http://schemas.xmlsoap.org/wsdl/", type = TPortType.class),
@XmlElement(name = "binding", namespace = "http://schemas.xmlsoap.org/wsdl/", type = TBinding.class),
@XmlElement(name = "service", namespace = "http://schemas.xmlsoap.org/wsdl/", type = TService.class)
})
protected List anyTopLevelOptionalElement;
@XmlAttribute(name = "targetNamespace")
@XmlSchemaType(name = "anyURI")
protected String targetNamespace;
@XmlAttribute(name = "name")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NCName")
protected String name;
/**
* Any top level optional element allowed to appear more then once - any child of definitions element except wsdl:types. Any extensibility element is allowed in any place.
*
* Gets the value of the anyTopLevelOptionalElement 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 anyTopLevelOptionalElement property.
*
*
* For example, to add a new item, do as follows:
*
*
* getAnyTopLevelOptionalElement().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link TBinding }
* {@link TImport }
* {@link TMessage }
* {@link TPortType }
* {@link TService }
* {@link TTypes }
*
*
*
* @return
* The value of the anyTopLevelOptionalElement property.
*/
public List getAnyTopLevelOptionalElement() {
if (anyTopLevelOptionalElement == null) {
anyTopLevelOptionalElement = new ArrayList<>();
}
return this.anyTopLevelOptionalElement;
}
/**
* Gets the value of the targetNamespace property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTargetNamespace() {
return targetNamespace;
}
/**
* Sets the value of the targetNamespace property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTargetNamespace(String value) {
this.targetNamespace = value;
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
public void setAnyTopLevelOptionalElement(List value) {
this.anyTopLevelOptionalElement = null;
if (value!= null) {
List draftl = this.getAnyTopLevelOptionalElement();
draftl.addAll(value);
}
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(object)) {
return false;
}
final TDefinitions that = ((TDefinitions) object);
{
List leftAnyTopLevelOptionalElement;
leftAnyTopLevelOptionalElement = (((this.anyTopLevelOptionalElement!= null)&&(!this.anyTopLevelOptionalElement.isEmpty()))?this.getAnyTopLevelOptionalElement():null);
List rightAnyTopLevelOptionalElement;
rightAnyTopLevelOptionalElement = (((that.anyTopLevelOptionalElement!= null)&&(!that.anyTopLevelOptionalElement.isEmpty()))?that.getAnyTopLevelOptionalElement():null);
if ((this.anyTopLevelOptionalElement!= null)&&(!this.anyTopLevelOptionalElement.isEmpty())) {
if ((that.anyTopLevelOptionalElement!= null)&&(!that.anyTopLevelOptionalElement.isEmpty())) {
if (!leftAnyTopLevelOptionalElement.equals(rightAnyTopLevelOptionalElement)) {
return false;
}
} else {
return false;
}
} else {
if ((that.anyTopLevelOptionalElement!= null)&&(!that.anyTopLevelOptionalElement.isEmpty())) {
return false;
}
}
}
{
String leftTargetNamespace;
leftTargetNamespace = this.getTargetNamespace();
String rightTargetNamespace;
rightTargetNamespace = that.getTargetNamespace();
if (this.targetNamespace!= null) {
if (that.targetNamespace!= null) {
if (!leftTargetNamespace.equals(rightTargetNamespace)) {
return false;
}
} else {
return false;
}
} else {
if (that.targetNamespace!= null) {
return false;
}
}
}
{
String leftName;
leftName = this.getName();
String rightName;
rightName = that.getName();
if (this.name!= null) {
if (that.name!= null) {
if (!leftName.equals(rightName)) {
return false;
}
} else {
return false;
}
} else {
if (that.name!= null) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
currentHashCode = ((currentHashCode* 31)+ super.hashCode());
{
currentHashCode = (currentHashCode* 31);
List theAnyTopLevelOptionalElement;
theAnyTopLevelOptionalElement = (((this.anyTopLevelOptionalElement!= null)&&(!this.anyTopLevelOptionalElement.isEmpty()))?this.getAnyTopLevelOptionalElement():null);
if ((this.anyTopLevelOptionalElement!= null)&&(!this.anyTopLevelOptionalElement.isEmpty())) {
currentHashCode += theAnyTopLevelOptionalElement.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theTargetNamespace;
theTargetNamespace = this.getTargetNamespace();
if (this.targetNamespace!= null) {
currentHashCode += theTargetNamespace.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theName;
theName = this.getName();
if (this.name!= null) {
currentHashCode += theName.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) {
super.appendFields(locator, buffer, strategy);
{
List theAnyTopLevelOptionalElement;
theAnyTopLevelOptionalElement = (((this.anyTopLevelOptionalElement!= null)&&(!this.anyTopLevelOptionalElement.isEmpty()))?this.getAnyTopLevelOptionalElement():null);
strategy.appendField(locator, this, "anyTopLevelOptionalElement", buffer, theAnyTopLevelOptionalElement, ((this.anyTopLevelOptionalElement!= null)&&(!this.anyTopLevelOptionalElement.isEmpty())));
}
{
String theTargetNamespace;
theTargetNamespace = this.getTargetNamespace();
strategy.appendField(locator, this, "targetNamespace", buffer, theTargetNamespace, (this.targetNamespace!= null));
}
{
String theName;
theName = this.getName();
strategy.appendField(locator, this, "name", buffer, theName, (this.name!= 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);
super.copyTo(locator, draftCopy, strategy);
if (draftCopy instanceof TDefinitions) {
final TDefinitions copy = ((TDefinitions) draftCopy);
{
Boolean anyTopLevelOptionalElementShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.anyTopLevelOptionalElement!= null)&&(!this.anyTopLevelOptionalElement.isEmpty())));
if (anyTopLevelOptionalElementShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceAnyTopLevelOptionalElement;
sourceAnyTopLevelOptionalElement = (((this.anyTopLevelOptionalElement!= null)&&(!this.anyTopLevelOptionalElement.isEmpty()))?this.getAnyTopLevelOptionalElement():null);
@SuppressWarnings("unchecked")
List copyAnyTopLevelOptionalElement = ((List ) strategy.copy(LocatorUtils.property(locator, "anyTopLevelOptionalElement", sourceAnyTopLevelOptionalElement), sourceAnyTopLevelOptionalElement, ((this.anyTopLevelOptionalElement!= null)&&(!this.anyTopLevelOptionalElement.isEmpty()))));
copy.setAnyTopLevelOptionalElement(copyAnyTopLevelOptionalElement);
} else {
if (anyTopLevelOptionalElementShouldBeCopiedAndSet == Boolean.FALSE) {
copy.anyTopLevelOptionalElement = null;
}
}
}
{
Boolean targetNamespaceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.targetNamespace!= null));
if (targetNamespaceShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceTargetNamespace;
sourceTargetNamespace = this.getTargetNamespace();
String copyTargetNamespace = ((String) strategy.copy(LocatorUtils.property(locator, "targetNamespace", sourceTargetNamespace), sourceTargetNamespace, (this.targetNamespace!= null)));
copy.setTargetNamespace(copyTargetNamespace);
} else {
if (targetNamespaceShouldBeCopiedAndSet == Boolean.FALSE) {
copy.targetNamespace = null;
}
}
}
{
Boolean nameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.name!= null));
if (nameShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceName;
sourceName = this.getName();
String copyName = ((String) strategy.copy(LocatorUtils.property(locator, "name", sourceName), sourceName, (this.name!= null)));
copy.setName(copyName);
} else {
if (nameShouldBeCopiedAndSet == Boolean.FALSE) {
copy.name = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new TDefinitions();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy