/*
 * XML Type:  ContextType
 * Namespace: http://schemas.xmlsoap.org/ws/2002/07/utility
 * Java type: org.xmlsoap.schemas.ws.x2002.x07.utility.ContextType
 *
 * Automatically generated - do not modify.
 */
package org.xmlsoap.schemas.ws.x2002.x07.utility.impl;

/**
 * An XML ContextType(@http://schemas.xmlsoap.org/ws/2002/07/utility).
 * <p/>
 * This is a complex type.
 */
public class ContextTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.xmlsoap.schemas.ws.x2002.x07.utility.ContextType {

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

    private static final javax.xml.namespace.QName EXPIRES$0 =
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/07/utility", "Expires");
    private static final javax.xml.namespace.QName IDENTIFIER$2 =
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/07/utility", "Identifier");
    private static final javax.xml.namespace.QName ID$4 =
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/07/utility", "Id");


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

    /**
     * True if has "Expires" element
     */
    public boolean isSetExpires() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(EXPIRES$0) != 0;
        }
    }

    /**
     * Sets the "Expires" element
     */
    public void setExpires(org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedDateTime expires) {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedDateTime target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedDateTime) get_store().find_element_user(EXPIRES$0, 0);
            if (target == null) {
                target = (org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedDateTime) get_store().add_element_user(EXPIRES$0);
            }
            target.set(expires);
        }
    }

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

    /**
     * Unsets the "Expires" element
     */
    public void unsetExpires() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(EXPIRES$0, 0);
        }
    }

    /**
     * Gets the "Identifier" element
     */
    public org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedURI getIdentifier() {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedURI target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedURI) get_store().find_element_user(IDENTIFIER$2, 0);
            if (target == null) {
                return null;
            }
            return target;
        }
    }

    /**
     * Sets the "Identifier" element
     */
    public void setIdentifier(org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedURI identifier) {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedURI target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedURI) get_store().find_element_user(IDENTIFIER$2, 0);
            if (target == null) {
                target = (org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedURI) get_store().add_element_user(IDENTIFIER$2);
            }
            target.set(identifier);
        }
    }

    /**
     * Appends and returns a new empty "Identifier" element
     */
    public org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedURI addNewIdentifier() {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedURI target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.AttributedURI) get_store().add_element_user(IDENTIFIER$2);
            return target;
        }
    }

    /**
     * Gets the "Id" attribute
     */
    public java.lang.String getId() {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue) get_store().find_attribute_user(ID$4);
            if (target == null) {
                return null;
            }
            return target.getStringValue();
        }
    }

    /**
     * Gets (as xml) the "Id" attribute
     */
    public org.apache.xmlbeans.XmlID xgetId() {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.XmlID target = null;
            target = (org.apache.xmlbeans.XmlID) get_store().find_attribute_user(ID$4);
            return target;
        }
    }

    /**
     * True if has "Id" attribute
     */
    public boolean isSetId() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().find_attribute_user(ID$4) != null;
        }
    }

    /**
     * Sets the "Id" attribute
     */
    public void setId(java.lang.String id) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue) get_store().find_attribute_user(ID$4);
            if (target == null) {
                target = (org.apache.xmlbeans.SimpleValue) get_store().add_attribute_user(ID$4);
            }
            target.setStringValue(id);
        }
    }

    /**
     * Sets (as xml) the "Id" attribute
     */
    public void xsetId(org.apache.xmlbeans.XmlID id) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.XmlID target = null;
            target = (org.apache.xmlbeans.XmlID) get_store().find_attribute_user(ID$4);
            if (target == null) {
                target = (org.apache.xmlbeans.XmlID) get_store().add_attribute_user(ID$4);
            }
            target.set(id);
        }
    }

    /**
     * Unsets the "Id" attribute
     */
    public void unsetId() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_attribute(ID$4);
        }
    }
}
