/*
 * An XML document type.
 * Localname: GetMultipleResourceProperties
 * Namespace: http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd
 * Java type: org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.resource.properties.impl;
/**
 * A document containing one GetMultipleResourceProperties(@http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class GetMultipleResourcePropertiesDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument
{
    
    public GetMultipleResourcePropertiesDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName GETMULTIPLERESOURCEPROPERTIES$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", "GetMultipleResourceProperties");
    
    
    /**
     * Gets the "GetMultipleResourceProperties" element
     */
    public org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties getGetMultipleResourceProperties()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties)get_store().find_element_user(GETMULTIPLERESOURCEPROPERTIES$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "GetMultipleResourceProperties" element
     */
    public void setGetMultipleResourceProperties(org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties getMultipleResourceProperties)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties)get_store().find_element_user(GETMULTIPLERESOURCEPROPERTIES$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties)get_store().add_element_user(GETMULTIPLERESOURCEPROPERTIES$0);
            }
            target.set(getMultipleResourceProperties);
        }
    }
    
    /**
     * Appends and returns a new empty "GetMultipleResourceProperties" element
     */
    public org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties addNewGetMultipleResourceProperties()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties)get_store().add_element_user(GETMULTIPLERESOURCEPROPERTIES$0);
            return target;
        }
    }
    /**
     * An XML GetMultipleResourceProperties(@http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd).
     *
     * This is a complex type.
     */
    public static class GetMultipleResourcePropertiesImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.properties.GetMultipleResourcePropertiesDocument.GetMultipleResourceProperties
    {
        
        public GetMultipleResourcePropertiesImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName RESOURCEPROPERTY$0 = 
            new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", "ResourceProperty");
        
        
        /**
         * Gets array of all "ResourceProperty" elements
         */
        public javax.xml.namespace.QName[] getResourcePropertyArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List targetList = new java.util.ArrayList();
                get_store().find_all_element_users(RESOURCEPROPERTY$0, targetList);
                javax.xml.namespace.QName[] result = new javax.xml.namespace.QName[targetList.size()];
                for (int i = 0, len = targetList.size() ; i < len ; i++)
                    result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getQNameValue();
                return result;
            }
        }
        
        /**
         * Gets ith "ResourceProperty" element
         */
        public javax.xml.namespace.QName getResourcePropertyArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RESOURCEPROPERTY$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target.getQNameValue();
            }
        }
        
        /**
         * Gets (as xml) array of all "ResourceProperty" elements
         */
        public org.apache.xmlbeans.XmlQName[] xgetResourcePropertyArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List targetList = new java.util.ArrayList();
                get_store().find_all_element_users(RESOURCEPROPERTY$0, targetList);
                org.apache.xmlbeans.XmlQName[] result = new org.apache.xmlbeans.XmlQName[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets (as xml) ith "ResourceProperty" element
         */
        public org.apache.xmlbeans.XmlQName xgetResourcePropertyArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlQName target = null;
                target = (org.apache.xmlbeans.XmlQName)get_store().find_element_user(RESOURCEPROPERTY$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return (org.apache.xmlbeans.XmlQName)target;
            }
        }
        
        /**
         * Returns number of "ResourceProperty" element
         */
        public int sizeOfResourcePropertyArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(RESOURCEPROPERTY$0);
            }
        }
        
        /**
         * Sets array of all "ResourceProperty" element
         */
        public void setResourcePropertyArray(javax.xml.namespace.QName[] resourcePropertyArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(resourcePropertyArray, RESOURCEPROPERTY$0);
            }
        }
        
        /**
         * Sets ith "ResourceProperty" element
         */
        public void setResourcePropertyArray(int i, javax.xml.namespace.QName resourceProperty)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RESOURCEPROPERTY$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.setQNameValue(resourceProperty);
            }
        }
        
        /**
         * Sets (as xml) array of all "ResourceProperty" element
         */
        public void xsetResourcePropertyArray(org.apache.xmlbeans.XmlQName[]resourcePropertyArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(resourcePropertyArray, RESOURCEPROPERTY$0);
            }
        }
        
        /**
         * Sets (as xml) ith "ResourceProperty" element
         */
        public void xsetResourcePropertyArray(int i, org.apache.xmlbeans.XmlQName resourceProperty)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlQName target = null;
                target = (org.apache.xmlbeans.XmlQName)get_store().find_element_user(RESOURCEPROPERTY$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(resourceProperty);
            }
        }
        
        /**
         * Inserts the value as the ith "ResourceProperty" element
         */
        public void insertResourceProperty(int i, javax.xml.namespace.QName resourceProperty)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = 
                    (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(RESOURCEPROPERTY$0, i);
                target.setQNameValue(resourceProperty);
            }
        }
        
        /**
         * Appends the value as the last "ResourceProperty" element
         */
        public void addResourceProperty(javax.xml.namespace.QName resourceProperty)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(RESOURCEPROPERTY$0);
                target.setQNameValue(resourceProperty);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "ResourceProperty" element
         */
        public org.apache.xmlbeans.XmlQName insertNewResourceProperty(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlQName target = null;
                target = (org.apache.xmlbeans.XmlQName)get_store().insert_element_user(RESOURCEPROPERTY$0, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "ResourceProperty" element
         */
        public org.apache.xmlbeans.XmlQName addNewResourceProperty()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlQName target = null;
                target = (org.apache.xmlbeans.XmlQName)get_store().add_element_user(RESOURCEPROPERTY$0);
                return target;
            }
        }
        
        /**
         * Removes the ith "ResourceProperty" element
         */
        public void removeResourceProperty(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(RESOURCEPROPERTY$0, i);
            }
        }
    }
}
