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

org.hl7.fhir.ProtocolActivity Maven / Gradle / Ivy

Go to download

The quick library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.18.0
Show newest version
//
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2 
// See https://eclipse-ee4j.github.io/jaxb-ri 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2024.09.27 at 11:16:19 AM MDT 
//


package org.hl7.fhir;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
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.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
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;


/**
 * A definition of behaviors to be taken in particular circumstances, often including conditions, options and other decision points.
 * 
 * 

Java class for Protocol.Activity complex type. * *

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

 * <complexType name="Protocol.Activity">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}BackboneElement">
 *       <sequence>
 *         <element name="alternative" type="{http://hl7.org/fhir}uri" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="component" type="{http://hl7.org/fhir}Protocol.Component" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="following" type="{http://hl7.org/fhir}uri" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="wait" type="{http://hl7.org/fhir}Duration" minOccurs="0"/>
 *         <element name="detail" type="{http://hl7.org/fhir}Protocol.Detail"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Protocol.Activity", propOrder = { "alternative", "component", "following", "wait", "detail" }) public class ProtocolActivity extends BackboneElement implements Equals2, HashCode2, ToString2 { protected List alternative; protected List component; protected List following; protected Duration wait; @XmlElement(required = true) protected ProtocolDetail detail; /** * Gets the value of the alternative 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 Jakarta XML Binding object. * This is why there is not a set method for the alternative property. * *

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

     *    getAlternative().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Uri } * * */ public List getAlternative() { if (alternative == null) { alternative = new ArrayList(); } return this.alternative; } /** * Gets the value of the component 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 Jakarta XML Binding object. * This is why there is not a set method for the component property. * *

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

     *    getComponent().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ProtocolComponent } * * */ public List getComponent() { if (component == null) { component = new ArrayList(); } return this.component; } /** * Gets the value of the following 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 Jakarta XML Binding object. * This is why there is not a set method for the following property. * *

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

     *    getFollowing().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Uri } * * */ public List getFollowing() { if (following == null) { following = new ArrayList(); } return this.following; } /** * Gets the value of the wait property. * * @return * possible object is * {@link Duration } * */ public Duration getWait() { return wait; } /** * Sets the value of the wait property. * * @param value * allowed object is * {@link Duration } * */ public void setWait(Duration value) { this.wait = value; } /** * Gets the value of the detail property. * * @return * possible object is * {@link ProtocolDetail } * */ public ProtocolDetail getDetail() { return detail; } /** * Sets the value of the detail property. * * @param value * allowed object is * {@link ProtocolDetail } * */ public void setDetail(ProtocolDetail value) { this.detail = value; } public ProtocolActivity withAlternative(Uri... values) { if (values!= null) { for (Uri value: values) { getAlternative().add(value); } } return this; } public ProtocolActivity withAlternative(Collection values) { if (values!= null) { getAlternative().addAll(values); } return this; } public ProtocolActivity withComponent(ProtocolComponent... values) { if (values!= null) { for (ProtocolComponent value: values) { getComponent().add(value); } } return this; } public ProtocolActivity withComponent(Collection values) { if (values!= null) { getComponent().addAll(values); } return this; } public ProtocolActivity withFollowing(Uri... values) { if (values!= null) { for (Uri value: values) { getFollowing().add(value); } } return this; } public ProtocolActivity withFollowing(Collection values) { if (values!= null) { getFollowing().addAll(values); } return this; } public ProtocolActivity withWait(Duration value) { setWait(value); return this; } public ProtocolActivity withDetail(ProtocolDetail value) { setDetail(value); return this; } @Override public ProtocolActivity withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public ProtocolActivity withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public ProtocolActivity withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public ProtocolActivity withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public ProtocolActivity withId(java.lang.String value) { setId(value); return this; } @Override 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; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final ProtocolActivity that = ((ProtocolActivity) object); { List lhsAlternative; lhsAlternative = (((this.alternative!= null)&&(!this.alternative.isEmpty()))?this.getAlternative():null); List rhsAlternative; rhsAlternative = (((that.alternative!= null)&&(!that.alternative.isEmpty()))?that.getAlternative():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "alternative", lhsAlternative), LocatorUtils.property(thatLocator, "alternative", rhsAlternative), lhsAlternative, rhsAlternative, ((this.alternative!= null)&&(!this.alternative.isEmpty())), ((that.alternative!= null)&&(!that.alternative.isEmpty())))) { return false; } } { List lhsComponent; lhsComponent = (((this.component!= null)&&(!this.component.isEmpty()))?this.getComponent():null); List rhsComponent; rhsComponent = (((that.component!= null)&&(!that.component.isEmpty()))?that.getComponent():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "component", lhsComponent), LocatorUtils.property(thatLocator, "component", rhsComponent), lhsComponent, rhsComponent, ((this.component!= null)&&(!this.component.isEmpty())), ((that.component!= null)&&(!that.component.isEmpty())))) { return false; } } { List lhsFollowing; lhsFollowing = (((this.following!= null)&&(!this.following.isEmpty()))?this.getFollowing():null); List rhsFollowing; rhsFollowing = (((that.following!= null)&&(!that.following.isEmpty()))?that.getFollowing():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "following", lhsFollowing), LocatorUtils.property(thatLocator, "following", rhsFollowing), lhsFollowing, rhsFollowing, ((this.following!= null)&&(!this.following.isEmpty())), ((that.following!= null)&&(!that.following.isEmpty())))) { return false; } } { Duration lhsWait; lhsWait = this.getWait(); Duration rhsWait; rhsWait = that.getWait(); if (!strategy.equals(LocatorUtils.property(thisLocator, "wait", lhsWait), LocatorUtils.property(thatLocator, "wait", rhsWait), lhsWait, rhsWait, (this.wait!= null), (that.wait!= null))) { return false; } } { ProtocolDetail lhsDetail; lhsDetail = this.getDetail(); ProtocolDetail rhsDetail; rhsDetail = that.getDetail(); if (!strategy.equals(LocatorUtils.property(thisLocator, "detail", lhsDetail), LocatorUtils.property(thatLocator, "detail", rhsDetail), lhsDetail, rhsDetail, (this.detail!= null), (that.detail!= null))) { return false; } } return true; } @Override public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance(); return equals(null, null, object, strategy); } @Override public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = super.hashCode(locator, strategy); { List theAlternative; theAlternative = (((this.alternative!= null)&&(!this.alternative.isEmpty()))?this.getAlternative():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "alternative", theAlternative), currentHashCode, theAlternative, ((this.alternative!= null)&&(!this.alternative.isEmpty()))); } { List theComponent; theComponent = (((this.component!= null)&&(!this.component.isEmpty()))?this.getComponent():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "component", theComponent), currentHashCode, theComponent, ((this.component!= null)&&(!this.component.isEmpty()))); } { List theFollowing; theFollowing = (((this.following!= null)&&(!this.following.isEmpty()))?this.getFollowing():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "following", theFollowing), currentHashCode, theFollowing, ((this.following!= null)&&(!this.following.isEmpty()))); } { Duration theWait; theWait = this.getWait(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "wait", theWait), currentHashCode, theWait, (this.wait!= null)); } { ProtocolDetail theDetail; theDetail = this.getDetail(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "detail", theDetail), currentHashCode, theDetail, (this.detail!= null)); } return currentHashCode; } @Override public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance(); return this.hashCode(null, strategy); } @Override public java.lang.String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } @Override 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; } @Override public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { super.appendFields(locator, buffer, strategy); { List theAlternative; theAlternative = (((this.alternative!= null)&&(!this.alternative.isEmpty()))?this.getAlternative():null); strategy.appendField(locator, this, "alternative", buffer, theAlternative, ((this.alternative!= null)&&(!this.alternative.isEmpty()))); } { List theComponent; theComponent = (((this.component!= null)&&(!this.component.isEmpty()))?this.getComponent():null); strategy.appendField(locator, this, "component", buffer, theComponent, ((this.component!= null)&&(!this.component.isEmpty()))); } { List theFollowing; theFollowing = (((this.following!= null)&&(!this.following.isEmpty()))?this.getFollowing():null); strategy.appendField(locator, this, "following", buffer, theFollowing, ((this.following!= null)&&(!this.following.isEmpty()))); } { Duration theWait; theWait = this.getWait(); strategy.appendField(locator, this, "wait", buffer, theWait, (this.wait!= null)); } { ProtocolDetail theDetail; theDetail = this.getDetail(); strategy.appendField(locator, this, "detail", buffer, theDetail, (this.detail!= null)); } return buffer; } public void setAlternative(List value) { this.alternative = value; } public void setComponent(List value) { this.component = value; } public void setFollowing(List value) { this.following = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy