/*
 * An XML document type.
 * Localname: From
 * Namespace: http://schemas.xmlsoap.org/ws/2003/03/addressing
 * Java type: org.activemq.ws.xmlbeans.addressing.v2003_03.FromDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.addressing.v2003_03.impl;
/**
 * A document containing one From(@http://schemas.xmlsoap.org/ws/2003/03/addressing) element.
 *
 * This is a complex type.
 */
public class FromDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.addressing.v2003_03.FromDocument
{
    
    public FromDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName FROM$0 = 
        new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2003/03/addressing", "From");
    
    
    /**
     * Gets the "From" element
     */
    public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType getFrom()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
            target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().find_element_user(FROM$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "From" element
     */
    public void setFrom(org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType from)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
            target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().find_element_user(FROM$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(FROM$0);
            }
            target.set(from);
        }
    }
    
    /**
     * Appends and returns a new empty "From" element
     */
    public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType addNewFrom()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
            target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(FROM$0);
            return target;
        }
    }
}
