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

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

/*
 * XML Type:  C_CODE_PHRASE
 * Namespace: http://schemas.openehr.org/v1
 * Java type: org.openehr.schemas.v1.CCODEPHRASE
 *
 * Automatically generated - do not modify.
 */
package org.openehr.schemas.v1.impl;
/**
 * An XML C_CODE_PHRASE(@http://schemas.openehr.org/v1).
 *
 * This is a complex type.
 */
public class CCODEPHRASEImpl extends org.openehr.schemas.v1.impl.CDOMAINTYPEImpl implements org.openehr.schemas.v1.CCODEPHRASE
{
    private static final long serialVersionUID = 1L;
    
    public CCODEPHRASEImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ASSUMEDVALUE$0 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "assumed_value");
    private static final javax.xml.namespace.QName TERMINOLOGYID$2 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "terminology_id");
    private static final javax.xml.namespace.QName CODELIST$4 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "code_list");
    
    
    /**
     * Gets the "assumed_value" element
     */
    public org.openehr.schemas.v1.CODEPHRASE getAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.CODEPHRASE target = null;
            target = (org.openehr.schemas.v1.CODEPHRASE)get_store().find_element_user(ASSUMEDVALUE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "assumed_value" element
     */
    public boolean isSetAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ASSUMEDVALUE$0) != 0;
        }
    }
    
    /**
     * Sets the "assumed_value" element
     */
    public void setAssumedValue(org.openehr.schemas.v1.CODEPHRASE assumedValue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.CODEPHRASE target = null;
            target = (org.openehr.schemas.v1.CODEPHRASE)get_store().find_element_user(ASSUMEDVALUE$0, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.CODEPHRASE)get_store().add_element_user(ASSUMEDVALUE$0);
            }
            target.set(assumedValue);
        }
    }
    
    /**
     * Appends and returns a new empty "assumed_value" element
     */
    public org.openehr.schemas.v1.CODEPHRASE addNewAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.CODEPHRASE target = null;
            target = (org.openehr.schemas.v1.CODEPHRASE)get_store().add_element_user(ASSUMEDVALUE$0);
            return target;
        }
    }
    
    /**
     * Unsets the "assumed_value" element
     */
    public void unsetAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ASSUMEDVALUE$0, 0);
        }
    }
    
    /**
     * Gets the "terminology_id" element
     */
    public org.openehr.schemas.v1.TERMINOLOGYID getTerminologyId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.TERMINOLOGYID target = null;
            target = (org.openehr.schemas.v1.TERMINOLOGYID)get_store().find_element_user(TERMINOLOGYID$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "terminology_id" element
     */
    public boolean isSetTerminologyId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TERMINOLOGYID$2) != 0;
        }
    }
    
    /**
     * Sets the "terminology_id" element
     */
    public void setTerminologyId(org.openehr.schemas.v1.TERMINOLOGYID terminologyId)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.TERMINOLOGYID target = null;
            target = (org.openehr.schemas.v1.TERMINOLOGYID)get_store().find_element_user(TERMINOLOGYID$2, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.TERMINOLOGYID)get_store().add_element_user(TERMINOLOGYID$2);
            }
            target.set(terminologyId);
        }
    }
    
    /**
     * Appends and returns a new empty "terminology_id" element
     */
    public org.openehr.schemas.v1.TERMINOLOGYID addNewTerminologyId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.TERMINOLOGYID target = null;
            target = (org.openehr.schemas.v1.TERMINOLOGYID)get_store().add_element_user(TERMINOLOGYID$2);
            return target;
        }
    }
    
    /**
     * Unsets the "terminology_id" element
     */
    public void unsetTerminologyId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TERMINOLOGYID$2, 0);
        }
    }
    
    /**
     * Gets array of all "code_list" elements
     */
    public java.lang.String[] getCodeListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(CODELIST$4, targetList);
            java.lang.String[] result = new java.lang.String[targetList.size()];
            for (int i = 0, len = targetList.size() ; i < len ; i++)
                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
            return result;
        }
    }
    
    /**
     * Gets ith "code_list" element
     */
    public java.lang.String getCodeListArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CODELIST$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) array of all "code_list" elements
     */
    public org.apache.xmlbeans.XmlString[] xgetCodeListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(CODELIST$4, targetList);
            org.apache.xmlbeans.XmlString[] result = new org.apache.xmlbeans.XmlString[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets (as xml) ith "code_list" element
     */
    public org.apache.xmlbeans.XmlString xgetCodeListArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CODELIST$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return (org.apache.xmlbeans.XmlString)target;
        }
    }
    
    /**
     * Returns number of "code_list" element
     */
    public int sizeOfCodeListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CODELIST$4);
        }
    }
    
    /**
     * Sets array of all "code_list" element
     */
    public void setCodeListArray(java.lang.String[] codeListArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(codeListArray, CODELIST$4);
        }
    }
    
    /**
     * Sets ith "code_list" element
     */
    public void setCodeListArray(int i, java.lang.String codeList)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CODELIST$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.setStringValue(codeList);
        }
    }
    
    /**
     * Sets (as xml) array of all "code_list" element
     */
    public void xsetCodeListArray(org.apache.xmlbeans.XmlString[]codeListArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(codeListArray, CODELIST$4);
        }
    }
    
    /**
     * Sets (as xml) ith "code_list" element
     */
    public void xsetCodeListArray(int i, org.apache.xmlbeans.XmlString codeList)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CODELIST$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(codeList);
        }
    }
    
    /**
     * Inserts the value as the ith "code_list" element
     */
    public void insertCodeList(int i, java.lang.String codeList)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = 
                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(CODELIST$4, i);
            target.setStringValue(codeList);
        }
    }
    
    /**
     * Appends the value as the last "code_list" element
     */
    public void addCodeList(java.lang.String codeList)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CODELIST$4);
            target.setStringValue(codeList);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "code_list" element
     */
    public org.apache.xmlbeans.XmlString insertNewCodeList(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().insert_element_user(CODELIST$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "code_list" element
     */
    public org.apache.xmlbeans.XmlString addNewCodeList()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(CODELIST$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "code_list" element
     */
    public void removeCodeList(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CODELIST$4, i);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy