/*
 * An XML document type.
 * Localname: PublisherReference
 * 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.PublisherReferenceDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.notification.brokered.impl;
/**
 * A document containing one PublisherReference(@http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class PublisherReferenceDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.notification.brokered.PublisherReferenceDocument
{
    
    public PublisherReferenceDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PUBLISHERREFERENCE$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.xsd", "PublisherReference");
    
    
    /**
     * Gets the "PublisherReference" element
     */
    public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType getPublisherReference()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
            target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().find_element_user(PUBLISHERREFERENCE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "PublisherReference" element
     */
    public void setPublisherReference(org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType publisherReference)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
            target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().find_element_user(PUBLISHERREFERENCE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(PUBLISHERREFERENCE$0);
            }
            target.set(publisherReference);
        }
    }
    
    /**
     * Appends and returns a new empty "PublisherReference" element
     */
    public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType addNewPublisherReference()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
            target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(PUBLISHERREFERENCE$0);
            return target;
        }
    }
}
