org.hl7.fhir.DomainResource Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// 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 jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlSeeAlso;
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;
/**
* A resource that includes narrative, extensions, and contained resources.
*
* Java class for DomainResource complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="DomainResource">
* <complexContent>
* <extension base="{http://hl7.org/fhir}Resource">
* <sequence>
* <element name="text" type="{http://hl7.org/fhir}Narrative" minOccurs="0"/>
* <element name="contained" type="{http://hl7.org/fhir}ResourceContainer" maxOccurs="unbounded" minOccurs="0"/>
* <element name="extension" type="{http://hl7.org/fhir}Extension" maxOccurs="unbounded" minOccurs="0"/>
* <element name="modifierExtension" type="{http://hl7.org/fhir}Extension" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DomainResource", propOrder = {
"text",
"contained",
"extension",
"modifierExtension"
})
@XmlSeeAlso({
Account.class,
Appointment.class,
AppointmentResponse.class,
AuditEvent.class,
Basic.class,
BodySite.class,
CarePlan.class,
CareTeam.class,
Claim.class,
ClaimResponse.class,
ClinicalImpression.class,
CodeSystem.class,
Communication.class,
CommunicationRequest.class,
CompartmentDefinition.class,
Composition.class,
ConceptMap.class,
Condition.class,
Conformance.class,
Contract.class,
Coverage.class,
DataElement.class,
DecisionSupportRule.class,
DecisionSupportServiceModule.class,
DetectedIssue.class,
Device.class,
DeviceComponent.class,
DeviceMetric.class,
DeviceUseRequest.class,
DeviceUseStatement.class,
DiagnosticOrder.class,
DiagnosticReport.class,
DocumentManifest.class,
DocumentReference.class,
EligibilityRequest.class,
EligibilityResponse.class,
Encounter.class,
EnrollmentRequest.class,
EnrollmentResponse.class,
EpisodeOfCare.class,
ExpansionProfile.class,
ExplanationOfBenefit.class,
FamilyMemberHistory.class,
Flag.class,
Goal.class,
Group.class,
GuidanceResponse.class,
HealthcareService.class,
ImagingExcerpt.class,
ImagingObjectSelection.class,
ImagingStudy.class,
Immunization.class,
ImmunizationRecommendation.class,
ImplementationGuide.class,
Library.class,
Linkage.class,
org.hl7.fhir.List.class,
Location.class,
Measure.class,
MeasureReport.class,
Media.class,
Medication.class,
MedicationAdministration.class,
MedicationDispense.class,
MedicationOrder.class,
MedicationStatement.class,
MessageHeader.class,
ModuleDefinition.class,
NamingSystem.class,
NutritionOrder.class,
Observation.class,
OperationDefinition.class,
OperationOutcome.class,
Order.class,
OrderResponse.class,
OrderSet.class,
Organization.class,
Patient.class,
PaymentNotice.class,
PaymentReconciliation.class,
Person.class,
Practitioner.class,
PractitionerRole.class,
Procedure.class,
ProcedureRequest.class,
ProcessRequest.class,
ProcessResponse.class,
Protocol.class,
Provenance.class,
Questionnaire.class,
QuestionnaireResponse.class,
ReferralRequest.class,
RelatedPerson.class,
RiskAssessment.class,
Schedule.class,
SearchParameter.class,
Sequence.class,
Slot.class,
Specimen.class,
StructureDefinition.class,
StructureMap.class,
Subscription.class,
Substance.class,
SupplyDelivery.class,
SupplyRequest.class,
Task.class,
TestScript.class,
ValueSet.class,
VisionPrescription.class,
AllergyIntolerance.class
})
public class DomainResource
extends Resource
implements Equals2, HashCode2, ToString2
{
protected Narrative text;
protected java.util.List contained;
protected java.util.List extension;
protected java.util.List modifierExtension;
/**
* Gets the value of the text property.
*
* @return
* possible object is
* {@link Narrative }
*
*/
public Narrative getText() {
return text;
}
/**
* Sets the value of the text property.
*
* @param value
* allowed object is
* {@link Narrative }
*
*/
public void setText(Narrative value) {
this.text = value;
}
/**
* Gets the value of the contained 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 contained property.
*
*
* For example, to add a new item, do as follows:
*
* getContained().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ResourceContainer }
*
*
*/
public java.util.List getContained() {
if (contained == null) {
contained = new ArrayList();
}
return this.contained;
}
/**
* Gets the value of the extension 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 extension property.
*
*
* For example, to add a new item, do as follows:
*
* getExtension().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Extension }
*
*
*/
public java.util.List getExtension() {
if (extension == null) {
extension = new ArrayList();
}
return this.extension;
}
/**
* Gets the value of the modifierExtension 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 modifierExtension property.
*
*
* For example, to add a new item, do as follows:
*
* getModifierExtension().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Extension }
*
*
*/
public java.util.List getModifierExtension() {
if (modifierExtension == null) {
modifierExtension = new ArrayList();
}
return this.modifierExtension;
}
public DomainResource withText(Narrative value) {
setText(value);
return this;
}
public DomainResource withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
public DomainResource withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
public DomainResource withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
public DomainResource withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
public DomainResource withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
public DomainResource withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public DomainResource withId(Id value) {
setId(value);
return this;
}
@Override
public DomainResource withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public DomainResource withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public DomainResource 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 DomainResource that = ((DomainResource) object);
{
Narrative lhsText;
lhsText = this.getText();
Narrative rhsText;
rhsText = that.getText();
if (!strategy.equals(LocatorUtils.property(thisLocator, "text", lhsText), LocatorUtils.property(thatLocator, "text", rhsText), lhsText, rhsText, (this.text!= null), (that.text!= null))) {
return false;
}
}
{
java.util.List lhsContained;
lhsContained = (((this.contained!= null)&&(!this.contained.isEmpty()))?this.getContained():null);
java.util.List rhsContained;
rhsContained = (((that.contained!= null)&&(!that.contained.isEmpty()))?that.getContained():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "contained", lhsContained), LocatorUtils.property(thatLocator, "contained", rhsContained), lhsContained, rhsContained, ((this.contained!= null)&&(!this.contained.isEmpty())), ((that.contained!= null)&&(!that.contained.isEmpty())))) {
return false;
}
}
{
java.util.List lhsExtension;
lhsExtension = (((this.extension!= null)&&(!this.extension.isEmpty()))?this.getExtension():null);
java.util.List rhsExtension;
rhsExtension = (((that.extension!= null)&&(!that.extension.isEmpty()))?that.getExtension():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "extension", lhsExtension), LocatorUtils.property(thatLocator, "extension", rhsExtension), lhsExtension, rhsExtension, ((this.extension!= null)&&(!this.extension.isEmpty())), ((that.extension!= null)&&(!that.extension.isEmpty())))) {
return false;
}
}
{
java.util.List lhsModifierExtension;
lhsModifierExtension = (((this.modifierExtension!= null)&&(!this.modifierExtension.isEmpty()))?this.getModifierExtension():null);
java.util.List rhsModifierExtension;
rhsModifierExtension = (((that.modifierExtension!= null)&&(!that.modifierExtension.isEmpty()))?that.getModifierExtension():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "modifierExtension", lhsModifierExtension), LocatorUtils.property(thatLocator, "modifierExtension", rhsModifierExtension), lhsModifierExtension, rhsModifierExtension, ((this.modifierExtension!= null)&&(!this.modifierExtension.isEmpty())), ((that.modifierExtension!= null)&&(!that.modifierExtension.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);
{
Narrative theText;
theText = this.getText();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "text", theText), currentHashCode, theText, (this.text!= null));
}
{
java.util.List theContained;
theContained = (((this.contained!= null)&&(!this.contained.isEmpty()))?this.getContained():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "contained", theContained), currentHashCode, theContained, ((this.contained!= null)&&(!this.contained.isEmpty())));
}
{
java.util.List theExtension;
theExtension = (((this.extension!= null)&&(!this.extension.isEmpty()))?this.getExtension():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "extension", theExtension), currentHashCode, theExtension, ((this.extension!= null)&&(!this.extension.isEmpty())));
}
{
java.util.List theModifierExtension;
theModifierExtension = (((this.modifierExtension!= null)&&(!this.modifierExtension.isEmpty()))?this.getModifierExtension():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "modifierExtension", theModifierExtension), currentHashCode, theModifierExtension, ((this.modifierExtension!= null)&&(!this.modifierExtension.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);
{
Narrative theText;
theText = this.getText();
strategy.appendField(locator, this, "text", buffer, theText, (this.text!= null));
}
{
java.util.List theContained;
theContained = (((this.contained!= null)&&(!this.contained.isEmpty()))?this.getContained():null);
strategy.appendField(locator, this, "contained", buffer, theContained, ((this.contained!= null)&&(!this.contained.isEmpty())));
}
{
java.util.List theExtension;
theExtension = (((this.extension!= null)&&(!this.extension.isEmpty()))?this.getExtension():null);
strategy.appendField(locator, this, "extension", buffer, theExtension, ((this.extension!= null)&&(!this.extension.isEmpty())));
}
{
java.util.List theModifierExtension;
theModifierExtension = (((this.modifierExtension!= null)&&(!this.modifierExtension.isEmpty()))?this.getModifierExtension():null);
strategy.appendField(locator, this, "modifierExtension", buffer, theModifierExtension, ((this.modifierExtension!= null)&&(!this.modifierExtension.isEmpty())));
}
return buffer;
}
public void setContained(java.util.List value) {
this.contained = value;
}
public void setExtension(java.util.List value) {
this.extension = value;
}
public void setModifierExtension(java.util.List value) {
this.modifierExtension = value;
}
}