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