org.hl7.fhir.Schedule 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: 2023.12.06 at 03:09:41 PM MST
//
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 Schedule complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Schedule">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
* <element name="serviceCategory" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="serviceType" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
* <element name="specialty" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
* <element name="actor" type="{http://hl7.org/fhir}Reference"/>
* <element name="planningHorizon" type="{http://hl7.org/fhir}Period" minOccurs="0"/>
* <element name="comment" type="{http://hl7.org/fhir}string" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Schedule", propOrder = {
"identifier",
"serviceCategory",
"serviceType",
"specialty",
"actor",
"planningHorizon",
"comment"
})
public class Schedule
extends DomainResource
implements Equals2, HashCode2, ToString2
{
protected List identifier;
protected CodeableConcept serviceCategory;
protected List serviceType;
protected List specialty;
@XmlElement(required = true)
protected Reference actor;
protected Period planningHorizon;
protected org.hl7.fhir.String comment;
/**
* 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 serviceCategory property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getServiceCategory() {
return serviceCategory;
}
/**
* Sets the value of the serviceCategory property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setServiceCategory(CodeableConcept value) {
this.serviceCategory = value;
}
/**
* Gets the value of the serviceType 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 serviceType property.
*
*
* For example, to add a new item, do as follows:
*
* getServiceType().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodeableConcept }
*
*
*/
public List getServiceType() {
if (serviceType == null) {
serviceType = new ArrayList();
}
return this.serviceType;
}
/**
* Gets the value of the specialty 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 specialty property.
*
*
* For example, to add a new item, do as follows:
*
* getSpecialty().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodeableConcept }
*
*
*/
public List getSpecialty() {
if (specialty == null) {
specialty = new ArrayList();
}
return this.specialty;
}
/**
* Gets the value of the actor property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getActor() {
return actor;
}
/**
* Sets the value of the actor property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setActor(Reference value) {
this.actor = value;
}
/**
* Gets the value of the planningHorizon property.
*
* @return
* possible object is
* {@link Period }
*
*/
public Period getPlanningHorizon() {
return planningHorizon;
}
/**
* Sets the value of the planningHorizon property.
*
* @param value
* allowed object is
* {@link Period }
*
*/
public void setPlanningHorizon(Period value) {
this.planningHorizon = value;
}
/**
* Gets the value of the comment property.
*
* @return
* possible object is
* {@link org.hl7.fhir.String }
*
*/
public org.hl7.fhir.String getComment() {
return comment;
}
/**
* Sets the value of the comment property.
*
* @param value
* allowed object is
* {@link org.hl7.fhir.String }
*
*/
public void setComment(org.hl7.fhir.String value) {
this.comment = value;
}
public Schedule withIdentifier(Identifier... values) {
if (values!= null) {
for (Identifier value: values) {
getIdentifier().add(value);
}
}
return this;
}
public Schedule withIdentifier(Collection values) {
if (values!= null) {
getIdentifier().addAll(values);
}
return this;
}
public Schedule withServiceCategory(CodeableConcept value) {
setServiceCategory(value);
return this;
}
public Schedule withServiceType(CodeableConcept... values) {
if (values!= null) {
for (CodeableConcept value: values) {
getServiceType().add(value);
}
}
return this;
}
public Schedule withServiceType(Collection values) {
if (values!= null) {
getServiceType().addAll(values);
}
return this;
}
public Schedule withSpecialty(CodeableConcept... values) {
if (values!= null) {
for (CodeableConcept value: values) {
getSpecialty().add(value);
}
}
return this;
}
public Schedule withSpecialty(Collection values) {
if (values!= null) {
getSpecialty().addAll(values);
}
return this;
}
public Schedule withActor(Reference value) {
setActor(value);
return this;
}
public Schedule withPlanningHorizon(Period value) {
setPlanningHorizon(value);
return this;
}
public Schedule withComment(org.hl7.fhir.String value) {
setComment(value);
return this;
}
@Override
public Schedule withText(Narrative value) {
setText(value);
return this;
}
@Override
public Schedule withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public Schedule withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public Schedule withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public Schedule withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public Schedule withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public Schedule withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public Schedule withId(Id value) {
setId(value);
return this;
}
@Override
public Schedule withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public Schedule withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public Schedule 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 Schedule that = ((Schedule) 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;
}
}
{
CodeableConcept lhsServiceCategory;
lhsServiceCategory = this.getServiceCategory();
CodeableConcept rhsServiceCategory;
rhsServiceCategory = that.getServiceCategory();
if (!strategy.equals(LocatorUtils.property(thisLocator, "serviceCategory", lhsServiceCategory), LocatorUtils.property(thatLocator, "serviceCategory", rhsServiceCategory), lhsServiceCategory, rhsServiceCategory, (this.serviceCategory!= null), (that.serviceCategory!= null))) {
return false;
}
}
{
List lhsServiceType;
lhsServiceType = (((this.serviceType!= null)&&(!this.serviceType.isEmpty()))?this.getServiceType():null);
List rhsServiceType;
rhsServiceType = (((that.serviceType!= null)&&(!that.serviceType.isEmpty()))?that.getServiceType():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "serviceType", lhsServiceType), LocatorUtils.property(thatLocator, "serviceType", rhsServiceType), lhsServiceType, rhsServiceType, ((this.serviceType!= null)&&(!this.serviceType.isEmpty())), ((that.serviceType!= null)&&(!that.serviceType.isEmpty())))) {
return false;
}
}
{
List lhsSpecialty;
lhsSpecialty = (((this.specialty!= null)&&(!this.specialty.isEmpty()))?this.getSpecialty():null);
List rhsSpecialty;
rhsSpecialty = (((that.specialty!= null)&&(!that.specialty.isEmpty()))?that.getSpecialty():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "specialty", lhsSpecialty), LocatorUtils.property(thatLocator, "specialty", rhsSpecialty), lhsSpecialty, rhsSpecialty, ((this.specialty!= null)&&(!this.specialty.isEmpty())), ((that.specialty!= null)&&(!that.specialty.isEmpty())))) {
return false;
}
}
{
Reference lhsActor;
lhsActor = this.getActor();
Reference rhsActor;
rhsActor = that.getActor();
if (!strategy.equals(LocatorUtils.property(thisLocator, "actor", lhsActor), LocatorUtils.property(thatLocator, "actor", rhsActor), lhsActor, rhsActor, (this.actor!= null), (that.actor!= null))) {
return false;
}
}
{
Period lhsPlanningHorizon;
lhsPlanningHorizon = this.getPlanningHorizon();
Period rhsPlanningHorizon;
rhsPlanningHorizon = that.getPlanningHorizon();
if (!strategy.equals(LocatorUtils.property(thisLocator, "planningHorizon", lhsPlanningHorizon), LocatorUtils.property(thatLocator, "planningHorizon", rhsPlanningHorizon), lhsPlanningHorizon, rhsPlanningHorizon, (this.planningHorizon!= null), (that.planningHorizon!= null))) {
return false;
}
}
{
org.hl7.fhir.String lhsComment;
lhsComment = this.getComment();
org.hl7.fhir.String rhsComment;
rhsComment = that.getComment();
if (!strategy.equals(LocatorUtils.property(thisLocator, "comment", lhsComment), LocatorUtils.property(thatLocator, "comment", rhsComment), lhsComment, rhsComment, (this.comment!= null), (that.comment!= 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())));
}
{
CodeableConcept theServiceCategory;
theServiceCategory = this.getServiceCategory();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "serviceCategory", theServiceCategory), currentHashCode, theServiceCategory, (this.serviceCategory!= null));
}
{
List theServiceType;
theServiceType = (((this.serviceType!= null)&&(!this.serviceType.isEmpty()))?this.getServiceType():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "serviceType", theServiceType), currentHashCode, theServiceType, ((this.serviceType!= null)&&(!this.serviceType.isEmpty())));
}
{
List theSpecialty;
theSpecialty = (((this.specialty!= null)&&(!this.specialty.isEmpty()))?this.getSpecialty():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "specialty", theSpecialty), currentHashCode, theSpecialty, ((this.specialty!= null)&&(!this.specialty.isEmpty())));
}
{
Reference theActor;
theActor = this.getActor();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "actor", theActor), currentHashCode, theActor, (this.actor!= null));
}
{
Period thePlanningHorizon;
thePlanningHorizon = this.getPlanningHorizon();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "planningHorizon", thePlanningHorizon), currentHashCode, thePlanningHorizon, (this.planningHorizon!= null));
}
{
org.hl7.fhir.String theComment;
theComment = this.getComment();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "comment", theComment), currentHashCode, theComment, (this.comment!= 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())));
}
{
CodeableConcept theServiceCategory;
theServiceCategory = this.getServiceCategory();
strategy.appendField(locator, this, "serviceCategory", buffer, theServiceCategory, (this.serviceCategory!= null));
}
{
List theServiceType;
theServiceType = (((this.serviceType!= null)&&(!this.serviceType.isEmpty()))?this.getServiceType():null);
strategy.appendField(locator, this, "serviceType", buffer, theServiceType, ((this.serviceType!= null)&&(!this.serviceType.isEmpty())));
}
{
List theSpecialty;
theSpecialty = (((this.specialty!= null)&&(!this.specialty.isEmpty()))?this.getSpecialty():null);
strategy.appendField(locator, this, "specialty", buffer, theSpecialty, ((this.specialty!= null)&&(!this.specialty.isEmpty())));
}
{
Reference theActor;
theActor = this.getActor();
strategy.appendField(locator, this, "actor", buffer, theActor, (this.actor!= null));
}
{
Period thePlanningHorizon;
thePlanningHorizon = this.getPlanningHorizon();
strategy.appendField(locator, this, "planningHorizon", buffer, thePlanningHorizon, (this.planningHorizon!= null));
}
{
org.hl7.fhir.String theComment;
theComment = this.getComment();
strategy.appendField(locator, this, "comment", buffer, theComment, (this.comment!= null));
}
return buffer;
}
}