org.openehr.schemas.v1.impl.DVQUANTITYImpl Maven / Gradle / Ivy
/*
* XML Type: DV_QUANTITY
* Namespace: http://schemas.openehr.org/v1
* Java type: org.openehr.schemas.v1.DVQUANTITY
*
* Automatically generated - do not modify.
*/
package org.openehr.schemas.v1.impl;
/**
* An XML DV_QUANTITY(@http://schemas.openehr.org/v1).
*
* This is a complex type.
*/
public class DVQUANTITYImpl extends org.openehr.schemas.v1.impl.DVAMOUNTImpl implements org.openehr.schemas.v1.DVQUANTITY
{
private static final long serialVersionUID = 1L;
public DVQUANTITYImpl(org.apache.xmlbeans.SchemaType sType)
{
super(sType);
}
private static final javax.xml.namespace.QName MAGNITUDE$0 =
new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "magnitude");
private static final javax.xml.namespace.QName UNITS$2 =
new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "units");
private static final javax.xml.namespace.QName PRECISION$4 =
new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "precision");
/**
* Gets the "magnitude" element
*/
public double getMagnitude()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAGNITUDE$0, 0);
if (target == null)
{
return 0.0;
}
return target.getDoubleValue();
}
}
/**
* Gets (as xml) the "magnitude" element
*/
public org.apache.xmlbeans.XmlDouble xgetMagnitude()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlDouble target = null;
target = (org.apache.xmlbeans.XmlDouble)get_store().find_element_user(MAGNITUDE$0, 0);
return target;
}
}
/**
* Sets the "magnitude" element
*/
public void setMagnitude(double magnitude)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAGNITUDE$0, 0);
if (target == null)
{
target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAGNITUDE$0);
}
target.setDoubleValue(magnitude);
}
}
/**
* Sets (as xml) the "magnitude" element
*/
public void xsetMagnitude(org.apache.xmlbeans.XmlDouble magnitude)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlDouble target = null;
target = (org.apache.xmlbeans.XmlDouble)get_store().find_element_user(MAGNITUDE$0, 0);
if (target == null)
{
target = (org.apache.xmlbeans.XmlDouble)get_store().add_element_user(MAGNITUDE$0);
}
target.set(magnitude);
}
}
/**
* Gets the "units" element
*/
public java.lang.String getUnits()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNITS$2, 0);
if (target == null)
{
return null;
}
return target.getStringValue();
}
}
/**
* Gets (as xml) the "units" element
*/
public org.apache.xmlbeans.XmlString xgetUnits()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(UNITS$2, 0);
return target;
}
}
/**
* Sets the "units" element
*/
public void setUnits(java.lang.String units)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNITS$2, 0);
if (target == null)
{
target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNITS$2);
}
target.setStringValue(units);
}
}
/**
* Sets (as xml) the "units" element
*/
public void xsetUnits(org.apache.xmlbeans.XmlString units)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(UNITS$2, 0);
if (target == null)
{
target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(UNITS$2);
}
target.set(units);
}
}
/**
* Gets the "precision" element
*/
public int getPrecision()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PRECISION$4, 0);
if (target == null)
{
return 0;
}
return target.getIntValue();
}
}
/**
* Gets (as xml) the "precision" element
*/
public org.apache.xmlbeans.XmlInt xgetPrecision()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlInt target = null;
target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(PRECISION$4, 0);
return target;
}
}
/**
* True if has "precision" element
*/
public boolean isSetPrecision()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(PRECISION$4) != 0;
}
}
/**
* Sets the "precision" element
*/
public void setPrecision(int precision)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PRECISION$4, 0);
if (target == null)
{
target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PRECISION$4);
}
target.setIntValue(precision);
}
}
/**
* Sets (as xml) the "precision" element
*/
public void xsetPrecision(org.apache.xmlbeans.XmlInt precision)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlInt target = null;
target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(PRECISION$4, 0);
if (target == null)
{
target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(PRECISION$4);
}
target.set(precision);
}
}
/**
* Unsets the "precision" element
*/
public void unsetPrecision()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(PRECISION$4, 0);
}
}
}