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