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

openEHR.v1.template.impl.COMPOSITIONImpl Maven / Gradle / Ivy

The newest version!
/*
 * XML Type:  COMPOSITION
 * Namespace: openEHR/v1/Template
 * Java type: openEHR.v1.template.COMPOSITION
 *
 * Automatically generated - do not modify.
 */
package openEHR.v1.template.impl;
/**
 * An XML COMPOSITION(@openEHR/v1/Template).
 *
 * This is a complex type.
 */
public class COMPOSITIONImpl extends openEHR.v1.template.impl.ArchetypedImpl implements openEHR.v1.template.COMPOSITION
{
    private static final long serialVersionUID = 1L;
    
    public COMPOSITIONImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CONTENT$0 = 
        new javax.xml.namespace.QName("openEHR/v1/Template", "Content");
    private static final javax.xml.namespace.QName CONTEXT$2 = 
        new javax.xml.namespace.QName("openEHR/v1/Template", "Context");
    private static final javax.xml.namespace.QName RULE$4 = 
        new javax.xml.namespace.QName("openEHR/v1/Template", "Rule");
    private static final javax.xml.namespace.QName NAME$6 = 
        new javax.xml.namespace.QName("", "name");
    private static final javax.xml.namespace.QName ANNOTATION$8 = 
        new javax.xml.namespace.QName("", "annotation");
    
    
    /**
     * Gets array of all "Content" elements
     */
    public openEHR.v1.template.ContentItem[] getContentArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(CONTENT$0, targetList);
            openEHR.v1.template.ContentItem[] result = new openEHR.v1.template.ContentItem[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "Content" element
     */
    public openEHR.v1.template.ContentItem getContentArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.ContentItem target = null;
            target = (openEHR.v1.template.ContentItem)get_store().find_element_user(CONTENT$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "Content" element
     */
    public int sizeOfContentArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CONTENT$0);
        }
    }
    
    /**
     * Sets array of all "Content" element
     */
    public void setContentArray(openEHR.v1.template.ContentItem[] contentArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(contentArray, CONTENT$0);
        }
    }
    
    /**
     * Sets ith "Content" element
     */
    public void setContentArray(int i, openEHR.v1.template.ContentItem content)
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.ContentItem target = null;
            target = (openEHR.v1.template.ContentItem)get_store().find_element_user(CONTENT$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(content);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "Content" element
     */
    public openEHR.v1.template.ContentItem insertNewContent(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.ContentItem target = null;
            target = (openEHR.v1.template.ContentItem)get_store().insert_element_user(CONTENT$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "Content" element
     */
    public openEHR.v1.template.ContentItem addNewContent()
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.ContentItem target = null;
            target = (openEHR.v1.template.ContentItem)get_store().add_element_user(CONTENT$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "Content" element
     */
    public void removeContent(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CONTENT$0, i);
        }
    }
    
    /**
     * Gets the "Context" element
     */
    public openEHR.v1.template.EVENTCONTEXT getContext()
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.EVENTCONTEXT target = null;
            target = (openEHR.v1.template.EVENTCONTEXT)get_store().find_element_user(CONTEXT$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "Context" element
     */
    public boolean isSetContext()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CONTEXT$2) != 0;
        }
    }
    
    /**
     * Sets the "Context" element
     */
    public void setContext(openEHR.v1.template.EVENTCONTEXT context)
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.EVENTCONTEXT target = null;
            target = (openEHR.v1.template.EVENTCONTEXT)get_store().find_element_user(CONTEXT$2, 0);
            if (target == null)
            {
                target = (openEHR.v1.template.EVENTCONTEXT)get_store().add_element_user(CONTEXT$2);
            }
            target.set(context);
        }
    }
    
    /**
     * Appends and returns a new empty "Context" element
     */
    public openEHR.v1.template.EVENTCONTEXT addNewContext()
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.EVENTCONTEXT target = null;
            target = (openEHR.v1.template.EVENTCONTEXT)get_store().add_element_user(CONTEXT$2);
            return target;
        }
    }
    
    /**
     * Unsets the "Context" element
     */
    public void unsetContext()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CONTEXT$2, 0);
        }
    }
    
    /**
     * Gets array of all "Rule" elements
     */
    public openEHR.v1.template.Statement[] getRuleArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(RULE$4, targetList);
            openEHR.v1.template.Statement[] result = new openEHR.v1.template.Statement[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "Rule" element
     */
    public openEHR.v1.template.Statement getRuleArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.Statement target = null;
            target = (openEHR.v1.template.Statement)get_store().find_element_user(RULE$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "Rule" element
     */
    public int sizeOfRuleArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(RULE$4);
        }
    }
    
    /**
     * Sets array of all "Rule" element
     */
    public void setRuleArray(openEHR.v1.template.Statement[] ruleArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(ruleArray, RULE$4);
        }
    }
    
    /**
     * Sets ith "Rule" element
     */
    public void setRuleArray(int i, openEHR.v1.template.Statement rule)
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.Statement target = null;
            target = (openEHR.v1.template.Statement)get_store().find_element_user(RULE$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(rule);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "Rule" element
     */
    public openEHR.v1.template.Statement insertNewRule(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.Statement target = null;
            target = (openEHR.v1.template.Statement)get_store().insert_element_user(RULE$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "Rule" element
     */
    public openEHR.v1.template.Statement addNewRule()
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.Statement target = null;
            target = (openEHR.v1.template.Statement)get_store().add_element_user(RULE$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "Rule" element
     */
    public void removeRule(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(RULE$4, i);
        }
    }
    
    /**
     * Gets the "name" attribute
     */
    public java.lang.String getName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "name" attribute
     */
    public org.apache.xmlbeans.XmlString xgetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$6);
            return target;
        }
    }
    
    /**
     * True if has "name" attribute
     */
    public boolean isSetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(NAME$6) != null;
        }
    }
    
    /**
     * Sets the "name" attribute
     */
    public void setName(java.lang.String name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$6);
            }
            target.setStringValue(name);
        }
    }
    
    /**
     * Sets (as xml) the "name" attribute
     */
    public void xsetName(org.apache.xmlbeans.XmlString name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$6);
            }
            target.set(name);
        }
    }
    
    /**
     * Unsets the "name" attribute
     */
    public void unsetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(NAME$6);
        }
    }
    
    /**
     * Gets the "annotation" attribute
     */
    public java.lang.String getAnnotation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ANNOTATION$8);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "annotation" attribute
     */
    public org.apache.xmlbeans.XmlString xgetAnnotation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ANNOTATION$8);
            return target;
        }
    }
    
    /**
     * True if has "annotation" attribute
     */
    public boolean isSetAnnotation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(ANNOTATION$8) != null;
        }
    }
    
    /**
     * Sets the "annotation" attribute
     */
    public void setAnnotation(java.lang.String annotation)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ANNOTATION$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ANNOTATION$8);
            }
            target.setStringValue(annotation);
        }
    }
    
    /**
     * Sets (as xml) the "annotation" attribute
     */
    public void xsetAnnotation(org.apache.xmlbeans.XmlString annotation)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ANNOTATION$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ANNOTATION$8);
            }
            target.set(annotation);
        }
    }
    
    /**
     * Unsets the "annotation" attribute
     */
    public void unsetAnnotation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(ANNOTATION$8);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy