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

org.somda.sdc.biceps.model.participant.BaseDemographics Maven / Gradle / Ivy

Go to download

SDCri is a set of Java libraries that implements a network communication framework conforming with the IEEE 11073 SDC specifications. This project implements the model for IEEE 11073-10207.

The newest version!

package org.somda.sdc.biceps.model.participant;

import java.util.ArrayList;
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.XmlSeeAlso;
import jakarta.xml.bind.annotation.XmlType;
import org.jetbrains.annotations.Nullable;
import org.jvnet.jaxb.lang.CopyStrategy;
import org.jvnet.jaxb.lang.CopyTo;
import org.jvnet.jaxb.lang.JAXBCopyStrategy;
import org.jvnet.jaxb.lang.JAXBToStringStrategy;
import org.jvnet.jaxb.lang.ToString;
import org.jvnet.jaxb.lang.ToStringStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;
import org.somda.sdc.biceps.model.extension.ExtensionType;


/**
 * Definition of basic demographic information.
 * 
 * 

Java class for BaseDemographics complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *         
 *         
 *         
 *         
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BaseDemographics", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = { "extension", "givenname", "middlename", "familyname", "birthname", "title" }) @XmlSeeAlso({ PatientDemographicsCoreData.class }) public class BaseDemographics implements Cloneable, CopyTo, ToString { @XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension") protected ExtensionType extension; /** * Given name of a person. * */ @XmlElement(name = "Givenname", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected String givenname; /** * Middle name of a person. * */ @XmlElement(name = "Middlename", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected List middlename; /** * Family name of a person. * */ @XmlElement(name = "Familyname", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected String familyname; /** * Birth name of a person. * */ @XmlElement(name = "Birthname", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected String birthname; /** * Title of a person. * */ @XmlElement(name = "Title", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected String title; /** * Gets the value of the extension property. * * @return * possible object is * {@link ExtensionType } * */ @Nullable public ExtensionType getExtension() { return extension; } /** * Sets the value of the extension property. * * @param value * allowed object is * {@link ExtensionType } * */ public void setExtension( @Nullable ExtensionType value) { this.extension = value; } /** * Given name of a person. * * @return * possible object is * {@link String } * */ @Nullable public String getGivenname() { return givenname; } /** * Sets the value of the givenname property. * * @param value * allowed object is * {@link String } * * @see #getGivenname() */ public void setGivenname( @Nullable String value) { this.givenname = value; } /** * Middle name of a person. * * Gets the value of the middlename 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 middlename property.

* *

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

*
     * getMiddlename().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link String } *

* * * @return * The value of the middlename property. */ public List getMiddlename() { if (middlename == null) { middlename = new ArrayList<>(); } return this.middlename; } /** * Family name of a person. * * @return * possible object is * {@link String } * */ @Nullable public String getFamilyname() { return familyname; } /** * Sets the value of the familyname property. * * @param value * allowed object is * {@link String } * * @see #getFamilyname() */ public void setFamilyname( @Nullable String value) { this.familyname = value; } /** * Birth name of a person. * * @return * possible object is * {@link String } * */ @Nullable public String getBirthname() { return birthname; } /** * Sets the value of the birthname property. * * @param value * allowed object is * {@link String } * * @see #getBirthname() */ public void setBirthname( @Nullable String value) { this.birthname = value; } /** * Title of a person. * * @return * possible object is * {@link String } * */ @Nullable public String getTitle() { return title; } /** * Sets the value of the title property. * * @param value * allowed object is * {@link String } * * @see #getTitle() */ public void setTitle( @Nullable String value) { this.title = value; } public void setMiddlename( @Nullable List value) { this.middlename = null; if (value!= null) { List draftl = this.getMiddlename(); draftl.addAll(value); } } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final BaseDemographics that = ((BaseDemographics) object); { ExtensionType leftExtension; leftExtension = this.getExtension(); ExtensionType rightExtension; rightExtension = that.getExtension(); if (this.extension!= null) { if (that.extension!= null) { if (!leftExtension.equals(rightExtension)) { return false; } } else { return false; } } else { if (that.extension!= null) { return false; } } } { String leftGivenname; leftGivenname = this.getGivenname(); String rightGivenname; rightGivenname = that.getGivenname(); if (this.givenname!= null) { if (that.givenname!= null) { if (!leftGivenname.equals(rightGivenname)) { return false; } } else { return false; } } else { if (that.givenname!= null) { return false; } } } { List leftMiddlename; leftMiddlename = (((this.middlename!= null)&&(!this.middlename.isEmpty()))?this.getMiddlename():null); List rightMiddlename; rightMiddlename = (((that.middlename!= null)&&(!that.middlename.isEmpty()))?that.getMiddlename():null); if ((this.middlename!= null)&&(!this.middlename.isEmpty())) { if ((that.middlename!= null)&&(!that.middlename.isEmpty())) { if (!leftMiddlename.equals(rightMiddlename)) { return false; } } else { return false; } } else { if ((that.middlename!= null)&&(!that.middlename.isEmpty())) { return false; } } } { String leftFamilyname; leftFamilyname = this.getFamilyname(); String rightFamilyname; rightFamilyname = that.getFamilyname(); if (this.familyname!= null) { if (that.familyname!= null) { if (!leftFamilyname.equals(rightFamilyname)) { return false; } } else { return false; } } else { if (that.familyname!= null) { return false; } } } { String leftBirthname; leftBirthname = this.getBirthname(); String rightBirthname; rightBirthname = that.getBirthname(); if (this.birthname!= null) { if (that.birthname!= null) { if (!leftBirthname.equals(rightBirthname)) { return false; } } else { return false; } } else { if (that.birthname!= null) { return false; } } } { String leftTitle; leftTitle = this.getTitle(); String rightTitle; rightTitle = that.getTitle(); if (this.title!= null) { if (that.title!= null) { if (!leftTitle.equals(rightTitle)) { return false; } } else { return false; } } else { if (that.title!= null) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; { currentHashCode = (currentHashCode* 31); ExtensionType theExtension; theExtension = this.getExtension(); if (this.extension!= null) { currentHashCode += theExtension.hashCode(); } } { currentHashCode = (currentHashCode* 31); String theGivenname; theGivenname = this.getGivenname(); if (this.givenname!= null) { currentHashCode += theGivenname.hashCode(); } } { currentHashCode = (currentHashCode* 31); List theMiddlename; theMiddlename = (((this.middlename!= null)&&(!this.middlename.isEmpty()))?this.getMiddlename():null); if ((this.middlename!= null)&&(!this.middlename.isEmpty())) { currentHashCode += theMiddlename.hashCode(); } } { currentHashCode = (currentHashCode* 31); String theFamilyname; theFamilyname = this.getFamilyname(); if (this.familyname!= null) { currentHashCode += theFamilyname.hashCode(); } } { currentHashCode = (currentHashCode* 31); String theBirthname; theBirthname = this.getBirthname(); if (this.birthname!= null) { currentHashCode += theBirthname.hashCode(); } } { currentHashCode = (currentHashCode* 31); String theTitle; theTitle = this.getTitle(); if (this.title!= null) { currentHashCode += theTitle.hashCode(); } } return currentHashCode; } @Override public String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.getInstance(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } @Override 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; } @Override public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { ExtensionType theExtension; theExtension = this.getExtension(); strategy.appendField(locator, this, "extension", buffer, theExtension, (this.extension!= null)); } { String theGivenname; theGivenname = this.getGivenname(); strategy.appendField(locator, this, "givenname", buffer, theGivenname, (this.givenname!= null)); } { List theMiddlename; theMiddlename = (((this.middlename!= null)&&(!this.middlename.isEmpty()))?this.getMiddlename():null); strategy.appendField(locator, this, "middlename", buffer, theMiddlename, ((this.middlename!= null)&&(!this.middlename.isEmpty()))); } { String theFamilyname; theFamilyname = this.getFamilyname(); strategy.appendField(locator, this, "familyname", buffer, theFamilyname, (this.familyname!= null)); } { String theBirthname; theBirthname = this.getBirthname(); strategy.appendField(locator, this, "birthname", buffer, theBirthname, (this.birthname!= null)); } { String theTitle; theTitle = this.getTitle(); strategy.appendField(locator, this, "title", buffer, theTitle, (this.title!= null)); } return buffer; } @Override public Object clone() { return copyTo(createNewInstance()); } @Override public Object copyTo(Object target) { final CopyStrategy strategy = JAXBCopyStrategy.getInstance(); return copyTo(null, target, strategy); } @Override public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof BaseDemographics) { final BaseDemographics copy = ((BaseDemographics) draftCopy); { Boolean extensionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.extension!= null)); if (extensionShouldBeCopiedAndSet == Boolean.TRUE) { ExtensionType sourceExtension; sourceExtension = this.getExtension(); ExtensionType copyExtension = ((ExtensionType) strategy.copy(LocatorUtils.property(locator, "extension", sourceExtension), sourceExtension, (this.extension!= null))); copy.setExtension(copyExtension); } else { if (extensionShouldBeCopiedAndSet == Boolean.FALSE) { copy.extension = null; } } } { Boolean givennameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.givenname!= null)); if (givennameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceGivenname; sourceGivenname = this.getGivenname(); String copyGivenname = ((String) strategy.copy(LocatorUtils.property(locator, "givenname", sourceGivenname), sourceGivenname, (this.givenname!= null))); copy.setGivenname(copyGivenname); } else { if (givennameShouldBeCopiedAndSet == Boolean.FALSE) { copy.givenname = null; } } } { Boolean middlenameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.middlename!= null)&&(!this.middlename.isEmpty()))); if (middlenameShouldBeCopiedAndSet == Boolean.TRUE) { List sourceMiddlename; sourceMiddlename = (((this.middlename!= null)&&(!this.middlename.isEmpty()))?this.getMiddlename():null); @SuppressWarnings("unchecked") List copyMiddlename = ((List ) strategy.copy(LocatorUtils.property(locator, "middlename", sourceMiddlename), sourceMiddlename, ((this.middlename!= null)&&(!this.middlename.isEmpty())))); copy.setMiddlename(copyMiddlename); } else { if (middlenameShouldBeCopiedAndSet == Boolean.FALSE) { copy.middlename = null; } } } { Boolean familynameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.familyname!= null)); if (familynameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceFamilyname; sourceFamilyname = this.getFamilyname(); String copyFamilyname = ((String) strategy.copy(LocatorUtils.property(locator, "familyname", sourceFamilyname), sourceFamilyname, (this.familyname!= null))); copy.setFamilyname(copyFamilyname); } else { if (familynameShouldBeCopiedAndSet == Boolean.FALSE) { copy.familyname = null; } } } { Boolean birthnameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.birthname!= null)); if (birthnameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceBirthname; sourceBirthname = this.getBirthname(); String copyBirthname = ((String) strategy.copy(LocatorUtils.property(locator, "birthname", sourceBirthname), sourceBirthname, (this.birthname!= null))); copy.setBirthname(copyBirthname); } else { if (birthnameShouldBeCopiedAndSet == Boolean.FALSE) { copy.birthname = null; } } } { Boolean titleShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.title!= null)); if (titleShouldBeCopiedAndSet == Boolean.TRUE) { String sourceTitle; sourceTitle = this.getTitle(); String copyTitle = ((String) strategy.copy(LocatorUtils.property(locator, "title", sourceTitle), sourceTitle, (this.title!= null))); copy.setTitle(copyTitle); } else { if (titleShouldBeCopiedAndSet == Boolean.FALSE) { copy.title = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new BaseDemographics(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy