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.22.0
Show newest version
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2018.01.12 at 11:04:27 AM MST 
//


package org.hl7.fhir;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
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.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
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 Equals, HashCode, ToString { @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 JAXB 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 JAXB 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 JAXB 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 JAXB 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 JAXB 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 JAXB 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; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Provenance)) { 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)) { 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)) { 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)) { 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)) { 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)) { 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)) { 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)) { 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)) { 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)) { 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)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy 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); } { Period thePeriod; thePeriod = this.getPeriod(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "period", thePeriod), currentHashCode, thePeriod); } { Instant theRecorded; theRecorded = this.getRecorded(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "recorded", theRecorded), currentHashCode, theRecorded); } { List theReason; theReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reason", theReason), currentHashCode, theReason); } { Coding theActivity; theActivity = this.getActivity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "activity", theActivity), currentHashCode, theActivity); } { Reference theLocation; theLocation = this.getLocation(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "location", theLocation), currentHashCode, theLocation); } { List thePolicy; thePolicy = (((this.policy!= null)&&(!this.policy.isEmpty()))?this.getPolicy():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "policy", thePolicy), currentHashCode, thePolicy); } { List theAgent; theAgent = (((this.agent!= null)&&(!this.agent.isEmpty()))?this.getAgent():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "agent", theAgent), currentHashCode, theAgent); } { List theEntity; theEntity = (((this.entity!= null)&&(!this.entity.isEmpty()))?this.getEntity():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "entity", theEntity), currentHashCode, theEntity); } { List theSignature; theSignature = (((this.signature!= null)&&(!this.signature.isEmpty()))?this.getSignature():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "signature", theSignature), currentHashCode, theSignature); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public java.lang.String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy 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); } { Period thePeriod; thePeriod = this.getPeriod(); strategy.appendField(locator, this, "period", buffer, thePeriod); } { Instant theRecorded; theRecorded = this.getRecorded(); strategy.appendField(locator, this, "recorded", buffer, theRecorded); } { List theReason; theReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null); strategy.appendField(locator, this, "reason", buffer, theReason); } { Coding theActivity; theActivity = this.getActivity(); strategy.appendField(locator, this, "activity", buffer, theActivity); } { Reference theLocation; theLocation = this.getLocation(); strategy.appendField(locator, this, "location", buffer, theLocation); } { List thePolicy; thePolicy = (((this.policy!= null)&&(!this.policy.isEmpty()))?this.getPolicy():null); strategy.appendField(locator, this, "policy", buffer, thePolicy); } { List theAgent; theAgent = (((this.agent!= null)&&(!this.agent.isEmpty()))?this.getAgent():null); strategy.appendField(locator, this, "agent", buffer, theAgent); } { List theEntity; theEntity = (((this.entity!= null)&&(!this.entity.isEmpty()))?this.getEntity():null); strategy.appendField(locator, this, "entity", buffer, theEntity); } { List theSignature; theSignature = (((this.signature!= null)&&(!this.signature.isEmpty()))?this.getSignature():null); strategy.appendField(locator, this, "signature", buffer, theSignature); } return buffer; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy