// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2016.07.27 at 04:06:37 PM EDT // package net.di2e.jaxb.cdr.describe.sp; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.validation.Valid; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.jvnet.jaxb2_commons.lang.CopyStrategy2; import org.jvnet.jaxb2_commons.lang.CopyTo2; import org.jvnet.jaxb2_commons.lang.Equals2; import org.jvnet.jaxb2_commons.lang.EqualsStrategy2; import org.jvnet.jaxb2_commons.lang.HashCode2; import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2; import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy; import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy; import org.jvnet.jaxb2_commons.lang.JAXBMergeStrategy; import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy; import org.jvnet.jaxb2_commons.lang.MergeFrom2; import org.jvnet.jaxb2_commons.lang.MergeStrategy2; import org.jvnet.jaxb2_commons.lang.ToString2; import org.jvnet.jaxb2_commons.lang.ToStringStrategy2; import org.jvnet.jaxb2_commons.locator.ObjectLocator; import org.jvnet.jaxb2_commons.locator.util.LocatorUtils; import us.mil.ces.metadata.ddms._5.RelatedResourcesType; /** * <p>Java class for ServiceType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="ServiceType"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="name" type="{urn:cdr-ex:describe:sp:1.0}SimpleTokenType"/> * <element name="function" type="{urn:cdr-ex:describe:sp:1.0}SimpleTokenType" maxOccurs="100" minOccurs="0"/> * <element name="type"> * <complexType> * <simpleContent> * <extension base="<urn:cdr-ex:describe:sp:1.0>ServiceTypeValuesType"> * <attribute name="style" use="required" type="{urn:cdr-ex:describe:sp:1.0}ServiceStyleValuesType" /> * <attribute name="version" use="required" type="{urn:cdr-ex:describe:sp:1.0}SimpleTokenType" /> * <attribute name="secure" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * </extension> * </simpleContent> * </complexType> * </element> * <element name="address" type="{urn:cdr-ex:describe:sp:1.0}AddressType" maxOccurs="100"/> * <element ref="{urn:cdr-ex:describe:sp:1.0}conformance" maxOccurs="100" minOccurs="0"/> * <element ref="{urn:us:mil:ces:metadata:ddms:5}relatedResource" maxOccurs="100" minOccurs="0"/> * <element name="serviceCapabilities" type="{urn:cdr-ex:describe:sp:1.0}ServiceCapabilitiesType" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ServiceType", propOrder = { "name", "function", "type", "address", "conformance", "relatedResource", "serviceCapabilities" }) public class ServiceType implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @XmlElement(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") @NotNull(message = "ServiceType.name {javax.validation.constraints.NotNull.message}") @Size(min = 1) protected String name; @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") @Size(min = 0, max = 100) protected List<String> function; @XmlElement(required = true) @NotNull(message = "ServiceType.type {javax.validation.constraints.NotNull.message}") @Valid protected ServiceType.Type type; @XmlElement(required = true) @NotNull(message = "ServiceType.address {javax.validation.constraints.NotNull.message}") @Size(min = 1, max = 100) @Valid protected List<AddressType> address; @Size(min = 0, max = 100) @Valid protected List<ConformanceType> conformance; @XmlElement(namespace = "urn:us:mil:ces:metadata:ddms:5") @Size(min = 0, max = 100) @Valid protected List<RelatedResourcesType> relatedResource; @Valid protected ServiceCapabilitiesType serviceCapabilities; /** * 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 boolean isSetName() { return (this.name!= null); } /** * Gets the value of the function property. * * <p> * 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 <CODE>set</CODE> method for the function property. * * <p> * For example, to add a new item, do as follows: * <pre> * getFunction().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getFunction() { if (function == null) { function = new ArrayList<String>(); } return this.function; } public boolean isSetFunction() { return ((this.function!= null)&&(!this.function.isEmpty())); } public void unsetFunction() { this.function = null; } /** * Gets the value of the type property. * * @return * possible object is * {@link ServiceType.Type } * */ public ServiceType.Type getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link ServiceType.Type } * */ public void setType(ServiceType.Type value) { this.type = value; } public boolean isSetType() { return (this.type!= null); } /** * Gets the value of the address property. * * <p> * 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 <CODE>set</CODE> method for the address property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAddress().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link AddressType } * * */ public List<AddressType> getAddress() { if (address == null) { address = new ArrayList<AddressType>(); } return this.address; } public boolean isSetAddress() { return ((this.address!= null)&&(!this.address.isEmpty())); } public void unsetAddress() { this.address = null; } /** * Gets the value of the conformance property. * * <p> * 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 <CODE>set</CODE> method for the conformance property. * * <p> * For example, to add a new item, do as follows: * <pre> * getConformance().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ConformanceType } * * */ public List<ConformanceType> getConformance() { if (conformance == null) { conformance = new ArrayList<ConformanceType>(); } return this.conformance; } public boolean isSetConformance() { return ((this.conformance!= null)&&(!this.conformance.isEmpty())); } public void unsetConformance() { this.conformance = null; } /** * Links to related resources which could include user interfaces * specific to the service, service documentation, service WSDL, WADLs, * etc.Gets the value of the relatedResource property. * * <p> * 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 <CODE>set</CODE> method for the relatedResource property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRelatedResource().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link RelatedResourcesType } * * */ public List<RelatedResourcesType> getRelatedResource() { if (relatedResource == null) { relatedResource = new ArrayList<RelatedResourcesType>(); } return this.relatedResource; } public boolean isSetRelatedResource() { return ((this.relatedResource!= null)&&(!this.relatedResource.isEmpty())); } public void unsetRelatedResource() { this.relatedResource = null; } /** * Gets the value of the serviceCapabilities property. * * @return * possible object is * {@link ServiceCapabilitiesType } * */ public ServiceCapabilitiesType getServiceCapabilities() { return serviceCapabilities; } /** * Sets the value of the serviceCapabilities property. * * @param value * allowed object is * {@link ServiceCapabilitiesType } * */ public void setServiceCapabilities(ServiceCapabilitiesType value) { this.serviceCapabilities = value; } public boolean isSetServiceCapabilities() { return (this.serviceCapabilities!= null); } public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName, this.isSetName()); } { List<String> theFunction; theFunction = (this.isSetFunction()?this.getFunction():null); strategy.appendField(locator, this, "function", buffer, theFunction, this.isSetFunction()); } { ServiceType.Type theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType, this.isSetType()); } { List<AddressType> theAddress; theAddress = (this.isSetAddress()?this.getAddress():null); strategy.appendField(locator, this, "address", buffer, theAddress, this.isSetAddress()); } { List<ConformanceType> theConformance; theConformance = (this.isSetConformance()?this.getConformance():null); strategy.appendField(locator, this, "conformance", buffer, theConformance, this.isSetConformance()); } { List<RelatedResourcesType> theRelatedResource; theRelatedResource = (this.isSetRelatedResource()?this.getRelatedResource():null); strategy.appendField(locator, this, "relatedResource", buffer, theRelatedResource, this.isSetRelatedResource()); } { ServiceCapabilitiesType theServiceCapabilities; theServiceCapabilities = this.getServiceCapabilities(); strategy.appendField(locator, this, "serviceCapabilities", buffer, theServiceCapabilities, this.isSetServiceCapabilities()); } return buffer; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final ServiceType that = ((ServiceType) object); { String lhsName; lhsName = this.getName(); String rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, this.isSetName(), that.isSetName())) { return false; } } { List<String> lhsFunction; lhsFunction = (this.isSetFunction()?this.getFunction():null); List<String> rhsFunction; rhsFunction = (that.isSetFunction()?that.getFunction():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "function", lhsFunction), LocatorUtils.property(thatLocator, "function", rhsFunction), lhsFunction, rhsFunction, this.isSetFunction(), that.isSetFunction())) { return false; } } { ServiceType.Type lhsType; lhsType = this.getType(); ServiceType.Type rhsType; rhsType = that.getType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, this.isSetType(), that.isSetType())) { return false; } } { List<AddressType> lhsAddress; lhsAddress = (this.isSetAddress()?this.getAddress():null); List<AddressType> rhsAddress; rhsAddress = (that.isSetAddress()?that.getAddress():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "address", lhsAddress), LocatorUtils.property(thatLocator, "address", rhsAddress), lhsAddress, rhsAddress, this.isSetAddress(), that.isSetAddress())) { return false; } } { List<ConformanceType> lhsConformance; lhsConformance = (this.isSetConformance()?this.getConformance():null); List<ConformanceType> rhsConformance; rhsConformance = (that.isSetConformance()?that.getConformance():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "conformance", lhsConformance), LocatorUtils.property(thatLocator, "conformance", rhsConformance), lhsConformance, rhsConformance, this.isSetConformance(), that.isSetConformance())) { return false; } } { List<RelatedResourcesType> lhsRelatedResource; lhsRelatedResource = (this.isSetRelatedResource()?this.getRelatedResource():null); List<RelatedResourcesType> rhsRelatedResource; rhsRelatedResource = (that.isSetRelatedResource()?that.getRelatedResource():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "relatedResource", lhsRelatedResource), LocatorUtils.property(thatLocator, "relatedResource", rhsRelatedResource), lhsRelatedResource, rhsRelatedResource, this.isSetRelatedResource(), that.isSetRelatedResource())) { return false; } } { ServiceCapabilitiesType lhsServiceCapabilities; lhsServiceCapabilities = this.getServiceCapabilities(); ServiceCapabilitiesType rhsServiceCapabilities; rhsServiceCapabilities = that.getServiceCapabilities(); if (!strategy.equals(LocatorUtils.property(thisLocator, "serviceCapabilities", lhsServiceCapabilities), LocatorUtils.property(thatLocator, "serviceCapabilities", rhsServiceCapabilities), lhsServiceCapabilities, rhsServiceCapabilities, this.isSetServiceCapabilities(), that.isSetServiceCapabilities())) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, this.isSetName()); } { List<String> theFunction; theFunction = (this.isSetFunction()?this.getFunction():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "function", theFunction), currentHashCode, theFunction, this.isSetFunction()); } { ServiceType.Type theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, this.isSetType()); } { List<AddressType> theAddress; theAddress = (this.isSetAddress()?this.getAddress():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "address", theAddress), currentHashCode, theAddress, this.isSetAddress()); } { List<ConformanceType> theConformance; theConformance = (this.isSetConformance()?this.getConformance():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "conformance", theConformance), currentHashCode, theConformance, this.isSetConformance()); } { List<RelatedResourcesType> theRelatedResource; theRelatedResource = (this.isSetRelatedResource()?this.getRelatedResource():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "relatedResource", theRelatedResource), currentHashCode, theRelatedResource, this.isSetRelatedResource()); } { ServiceCapabilitiesType theServiceCapabilities; theServiceCapabilities = this.getServiceCapabilities(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "serviceCapabilities", theServiceCapabilities), currentHashCode, theServiceCapabilities, this.isSetServiceCapabilities()); } return currentHashCode; } public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public Object clone() { return copyTo(createNewInstance()); } public Object copyTo(Object target) { final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE; return copyTo(null, target, strategy); } public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof ServiceType) { final ServiceType copy = ((ServiceType) draftCopy); { Boolean nameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetName()); if (nameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceName; sourceName = this.getName(); String copyName = ((String) strategy.copy(LocatorUtils.property(locator, "name", sourceName), sourceName, this.isSetName())); copy.setName(copyName); } else { if (nameShouldBeCopiedAndSet == Boolean.FALSE) { copy.name = null; } } } { Boolean functionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetFunction()); if (functionShouldBeCopiedAndSet == Boolean.TRUE) { List<String> sourceFunction; sourceFunction = (this.isSetFunction()?this.getFunction():null); @SuppressWarnings("unchecked") List<String> copyFunction = ((List<String> ) strategy.copy(LocatorUtils.property(locator, "function", sourceFunction), sourceFunction, this.isSetFunction())); copy.unsetFunction(); if (copyFunction!= null) { List<String> uniqueFunctionl = copy.getFunction(); uniqueFunctionl.addAll(copyFunction); } } else { if (functionShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetFunction(); } } } { Boolean typeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetType()); if (typeShouldBeCopiedAndSet == Boolean.TRUE) { ServiceType.Type sourceType; sourceType = this.getType(); ServiceType.Type copyType = ((ServiceType.Type) strategy.copy(LocatorUtils.property(locator, "type", sourceType), sourceType, this.isSetType())); copy.setType(copyType); } else { if (typeShouldBeCopiedAndSet == Boolean.FALSE) { copy.type = null; } } } { Boolean addressShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetAddress()); if (addressShouldBeCopiedAndSet == Boolean.TRUE) { List<AddressType> sourceAddress; sourceAddress = (this.isSetAddress()?this.getAddress():null); @SuppressWarnings("unchecked") List<AddressType> copyAddress = ((List<AddressType> ) strategy.copy(LocatorUtils.property(locator, "address", sourceAddress), sourceAddress, this.isSetAddress())); copy.unsetAddress(); if (copyAddress!= null) { List<AddressType> uniqueAddressl = copy.getAddress(); uniqueAddressl.addAll(copyAddress); } } else { if (addressShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetAddress(); } } } { Boolean conformanceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetConformance()); if (conformanceShouldBeCopiedAndSet == Boolean.TRUE) { List<ConformanceType> sourceConformance; sourceConformance = (this.isSetConformance()?this.getConformance():null); @SuppressWarnings("unchecked") List<ConformanceType> copyConformance = ((List<ConformanceType> ) strategy.copy(LocatorUtils.property(locator, "conformance", sourceConformance), sourceConformance, this.isSetConformance())); copy.unsetConformance(); if (copyConformance!= null) { List<ConformanceType> uniqueConformancel = copy.getConformance(); uniqueConformancel.addAll(copyConformance); } } else { if (conformanceShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetConformance(); } } } { Boolean relatedResourceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetRelatedResource()); if (relatedResourceShouldBeCopiedAndSet == Boolean.TRUE) { List<RelatedResourcesType> sourceRelatedResource; sourceRelatedResource = (this.isSetRelatedResource()?this.getRelatedResource():null); @SuppressWarnings("unchecked") List<RelatedResourcesType> copyRelatedResource = ((List<RelatedResourcesType> ) strategy.copy(LocatorUtils.property(locator, "relatedResource", sourceRelatedResource), sourceRelatedResource, this.isSetRelatedResource())); copy.unsetRelatedResource(); if (copyRelatedResource!= null) { List<RelatedResourcesType> uniqueRelatedResourcel = copy.getRelatedResource(); uniqueRelatedResourcel.addAll(copyRelatedResource); } } else { if (relatedResourceShouldBeCopiedAndSet == Boolean.FALSE) { copy.unsetRelatedResource(); } } } { Boolean serviceCapabilitiesShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetServiceCapabilities()); if (serviceCapabilitiesShouldBeCopiedAndSet == Boolean.TRUE) { ServiceCapabilitiesType sourceServiceCapabilities; sourceServiceCapabilities = this.getServiceCapabilities(); ServiceCapabilitiesType copyServiceCapabilities = ((ServiceCapabilitiesType) strategy.copy(LocatorUtils.property(locator, "serviceCapabilities", sourceServiceCapabilities), sourceServiceCapabilities, this.isSetServiceCapabilities())); copy.setServiceCapabilities(copyServiceCapabilities); } else { if (serviceCapabilitiesShouldBeCopiedAndSet == Boolean.FALSE) { copy.serviceCapabilities = null; } } } } return draftCopy; } public Object createNewInstance() { return new ServiceType(); } public void mergeFrom(Object left, Object right) { final MergeStrategy2 strategy = JAXBMergeStrategy.INSTANCE; mergeFrom(null, null, left, right, strategy); } public void mergeFrom(ObjectLocator leftLocator, ObjectLocator rightLocator, Object left, Object right, MergeStrategy2 strategy) { if (right instanceof ServiceType) { final ServiceType target = this; final ServiceType leftObject = ((ServiceType) left); final ServiceType rightObject = ((ServiceType) right); { Boolean nameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetName(), rightObject.isSetName()); if (nameShouldBeMergedAndSet == Boolean.TRUE) { String lhsName; lhsName = leftObject.getName(); String rhsName; rhsName = rightObject.getName(); String mergedName = ((String) strategy.merge(LocatorUtils.property(leftLocator, "name", lhsName), LocatorUtils.property(rightLocator, "name", rhsName), lhsName, rhsName, leftObject.isSetName(), rightObject.isSetName())); target.setName(mergedName); } else { if (nameShouldBeMergedAndSet == Boolean.FALSE) { target.name = null; } } } { Boolean functionShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetFunction(), rightObject.isSetFunction()); if (functionShouldBeMergedAndSet == Boolean.TRUE) { List<String> lhsFunction; lhsFunction = (leftObject.isSetFunction()?leftObject.getFunction():null); List<String> rhsFunction; rhsFunction = (rightObject.isSetFunction()?rightObject.getFunction():null); List<String> mergedFunction = ((List<String> ) strategy.merge(LocatorUtils.property(leftLocator, "function", lhsFunction), LocatorUtils.property(rightLocator, "function", rhsFunction), lhsFunction, rhsFunction, leftObject.isSetFunction(), rightObject.isSetFunction())); target.unsetFunction(); if (mergedFunction!= null) { List<String> uniqueFunctionl = target.getFunction(); uniqueFunctionl.addAll(mergedFunction); } } else { if (functionShouldBeMergedAndSet == Boolean.FALSE) { target.unsetFunction(); } } } { Boolean typeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetType(), rightObject.isSetType()); if (typeShouldBeMergedAndSet == Boolean.TRUE) { ServiceType.Type lhsType; lhsType = leftObject.getType(); ServiceType.Type rhsType; rhsType = rightObject.getType(); ServiceType.Type mergedType = ((ServiceType.Type) strategy.merge(LocatorUtils.property(leftLocator, "type", lhsType), LocatorUtils.property(rightLocator, "type", rhsType), lhsType, rhsType, leftObject.isSetType(), rightObject.isSetType())); target.setType(mergedType); } else { if (typeShouldBeMergedAndSet == Boolean.FALSE) { target.type = null; } } } { Boolean addressShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetAddress(), rightObject.isSetAddress()); if (addressShouldBeMergedAndSet == Boolean.TRUE) { List<AddressType> lhsAddress; lhsAddress = (leftObject.isSetAddress()?leftObject.getAddress():null); List<AddressType> rhsAddress; rhsAddress = (rightObject.isSetAddress()?rightObject.getAddress():null); List<AddressType> mergedAddress = ((List<AddressType> ) strategy.merge(LocatorUtils.property(leftLocator, "address", lhsAddress), LocatorUtils.property(rightLocator, "address", rhsAddress), lhsAddress, rhsAddress, leftObject.isSetAddress(), rightObject.isSetAddress())); target.unsetAddress(); if (mergedAddress!= null) { List<AddressType> uniqueAddressl = target.getAddress(); uniqueAddressl.addAll(mergedAddress); } } else { if (addressShouldBeMergedAndSet == Boolean.FALSE) { target.unsetAddress(); } } } { Boolean conformanceShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetConformance(), rightObject.isSetConformance()); if (conformanceShouldBeMergedAndSet == Boolean.TRUE) { List<ConformanceType> lhsConformance; lhsConformance = (leftObject.isSetConformance()?leftObject.getConformance():null); List<ConformanceType> rhsConformance; rhsConformance = (rightObject.isSetConformance()?rightObject.getConformance():null); List<ConformanceType> mergedConformance = ((List<ConformanceType> ) strategy.merge(LocatorUtils.property(leftLocator, "conformance", lhsConformance), LocatorUtils.property(rightLocator, "conformance", rhsConformance), lhsConformance, rhsConformance, leftObject.isSetConformance(), rightObject.isSetConformance())); target.unsetConformance(); if (mergedConformance!= null) { List<ConformanceType> uniqueConformancel = target.getConformance(); uniqueConformancel.addAll(mergedConformance); } } else { if (conformanceShouldBeMergedAndSet == Boolean.FALSE) { target.unsetConformance(); } } } { Boolean relatedResourceShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetRelatedResource(), rightObject.isSetRelatedResource()); if (relatedResourceShouldBeMergedAndSet == Boolean.TRUE) { List<RelatedResourcesType> lhsRelatedResource; lhsRelatedResource = (leftObject.isSetRelatedResource()?leftObject.getRelatedResource():null); List<RelatedResourcesType> rhsRelatedResource; rhsRelatedResource = (rightObject.isSetRelatedResource()?rightObject.getRelatedResource():null); List<RelatedResourcesType> mergedRelatedResource = ((List<RelatedResourcesType> ) strategy.merge(LocatorUtils.property(leftLocator, "relatedResource", lhsRelatedResource), LocatorUtils.property(rightLocator, "relatedResource", rhsRelatedResource), lhsRelatedResource, rhsRelatedResource, leftObject.isSetRelatedResource(), rightObject.isSetRelatedResource())); target.unsetRelatedResource(); if (mergedRelatedResource!= null) { List<RelatedResourcesType> uniqueRelatedResourcel = target.getRelatedResource(); uniqueRelatedResourcel.addAll(mergedRelatedResource); } } else { if (relatedResourceShouldBeMergedAndSet == Boolean.FALSE) { target.unsetRelatedResource(); } } } { Boolean serviceCapabilitiesShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetServiceCapabilities(), rightObject.isSetServiceCapabilities()); if (serviceCapabilitiesShouldBeMergedAndSet == Boolean.TRUE) { ServiceCapabilitiesType lhsServiceCapabilities; lhsServiceCapabilities = leftObject.getServiceCapabilities(); ServiceCapabilitiesType rhsServiceCapabilities; rhsServiceCapabilities = rightObject.getServiceCapabilities(); ServiceCapabilitiesType mergedServiceCapabilities = ((ServiceCapabilitiesType) strategy.merge(LocatorUtils.property(leftLocator, "serviceCapabilities", lhsServiceCapabilities), LocatorUtils.property(rightLocator, "serviceCapabilities", rhsServiceCapabilities), lhsServiceCapabilities, rhsServiceCapabilities, leftObject.isSetServiceCapabilities(), rightObject.isSetServiceCapabilities())); target.setServiceCapabilities(mergedServiceCapabilities); } else { if (serviceCapabilitiesShouldBeMergedAndSet == Boolean.FALSE) { target.serviceCapabilities = null; } } } } } public void setFunction(List<String> value) { this.function = null; if (value!= null) { List<String> draftl = this.getFunction(); draftl.addAll(value); } } public void setAddress(List<AddressType> value) { this.address = null; if (value!= null) { List<AddressType> draftl = this.getAddress(); draftl.addAll(value); } } public void setConformance(List<ConformanceType> value) { this.conformance = null; if (value!= null) { List<ConformanceType> draftl = this.getConformance(); draftl.addAll(value); } } public void setRelatedResource(List<RelatedResourcesType> value) { this.relatedResource = null; if (value!= null) { List<RelatedResourcesType> draftl = this.getRelatedResource(); draftl.addAll(value); } } /** * The type of service service. If the value doesn't * exist in the enumeration please provide your own and circle back * with the Technical Committee so the value is added in future * revisions * * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType> * <simpleContent> * <extension base="<urn:cdr-ex:describe:sp:1.0>ServiceTypeValuesType"> * <attribute name="style" use="required" type="{urn:cdr-ex:describe:sp:1.0}ServiceStyleValuesType" /> * <attribute name="version" use="required" type="{urn:cdr-ex:describe:sp:1.0}SimpleTokenType" /> * <attribute name="secure" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * </extension> * </simpleContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "value" }) public static class Type implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2 { private final static long serialVersionUID = 1L; @XmlValue protected String value; @XmlAttribute(name = "style", required = true) protected String style; @XmlAttribute(name = "version", required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String version; @XmlAttribute(name = "secure", required = true) protected boolean secure; /** * Human readable string for the type of service * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } public boolean isSetValue() { return (this.value!= null); } /** * Gets the value of the style property. * * @return * possible object is * {@link String } * */ public String getStyle() { return style; } /** * Sets the value of the style property. * * @param value * allowed object is * {@link String } * */ public void setStyle(String value) { this.style = value; } public boolean isSetStyle() { return (this.style!= null); } /** * Gets the value of the version property. * * @return * possible object is * {@link String } * */ public String getVersion() { return version; } /** * Sets the value of the version property. * * @param value * allowed object is * {@link String } * */ public void setVersion(String value) { this.version = value; } public boolean isSetVersion() { return (this.version!= null); } /** * Gets the value of the secure property. * */ public boolean isSecure() { return secure; } /** * Sets the value of the secure property. * */ public void setSecure(boolean value) { this.secure = value; } public boolean isSetSecure() { return true; } public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue, this.isSetValue()); } { String theStyle; theStyle = this.getStyle(); strategy.appendField(locator, this, "style", buffer, theStyle, this.isSetStyle()); } { String theVersion; theVersion = this.getVersion(); strategy.appendField(locator, this, "version", buffer, theVersion, this.isSetVersion()); } { boolean theSecure; theSecure = this.isSecure(); strategy.appendField(locator, this, "secure", buffer, theSecure, true); } return buffer; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final ServiceType.Type that = ((ServiceType.Type) object); { String lhsValue; lhsValue = this.getValue(); String rhsValue; rhsValue = that.getValue(); if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue, this.isSetValue(), that.isSetValue())) { return false; } } { String lhsStyle; lhsStyle = this.getStyle(); String rhsStyle; rhsStyle = that.getStyle(); if (!strategy.equals(LocatorUtils.property(thisLocator, "style", lhsStyle), LocatorUtils.property(thatLocator, "style", rhsStyle), lhsStyle, rhsStyle, this.isSetStyle(), that.isSetStyle())) { return false; } } { String lhsVersion; lhsVersion = this.getVersion(); String rhsVersion; rhsVersion = that.getVersion(); if (!strategy.equals(LocatorUtils.property(thisLocator, "version", lhsVersion), LocatorUtils.property(thatLocator, "version", rhsVersion), lhsVersion, rhsVersion, this.isSetVersion(), that.isSetVersion())) { return false; } } { boolean lhsSecure; lhsSecure = this.isSecure(); boolean rhsSecure; rhsSecure = that.isSecure(); if (!strategy.equals(LocatorUtils.property(thisLocator, "secure", lhsSecure), LocatorUtils.property(thatLocator, "secure", rhsSecure), lhsSecure, rhsSecure, true, true)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theValue; theValue = this.getValue(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue, this.isSetValue()); } { String theStyle; theStyle = this.getStyle(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "style", theStyle), currentHashCode, theStyle, this.isSetStyle()); } { String theVersion; theVersion = this.getVersion(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "version", theVersion), currentHashCode, theVersion, this.isSetVersion()); } { boolean theSecure; theSecure = this.isSecure(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "secure", theSecure), currentHashCode, theSecure, true); } return currentHashCode; } public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public Object clone() { return copyTo(createNewInstance()); } public Object copyTo(Object target) { final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE; return copyTo(null, target, strategy); } public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof ServiceType.Type) { final ServiceType.Type copy = ((ServiceType.Type) draftCopy); { Boolean valueShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetValue()); if (valueShouldBeCopiedAndSet == Boolean.TRUE) { String sourceValue; sourceValue = this.getValue(); String copyValue = ((String) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue, this.isSetValue())); copy.setValue(copyValue); } else { if (valueShouldBeCopiedAndSet == Boolean.FALSE) { copy.value = null; } } } { Boolean styleShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetStyle()); if (styleShouldBeCopiedAndSet == Boolean.TRUE) { String sourceStyle; sourceStyle = this.getStyle(); String copyStyle = ((String) strategy.copy(LocatorUtils.property(locator, "style", sourceStyle), sourceStyle, this.isSetStyle())); copy.setStyle(copyStyle); } else { if (styleShouldBeCopiedAndSet == Boolean.FALSE) { copy.style = null; } } } { Boolean versionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetVersion()); if (versionShouldBeCopiedAndSet == Boolean.TRUE) { String sourceVersion; sourceVersion = this.getVersion(); String copyVersion = ((String) strategy.copy(LocatorUtils.property(locator, "version", sourceVersion), sourceVersion, this.isSetVersion())); copy.setVersion(copyVersion); } else { if (versionShouldBeCopiedAndSet == Boolean.FALSE) { copy.version = null; } } } { Boolean secureShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, true); if (secureShouldBeCopiedAndSet == Boolean.TRUE) { boolean sourceSecure; sourceSecure = this.isSecure(); boolean copySecure = strategy.copy(LocatorUtils.property(locator, "secure", sourceSecure), sourceSecure, true); copy.setSecure(copySecure); } else { if (secureShouldBeCopiedAndSet == Boolean.FALSE) { } } } } return draftCopy; } public Object createNewInstance() { return new ServiceType.Type(); } public void mergeFrom(Object left, Object right) { final MergeStrategy2 strategy = JAXBMergeStrategy.INSTANCE; mergeFrom(null, null, left, right, strategy); } public void mergeFrom(ObjectLocator leftLocator, ObjectLocator rightLocator, Object left, Object right, MergeStrategy2 strategy) { if (right instanceof ServiceType.Type) { final ServiceType.Type target = this; final ServiceType.Type leftObject = ((ServiceType.Type) left); final ServiceType.Type rightObject = ((ServiceType.Type) right); { Boolean valueShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetValue(), rightObject.isSetValue()); if (valueShouldBeMergedAndSet == Boolean.TRUE) { String lhsValue; lhsValue = leftObject.getValue(); String rhsValue; rhsValue = rightObject.getValue(); String mergedValue = ((String) strategy.merge(LocatorUtils.property(leftLocator, "value", lhsValue), LocatorUtils.property(rightLocator, "value", rhsValue), lhsValue, rhsValue, leftObject.isSetValue(), rightObject.isSetValue())); target.setValue(mergedValue); } else { if (valueShouldBeMergedAndSet == Boolean.FALSE) { target.value = null; } } } { Boolean styleShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetStyle(), rightObject.isSetStyle()); if (styleShouldBeMergedAndSet == Boolean.TRUE) { String lhsStyle; lhsStyle = leftObject.getStyle(); String rhsStyle; rhsStyle = rightObject.getStyle(); String mergedStyle = ((String) strategy.merge(LocatorUtils.property(leftLocator, "style", lhsStyle), LocatorUtils.property(rightLocator, "style", rhsStyle), lhsStyle, rhsStyle, leftObject.isSetStyle(), rightObject.isSetStyle())); target.setStyle(mergedStyle); } else { if (styleShouldBeMergedAndSet == Boolean.FALSE) { target.style = null; } } } { Boolean versionShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetVersion(), rightObject.isSetVersion()); if (versionShouldBeMergedAndSet == Boolean.TRUE) { String lhsVersion; lhsVersion = leftObject.getVersion(); String rhsVersion; rhsVersion = rightObject.getVersion(); String mergedVersion = ((String) strategy.merge(LocatorUtils.property(leftLocator, "version", lhsVersion), LocatorUtils.property(rightLocator, "version", rhsVersion), lhsVersion, rhsVersion, leftObject.isSetVersion(), rightObject.isSetVersion())); target.setVersion(mergedVersion); } else { if (versionShouldBeMergedAndSet == Boolean.FALSE) { target.version = null; } } } { Boolean secureShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, true, true); if (secureShouldBeMergedAndSet == Boolean.TRUE) { boolean lhsSecure; lhsSecure = leftObject.isSecure(); boolean rhsSecure; rhsSecure = rightObject.isSecure(); boolean mergedSecure = ((boolean) strategy.merge(LocatorUtils.property(leftLocator, "secure", lhsSecure), LocatorUtils.property(rightLocator, "secure", rhsSecure), lhsSecure, rhsSecure, true, true)); target.setSecure(mergedSecure); } else { if (secureShouldBeMergedAndSet == Boolean.FALSE) { } } } } } } }