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