/*
 * An XML document type.
 * Localname: signature-certificate
 * Namespace: http://www.bea.com/2003/03/wli/tpm
 * Java type: com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.x2003.x03.wli.tpm.impl;
/**
 * A document containing one signature-certificate(@http://www.bea.com/2003/03/wli/tpm) element.
 *
 * This is a complex type.
 */
public class SignatureCertificateDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument
{
    
    public SignatureCertificateDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SIGNATURECERTIFICATE$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/2003/03/wli/tpm", "signature-certificate");
    
    
    /**
     * Gets the "signature-certificate" element
     */
    public com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate getSignatureCertificate()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate target = null;
            target = (com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate)get_store().find_element_user(SIGNATURECERTIFICATE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "signature-certificate" element
     */
    public void setSignatureCertificate(com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate signatureCertificate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate target = null;
            target = (com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate)get_store().find_element_user(SIGNATURECERTIFICATE$0, 0);
            if (target == null)
            {
                target = (com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate)get_store().add_element_user(SIGNATURECERTIFICATE$0);
            }
            target.set(signatureCertificate);
        }
    }
    
    /**
     * Appends and returns a new empty "signature-certificate" element
     */
    public com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate addNewSignatureCertificate()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate target = null;
            target = (com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate)get_store().add_element_user(SIGNATURECERTIFICATE$0);
            return target;
        }
    }
    /**
     * An XML signature-certificate(@http://www.bea.com/2003/03/wli/tpm).
     *
     * This is a complex type.
     */
    public static class SignatureCertificateImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.SignatureCertificateDocument.SignatureCertificate
    {
        
        public SignatureCertificateImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName KEYINFO$0 = 
            new javax.xml.namespace.QName("http://www.w3.org/2000/09/xmldsig#", "KeyInfo");
        private static final javax.xml.namespace.QName NAME$2 = 
            new javax.xml.namespace.QName("", "name");
        private static final javax.xml.namespace.QName PASSWORDALIAS$4 = 
            new javax.xml.namespace.QName("", "password-alias");
        
        
        /**
         * Gets the "KeyInfo" element
         */
        public org.w3.x2000.x09.xmldsig.KeyInfoType getKeyInfo()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.w3.x2000.x09.xmldsig.KeyInfoType target = null;
                target = (org.w3.x2000.x09.xmldsig.KeyInfoType)get_store().find_element_user(KEYINFO$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * True if has "KeyInfo" element
         */
        public boolean isSetKeyInfo()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(KEYINFO$0) != 0;
            }
        }
        
        /**
         * Sets the "KeyInfo" element
         */
        public void setKeyInfo(org.w3.x2000.x09.xmldsig.KeyInfoType keyInfo)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.w3.x2000.x09.xmldsig.KeyInfoType target = null;
                target = (org.w3.x2000.x09.xmldsig.KeyInfoType)get_store().find_element_user(KEYINFO$0, 0);
                if (target == null)
                {
                    target = (org.w3.x2000.x09.xmldsig.KeyInfoType)get_store().add_element_user(KEYINFO$0);
                }
                target.set(keyInfo);
            }
        }
        
        /**
         * Appends and returns a new empty "KeyInfo" element
         */
        public org.w3.x2000.x09.xmldsig.KeyInfoType addNewKeyInfo()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.w3.x2000.x09.xmldsig.KeyInfoType target = null;
                target = (org.w3.x2000.x09.xmldsig.KeyInfoType)get_store().add_element_user(KEYINFO$0);
                return target;
            }
        }
        
        /**
         * Unsets the "KeyInfo" element
         */
        public void unsetKeyInfo()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(KEYINFO$0, 0);
            }
        }
        
        /**
         * Gets the "name" attribute
         */
        public java.lang.String getName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "name" attribute
         */
        public org.apache.xmlbeans.XmlString xgetName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$2);
                return target;
            }
        }
        
        /**
         * Sets the "name" attribute
         */
        public void setName(java.lang.String name)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$2);
                }
                target.setStringValue(name);
            }
        }
        
        /**
         * Sets (as xml) the "name" attribute
         */
        public void xsetName(org.apache.xmlbeans.XmlString name)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$2);
                }
                target.set(name);
            }
        }
        
        /**
         * Gets the "password-alias" attribute
         */
        public java.lang.String getPasswordAlias()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PASSWORDALIAS$4);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "password-alias" attribute
         */
        public org.apache.xmlbeans.XmlString xgetPasswordAlias()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PASSWORDALIAS$4);
                return target;
            }
        }
        
        /**
         * True if has "password-alias" attribute
         */
        public boolean isSetPasswordAlias()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(PASSWORDALIAS$4) != null;
            }
        }
        
        /**
         * Sets the "password-alias" attribute
         */
        public void setPasswordAlias(java.lang.String passwordAlias)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PASSWORDALIAS$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PASSWORDALIAS$4);
                }
                target.setStringValue(passwordAlias);
            }
        }
        
        /**
         * Sets (as xml) the "password-alias" attribute
         */
        public void xsetPasswordAlias(org.apache.xmlbeans.XmlString passwordAlias)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PASSWORDALIAS$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(PASSWORDALIAS$4);
                }
                target.set(passwordAlias);
            }
        }
        
        /**
         * Unsets the "password-alias" attribute
         */
        public void unsetPasswordAlias()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(PASSWORDALIAS$4);
            }
        }
    }
}
