/*
 * An XML document type.
 * Localname: Context
 * Namespace: http://schemas.xmlsoap.org/ws/2002/07/utility
 * Java type: org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument
 *
 * Automatically generated - do not modify.
 */
package org.xmlsoap.schemas.ws.x2002.x07.utility.impl;

/**
 * A document containing one Context(@http://schemas.xmlsoap.org/ws/2002/07/utility) element.
 * <p/>
 * This is a complex type.
 */
public class ContextDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument {

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

    private static final javax.xml.namespace.QName CONTEXT$0 =
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/07/utility", "Context");


    /**
     * Gets the "Context" element
     */
    public org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context getContext() {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context) get_store().find_element_user(CONTEXT$0, 0);
            if (target == null) {
                return null;
            }
            return target;
        }
    }

    /**
     * Sets the "Context" element
     */
    public void setContext(org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context context) {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context) get_store().find_element_user(CONTEXT$0, 0);
            if (target == null) {
                target = (org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context) get_store().add_element_user(CONTEXT$0);
            }
            target.set(context);
        }
    }

    /**
     * Appends and returns a new empty "Context" element
     */
    public org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context addNewContext() {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context) get_store().add_element_user(CONTEXT$0);
            return target;
        }
    }

    /**
     * An XML Context(@http://schemas.xmlsoap.org/ws/2002/07/utility).
     * <p/>
     * This is a complex type.
     */
    public static class ContextImpl extends org.xmlsoap.schemas.ws.x2002.x07.utility.impl.ContextTypeImpl implements org.xmlsoap.schemas.ws.x2002.x07.utility.ContextDocument.Context {

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


    }
}
