org.somda.sdc.biceps.model.participant.LocationDetail Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biceps-model Show documentation
Show all versions of biceps-model Show documentation
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 jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
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;
/**
* Details about a location. This information is derived from the HL7 PV1-3 PL.
*
* Java class for LocationDetail complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LocationDetail", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = {
"extension"
})
public class LocationDetail implements Cloneable, CopyTo, ToString
{
@XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension")
protected ExtensionType extension;
/**
* Name of a point of care unit, e.g., nursing unit, department, or clinic.
*
*/
@XmlAttribute(name = "PoC")
protected String poC;
/**
* Name of the room of a location.
*
*/
@XmlAttribute(name = "Room")
protected String room;
/**
* Name of the bed of a location.
*
*/
@XmlAttribute(name = "Bed")
protected String bed;
/**
* Name of the facility of a location.
*
*/
@XmlAttribute(name = "Facility")
protected String facility;
/**
* Name of the building of a location.
*
*/
@XmlAttribute(name = "Building")
protected String building;
/**
* Name of the floor of a building.
*
*/
@XmlAttribute(name = "Floor")
protected String floor;
/**
* 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;
}
/**
* Name of a point of care unit, e.g., nursing unit, department, or clinic.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getPoC() {
return poC;
}
/**
* Sets the value of the poC property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getPoC()
*/
public void setPoC(
@Nullable
String value) {
this.poC = value;
}
/**
* Name of the room of a location.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getRoom() {
return room;
}
/**
* Sets the value of the room property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getRoom()
*/
public void setRoom(
@Nullable
String value) {
this.room = value;
}
/**
* Name of the bed of a location.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getBed() {
return bed;
}
/**
* Sets the value of the bed property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getBed()
*/
public void setBed(
@Nullable
String value) {
this.bed = value;
}
/**
* Name of the facility of a location.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getFacility() {
return facility;
}
/**
* Sets the value of the facility property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getFacility()
*/
public void setFacility(
@Nullable
String value) {
this.facility = value;
}
/**
* Name of the building of a location.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getBuilding() {
return building;
}
/**
* Sets the value of the building property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getBuilding()
*/
public void setBuilding(
@Nullable
String value) {
this.building = value;
}
/**
* Name of the floor of a building.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getFloor() {
return floor;
}
/**
* Sets the value of the floor property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getFloor()
*/
public void setFloor(
@Nullable
String value) {
this.floor = value;
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final LocationDetail that = ((LocationDetail) 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 leftPoC;
leftPoC = this.getPoC();
String rightPoC;
rightPoC = that.getPoC();
if (this.poC!= null) {
if (that.poC!= null) {
if (!leftPoC.equals(rightPoC)) {
return false;
}
} else {
return false;
}
} else {
if (that.poC!= null) {
return false;
}
}
}
{
String leftRoom;
leftRoom = this.getRoom();
String rightRoom;
rightRoom = that.getRoom();
if (this.room!= null) {
if (that.room!= null) {
if (!leftRoom.equals(rightRoom)) {
return false;
}
} else {
return false;
}
} else {
if (that.room!= null) {
return false;
}
}
}
{
String leftBed;
leftBed = this.getBed();
String rightBed;
rightBed = that.getBed();
if (this.bed!= null) {
if (that.bed!= null) {
if (!leftBed.equals(rightBed)) {
return false;
}
} else {
return false;
}
} else {
if (that.bed!= null) {
return false;
}
}
}
{
String leftFacility;
leftFacility = this.getFacility();
String rightFacility;
rightFacility = that.getFacility();
if (this.facility!= null) {
if (that.facility!= null) {
if (!leftFacility.equals(rightFacility)) {
return false;
}
} else {
return false;
}
} else {
if (that.facility!= null) {
return false;
}
}
}
{
String leftBuilding;
leftBuilding = this.getBuilding();
String rightBuilding;
rightBuilding = that.getBuilding();
if (this.building!= null) {
if (that.building!= null) {
if (!leftBuilding.equals(rightBuilding)) {
return false;
}
} else {
return false;
}
} else {
if (that.building!= null) {
return false;
}
}
}
{
String leftFloor;
leftFloor = this.getFloor();
String rightFloor;
rightFloor = that.getFloor();
if (this.floor!= null) {
if (that.floor!= null) {
if (!leftFloor.equals(rightFloor)) {
return false;
}
} else {
return false;
}
} else {
if (that.floor!= 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 thePoC;
thePoC = this.getPoC();
if (this.poC!= null) {
currentHashCode += thePoC.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theRoom;
theRoom = this.getRoom();
if (this.room!= null) {
currentHashCode += theRoom.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theBed;
theBed = this.getBed();
if (this.bed!= null) {
currentHashCode += theBed.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theFacility;
theFacility = this.getFacility();
if (this.facility!= null) {
currentHashCode += theFacility.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theBuilding;
theBuilding = this.getBuilding();
if (this.building!= null) {
currentHashCode += theBuilding.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theFloor;
theFloor = this.getFloor();
if (this.floor!= null) {
currentHashCode += theFloor.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 thePoC;
thePoC = this.getPoC();
strategy.appendField(locator, this, "poC", buffer, thePoC, (this.poC!= null));
}
{
String theRoom;
theRoom = this.getRoom();
strategy.appendField(locator, this, "room", buffer, theRoom, (this.room!= null));
}
{
String theBed;
theBed = this.getBed();
strategy.appendField(locator, this, "bed", buffer, theBed, (this.bed!= null));
}
{
String theFacility;
theFacility = this.getFacility();
strategy.appendField(locator, this, "facility", buffer, theFacility, (this.facility!= null));
}
{
String theBuilding;
theBuilding = this.getBuilding();
strategy.appendField(locator, this, "building", buffer, theBuilding, (this.building!= null));
}
{
String theFloor;
theFloor = this.getFloor();
strategy.appendField(locator, this, "floor", buffer, theFloor, (this.floor!= 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 LocationDetail) {
final LocationDetail copy = ((LocationDetail) 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 poCShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.poC!= null));
if (poCShouldBeCopiedAndSet == Boolean.TRUE) {
String sourcePoC;
sourcePoC = this.getPoC();
String copyPoC = ((String) strategy.copy(LocatorUtils.property(locator, "poC", sourcePoC), sourcePoC, (this.poC!= null)));
copy.setPoC(copyPoC);
} else {
if (poCShouldBeCopiedAndSet == Boolean.FALSE) {
copy.poC = null;
}
}
}
{
Boolean roomShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.room!= null));
if (roomShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceRoom;
sourceRoom = this.getRoom();
String copyRoom = ((String) strategy.copy(LocatorUtils.property(locator, "room", sourceRoom), sourceRoom, (this.room!= null)));
copy.setRoom(copyRoom);
} else {
if (roomShouldBeCopiedAndSet == Boolean.FALSE) {
copy.room = null;
}
}
}
{
Boolean bedShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.bed!= null));
if (bedShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceBed;
sourceBed = this.getBed();
String copyBed = ((String) strategy.copy(LocatorUtils.property(locator, "bed", sourceBed), sourceBed, (this.bed!= null)));
copy.setBed(copyBed);
} else {
if (bedShouldBeCopiedAndSet == Boolean.FALSE) {
copy.bed = null;
}
}
}
{
Boolean facilityShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.facility!= null));
if (facilityShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceFacility;
sourceFacility = this.getFacility();
String copyFacility = ((String) strategy.copy(LocatorUtils.property(locator, "facility", sourceFacility), sourceFacility, (this.facility!= null)));
copy.setFacility(copyFacility);
} else {
if (facilityShouldBeCopiedAndSet == Boolean.FALSE) {
copy.facility = null;
}
}
}
{
Boolean buildingShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.building!= null));
if (buildingShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceBuilding;
sourceBuilding = this.getBuilding();
String copyBuilding = ((String) strategy.copy(LocatorUtils.property(locator, "building", sourceBuilding), sourceBuilding, (this.building!= null)));
copy.setBuilding(copyBuilding);
} else {
if (buildingShouldBeCopiedAndSet == Boolean.FALSE) {
copy.building = null;
}
}
}
{
Boolean floorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.floor!= null));
if (floorShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceFloor;
sourceFloor = this.getFloor();
String copyFloor = ((String) strategy.copy(LocatorUtils.property(locator, "floor", sourceFloor), sourceFloor, (this.floor!= null)));
copy.setFloor(copyFloor);
} else {
if (floorShouldBeCopiedAndSet == Boolean.FALSE) {
copy.floor = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new LocationDetail();
}
}