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

org.hl7.fhir.ProtocolStep 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.06.14 at 01:52:11 PM 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.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.Step complex type. * *

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

 * <complexType name="Protocol.Step">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}BackboneElement">
 *       <sequence>
 *         <element name="name" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="description" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="duration" type="{http://hl7.org/fhir}Duration" minOccurs="0"/>
 *         <element name="precondition" type="{http://hl7.org/fhir}Protocol.Precondition" minOccurs="0"/>
 *         <element name="exit" type="{http://hl7.org/fhir}Protocol.Precondition" minOccurs="0"/>
 *         <element name="firstActivity" type="{http://hl7.org/fhir}uri" minOccurs="0"/>
 *         <element name="activity" type="{http://hl7.org/fhir}Protocol.Activity" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="next" type="{http://hl7.org/fhir}Protocol.Next" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Protocol.Step", propOrder = { "name", "description", "duration", "precondition", "exit", "firstActivity", "activity", "next" }) public class ProtocolStep extends BackboneElement implements Equals2, HashCode2, ToString2 { protected org.hl7.fhir.String name; protected org.hl7.fhir.String description; protected Duration duration; protected ProtocolPrecondition precondition; protected ProtocolPrecondition exit; protected Uri firstActivity; protected List activity; protected List next; /** * Gets the value of the name property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setName(org.hl7.fhir.String value) { this.name = value; } /** * Gets the value of the description property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setDescription(org.hl7.fhir.String value) { this.description = value; } /** * Gets the value of the duration property. * * @return * possible object is * {@link Duration } * */ public Duration getDuration() { return duration; } /** * Sets the value of the duration property. * * @param value * allowed object is * {@link Duration } * */ public void setDuration(Duration value) { this.duration = value; } /** * Gets the value of the precondition property. * * @return * possible object is * {@link ProtocolPrecondition } * */ public ProtocolPrecondition getPrecondition() { return precondition; } /** * Sets the value of the precondition property. * * @param value * allowed object is * {@link ProtocolPrecondition } * */ public void setPrecondition(ProtocolPrecondition value) { this.precondition = value; } /** * Gets the value of the exit property. * * @return * possible object is * {@link ProtocolPrecondition } * */ public ProtocolPrecondition getExit() { return exit; } /** * Sets the value of the exit property. * * @param value * allowed object is * {@link ProtocolPrecondition } * */ public void setExit(ProtocolPrecondition value) { this.exit = value; } /** * Gets the value of the firstActivity property. * * @return * possible object is * {@link Uri } * */ public Uri getFirstActivity() { return firstActivity; } /** * Sets the value of the firstActivity property. * * @param value * allowed object is * {@link Uri } * */ public void setFirstActivity(Uri value) { this.firstActivity = value; } /** * Gets the value of the activity 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 activity property. * *

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

     *    getActivity().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ProtocolActivity } * * */ public List getActivity() { if (activity == null) { activity = new ArrayList(); } return this.activity; } /** * Gets the value of the next 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 next property. * *

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

     *    getNext().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ProtocolNext } * * */ public List getNext() { if (next == null) { next = new ArrayList(); } return this.next; } public ProtocolStep withName(org.hl7.fhir.String value) { setName(value); return this; } public ProtocolStep withDescription(org.hl7.fhir.String value) { setDescription(value); return this; } public ProtocolStep withDuration(Duration value) { setDuration(value); return this; } public ProtocolStep withPrecondition(ProtocolPrecondition value) { setPrecondition(value); return this; } public ProtocolStep withExit(ProtocolPrecondition value) { setExit(value); return this; } public ProtocolStep withFirstActivity(Uri value) { setFirstActivity(value); return this; } public ProtocolStep withActivity(ProtocolActivity... values) { if (values!= null) { for (ProtocolActivity value: values) { getActivity().add(value); } } return this; } public ProtocolStep withActivity(Collection values) { if (values!= null) { getActivity().addAll(values); } return this; } public ProtocolStep withNext(ProtocolNext... values) { if (values!= null) { for (ProtocolNext value: values) { getNext().add(value); } } return this; } public ProtocolStep withNext(Collection values) { if (values!= null) { getNext().addAll(values); } return this; } @Override public ProtocolStep withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public ProtocolStep withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public ProtocolStep withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public ProtocolStep withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public ProtocolStep 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 ProtocolStep that = ((ProtocolStep) object); { org.hl7.fhir.String lhsName; lhsName = this.getName(); org.hl7.fhir.String rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, (this.name!= null), (that.name!= null))) { return false; } } { org.hl7.fhir.String lhsDescription; lhsDescription = this.getDescription(); org.hl7.fhir.String rhsDescription; rhsDescription = that.getDescription(); if (!strategy.equals(LocatorUtils.property(thisLocator, "description", lhsDescription), LocatorUtils.property(thatLocator, "description", rhsDescription), lhsDescription, rhsDescription, (this.description!= null), (that.description!= null))) { return false; } } { Duration lhsDuration; lhsDuration = this.getDuration(); Duration rhsDuration; rhsDuration = that.getDuration(); if (!strategy.equals(LocatorUtils.property(thisLocator, "duration", lhsDuration), LocatorUtils.property(thatLocator, "duration", rhsDuration), lhsDuration, rhsDuration, (this.duration!= null), (that.duration!= null))) { return false; } } { ProtocolPrecondition lhsPrecondition; lhsPrecondition = this.getPrecondition(); ProtocolPrecondition rhsPrecondition; rhsPrecondition = that.getPrecondition(); if (!strategy.equals(LocatorUtils.property(thisLocator, "precondition", lhsPrecondition), LocatorUtils.property(thatLocator, "precondition", rhsPrecondition), lhsPrecondition, rhsPrecondition, (this.precondition!= null), (that.precondition!= null))) { return false; } } { ProtocolPrecondition lhsExit; lhsExit = this.getExit(); ProtocolPrecondition rhsExit; rhsExit = that.getExit(); if (!strategy.equals(LocatorUtils.property(thisLocator, "exit", lhsExit), LocatorUtils.property(thatLocator, "exit", rhsExit), lhsExit, rhsExit, (this.exit!= null), (that.exit!= null))) { return false; } } { Uri lhsFirstActivity; lhsFirstActivity = this.getFirstActivity(); Uri rhsFirstActivity; rhsFirstActivity = that.getFirstActivity(); if (!strategy.equals(LocatorUtils.property(thisLocator, "firstActivity", lhsFirstActivity), LocatorUtils.property(thatLocator, "firstActivity", rhsFirstActivity), lhsFirstActivity, rhsFirstActivity, (this.firstActivity!= null), (that.firstActivity!= null))) { return false; } } { List lhsActivity; lhsActivity = (((this.activity!= null)&&(!this.activity.isEmpty()))?this.getActivity():null); List rhsActivity; rhsActivity = (((that.activity!= null)&&(!that.activity.isEmpty()))?that.getActivity():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "activity", lhsActivity), LocatorUtils.property(thatLocator, "activity", rhsActivity), lhsActivity, rhsActivity, ((this.activity!= null)&&(!this.activity.isEmpty())), ((that.activity!= null)&&(!that.activity.isEmpty())))) { return false; } } { List lhsNext; lhsNext = (((this.next!= null)&&(!this.next.isEmpty()))?this.getNext():null); List rhsNext; rhsNext = (((that.next!= null)&&(!that.next.isEmpty()))?that.getNext():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "next", lhsNext), LocatorUtils.property(thatLocator, "next", rhsNext), lhsNext, rhsNext, ((this.next!= null)&&(!this.next.isEmpty())), ((that.next!= null)&&(!that.next.isEmpty())))) { 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); { org.hl7.fhir.String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, (this.name!= null)); } { org.hl7.fhir.String theDescription; theDescription = this.getDescription(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "description", theDescription), currentHashCode, theDescription, (this.description!= null)); } { Duration theDuration; theDuration = this.getDuration(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "duration", theDuration), currentHashCode, theDuration, (this.duration!= null)); } { ProtocolPrecondition thePrecondition; thePrecondition = this.getPrecondition(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "precondition", thePrecondition), currentHashCode, thePrecondition, (this.precondition!= null)); } { ProtocolPrecondition theExit; theExit = this.getExit(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "exit", theExit), currentHashCode, theExit, (this.exit!= null)); } { Uri theFirstActivity; theFirstActivity = this.getFirstActivity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "firstActivity", theFirstActivity), currentHashCode, theFirstActivity, (this.firstActivity!= null)); } { List theActivity; theActivity = (((this.activity!= null)&&(!this.activity.isEmpty()))?this.getActivity():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "activity", theActivity), currentHashCode, theActivity, ((this.activity!= null)&&(!this.activity.isEmpty()))); } { List theNext; theNext = (((this.next!= null)&&(!this.next.isEmpty()))?this.getNext():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "next", theNext), currentHashCode, theNext, ((this.next!= null)&&(!this.next.isEmpty()))); } 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); { org.hl7.fhir.String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName, (this.name!= null)); } { org.hl7.fhir.String theDescription; theDescription = this.getDescription(); strategy.appendField(locator, this, "description", buffer, theDescription, (this.description!= null)); } { Duration theDuration; theDuration = this.getDuration(); strategy.appendField(locator, this, "duration", buffer, theDuration, (this.duration!= null)); } { ProtocolPrecondition thePrecondition; thePrecondition = this.getPrecondition(); strategy.appendField(locator, this, "precondition", buffer, thePrecondition, (this.precondition!= null)); } { ProtocolPrecondition theExit; theExit = this.getExit(); strategy.appendField(locator, this, "exit", buffer, theExit, (this.exit!= null)); } { Uri theFirstActivity; theFirstActivity = this.getFirstActivity(); strategy.appendField(locator, this, "firstActivity", buffer, theFirstActivity, (this.firstActivity!= null)); } { List theActivity; theActivity = (((this.activity!= null)&&(!this.activity.isEmpty()))?this.getActivity():null); strategy.appendField(locator, this, "activity", buffer, theActivity, ((this.activity!= null)&&(!this.activity.isEmpty()))); } { List theNext; theNext = (((this.next!= null)&&(!this.next.isEmpty()))?this.getNext():null); strategy.appendField(locator, this, "next", buffer, theNext, ((this.next!= null)&&(!this.next.isEmpty()))); } return buffer; } public void setActivity(List value) { this.activity = value; } public void setNext(List value) { this.next = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy