
org.hl7.v3.PQ Maven / Gradle / Ivy
Show all versions of ihe-iti Show documentation
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.07.06 at 04:34:42 PM PDT
//
package org.hl7.v3;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
/**
*
* A dimensioned quantity expressing the result of a
* measurement act.
*
*
* Java class for PQ complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="PQ">
* <complexContent>
* <extension base="{urn:hl7-org:v3}QTY">
* <sequence>
* <element name="translation" type="{urn:hl7-org:v3}PQR" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="value" type="{urn:hl7-org:v3}real" />
* <attribute name="unit" type="{urn:hl7-org:v3}cs" default="1" />
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PQ", namespace = "urn:hl7-org:v3", propOrder = {
"translation"
})
@XmlSeeAlso({
SXCMPQ.class,
IVXBPQ.class,
PPDPQ.class,
HXITPQ.class
})
public class PQ
extends QTY
{
@XmlElement(namespace = "urn:hl7-org:v3")
protected List translation;
@XmlAttribute(name = "value")
protected String value;
@XmlAttribute(name = "unit")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String unit;
/**
* Gets the value of the translation 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 translation property.
*
*
* For example, to add a new item, do as follows:
*
* getTranslation().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link PQR }
*
*
*/
public List getTranslation() {
if (translation == null) {
translation = new ArrayList();
}
return this.translation;
}
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the unit property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUnit() {
if (unit == null) {
return "1";
} else {
return unit;
}
}
/**
* Sets the value of the unit property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUnit(String value) {
this.unit = value;
}
public PQ withTranslation(PQR... values) {
if (values!= null) {
for (PQR value: values) {
getTranslation().add(value);
}
}
return this;
}
public PQ withTranslation(Collection values) {
if (values!= null) {
getTranslation().addAll(values);
}
return this;
}
public PQ withValue(String value) {
setValue(value);
return this;
}
public PQ withUnit(String value) {
setUnit(value);
return this;
}
@Override
public PQ withNullFlavor(String... values) {
if (values!= null) {
for (String value: values) {
getNullFlavor().add(value);
}
}
return this;
}
@Override
public PQ withNullFlavor(Collection values) {
if (values!= null) {
getNullFlavor().addAll(values);
}
return this;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}
@Override
public boolean equals(Object that) {
return EqualsBuilder.reflectionEquals(this, that);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
}