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