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

org.hl7.fhir.Signature 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.03.21 at 12:42:34 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.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 a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions
 * 
 * 

Java class for Signature complex type. * *

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

 * <complexType name="Signature">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}Element">
 *       <sequence>
 *         <element name="type" type="{http://hl7.org/fhir}Coding" maxOccurs="unbounded"/>
 *         <element name="when" type="{http://hl7.org/fhir}instant"/>
 *         <choice>
 *           <element name="whoUri" type="{http://hl7.org/fhir}uri"/>
 *           <element name="whoReference" type="{http://hl7.org/fhir}Reference"/>
 *         </choice>
 *         <element name="contentType" type="{http://hl7.org/fhir}code" minOccurs="0"/>
 *         <element name="blob" type="{http://hl7.org/fhir}base64Binary" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Signature", propOrder = { "type", "when", "whoUri", "whoReference", "contentType", "blob" }) public class Signature extends Element implements Equals2, HashCode2, ToString2 { @XmlElement(required = true) protected List type; @XmlElement(required = true) protected Instant when; protected Uri whoUri; protected Reference whoReference; protected Code contentType; protected Base64Binary blob; /** * Gets the value of the type 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 type property. * *

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

     *    getType().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Coding } * * */ public List getType() { if (type == null) { type = new ArrayList(); } return this.type; } /** * Gets the value of the when property. * * @return * possible object is * {@link Instant } * */ public Instant getWhen() { return when; } /** * Sets the value of the when property. * * @param value * allowed object is * {@link Instant } * */ public void setWhen(Instant value) { this.when = value; } /** * Gets the value of the whoUri property. * * @return * possible object is * {@link Uri } * */ public Uri getWhoUri() { return whoUri; } /** * Sets the value of the whoUri property. * * @param value * allowed object is * {@link Uri } * */ public void setWhoUri(Uri value) { this.whoUri = value; } /** * Gets the value of the whoReference property. * * @return * possible object is * {@link Reference } * */ public Reference getWhoReference() { return whoReference; } /** * Sets the value of the whoReference property. * * @param value * allowed object is * {@link Reference } * */ public void setWhoReference(Reference value) { this.whoReference = value; } /** * Gets the value of the contentType property. * * @return * possible object is * {@link Code } * */ public Code getContentType() { return contentType; } /** * Sets the value of the contentType property. * * @param value * allowed object is * {@link Code } * */ public void setContentType(Code value) { this.contentType = value; } /** * Gets the value of the blob property. * * @return * possible object is * {@link Base64Binary } * */ public Base64Binary getBlob() { return blob; } /** * Sets the value of the blob property. * * @param value * allowed object is * {@link Base64Binary } * */ public void setBlob(Base64Binary value) { this.blob = value; } public Signature withType(Coding... values) { if (values!= null) { for (Coding value: values) { getType().add(value); } } return this; } public Signature withType(Collection values) { if (values!= null) { getType().addAll(values); } return this; } public Signature withWhen(Instant value) { setWhen(value); return this; } public Signature withWhoUri(Uri value) { setWhoUri(value); return this; } public Signature withWhoReference(Reference value) { setWhoReference(value); return this; } public Signature withContentType(Code value) { setContentType(value); return this; } public Signature withBlob(Base64Binary value) { setBlob(value); return this; } @Override public Signature withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public Signature withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public Signature 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 Signature that = ((Signature) object); { List lhsType; lhsType = (((this.type!= null)&&(!this.type.isEmpty()))?this.getType():null); List rhsType; rhsType = (((that.type!= null)&&(!that.type.isEmpty()))?that.getType():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, ((this.type!= null)&&(!this.type.isEmpty())), ((that.type!= null)&&(!that.type.isEmpty())))) { return false; } } { Instant lhsWhen; lhsWhen = this.getWhen(); Instant rhsWhen; rhsWhen = that.getWhen(); if (!strategy.equals(LocatorUtils.property(thisLocator, "when", lhsWhen), LocatorUtils.property(thatLocator, "when", rhsWhen), lhsWhen, rhsWhen, (this.when!= null), (that.when!= null))) { return false; } } { Uri lhsWhoUri; lhsWhoUri = this.getWhoUri(); Uri rhsWhoUri; rhsWhoUri = that.getWhoUri(); if (!strategy.equals(LocatorUtils.property(thisLocator, "whoUri", lhsWhoUri), LocatorUtils.property(thatLocator, "whoUri", rhsWhoUri), lhsWhoUri, rhsWhoUri, (this.whoUri!= null), (that.whoUri!= null))) { return false; } } { Reference lhsWhoReference; lhsWhoReference = this.getWhoReference(); Reference rhsWhoReference; rhsWhoReference = that.getWhoReference(); if (!strategy.equals(LocatorUtils.property(thisLocator, "whoReference", lhsWhoReference), LocatorUtils.property(thatLocator, "whoReference", rhsWhoReference), lhsWhoReference, rhsWhoReference, (this.whoReference!= null), (that.whoReference!= null))) { return false; } } { Code lhsContentType; lhsContentType = this.getContentType(); Code rhsContentType; rhsContentType = that.getContentType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "contentType", lhsContentType), LocatorUtils.property(thatLocator, "contentType", rhsContentType), lhsContentType, rhsContentType, (this.contentType!= null), (that.contentType!= null))) { return false; } } { Base64Binary lhsBlob; lhsBlob = this.getBlob(); Base64Binary rhsBlob; rhsBlob = that.getBlob(); if (!strategy.equals(LocatorUtils.property(thisLocator, "blob", lhsBlob), LocatorUtils.property(thatLocator, "blob", rhsBlob), lhsBlob, rhsBlob, (this.blob!= null), (that.blob!= 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 theType; theType = (((this.type!= null)&&(!this.type.isEmpty()))?this.getType():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, ((this.type!= null)&&(!this.type.isEmpty()))); } { Instant theWhen; theWhen = this.getWhen(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "when", theWhen), currentHashCode, theWhen, (this.when!= null)); } { Uri theWhoUri; theWhoUri = this.getWhoUri(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "whoUri", theWhoUri), currentHashCode, theWhoUri, (this.whoUri!= null)); } { Reference theWhoReference; theWhoReference = this.getWhoReference(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "whoReference", theWhoReference), currentHashCode, theWhoReference, (this.whoReference!= null)); } { Code theContentType; theContentType = this.getContentType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "contentType", theContentType), currentHashCode, theContentType, (this.contentType!= null)); } { Base64Binary theBlob; theBlob = this.getBlob(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "blob", theBlob), currentHashCode, theBlob, (this.blob!= 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 theType; theType = (((this.type!= null)&&(!this.type.isEmpty()))?this.getType():null); strategy.appendField(locator, this, "type", buffer, theType, ((this.type!= null)&&(!this.type.isEmpty()))); } { Instant theWhen; theWhen = this.getWhen(); strategy.appendField(locator, this, "when", buffer, theWhen, (this.when!= null)); } { Uri theWhoUri; theWhoUri = this.getWhoUri(); strategy.appendField(locator, this, "whoUri", buffer, theWhoUri, (this.whoUri!= null)); } { Reference theWhoReference; theWhoReference = this.getWhoReference(); strategy.appendField(locator, this, "whoReference", buffer, theWhoReference, (this.whoReference!= null)); } { Code theContentType; theContentType = this.getContentType(); strategy.appendField(locator, this, "contentType", buffer, theContentType, (this.contentType!= null)); } { Base64Binary theBlob; theBlob = this.getBlob(); strategy.appendField(locator, this, "blob", buffer, theBlob, (this.blob!= null)); } return buffer; } public void setType(List value) { this.type = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy