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