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