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

org.openehr.schemas.v1.impl.CREALImpl Maven / Gradle / Ivy

/*
 * XML Type:  C_REAL
 * Namespace: http://schemas.openehr.org/v1
 * Java type: org.openehr.schemas.v1.CREAL
 *
 * Automatically generated - do not modify.
 */
package org.openehr.schemas.v1.impl;
/**
 * An XML C_REAL(@http://schemas.openehr.org/v1).
 *
 * This is a complex type.
 */
public class CREALImpl extends org.openehr.schemas.v1.impl.CPRIMITIVEImpl implements org.openehr.schemas.v1.CREAL
{
    private static final long serialVersionUID = 1L;
    
    public CREALImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName LIST$0 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "list");
    private static final javax.xml.namespace.QName RANGE$2 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "range");
    private static final javax.xml.namespace.QName ASSUMEDVALUE$4 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "assumed_value");
    
    
    /**
     * Gets array of all "list" elements
     */
    public float[] getListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(LIST$0, targetList);
            float[] result = new float[targetList.size()];
            for (int i = 0, len = targetList.size() ; i < len ; i++)
                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getFloatValue();
            return result;
        }
    }
    
    /**
     * Gets ith "list" element
     */
    public float getListArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LIST$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target.getFloatValue();
        }
    }
    
    /**
     * Gets (as xml) array of all "list" elements
     */
    public org.apache.xmlbeans.XmlFloat[] xgetListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(LIST$0, targetList);
            org.apache.xmlbeans.XmlFloat[] result = new org.apache.xmlbeans.XmlFloat[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets (as xml) ith "list" element
     */
    public org.apache.xmlbeans.XmlFloat xgetListArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlFloat target = null;
            target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(LIST$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return (org.apache.xmlbeans.XmlFloat)target;
        }
    }
    
    /**
     * Returns number of "list" element
     */
    public int sizeOfListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(LIST$0);
        }
    }
    
    /**
     * Sets array of all "list" element
     */
    public void setListArray(float[] listArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(listArray, LIST$0);
        }
    }
    
    /**
     * Sets ith "list" element
     */
    public void setListArray(int i, float list)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LIST$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.setFloatValue(list);
        }
    }
    
    /**
     * Sets (as xml) array of all "list" element
     */
    public void xsetListArray(org.apache.xmlbeans.XmlFloat[]listArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(listArray, LIST$0);
        }
    }
    
    /**
     * Sets (as xml) ith "list" element
     */
    public void xsetListArray(int i, org.apache.xmlbeans.XmlFloat list)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlFloat target = null;
            target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(LIST$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(list);
        }
    }
    
    /**
     * Inserts the value as the ith "list" element
     */
    public void insertList(int i, float list)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = 
                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(LIST$0, i);
            target.setFloatValue(list);
        }
    }
    
    /**
     * Appends the value as the last "list" element
     */
    public void addList(float list)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(LIST$0);
            target.setFloatValue(list);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "list" element
     */
    public org.apache.xmlbeans.XmlFloat insertNewList(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlFloat target = null;
            target = (org.apache.xmlbeans.XmlFloat)get_store().insert_element_user(LIST$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "list" element
     */
    public org.apache.xmlbeans.XmlFloat addNewList()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlFloat target = null;
            target = (org.apache.xmlbeans.XmlFloat)get_store().add_element_user(LIST$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "list" element
     */
    public void removeList(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(LIST$0, i);
        }
    }
    
    /**
     * Gets the "range" element
     */
    public org.openehr.schemas.v1.IntervalOfReal getRange()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.IntervalOfReal target = null;
            target = (org.openehr.schemas.v1.IntervalOfReal)get_store().find_element_user(RANGE$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "range" element
     */
    public boolean isSetRange()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(RANGE$2) != 0;
        }
    }
    
    /**
     * Sets the "range" element
     */
    public void setRange(org.openehr.schemas.v1.IntervalOfReal range)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.IntervalOfReal target = null;
            target = (org.openehr.schemas.v1.IntervalOfReal)get_store().find_element_user(RANGE$2, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.IntervalOfReal)get_store().add_element_user(RANGE$2);
            }
            target.set(range);
        }
    }
    
    /**
     * Appends and returns a new empty "range" element
     */
    public org.openehr.schemas.v1.IntervalOfReal addNewRange()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.IntervalOfReal target = null;
            target = (org.openehr.schemas.v1.IntervalOfReal)get_store().add_element_user(RANGE$2);
            return target;
        }
    }
    
    /**
     * Unsets the "range" element
     */
    public void unsetRange()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(RANGE$2, 0);
        }
    }
    
    /**
     * Gets the "assumed_value" element
     */
    public float getAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ASSUMEDVALUE$4, 0);
            if (target == null)
            {
                return 0.0f;
            }
            return target.getFloatValue();
        }
    }
    
    /**
     * Gets (as xml) the "assumed_value" element
     */
    public org.apache.xmlbeans.XmlFloat xgetAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlFloat target = null;
            target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(ASSUMEDVALUE$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "assumed_value" element
     */
    public boolean isSetAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ASSUMEDVALUE$4) != 0;
        }
    }
    
    /**
     * Sets the "assumed_value" element
     */
    public void setAssumedValue(float assumedValue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ASSUMEDVALUE$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ASSUMEDVALUE$4);
            }
            target.setFloatValue(assumedValue);
        }
    }
    
    /**
     * Sets (as xml) the "assumed_value" element
     */
    public void xsetAssumedValue(org.apache.xmlbeans.XmlFloat assumedValue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlFloat target = null;
            target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(ASSUMEDVALUE$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlFloat)get_store().add_element_user(ASSUMEDVALUE$4);
            }
            target.set(assumedValue);
        }
    }
    
    /**
     * Unsets the "assumed_value" element
     */
    public void unsetAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ASSUMEDVALUE$4, 0);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy