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

org.hl7.fhir.MessageHeader 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 MessageHeader complex type. * *

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

 * <complexType name="MessageHeader">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="timestamp" type="{http://hl7.org/fhir}instant"/>
 *         <element name="event" type="{http://hl7.org/fhir}Coding"/>
 *         <element name="response" type="{http://hl7.org/fhir}MessageHeader.Response" minOccurs="0"/>
 *         <element name="source" type="{http://hl7.org/fhir}MessageHeader.Source"/>
 *         <element name="destination" type="{http://hl7.org/fhir}MessageHeader.Destination" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="enterer" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="author" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="receiver" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="responsible" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="reason" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="data" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MessageHeader", propOrder = { "timestamp", "event", "response", "source", "destination", "enterer", "author", "receiver", "responsible", "reason", "data" }) public class MessageHeader extends DomainResource implements Equals, HashCode, ToString { @XmlElement(required = true) protected Instant timestamp; @XmlElement(required = true) protected Coding event; protected MessageHeaderResponse response; @XmlElement(required = true) protected MessageHeaderSource source; protected List destination; protected Reference enterer; protected Reference author; protected Reference receiver; protected Reference responsible; protected CodeableConcept reason; protected List data; /** * Gets the value of the timestamp property. * * @return * possible object is * {@link Instant } * */ public Instant getTimestamp() { return timestamp; } /** * Sets the value of the timestamp property. * * @param value * allowed object is * {@link Instant } * */ public void setTimestamp(Instant value) { this.timestamp = value; } /** * Gets the value of the event property. * * @return * possible object is * {@link Coding } * */ public Coding getEvent() { return event; } /** * Sets the value of the event property. * * @param value * allowed object is * {@link Coding } * */ public void setEvent(Coding value) { this.event = value; } /** * Gets the value of the response property. * * @return * possible object is * {@link MessageHeaderResponse } * */ public MessageHeaderResponse getResponse() { return response; } /** * Sets the value of the response property. * * @param value * allowed object is * {@link MessageHeaderResponse } * */ public void setResponse(MessageHeaderResponse value) { this.response = value; } /** * Gets the value of the source property. * * @return * possible object is * {@link MessageHeaderSource } * */ public MessageHeaderSource getSource() { return source; } /** * Sets the value of the source property. * * @param value * allowed object is * {@link MessageHeaderSource } * */ public void setSource(MessageHeaderSource value) { this.source = value; } /** * Gets the value of the destination 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 destination property. * *

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

     *    getDestination().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link MessageHeaderDestination } * * */ public List getDestination() { if (destination == null) { destination = new ArrayList(); } return this.destination; } /** * Gets the value of the enterer property. * * @return * possible object is * {@link Reference } * */ public Reference getEnterer() { return enterer; } /** * Sets the value of the enterer property. * * @param value * allowed object is * {@link Reference } * */ public void setEnterer(Reference value) { this.enterer = value; } /** * Gets the value of the author property. * * @return * possible object is * {@link Reference } * */ public Reference getAuthor() { return author; } /** * Sets the value of the author property. * * @param value * allowed object is * {@link Reference } * */ public void setAuthor(Reference value) { this.author = value; } /** * Gets the value of the receiver property. * * @return * possible object is * {@link Reference } * */ public Reference getReceiver() { return receiver; } /** * Sets the value of the receiver property. * * @param value * allowed object is * {@link Reference } * */ public void setReceiver(Reference value) { this.receiver = value; } /** * Gets the value of the responsible property. * * @return * possible object is * {@link Reference } * */ public Reference getResponsible() { return responsible; } /** * Sets the value of the responsible property. * * @param value * allowed object is * {@link Reference } * */ public void setResponsible(Reference value) { this.responsible = value; } /** * Gets the value of the reason property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getReason() { return reason; } /** * Sets the value of the reason property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setReason(CodeableConcept value) { this.reason = value; } /** * Gets the value of the data 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 data property. * *

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

     *    getData().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Reference } * * */ public List getData() { if (data == null) { data = new ArrayList(); } return this.data; } public MessageHeader withTimestamp(Instant value) { setTimestamp(value); return this; } public MessageHeader withEvent(Coding value) { setEvent(value); return this; } public MessageHeader withResponse(MessageHeaderResponse value) { setResponse(value); return this; } public MessageHeader withSource(MessageHeaderSource value) { setSource(value); return this; } public MessageHeader withDestination(MessageHeaderDestination... values) { if (values!= null) { for (MessageHeaderDestination value: values) { getDestination().add(value); } } return this; } public MessageHeader withDestination(Collection values) { if (values!= null) { getDestination().addAll(values); } return this; } public MessageHeader withEnterer(Reference value) { setEnterer(value); return this; } public MessageHeader withAuthor(Reference value) { setAuthor(value); return this; } public MessageHeader withReceiver(Reference value) { setReceiver(value); return this; } public MessageHeader withResponsible(Reference value) { setResponsible(value); return this; } public MessageHeader withReason(CodeableConcept value) { setReason(value); return this; } public MessageHeader withData(Reference... values) { if (values!= null) { for (Reference value: values) { getData().add(value); } } return this; } public MessageHeader withData(Collection values) { if (values!= null) { getData().addAll(values); } return this; } @Override public MessageHeader withText(Narrative value) { setText(value); return this; } @Override public MessageHeader withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public MessageHeader withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public MessageHeader withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public MessageHeader withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public MessageHeader withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public MessageHeader withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public MessageHeader withId(Id value) { setId(value); return this; } @Override public MessageHeader withMeta(Meta value) { setMeta(value); return this; } @Override public MessageHeader withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public MessageHeader withLanguage(Code value) { setLanguage(value); return this; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof MessageHeader)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final MessageHeader that = ((MessageHeader) object); { Instant lhsTimestamp; lhsTimestamp = this.getTimestamp(); Instant rhsTimestamp; rhsTimestamp = that.getTimestamp(); if (!strategy.equals(LocatorUtils.property(thisLocator, "timestamp", lhsTimestamp), LocatorUtils.property(thatLocator, "timestamp", rhsTimestamp), lhsTimestamp, rhsTimestamp)) { return false; } } { Coding lhsEvent; lhsEvent = this.getEvent(); Coding rhsEvent; rhsEvent = that.getEvent(); if (!strategy.equals(LocatorUtils.property(thisLocator, "event", lhsEvent), LocatorUtils.property(thatLocator, "event", rhsEvent), lhsEvent, rhsEvent)) { return false; } } { MessageHeaderResponse lhsResponse; lhsResponse = this.getResponse(); MessageHeaderResponse rhsResponse; rhsResponse = that.getResponse(); if (!strategy.equals(LocatorUtils.property(thisLocator, "response", lhsResponse), LocatorUtils.property(thatLocator, "response", rhsResponse), lhsResponse, rhsResponse)) { return false; } } { MessageHeaderSource lhsSource; lhsSource = this.getSource(); MessageHeaderSource rhsSource; rhsSource = that.getSource(); if (!strategy.equals(LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource)) { return false; } } { List lhsDestination; lhsDestination = (((this.destination!= null)&&(!this.destination.isEmpty()))?this.getDestination():null); List rhsDestination; rhsDestination = (((that.destination!= null)&&(!that.destination.isEmpty()))?that.getDestination():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "destination", lhsDestination), LocatorUtils.property(thatLocator, "destination", rhsDestination), lhsDestination, rhsDestination)) { return false; } } { Reference lhsEnterer; lhsEnterer = this.getEnterer(); Reference rhsEnterer; rhsEnterer = that.getEnterer(); if (!strategy.equals(LocatorUtils.property(thisLocator, "enterer", lhsEnterer), LocatorUtils.property(thatLocator, "enterer", rhsEnterer), lhsEnterer, rhsEnterer)) { return false; } } { Reference lhsAuthor; lhsAuthor = this.getAuthor(); Reference rhsAuthor; rhsAuthor = that.getAuthor(); if (!strategy.equals(LocatorUtils.property(thisLocator, "author", lhsAuthor), LocatorUtils.property(thatLocator, "author", rhsAuthor), lhsAuthor, rhsAuthor)) { return false; } } { Reference lhsReceiver; lhsReceiver = this.getReceiver(); Reference rhsReceiver; rhsReceiver = that.getReceiver(); if (!strategy.equals(LocatorUtils.property(thisLocator, "receiver", lhsReceiver), LocatorUtils.property(thatLocator, "receiver", rhsReceiver), lhsReceiver, rhsReceiver)) { return false; } } { Reference lhsResponsible; lhsResponsible = this.getResponsible(); Reference rhsResponsible; rhsResponsible = that.getResponsible(); if (!strategy.equals(LocatorUtils.property(thisLocator, "responsible", lhsResponsible), LocatorUtils.property(thatLocator, "responsible", rhsResponsible), lhsResponsible, rhsResponsible)) { return false; } } { CodeableConcept lhsReason; lhsReason = this.getReason(); CodeableConcept rhsReason; rhsReason = that.getReason(); if (!strategy.equals(LocatorUtils.property(thisLocator, "reason", lhsReason), LocatorUtils.property(thatLocator, "reason", rhsReason), lhsReason, rhsReason)) { return false; } } { List lhsData; lhsData = (((this.data!= null)&&(!this.data.isEmpty()))?this.getData():null); List rhsData; rhsData = (((that.data!= null)&&(!that.data.isEmpty()))?that.getData():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "data", lhsData), LocatorUtils.property(thatLocator, "data", rhsData), lhsData, rhsData)) { 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); { Instant theTimestamp; theTimestamp = this.getTimestamp(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "timestamp", theTimestamp), currentHashCode, theTimestamp); } { Coding theEvent; theEvent = this.getEvent(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "event", theEvent), currentHashCode, theEvent); } { MessageHeaderResponse theResponse; theResponse = this.getResponse(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "response", theResponse), currentHashCode, theResponse); } { MessageHeaderSource theSource; theSource = this.getSource(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource); } { List theDestination; theDestination = (((this.destination!= null)&&(!this.destination.isEmpty()))?this.getDestination():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "destination", theDestination), currentHashCode, theDestination); } { Reference theEnterer; theEnterer = this.getEnterer(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "enterer", theEnterer), currentHashCode, theEnterer); } { Reference theAuthor; theAuthor = this.getAuthor(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "author", theAuthor), currentHashCode, theAuthor); } { Reference theReceiver; theReceiver = this.getReceiver(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "receiver", theReceiver), currentHashCode, theReceiver); } { Reference theResponsible; theResponsible = this.getResponsible(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "responsible", theResponsible), currentHashCode, theResponsible); } { CodeableConcept theReason; theReason = this.getReason(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reason", theReason), currentHashCode, theReason); } { List theData; theData = (((this.data!= null)&&(!this.data.isEmpty()))?this.getData():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "data", theData), currentHashCode, theData); } 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); { Instant theTimestamp; theTimestamp = this.getTimestamp(); strategy.appendField(locator, this, "timestamp", buffer, theTimestamp); } { Coding theEvent; theEvent = this.getEvent(); strategy.appendField(locator, this, "event", buffer, theEvent); } { MessageHeaderResponse theResponse; theResponse = this.getResponse(); strategy.appendField(locator, this, "response", buffer, theResponse); } { MessageHeaderSource theSource; theSource = this.getSource(); strategy.appendField(locator, this, "source", buffer, theSource); } { List theDestination; theDestination = (((this.destination!= null)&&(!this.destination.isEmpty()))?this.getDestination():null); strategy.appendField(locator, this, "destination", buffer, theDestination); } { Reference theEnterer; theEnterer = this.getEnterer(); strategy.appendField(locator, this, "enterer", buffer, theEnterer); } { Reference theAuthor; theAuthor = this.getAuthor(); strategy.appendField(locator, this, "author", buffer, theAuthor); } { Reference theReceiver; theReceiver = this.getReceiver(); strategy.appendField(locator, this, "receiver", buffer, theReceiver); } { Reference theResponsible; theResponsible = this.getResponsible(); strategy.appendField(locator, this, "responsible", buffer, theResponsible); } { CodeableConcept theReason; theReason = this.getReason(); strategy.appendField(locator, this, "reason", buffer, theReason); } { List theData; theData = (((this.data!= null)&&(!this.data.isEmpty()))?this.getData():null); strategy.appendField(locator, this, "data", buffer, theData); } return buffer; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy