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

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

/*
 * XML Type:  HISTORY
 * Namespace: http://schemas.openehr.org/v1
 * Java type: org.openehr.schemas.v1.HISTORY
 *
 * Automatically generated - do not modify.
 */
package org.openehr.schemas.v1.impl;
/**
 * An XML HISTORY(@http://schemas.openehr.org/v1).
 *
 * This is a complex type.
 */
public class HISTORYImpl extends org.openehr.schemas.v1.impl.LOCATABLEImpl implements org.openehr.schemas.v1.HISTORY
{
    private static final long serialVersionUID = 1L;
    
    public HISTORYImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ORIGIN$0 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "origin");
    private static final javax.xml.namespace.QName PERIOD$2 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "period");
    private static final javax.xml.namespace.QName DURATION$4 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "duration");
    private static final javax.xml.namespace.QName EVENTS$6 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "events");
    private static final javax.xml.namespace.QName SUMMARY$8 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "summary");
    
    
    /**
     * Gets the "origin" element
     */
    public org.openehr.schemas.v1.DVDATETIME getOrigin()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDATETIME target = null;
            target = (org.openehr.schemas.v1.DVDATETIME)get_store().find_element_user(ORIGIN$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "origin" element
     */
    public void setOrigin(org.openehr.schemas.v1.DVDATETIME origin)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDATETIME target = null;
            target = (org.openehr.schemas.v1.DVDATETIME)get_store().find_element_user(ORIGIN$0, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.DVDATETIME)get_store().add_element_user(ORIGIN$0);
            }
            target.set(origin);
        }
    }
    
    /**
     * Appends and returns a new empty "origin" element
     */
    public org.openehr.schemas.v1.DVDATETIME addNewOrigin()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDATETIME target = null;
            target = (org.openehr.schemas.v1.DVDATETIME)get_store().add_element_user(ORIGIN$0);
            return target;
        }
    }
    
    /**
     * Gets the "period" element
     */
    public org.openehr.schemas.v1.DVDURATION getPeriod()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDURATION target = null;
            target = (org.openehr.schemas.v1.DVDURATION)get_store().find_element_user(PERIOD$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "period" element
     */
    public boolean isSetPeriod()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PERIOD$2) != 0;
        }
    }
    
    /**
     * Sets the "period" element
     */
    public void setPeriod(org.openehr.schemas.v1.DVDURATION period)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDURATION target = null;
            target = (org.openehr.schemas.v1.DVDURATION)get_store().find_element_user(PERIOD$2, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.DVDURATION)get_store().add_element_user(PERIOD$2);
            }
            target.set(period);
        }
    }
    
    /**
     * Appends and returns a new empty "period" element
     */
    public org.openehr.schemas.v1.DVDURATION addNewPeriod()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDURATION target = null;
            target = (org.openehr.schemas.v1.DVDURATION)get_store().add_element_user(PERIOD$2);
            return target;
        }
    }
    
    /**
     * Unsets the "period" element
     */
    public void unsetPeriod()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PERIOD$2, 0);
        }
    }
    
    /**
     * Gets the "duration" element
     */
    public org.openehr.schemas.v1.DVDURATION getDuration()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDURATION target = null;
            target = (org.openehr.schemas.v1.DVDURATION)get_store().find_element_user(DURATION$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "duration" element
     */
    public boolean isSetDuration()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DURATION$4) != 0;
        }
    }
    
    /**
     * Sets the "duration" element
     */
    public void setDuration(org.openehr.schemas.v1.DVDURATION duration)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDURATION target = null;
            target = (org.openehr.schemas.v1.DVDURATION)get_store().find_element_user(DURATION$4, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.DVDURATION)get_store().add_element_user(DURATION$4);
            }
            target.set(duration);
        }
    }
    
    /**
     * Appends and returns a new empty "duration" element
     */
    public org.openehr.schemas.v1.DVDURATION addNewDuration()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDURATION target = null;
            target = (org.openehr.schemas.v1.DVDURATION)get_store().add_element_user(DURATION$4);
            return target;
        }
    }
    
    /**
     * Unsets the "duration" element
     */
    public void unsetDuration()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DURATION$4, 0);
        }
    }
    
    /**
     * Gets array of all "events" elements
     */
    public org.openehr.schemas.v1.EVENT[] getEventsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(EVENTS$6, targetList);
            org.openehr.schemas.v1.EVENT[] result = new org.openehr.schemas.v1.EVENT[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "events" element
     */
    public org.openehr.schemas.v1.EVENT getEventsArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.EVENT target = null;
            target = (org.openehr.schemas.v1.EVENT)get_store().find_element_user(EVENTS$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "events" element
     */
    public int sizeOfEventsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(EVENTS$6);
        }
    }
    
    /**
     * Sets array of all "events" element
     */
    public void setEventsArray(org.openehr.schemas.v1.EVENT[] eventsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(eventsArray, EVENTS$6);
        }
    }
    
    /**
     * Sets ith "events" element
     */
    public void setEventsArray(int i, org.openehr.schemas.v1.EVENT events)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.EVENT target = null;
            target = (org.openehr.schemas.v1.EVENT)get_store().find_element_user(EVENTS$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(events);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "events" element
     */
    public org.openehr.schemas.v1.EVENT insertNewEvents(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.EVENT target = null;
            target = (org.openehr.schemas.v1.EVENT)get_store().insert_element_user(EVENTS$6, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "events" element
     */
    public org.openehr.schemas.v1.EVENT addNewEvents()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.EVENT target = null;
            target = (org.openehr.schemas.v1.EVENT)get_store().add_element_user(EVENTS$6);
            return target;
        }
    }
    
    /**
     * Removes the ith "events" element
     */
    public void removeEvents(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(EVENTS$6, i);
        }
    }
    
    /**
     * Gets the "summary" element
     */
    public org.openehr.schemas.v1.ITEMSTRUCTURE getSummary()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.ITEMSTRUCTURE target = null;
            target = (org.openehr.schemas.v1.ITEMSTRUCTURE)get_store().find_element_user(SUMMARY$8, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "summary" element
     */
    public boolean isSetSummary()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(SUMMARY$8) != 0;
        }
    }
    
    /**
     * Sets the "summary" element
     */
    public void setSummary(org.openehr.schemas.v1.ITEMSTRUCTURE summary)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.ITEMSTRUCTURE target = null;
            target = (org.openehr.schemas.v1.ITEMSTRUCTURE)get_store().find_element_user(SUMMARY$8, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.ITEMSTRUCTURE)get_store().add_element_user(SUMMARY$8);
            }
            target.set(summary);
        }
    }
    
    /**
     * Appends and returns a new empty "summary" element
     */
    public org.openehr.schemas.v1.ITEMSTRUCTURE addNewSummary()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.ITEMSTRUCTURE target = null;
            target = (org.openehr.schemas.v1.ITEMSTRUCTURE)get_store().add_element_user(SUMMARY$8);
            return target;
        }
    }
    
    /**
     * Unsets the "summary" element
     */
    public void unsetSummary()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(SUMMARY$8, 0);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy