/*
 * An XML document type.
 * Localname: signature-transforms
 * Namespace: http://www.bea.com/2003/03/wli/tpm
 * Java type: com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.x2003.x03.wli.tpm.impl;
/**
 * A document containing one signature-transforms(@http://www.bea.com/2003/03/wli/tpm) element.
 *
 * This is a complex type.
 */
public class SignatureTransformsDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument
{
    
    public SignatureTransformsDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SIGNATURETRANSFORMS$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/2003/03/wli/tpm", "signature-transforms");
    
    
    /**
     * Gets the "signature-transforms" element
     */
    public com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms getSignatureTransforms()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms target = null;
            target = (com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms)get_store().find_element_user(SIGNATURETRANSFORMS$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "signature-transforms" element
     */
    public void setSignatureTransforms(com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms signatureTransforms)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms target = null;
            target = (com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms)get_store().find_element_user(SIGNATURETRANSFORMS$0, 0);
            if (target == null)
            {
                target = (com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms)get_store().add_element_user(SIGNATURETRANSFORMS$0);
            }
            target.set(signatureTransforms);
        }
    }
    
    /**
     * Appends and returns a new empty "signature-transforms" element
     */
    public com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms addNewSignatureTransforms()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms target = null;
            target = (com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms)get_store().add_element_user(SIGNATURETRANSFORMS$0);
            return target;
        }
    }
    /**
     * An XML signature-transforms(@http://www.bea.com/2003/03/wli/tpm).
     *
     * This is a complex type.
     */
    public static class SignatureTransformsImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.SignatureTransformsDocument.SignatureTransforms
    {
        
        public SignatureTransformsImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName XPATH$0 = 
            new javax.xml.namespace.QName("http://www.bea.com/2003/03/wli/tpm", "xpath");
        
        
        /**
         * Gets a List of "xpath" elements
         */
        public java.util.List<org.apache.xmlbeans.XmlObject> getXpathList()
        {
            final class XpathList extends java.util.AbstractList<org.apache.xmlbeans.XmlObject>
            {
                public org.apache.xmlbeans.XmlObject get(int i)
                    { return SignatureTransformsImpl.this.getXpathArray(i); }
                
                public org.apache.xmlbeans.XmlObject set(int i, org.apache.xmlbeans.XmlObject o)
                {
                    org.apache.xmlbeans.XmlObject old = SignatureTransformsImpl.this.getXpathArray(i);
                    SignatureTransformsImpl.this.setXpathArray(i, o);
                    return old;
                }
                
                public void add(int i, org.apache.xmlbeans.XmlObject o)
                    { SignatureTransformsImpl.this.insertNewXpath(i).set(o); }
                
                public org.apache.xmlbeans.XmlObject remove(int i)
                {
                    org.apache.xmlbeans.XmlObject old = SignatureTransformsImpl.this.getXpathArray(i);
                    SignatureTransformsImpl.this.removeXpath(i);
                    return old;
                }
                
                public int size()
                    { return SignatureTransformsImpl.this.sizeOfXpathArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new XpathList();
            }
        }
        
        /**
         * Gets array of all "xpath" elements
         */
        public org.apache.xmlbeans.XmlObject[] getXpathArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List targetList = new java.util.ArrayList();
                get_store().find_all_element_users(XPATH$0, targetList);
                org.apache.xmlbeans.XmlObject[] result = new org.apache.xmlbeans.XmlObject[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "xpath" element
         */
        public org.apache.xmlbeans.XmlObject getXpathArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlObject target = null;
                target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(XPATH$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "xpath" element
         */
        public int sizeOfXpathArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(XPATH$0);
            }
        }
        
        /**
         * Sets array of all "xpath" element
         */
        public void setXpathArray(org.apache.xmlbeans.XmlObject[] xpathArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(xpathArray, XPATH$0);
            }
        }
        
        /**
         * Sets ith "xpath" element
         */
        public void setXpathArray(int i, org.apache.xmlbeans.XmlObject xpath)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlObject target = null;
                target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(XPATH$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(xpath);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "xpath" element
         */
        public org.apache.xmlbeans.XmlObject insertNewXpath(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlObject target = null;
                target = (org.apache.xmlbeans.XmlObject)get_store().insert_element_user(XPATH$0, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "xpath" element
         */
        public org.apache.xmlbeans.XmlObject addNewXpath()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlObject target = null;
                target = (org.apache.xmlbeans.XmlObject)get_store().add_element_user(XPATH$0);
                return target;
            }
        }
        
        /**
         * Removes the ith "xpath" element
         */
        public void removeXpath(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(XPATH$0, i);
            }
        }
    }
}
