/*
 * An XML document type.
 * Localname: MetadataDescriptorRef
 * Namespace: http://docs.oasis-open.org/wsrf/2004/10/wsrf-WSResourceMetadataDescriptor-1.0-draft-01.xsd
 * Java type: org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.resource.md.impl;
/**
 * A document containing one MetadataDescriptorRef(@http://docs.oasis-open.org/wsrf/2004/10/wsrf-WSResourceMetadataDescriptor-1.0-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class MetadataDescriptorRefDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefDocument
{
    
    public MetadataDescriptorRefDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName METADATADESCRIPTORREF$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/10/wsrf-WSResourceMetadataDescriptor-1.0-draft-01.xsd", "MetadataDescriptorRef");
    
    
    /**
     * Gets the "MetadataDescriptorRef" element
     */
    public org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefType getMetadataDescriptorRef()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefType)get_store().find_element_user(METADATADESCRIPTORREF$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "MetadataDescriptorRef" element
     */
    public void setMetadataDescriptorRef(org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefType metadataDescriptorRef)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefType)get_store().find_element_user(METADATADESCRIPTORREF$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefType)get_store().add_element_user(METADATADESCRIPTORREF$0);
            }
            target.set(metadataDescriptorRef);
        }
    }
    
    /**
     * Appends and returns a new empty "MetadataDescriptorRef" element
     */
    public org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefType addNewMetadataDescriptorRef()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorRefType)get_store().add_element_user(METADATADESCRIPTORREF$0);
            return target;
        }
    }
}
