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

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

The newest version!
/*
 * XML Type:  CLUSTER
 * Namespace: openEHR/v1/Template
 * Java type: openEHR.v1.template.CLUSTER
 *
 * Automatically generated - do not modify.
 */
package openEHR.v1.template.impl;
/**
 * An XML CLUSTER(@openEHR/v1/Template).
 *
 * This is a complex type.
 */
public class CLUSTERImpl extends openEHR.v1.template.impl.ITEMImpl implements openEHR.v1.template.CLUSTER
{
    private static final long serialVersionUID = 1L;
    
    public CLUSTERImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ITEMS$0 = 
        new javax.xml.namespace.QName("openEHR/v1/Template", "Items");
    
    
    /**
     * Gets array of all "Items" elements
     */
    public openEHR.v1.template.ITEM[] getItemsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(ITEMS$0, targetList);
            openEHR.v1.template.ITEM[] result = new openEHR.v1.template.ITEM[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "Items" element
     */
    public openEHR.v1.template.ITEM getItemsArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.ITEM target = null;
            target = (openEHR.v1.template.ITEM)get_store().find_element_user(ITEMS$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "Items" element
     */
    public int sizeOfItemsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ITEMS$0);
        }
    }
    
    /**
     * Sets array of all "Items" element
     */
    public void setItemsArray(openEHR.v1.template.ITEM[] itemsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(itemsArray, ITEMS$0);
        }
    }
    
    /**
     * Sets ith "Items" element
     */
    public void setItemsArray(int i, openEHR.v1.template.ITEM items)
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.ITEM target = null;
            target = (openEHR.v1.template.ITEM)get_store().find_element_user(ITEMS$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(items);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "Items" element
     */
    public openEHR.v1.template.ITEM insertNewItems(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.ITEM target = null;
            target = (openEHR.v1.template.ITEM)get_store().insert_element_user(ITEMS$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "Items" element
     */
    public openEHR.v1.template.ITEM addNewItems()
    {
        synchronized (monitor())
        {
            check_orphaned();
            openEHR.v1.template.ITEM target = null;
            target = (openEHR.v1.template.ITEM)get_store().add_element_user(ITEMS$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "Items" element
     */
    public void removeItems(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ITEMS$0, i);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy