/*
 * An XML document type.
 * Localname: Sequence
 * Namespace: http://schemas.xmlsoap.org/ws/2004/03/rm
 * Java type: org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceDocument
 *
 * Automatically generated - do not modify.
 */
package org.xmlsoap.schemas.ws.x2004.x03.rm.impl;

/**
 * A document containing one Sequence(@http://schemas.xmlsoap.org/ws/2004/03/rm) element.
 * <p/>
 * This is a complex type.
 */
public class SequenceDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceDocument {

    public SequenceDocumentImpl(org.apache.xmlbeans.SchemaType sType) {
        super(sType);
    }

    private static final javax.xml.namespace.QName SEQUENCE$0 =
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2004/03/rm", "Sequence");


    /**
     * Gets the "Sequence" element
     */
    public org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceType getSequence() {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceType target = null;
            target = (org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceType) get_store().find_element_user(SEQUENCE$0, 0);
            if (target == null) {
                return null;
            }
            return target;
        }
    }

    /**
     * Sets the "Sequence" element
     */
    public void setSequence(org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceType sequence) {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceType target = null;
            target = (org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceType) get_store().find_element_user(SEQUENCE$0, 0);
            if (target == null) {
                target = (org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceType) get_store().add_element_user(SEQUENCE$0);
            }
            target.set(sequence);
        }
    }

    /**
     * Appends and returns a new empty "Sequence" element
     */
    public org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceType addNewSequence() {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceType target = null;
            target = (org.xmlsoap.schemas.ws.x2004.x03.rm.SequenceType) get_store().add_element_user(SEQUENCE$0);
            return target;
        }
    }
}
