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