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

org.hl7.fhir.Media 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.09.27 at 11:16:19 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 Media complex type. * *

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

 * <complexType name="Media">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="type" type="{http://hl7.org/fhir}DigitalMediaType"/>
 *         <element name="subtype" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="view" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="subject" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="operator" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="deviceName" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="height" type="{http://hl7.org/fhir}positiveInt" minOccurs="0"/>
 *         <element name="width" type="{http://hl7.org/fhir}positiveInt" minOccurs="0"/>
 *         <element name="frames" type="{http://hl7.org/fhir}positiveInt" minOccurs="0"/>
 *         <element name="duration" type="{http://hl7.org/fhir}unsignedInt" minOccurs="0"/>
 *         <element name="content" type="{http://hl7.org/fhir}Attachment"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Media", propOrder = { "identifier", "type", "subtype", "view", "subject", "operator", "deviceName", "height", "width", "frames", "duration", "content" }) public class Media extends DomainResource implements Equals2, HashCode2, ToString2 { protected List identifier; @XmlElement(required = true) protected DigitalMediaType type; protected CodeableConcept subtype; protected CodeableConcept view; protected Reference subject; protected Reference operator; protected org.hl7.fhir.String deviceName; protected PositiveInt height; protected PositiveInt width; protected PositiveInt frames; protected UnsignedInt duration; @XmlElement(required = true) protected Attachment content; /** * Gets the value of the identifier 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 identifier property. * *

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

     *    getIdentifier().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Identifier } * * */ public List getIdentifier() { if (identifier == null) { identifier = new ArrayList(); } return this.identifier; } /** * Gets the value of the type property. * * @return * possible object is * {@link DigitalMediaType } * */ public DigitalMediaType getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link DigitalMediaType } * */ public void setType(DigitalMediaType value) { this.type = value; } /** * Gets the value of the subtype property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getSubtype() { return subtype; } /** * Sets the value of the subtype property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setSubtype(CodeableConcept value) { this.subtype = value; } /** * Gets the value of the view property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getView() { return view; } /** * Sets the value of the view property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setView(CodeableConcept value) { this.view = value; } /** * Gets the value of the subject property. * * @return * possible object is * {@link Reference } * */ public Reference getSubject() { return subject; } /** * Sets the value of the subject property. * * @param value * allowed object is * {@link Reference } * */ public void setSubject(Reference value) { this.subject = value; } /** * Gets the value of the operator property. * * @return * possible object is * {@link Reference } * */ public Reference getOperator() { return operator; } /** * Sets the value of the operator property. * * @param value * allowed object is * {@link Reference } * */ public void setOperator(Reference value) { this.operator = value; } /** * Gets the value of the deviceName property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getDeviceName() { return deviceName; } /** * Sets the value of the deviceName property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setDeviceName(org.hl7.fhir.String value) { this.deviceName = value; } /** * Gets the value of the height property. * * @return * possible object is * {@link PositiveInt } * */ public PositiveInt getHeight() { return height; } /** * Sets the value of the height property. * * @param value * allowed object is * {@link PositiveInt } * */ public void setHeight(PositiveInt value) { this.height = value; } /** * Gets the value of the width property. * * @return * possible object is * {@link PositiveInt } * */ public PositiveInt getWidth() { return width; } /** * Sets the value of the width property. * * @param value * allowed object is * {@link PositiveInt } * */ public void setWidth(PositiveInt value) { this.width = value; } /** * Gets the value of the frames property. * * @return * possible object is * {@link PositiveInt } * */ public PositiveInt getFrames() { return frames; } /** * Sets the value of the frames property. * * @param value * allowed object is * {@link PositiveInt } * */ public void setFrames(PositiveInt value) { this.frames = value; } /** * Gets the value of the duration property. * * @return * possible object is * {@link UnsignedInt } * */ public UnsignedInt getDuration() { return duration; } /** * Sets the value of the duration property. * * @param value * allowed object is * {@link UnsignedInt } * */ public void setDuration(UnsignedInt value) { this.duration = value; } /** * Gets the value of the content property. * * @return * possible object is * {@link Attachment } * */ public Attachment getContent() { return content; } /** * Sets the value of the content property. * * @param value * allowed object is * {@link Attachment } * */ public void setContent(Attachment value) { this.content = value; } public Media withIdentifier(Identifier... values) { if (values!= null) { for (Identifier value: values) { getIdentifier().add(value); } } return this; } public Media withIdentifier(Collection values) { if (values!= null) { getIdentifier().addAll(values); } return this; } public Media withType(DigitalMediaType value) { setType(value); return this; } public Media withSubtype(CodeableConcept value) { setSubtype(value); return this; } public Media withView(CodeableConcept value) { setView(value); return this; } public Media withSubject(Reference value) { setSubject(value); return this; } public Media withOperator(Reference value) { setOperator(value); return this; } public Media withDeviceName(org.hl7.fhir.String value) { setDeviceName(value); return this; } public Media withHeight(PositiveInt value) { setHeight(value); return this; } public Media withWidth(PositiveInt value) { setWidth(value); return this; } public Media withFrames(PositiveInt value) { setFrames(value); return this; } public Media withDuration(UnsignedInt value) { setDuration(value); return this; } public Media withContent(Attachment value) { setContent(value); return this; } @Override public Media withText(Narrative value) { setText(value); return this; } @Override public Media withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public Media withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public Media withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public Media withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public Media withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public Media withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public Media withId(Id value) { setId(value); return this; } @Override public Media withMeta(Meta value) { setMeta(value); return this; } @Override public Media withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public Media 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 Media that = ((Media) object); { List lhsIdentifier; lhsIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); List rhsIdentifier; rhsIdentifier = (((that.identifier!= null)&&(!that.identifier.isEmpty()))?that.getIdentifier():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "identifier", lhsIdentifier), LocatorUtils.property(thatLocator, "identifier", rhsIdentifier), lhsIdentifier, rhsIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())), ((that.identifier!= null)&&(!that.identifier.isEmpty())))) { return false; } } { DigitalMediaType lhsType; lhsType = this.getType(); DigitalMediaType rhsType; rhsType = that.getType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, (this.type!= null), (that.type!= null))) { return false; } } { CodeableConcept lhsSubtype; lhsSubtype = this.getSubtype(); CodeableConcept rhsSubtype; rhsSubtype = that.getSubtype(); if (!strategy.equals(LocatorUtils.property(thisLocator, "subtype", lhsSubtype), LocatorUtils.property(thatLocator, "subtype", rhsSubtype), lhsSubtype, rhsSubtype, (this.subtype!= null), (that.subtype!= null))) { return false; } } { CodeableConcept lhsView; lhsView = this.getView(); CodeableConcept rhsView; rhsView = that.getView(); if (!strategy.equals(LocatorUtils.property(thisLocator, "view", lhsView), LocatorUtils.property(thatLocator, "view", rhsView), lhsView, rhsView, (this.view!= null), (that.view!= null))) { return false; } } { Reference lhsSubject; lhsSubject = this.getSubject(); Reference rhsSubject; rhsSubject = that.getSubject(); if (!strategy.equals(LocatorUtils.property(thisLocator, "subject", lhsSubject), LocatorUtils.property(thatLocator, "subject", rhsSubject), lhsSubject, rhsSubject, (this.subject!= null), (that.subject!= null))) { return false; } } { Reference lhsOperator; lhsOperator = this.getOperator(); Reference rhsOperator; rhsOperator = that.getOperator(); if (!strategy.equals(LocatorUtils.property(thisLocator, "operator", lhsOperator), LocatorUtils.property(thatLocator, "operator", rhsOperator), lhsOperator, rhsOperator, (this.operator!= null), (that.operator!= null))) { return false; } } { org.hl7.fhir.String lhsDeviceName; lhsDeviceName = this.getDeviceName(); org.hl7.fhir.String rhsDeviceName; rhsDeviceName = that.getDeviceName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "deviceName", lhsDeviceName), LocatorUtils.property(thatLocator, "deviceName", rhsDeviceName), lhsDeviceName, rhsDeviceName, (this.deviceName!= null), (that.deviceName!= null))) { return false; } } { PositiveInt lhsHeight; lhsHeight = this.getHeight(); PositiveInt rhsHeight; rhsHeight = that.getHeight(); if (!strategy.equals(LocatorUtils.property(thisLocator, "height", lhsHeight), LocatorUtils.property(thatLocator, "height", rhsHeight), lhsHeight, rhsHeight, (this.height!= null), (that.height!= null))) { return false; } } { PositiveInt lhsWidth; lhsWidth = this.getWidth(); PositiveInt rhsWidth; rhsWidth = that.getWidth(); if (!strategy.equals(LocatorUtils.property(thisLocator, "width", lhsWidth), LocatorUtils.property(thatLocator, "width", rhsWidth), lhsWidth, rhsWidth, (this.width!= null), (that.width!= null))) { return false; } } { PositiveInt lhsFrames; lhsFrames = this.getFrames(); PositiveInt rhsFrames; rhsFrames = that.getFrames(); if (!strategy.equals(LocatorUtils.property(thisLocator, "frames", lhsFrames), LocatorUtils.property(thatLocator, "frames", rhsFrames), lhsFrames, rhsFrames, (this.frames!= null), (that.frames!= null))) { return false; } } { UnsignedInt lhsDuration; lhsDuration = this.getDuration(); UnsignedInt 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; } } { Attachment lhsContent; lhsContent = this.getContent(); Attachment rhsContent; rhsContent = that.getContent(); if (!strategy.equals(LocatorUtils.property(thisLocator, "content", lhsContent), LocatorUtils.property(thatLocator, "content", rhsContent), lhsContent, rhsContent, (this.content!= null), (that.content!= 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 theIdentifier; theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty()))); } { DigitalMediaType theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null)); } { CodeableConcept theSubtype; theSubtype = this.getSubtype(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subtype", theSubtype), currentHashCode, theSubtype, (this.subtype!= null)); } { CodeableConcept theView; theView = this.getView(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "view", theView), currentHashCode, theView, (this.view!= null)); } { Reference theSubject; theSubject = this.getSubject(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subject", theSubject), currentHashCode, theSubject, (this.subject!= null)); } { Reference theOperator; theOperator = this.getOperator(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "operator", theOperator), currentHashCode, theOperator, (this.operator!= null)); } { org.hl7.fhir.String theDeviceName; theDeviceName = this.getDeviceName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "deviceName", theDeviceName), currentHashCode, theDeviceName, (this.deviceName!= null)); } { PositiveInt theHeight; theHeight = this.getHeight(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "height", theHeight), currentHashCode, theHeight, (this.height!= null)); } { PositiveInt theWidth; theWidth = this.getWidth(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "width", theWidth), currentHashCode, theWidth, (this.width!= null)); } { PositiveInt theFrames; theFrames = this.getFrames(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "frames", theFrames), currentHashCode, theFrames, (this.frames!= null)); } { UnsignedInt theDuration; theDuration = this.getDuration(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "duration", theDuration), currentHashCode, theDuration, (this.duration!= null)); } { Attachment theContent; theContent = this.getContent(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "content", theContent), currentHashCode, theContent, (this.content!= 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 theIdentifier; theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); strategy.appendField(locator, this, "identifier", buffer, theIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty()))); } { DigitalMediaType theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null)); } { CodeableConcept theSubtype; theSubtype = this.getSubtype(); strategy.appendField(locator, this, "subtype", buffer, theSubtype, (this.subtype!= null)); } { CodeableConcept theView; theView = this.getView(); strategy.appendField(locator, this, "view", buffer, theView, (this.view!= null)); } { Reference theSubject; theSubject = this.getSubject(); strategy.appendField(locator, this, "subject", buffer, theSubject, (this.subject!= null)); } { Reference theOperator; theOperator = this.getOperator(); strategy.appendField(locator, this, "operator", buffer, theOperator, (this.operator!= null)); } { org.hl7.fhir.String theDeviceName; theDeviceName = this.getDeviceName(); strategy.appendField(locator, this, "deviceName", buffer, theDeviceName, (this.deviceName!= null)); } { PositiveInt theHeight; theHeight = this.getHeight(); strategy.appendField(locator, this, "height", buffer, theHeight, (this.height!= null)); } { PositiveInt theWidth; theWidth = this.getWidth(); strategy.appendField(locator, this, "width", buffer, theWidth, (this.width!= null)); } { PositiveInt theFrames; theFrames = this.getFrames(); strategy.appendField(locator, this, "frames", buffer, theFrames, (this.frames!= null)); } { UnsignedInt theDuration; theDuration = this.getDuration(); strategy.appendField(locator, this, "duration", buffer, theDuration, (this.duration!= null)); } { Attachment theContent; theContent = this.getContent(); strategy.appendField(locator, this, "content", buffer, theContent, (this.content!= null)); } return buffer; } public void setIdentifier(List value) { this.identifier = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy