/*
 * An XML attribute type.
 * Localname: EventSource
 * Namespace: http://schemas.xmlsoap.org/ws/2004/08/eventing
 * Java type: org.codehaus.activemq.ws.schema.eventing.EventSourceAttribute
 *
 * Automatically generated - do not modify.
 */
package org.codehaus.activemq.ws.schema.eventing.impl;

/**
 * A document containing one EventSource(@http://schemas.xmlsoap.org/ws/2004/08/eventing) attribute.
 * <p/>
 * This is a complex type.
 */
public class EventSourceAttributeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.codehaus.activemq.ws.schema.eventing.EventSourceAttribute {

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

    private static final javax.xml.namespace.QName EVENTSOURCE$0 =
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "EventSource");


    /**
     * Gets the "EventSource" attribute
     */
    public boolean getEventSource() {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue) get_store().find_attribute_user(EVENTSOURCE$0);
            if (target == null) {
                return false;
            }
            return target.getBooleanValue();
        }
    }

    /**
     * Gets (as xml) the "EventSource" attribute
     */
    public org.apache.xmlbeans.XmlBoolean xgetEventSource() {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean) get_store().find_attribute_user(EVENTSOURCE$0);
            return target;
        }
    }

    /**
     * True if has "EventSource" attribute
     */
    public boolean isSetEventSource() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().find_attribute_user(EVENTSOURCE$0) != null;
        }
    }

    /**
     * Sets the "EventSource" attribute
     */
    public void setEventSource(boolean eventSource) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue) get_store().find_attribute_user(EVENTSOURCE$0);
            if (target == null) {
                target = (org.apache.xmlbeans.SimpleValue) get_store().add_attribute_user(EVENTSOURCE$0);
            }
            target.setBooleanValue(eventSource);
        }
    }

    /**
     * Sets (as xml) the "EventSource" attribute
     */
    public void xsetEventSource(org.apache.xmlbeans.XmlBoolean eventSource) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean) get_store().find_attribute_user(EVENTSOURCE$0);
            if (target == null) {
                target = (org.apache.xmlbeans.XmlBoolean) get_store().add_attribute_user(EVENTSOURCE$0);
            }
            target.set(eventSource);
        }
    }

    /**
     * Unsets the "EventSource" attribute
     */
    public void unsetEventSource() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_attribute(EVENTSOURCE$0);
        }
    }
}
