/*
 * An XML document type.
 * Localname: SubscriptionPolicy
 * Namespace: http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd
 * Java type: org.activemq.ws.xmlbeans.notification.base.SubscriptionPolicyDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.notification.base.impl;
/**
 * A document containing one SubscriptionPolicy(@http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class SubscriptionPolicyDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.notification.base.SubscriptionPolicyDocument
{
    
    public SubscriptionPolicyDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SUBSCRIPTIONPOLICY$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "SubscriptionPolicy");
    
    
    /**
     * Gets the "SubscriptionPolicy" element
     */
    public org.apache.xmlbeans.XmlObject getSubscriptionPolicy()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlObject target = null;
            target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(SUBSCRIPTIONPOLICY$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "SubscriptionPolicy" element
     */
    public void setSubscriptionPolicy(org.apache.xmlbeans.XmlObject subscriptionPolicy)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlObject target = null;
            target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(SUBSCRIPTIONPOLICY$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlObject)get_store().add_element_user(SUBSCRIPTIONPOLICY$0);
            }
            target.set(subscriptionPolicy);
        }
    }
    
    /**
     * Appends and returns a new empty "SubscriptionPolicy" element
     */
    public org.apache.xmlbeans.XmlObject addNewSubscriptionPolicy()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlObject target = null;
            target = (org.apache.xmlbeans.XmlObject)get_store().add_element_user(SUBSCRIPTIONPOLICY$0);
            return target;
        }
    }
}
