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

org.hl7.fhir.Provenance 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.05.02 at 09:57:28 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;


/**
 * If the element is present, it must have either a @value, an @id, or extensions
 * 
 * 

Java class for Provenance complex type. * *

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

 * <complexType name="Provenance">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="target" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded"/>
 *         <element name="period" type="{http://hl7.org/fhir}Period" minOccurs="0"/>
 *         <element name="recorded" type="{http://hl7.org/fhir}instant"/>
 *         <element name="reason" type="{http://hl7.org/fhir}Coding" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="activity" type="{http://hl7.org/fhir}Coding" minOccurs="0"/>
 *         <element name="location" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="policy" type="{http://hl7.org/fhir}uri" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="agent" type="{http://hl7.org/fhir}Provenance.Agent" maxOccurs="unbounded"/>
 *         <element name="entity" type="{http://hl7.org/fhir}Provenance.Entity" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="signature" type="{http://hl7.org/fhir}Signature" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Provenance", propOrder = { "target", "period", "recorded", "reason", "activity", "location", "policy", "agent", "entity", "signature" }) public class Provenance extends DomainResource implements Equals2, HashCode2, ToString2 { @XmlElement(required = true) protected List target; protected Period period; @XmlElement(required = true) protected Instant recorded; protected List reason; protected Coding activity; protected Reference location; protected List policy; @XmlElement(required = true) protected List agent; protected List entity; protected List signature; /** * Gets the value of the target 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 target property. * *

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

     *    getTarget().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Reference } * * */ public List getTarget() { if (target == null) { target = new ArrayList(); } return this.target; } /** * Gets the value of the period property. * * @return * possible object is * {@link Period } * */ public Period getPeriod() { return period; } /** * Sets the value of the period property. * * @param value * allowed object is * {@link Period } * */ public void setPeriod(Period value) { this.period = value; } /** * Gets the value of the recorded property. * * @return * possible object is * {@link Instant } * */ public Instant getRecorded() { return recorded; } /** * Sets the value of the recorded property. * * @param value * allowed object is * {@link Instant } * */ public void setRecorded(Instant value) { this.recorded = value; } /** * Gets the value of the reason 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 reason property. * *

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

     *    getReason().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Coding } * * */ public List getReason() { if (reason == null) { reason = new ArrayList(); } return this.reason; } /** * Gets the value of the activity property. * * @return * possible object is * {@link Coding } * */ public Coding getActivity() { return activity; } /** * Sets the value of the activity property. * * @param value * allowed object is * {@link Coding } * */ public void setActivity(Coding value) { this.activity = value; } /** * Gets the value of the location property. * * @return * possible object is * {@link Reference } * */ public Reference getLocation() { return location; } /** * Sets the value of the location property. * * @param value * allowed object is * {@link Reference } * */ public void setLocation(Reference value) { this.location = value; } /** * Gets the value of the policy 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 policy property. * *

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

     *    getPolicy().add(newItem);
     * 
* * *

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

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

     *    getAgent().add(newItem);
     * 
* * *

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

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

     *    getEntity().add(newItem);
     * 
* * *

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

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

     *    getSignature().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Signature } * * */ public List getSignature() { if (signature == null) { signature = new ArrayList(); } return this.signature; } public Provenance withTarget(Reference... values) { if (values!= null) { for (Reference value: values) { getTarget().add(value); } } return this; } public Provenance withTarget(Collection values) { if (values!= null) { getTarget().addAll(values); } return this; } public Provenance withPeriod(Period value) { setPeriod(value); return this; } public Provenance withRecorded(Instant value) { setRecorded(value); return this; } public Provenance withReason(Coding... values) { if (values!= null) { for (Coding value: values) { getReason().add(value); } } return this; } public Provenance withReason(Collection values) { if (values!= null) { getReason().addAll(values); } return this; } public Provenance withActivity(Coding value) { setActivity(value); return this; } public Provenance withLocation(Reference value) { setLocation(value); return this; } public Provenance withPolicy(Uri... values) { if (values!= null) { for (Uri value: values) { getPolicy().add(value); } } return this; } public Provenance withPolicy(Collection values) { if (values!= null) { getPolicy().addAll(values); } return this; } public Provenance withAgent(ProvenanceAgent... values) { if (values!= null) { for (ProvenanceAgent value: values) { getAgent().add(value); } } return this; } public Provenance withAgent(Collection values) { if (values!= null) { getAgent().addAll(values); } return this; } public Provenance withEntity(ProvenanceEntity... values) { if (values!= null) { for (ProvenanceEntity value: values) { getEntity().add(value); } } return this; } public Provenance withEntity(Collection values) { if (values!= null) { getEntity().addAll(values); } return this; } public Provenance withSignature(Signature... values) { if (values!= null) { for (Signature value: values) { getSignature().add(value); } } return this; } public Provenance withSignature(Collection values) { if (values!= null) { getSignature().addAll(values); } return this; } @Override public Provenance withText(Narrative value) { setText(value); return this; } @Override public Provenance withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public Provenance withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public Provenance withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public Provenance withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public Provenance withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public Provenance withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public Provenance withId(Id value) { setId(value); return this; } @Override public Provenance withMeta(Meta value) { setMeta(value); return this; } @Override public Provenance withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public Provenance withLanguage(Code value) { setLanguage(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 Provenance that = ((Provenance) object); { List lhsTarget; lhsTarget = (((this.target!= null)&&(!this.target.isEmpty()))?this.getTarget():null); List rhsTarget; rhsTarget = (((that.target!= null)&&(!that.target.isEmpty()))?that.getTarget():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "target", lhsTarget), LocatorUtils.property(thatLocator, "target", rhsTarget), lhsTarget, rhsTarget, ((this.target!= null)&&(!this.target.isEmpty())), ((that.target!= null)&&(!that.target.isEmpty())))) { return false; } } { Period lhsPeriod; lhsPeriod = this.getPeriod(); Period rhsPeriod; rhsPeriod = that.getPeriod(); if (!strategy.equals(LocatorUtils.property(thisLocator, "period", lhsPeriod), LocatorUtils.property(thatLocator, "period", rhsPeriod), lhsPeriod, rhsPeriod, (this.period!= null), (that.period!= null))) { return false; } } { Instant lhsRecorded; lhsRecorded = this.getRecorded(); Instant rhsRecorded; rhsRecorded = that.getRecorded(); if (!strategy.equals(LocatorUtils.property(thisLocator, "recorded", lhsRecorded), LocatorUtils.property(thatLocator, "recorded", rhsRecorded), lhsRecorded, rhsRecorded, (this.recorded!= null), (that.recorded!= null))) { return false; } } { List lhsReason; lhsReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null); List rhsReason; rhsReason = (((that.reason!= null)&&(!that.reason.isEmpty()))?that.getReason():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "reason", lhsReason), LocatorUtils.property(thatLocator, "reason", rhsReason), lhsReason, rhsReason, ((this.reason!= null)&&(!this.reason.isEmpty())), ((that.reason!= null)&&(!that.reason.isEmpty())))) { return false; } } { Coding lhsActivity; lhsActivity = this.getActivity(); Coding rhsActivity; rhsActivity = that.getActivity(); if (!strategy.equals(LocatorUtils.property(thisLocator, "activity", lhsActivity), LocatorUtils.property(thatLocator, "activity", rhsActivity), lhsActivity, rhsActivity, (this.activity!= null), (that.activity!= null))) { return false; } } { Reference lhsLocation; lhsLocation = this.getLocation(); Reference rhsLocation; rhsLocation = that.getLocation(); if (!strategy.equals(LocatorUtils.property(thisLocator, "location", lhsLocation), LocatorUtils.property(thatLocator, "location", rhsLocation), lhsLocation, rhsLocation, (this.location!= null), (that.location!= null))) { return false; } } { List lhsPolicy; lhsPolicy = (((this.policy!= null)&&(!this.policy.isEmpty()))?this.getPolicy():null); List rhsPolicy; rhsPolicy = (((that.policy!= null)&&(!that.policy.isEmpty()))?that.getPolicy():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "policy", lhsPolicy), LocatorUtils.property(thatLocator, "policy", rhsPolicy), lhsPolicy, rhsPolicy, ((this.policy!= null)&&(!this.policy.isEmpty())), ((that.policy!= null)&&(!that.policy.isEmpty())))) { return false; } } { List lhsAgent; lhsAgent = (((this.agent!= null)&&(!this.agent.isEmpty()))?this.getAgent():null); List rhsAgent; rhsAgent = (((that.agent!= null)&&(!that.agent.isEmpty()))?that.getAgent():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "agent", lhsAgent), LocatorUtils.property(thatLocator, "agent", rhsAgent), lhsAgent, rhsAgent, ((this.agent!= null)&&(!this.agent.isEmpty())), ((that.agent!= null)&&(!that.agent.isEmpty())))) { return false; } } { List lhsEntity; lhsEntity = (((this.entity!= null)&&(!this.entity.isEmpty()))?this.getEntity():null); List rhsEntity; rhsEntity = (((that.entity!= null)&&(!that.entity.isEmpty()))?that.getEntity():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "entity", lhsEntity), LocatorUtils.property(thatLocator, "entity", rhsEntity), lhsEntity, rhsEntity, ((this.entity!= null)&&(!this.entity.isEmpty())), ((that.entity!= null)&&(!that.entity.isEmpty())))) { return false; } } { List lhsSignature; lhsSignature = (((this.signature!= null)&&(!this.signature.isEmpty()))?this.getSignature():null); List rhsSignature; rhsSignature = (((that.signature!= null)&&(!that.signature.isEmpty()))?that.getSignature():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "signature", lhsSignature), LocatorUtils.property(thatLocator, "signature", rhsSignature), lhsSignature, rhsSignature, ((this.signature!= null)&&(!this.signature.isEmpty())), ((that.signature!= null)&&(!that.signature.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); { List theTarget; theTarget = (((this.target!= null)&&(!this.target.isEmpty()))?this.getTarget():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "target", theTarget), currentHashCode, theTarget, ((this.target!= null)&&(!this.target.isEmpty()))); } { Period thePeriod; thePeriod = this.getPeriod(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "period", thePeriod), currentHashCode, thePeriod, (this.period!= null)); } { Instant theRecorded; theRecorded = this.getRecorded(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "recorded", theRecorded), currentHashCode, theRecorded, (this.recorded!= null)); } { List theReason; theReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reason", theReason), currentHashCode, theReason, ((this.reason!= null)&&(!this.reason.isEmpty()))); } { Coding theActivity; theActivity = this.getActivity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "activity", theActivity), currentHashCode, theActivity, (this.activity!= null)); } { Reference theLocation; theLocation = this.getLocation(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "location", theLocation), currentHashCode, theLocation, (this.location!= null)); } { List thePolicy; thePolicy = (((this.policy!= null)&&(!this.policy.isEmpty()))?this.getPolicy():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "policy", thePolicy), currentHashCode, thePolicy, ((this.policy!= null)&&(!this.policy.isEmpty()))); } { List theAgent; theAgent = (((this.agent!= null)&&(!this.agent.isEmpty()))?this.getAgent():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "agent", theAgent), currentHashCode, theAgent, ((this.agent!= null)&&(!this.agent.isEmpty()))); } { List theEntity; theEntity = (((this.entity!= null)&&(!this.entity.isEmpty()))?this.getEntity():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "entity", theEntity), currentHashCode, theEntity, ((this.entity!= null)&&(!this.entity.isEmpty()))); } { List theSignature; theSignature = (((this.signature!= null)&&(!this.signature.isEmpty()))?this.getSignature():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "signature", theSignature), currentHashCode, theSignature, ((this.signature!= null)&&(!this.signature.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); { List theTarget; theTarget = (((this.target!= null)&&(!this.target.isEmpty()))?this.getTarget():null); strategy.appendField(locator, this, "target", buffer, theTarget, ((this.target!= null)&&(!this.target.isEmpty()))); } { Period thePeriod; thePeriod = this.getPeriod(); strategy.appendField(locator, this, "period", buffer, thePeriod, (this.period!= null)); } { Instant theRecorded; theRecorded = this.getRecorded(); strategy.appendField(locator, this, "recorded", buffer, theRecorded, (this.recorded!= null)); } { List theReason; theReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null); strategy.appendField(locator, this, "reason", buffer, theReason, ((this.reason!= null)&&(!this.reason.isEmpty()))); } { Coding theActivity; theActivity = this.getActivity(); strategy.appendField(locator, this, "activity", buffer, theActivity, (this.activity!= null)); } { Reference theLocation; theLocation = this.getLocation(); strategy.appendField(locator, this, "location", buffer, theLocation, (this.location!= null)); } { List thePolicy; thePolicy = (((this.policy!= null)&&(!this.policy.isEmpty()))?this.getPolicy():null); strategy.appendField(locator, this, "policy", buffer, thePolicy, ((this.policy!= null)&&(!this.policy.isEmpty()))); } { List theAgent; theAgent = (((this.agent!= null)&&(!this.agent.isEmpty()))?this.getAgent():null); strategy.appendField(locator, this, "agent", buffer, theAgent, ((this.agent!= null)&&(!this.agent.isEmpty()))); } { List theEntity; theEntity = (((this.entity!= null)&&(!this.entity.isEmpty()))?this.getEntity():null); strategy.appendField(locator, this, "entity", buffer, theEntity, ((this.entity!= null)&&(!this.entity.isEmpty()))); } { List theSignature; theSignature = (((this.signature!= null)&&(!this.signature.isEmpty()))?this.getSignature():null); strategy.appendField(locator, this, "signature", buffer, theSignature, ((this.signature!= null)&&(!this.signature.isEmpty()))); } return buffer; } public void setTarget(List value) { this.target = value; } public void setReason(List value) { this.reason = value; } public void setPolicy(List value) { this.policy = value; } public void setAgent(List value) { this.agent = value; } public void setEntity(List value) { this.entity = value; } public void setSignature(List value) { this.signature = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy