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

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

The newest version!
/*
 * XML Type:  X_VERSIONED_OBJECT
 * Namespace: http://schemas.openehr.org/v1
 * Java type: org.openehr.schemas.v1.XVERSIONEDOBJECT
 *
 * Automatically generated - do not modify.
 */
package org.openehr.schemas.v1.impl;
/**
 * An XML X_VERSIONED_OBJECT(@http://schemas.openehr.org/v1).
 *
 * This is a complex type.
 */
public class XVERSIONEDOBJECTImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.openehr.schemas.v1.XVERSIONEDOBJECT
{
    private static final long serialVersionUID = 1L;
    
    public XVERSIONEDOBJECTImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName UID$0 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "uid");
    private static final javax.xml.namespace.QName OWNERID$2 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "owner_id");
    private static final javax.xml.namespace.QName TIMECREATED$4 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "time_created");
    private static final javax.xml.namespace.QName TOTALVERSIONCOUNT$6 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "total_version_count");
    private static final javax.xml.namespace.QName EXTRACTVERSIONCOUNT$8 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "extract_version_count");
    private static final javax.xml.namespace.QName REVISIONHISTORY$10 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "revision_history");
    private static final javax.xml.namespace.QName VERSIONS$12 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "versions");
    
    
    /**
     * Gets the "uid" element
     */
    public org.openehr.schemas.v1.HIEROBJECTID getUid()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.HIEROBJECTID target = null;
            target = (org.openehr.schemas.v1.HIEROBJECTID)get_store().find_element_user(UID$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "uid" element
     */
    public void setUid(org.openehr.schemas.v1.HIEROBJECTID uid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.HIEROBJECTID target = null;
            target = (org.openehr.schemas.v1.HIEROBJECTID)get_store().find_element_user(UID$0, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.HIEROBJECTID)get_store().add_element_user(UID$0);
            }
            target.set(uid);
        }
    }
    
    /**
     * Appends and returns a new empty "uid" element
     */
    public org.openehr.schemas.v1.HIEROBJECTID addNewUid()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.HIEROBJECTID target = null;
            target = (org.openehr.schemas.v1.HIEROBJECTID)get_store().add_element_user(UID$0);
            return target;
        }
    }
    
    /**
     * Gets the "owner_id" element
     */
    public org.openehr.schemas.v1.OBJECTREF getOwnerId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.OBJECTREF target = null;
            target = (org.openehr.schemas.v1.OBJECTREF)get_store().find_element_user(OWNERID$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "owner_id" element
     */
    public void setOwnerId(org.openehr.schemas.v1.OBJECTREF ownerId)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.OBJECTREF target = null;
            target = (org.openehr.schemas.v1.OBJECTREF)get_store().find_element_user(OWNERID$2, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.OBJECTREF)get_store().add_element_user(OWNERID$2);
            }
            target.set(ownerId);
        }
    }
    
    /**
     * Appends and returns a new empty "owner_id" element
     */
    public org.openehr.schemas.v1.OBJECTREF addNewOwnerId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.OBJECTREF target = null;
            target = (org.openehr.schemas.v1.OBJECTREF)get_store().add_element_user(OWNERID$2);
            return target;
        }
    }
    
    /**
     * Gets the "time_created" element
     */
    public org.openehr.schemas.v1.DVDATETIME getTimeCreated()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDATETIME target = null;
            target = (org.openehr.schemas.v1.DVDATETIME)get_store().find_element_user(TIMECREATED$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "time_created" element
     */
    public void setTimeCreated(org.openehr.schemas.v1.DVDATETIME timeCreated)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDATETIME target = null;
            target = (org.openehr.schemas.v1.DVDATETIME)get_store().find_element_user(TIMECREATED$4, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.DVDATETIME)get_store().add_element_user(TIMECREATED$4);
            }
            target.set(timeCreated);
        }
    }
    
    /**
     * Appends and returns a new empty "time_created" element
     */
    public org.openehr.schemas.v1.DVDATETIME addNewTimeCreated()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVDATETIME target = null;
            target = (org.openehr.schemas.v1.DVDATETIME)get_store().add_element_user(TIMECREATED$4);
            return target;
        }
    }
    
    /**
     * Gets the "total_version_count" element
     */
    public int getTotalVersionCount()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOTALVERSIONCOUNT$6, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "total_version_count" element
     */
    public org.apache.xmlbeans.XmlInt xgetTotalVersionCount()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(TOTALVERSIONCOUNT$6, 0);
            return target;
        }
    }
    
    /**
     * Sets the "total_version_count" element
     */
    public void setTotalVersionCount(int totalVersionCount)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOTALVERSIONCOUNT$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TOTALVERSIONCOUNT$6);
            }
            target.setIntValue(totalVersionCount);
        }
    }
    
    /**
     * Sets (as xml) the "total_version_count" element
     */
    public void xsetTotalVersionCount(org.apache.xmlbeans.XmlInt totalVersionCount)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(TOTALVERSIONCOUNT$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(TOTALVERSIONCOUNT$6);
            }
            target.set(totalVersionCount);
        }
    }
    
    /**
     * Gets the "extract_version_count" element
     */
    public int getExtractVersionCount()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EXTRACTVERSIONCOUNT$8, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "extract_version_count" element
     */
    public org.apache.xmlbeans.XmlInt xgetExtractVersionCount()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(EXTRACTVERSIONCOUNT$8, 0);
            return target;
        }
    }
    
    /**
     * Sets the "extract_version_count" element
     */
    public void setExtractVersionCount(int extractVersionCount)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EXTRACTVERSIONCOUNT$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(EXTRACTVERSIONCOUNT$8);
            }
            target.setIntValue(extractVersionCount);
        }
    }
    
    /**
     * Sets (as xml) the "extract_version_count" element
     */
    public void xsetExtractVersionCount(org.apache.xmlbeans.XmlInt extractVersionCount)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(EXTRACTVERSIONCOUNT$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(EXTRACTVERSIONCOUNT$8);
            }
            target.set(extractVersionCount);
        }
    }
    
    /**
     * Gets the "revision_history" element
     */
    public org.openehr.schemas.v1.REVISIONHISTORY getRevisionHistory()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.REVISIONHISTORY target = null;
            target = (org.openehr.schemas.v1.REVISIONHISTORY)get_store().find_element_user(REVISIONHISTORY$10, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "revision_history" element
     */
    public boolean isSetRevisionHistory()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(REVISIONHISTORY$10) != 0;
        }
    }
    
    /**
     * Sets the "revision_history" element
     */
    public void setRevisionHistory(org.openehr.schemas.v1.REVISIONHISTORY revisionHistory)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.REVISIONHISTORY target = null;
            target = (org.openehr.schemas.v1.REVISIONHISTORY)get_store().find_element_user(REVISIONHISTORY$10, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.REVISIONHISTORY)get_store().add_element_user(REVISIONHISTORY$10);
            }
            target.set(revisionHistory);
        }
    }
    
    /**
     * Appends and returns a new empty "revision_history" element
     */
    public org.openehr.schemas.v1.REVISIONHISTORY addNewRevisionHistory()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.REVISIONHISTORY target = null;
            target = (org.openehr.schemas.v1.REVISIONHISTORY)get_store().add_element_user(REVISIONHISTORY$10);
            return target;
        }
    }
    
    /**
     * Unsets the "revision_history" element
     */
    public void unsetRevisionHistory()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(REVISIONHISTORY$10, 0);
        }
    }
    
    /**
     * Gets array of all "versions" elements
     */
    public org.openehr.schemas.v1.ORIGINALVERSION[] getVersionsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(VERSIONS$12, targetList);
            org.openehr.schemas.v1.ORIGINALVERSION[] result = new org.openehr.schemas.v1.ORIGINALVERSION[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "versions" element
     */
    public org.openehr.schemas.v1.ORIGINALVERSION getVersionsArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.ORIGINALVERSION target = null;
            target = (org.openehr.schemas.v1.ORIGINALVERSION)get_store().find_element_user(VERSIONS$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "versions" element
     */
    public int sizeOfVersionsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(VERSIONS$12);
        }
    }
    
    /**
     * Sets array of all "versions" element
     */
    public void setVersionsArray(org.openehr.schemas.v1.ORIGINALVERSION[] versionsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(versionsArray, VERSIONS$12);
        }
    }
    
    /**
     * Sets ith "versions" element
     */
    public void setVersionsArray(int i, org.openehr.schemas.v1.ORIGINALVERSION versions)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.ORIGINALVERSION target = null;
            target = (org.openehr.schemas.v1.ORIGINALVERSION)get_store().find_element_user(VERSIONS$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(versions);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "versions" element
     */
    public org.openehr.schemas.v1.ORIGINALVERSION insertNewVersions(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.ORIGINALVERSION target = null;
            target = (org.openehr.schemas.v1.ORIGINALVERSION)get_store().insert_element_user(VERSIONS$12, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "versions" element
     */
    public org.openehr.schemas.v1.ORIGINALVERSION addNewVersions()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.ORIGINALVERSION target = null;
            target = (org.openehr.schemas.v1.ORIGINALVERSION)get_store().add_element_user(VERSIONS$12);
            return target;
        }
    }
    
    /**
     * Removes the ith "versions" element
     */
    public void removeVersions(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(VERSIONS$12, i);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy