/*
 * An XML document type.
 * Localname: web-service-binding
 * Namespace: http://www.bea.com/2003/03/wli/tpm
 * Java type: com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.x2003.x03.wli.tpm.impl;
/**
 * A document containing one web-service-binding(@http://www.bea.com/2003/03/wli/tpm) element.
 *
 * This is a complex type.
 */
public class WebServiceBindingDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument
{
    
    public WebServiceBindingDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName WEBSERVICEBINDING$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/2003/03/wli/tpm", "web-service-binding");
    
    
    /**
     * Gets the "web-service-binding" element
     */
    public com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding getWebServiceBinding()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding target = null;
            target = (com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding)get_store().find_element_user(WEBSERVICEBINDING$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "web-service-binding" element
     */
    public void setWebServiceBinding(com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding webServiceBinding)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding target = null;
            target = (com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding)get_store().find_element_user(WEBSERVICEBINDING$0, 0);
            if (target == null)
            {
                target = (com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding)get_store().add_element_user(WEBSERVICEBINDING$0);
            }
            target.set(webServiceBinding);
        }
    }
    
    /**
     * Appends and returns a new empty "web-service-binding" element
     */
    public com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding addNewWebServiceBinding()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding target = null;
            target = (com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding)get_store().add_element_user(WEBSERVICEBINDING$0);
            return target;
        }
    }
    /**
     * An XML web-service-binding(@http://www.bea.com/2003/03/wli/tpm).
     *
     * This is a complex type.
     */
    public static class WebServiceBindingImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.WebServiceBindingDocument.WebServiceBinding
    {
        
        public WebServiceBindingImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName TRANSPORT$0 = 
            new javax.xml.namespace.QName("http://www.bea.com/2003/03/wli/tpm", "transport");
        private static final javax.xml.namespace.QName NAME$2 = 
            new javax.xml.namespace.QName("", "name");
        
        
        /**
         * Gets the "transport" element
         */
        public com.bea.x2003.x03.wli.tpm.TransportDocument.Transport getTransport()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.TransportDocument.Transport target = null;
                target = (com.bea.x2003.x03.wli.tpm.TransportDocument.Transport)get_store().find_element_user(TRANSPORT$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * True if has "transport" element
         */
        public boolean isSetTransport()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(TRANSPORT$0) != 0;
            }
        }
        
        /**
         * Sets the "transport" element
         */
        public void setTransport(com.bea.x2003.x03.wli.tpm.TransportDocument.Transport transport)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.TransportDocument.Transport target = null;
                target = (com.bea.x2003.x03.wli.tpm.TransportDocument.Transport)get_store().find_element_user(TRANSPORT$0, 0);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.TransportDocument.Transport)get_store().add_element_user(TRANSPORT$0);
                }
                target.set(transport);
            }
        }
        
        /**
         * Appends and returns a new empty "transport" element
         */
        public com.bea.x2003.x03.wli.tpm.TransportDocument.Transport addNewTransport()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.TransportDocument.Transport target = null;
                target = (com.bea.x2003.x03.wli.tpm.TransportDocument.Transport)get_store().add_element_user(TRANSPORT$0);
                return target;
            }
        }
        
        /**
         * Unsets the "transport" element
         */
        public void unsetTransport()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(TRANSPORT$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);
            }
        }
    }
}
