/*
 * XML Type:  MetadataDescriptorType
 * Namespace: http://docs.oasis-open.org/wsrf/2004/10/wsrf-WSResourceMetadataDescriptor-1.0-draft-01.xsd
 * Java type: org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorType
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.resource.md.impl;
/**
 * An XML MetadataDescriptorType(@http://docs.oasis-open.org/wsrf/2004/10/wsrf-WSResourceMetadataDescriptor-1.0-draft-01.xsd).
 *
 * This is a complex type.
 */
public class MetadataDescriptorTypeImpl extends org.activemq.ws.xmlbeans.resource.md.impl.DocumentedTypeImpl implements org.activemq.ws.xmlbeans.resource.md.MetadataDescriptorType
{
    
    public MetadataDescriptorTypeImpl(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");
    private static final javax.xml.namespace.QName OPERATION$2 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/10/wsrf-WSResourceMetadataDescriptor-1.0-draft-01.xsd", "Operation");
    private static final javax.xml.namespace.QName NAME$4 = 
        new javax.xml.namespace.QName("", "name");
    private static final javax.xml.namespace.QName INTERFACE$6 = 
        new javax.xml.namespace.QName("", "interface");
    private static final javax.xml.namespace.QName SPECIALIZES$8 = 
        new javax.xml.namespace.QName("", "specializes");
    private static final javax.xml.namespace.QName WSDLLOCATION$10 = 
        new javax.xml.namespace.QName("", "wsdlLocation");
    private static final javax.xml.namespace.QName METADATADESCRIPTORLOCATION$12 = 
        new javax.xml.namespace.QName("", "metadataDescriptorLocation");
    
    
    /**
     * Gets array of all "Property" elements
     */
    public org.activemq.ws.xmlbeans.resource.md.PropertyType[] getPropertyArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(PROPERTY$0, targetList);
            org.activemq.ws.xmlbeans.resource.md.PropertyType[] result = new org.activemq.ws.xmlbeans.resource.md.PropertyType[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "Property" element
     */
    public org.activemq.ws.xmlbeans.resource.md.PropertyType getPropertyArray(int i)
    {
        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, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "Property" element
     */
    public int sizeOfPropertyArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PROPERTY$0);
        }
    }
    
    /**
     * Sets array of all "Property" element
     */
    public void setPropertyArray(org.activemq.ws.xmlbeans.resource.md.PropertyType[] propertyArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(propertyArray, PROPERTY$0);
        }
    }
    
    /**
     * Sets ith "Property" element
     */
    public void setPropertyArray(int i, 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, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(property);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "Property" element
     */
    public org.activemq.ws.xmlbeans.resource.md.PropertyType insertNewProperty(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.PropertyType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.PropertyType)get_store().insert_element_user(PROPERTY$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "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;
        }
    }
    
    /**
     * Removes the ith "Property" element
     */
    public void removeProperty(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PROPERTY$0, i);
        }
    }
    
    /**
     * Gets array of all "Operation" elements
     */
    public org.activemq.ws.xmlbeans.resource.md.OperationsType[] getOperationArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(OPERATION$2, targetList);
            org.activemq.ws.xmlbeans.resource.md.OperationsType[] result = new org.activemq.ws.xmlbeans.resource.md.OperationsType[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "Operation" element
     */
    public org.activemq.ws.xmlbeans.resource.md.OperationsType getOperationArray(int i)
    {
        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$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "Operation" element
     */
    public int sizeOfOperationArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(OPERATION$2);
        }
    }
    
    /**
     * Sets array of all "Operation" element
     */
    public void setOperationArray(org.activemq.ws.xmlbeans.resource.md.OperationsType[] operationArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(operationArray, OPERATION$2);
        }
    }
    
    /**
     * Sets ith "Operation" element
     */
    public void setOperationArray(int i, 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$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(operation);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "Operation" element
     */
    public org.activemq.ws.xmlbeans.resource.md.OperationsType insertNewOperation(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.OperationsType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.OperationsType)get_store().insert_element_user(OPERATION$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "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$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "Operation" element
     */
    public void removeOperation(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(OPERATION$2, i);
        }
    }
    
    /**
     * Gets the "name" attribute
     */
    public java.lang.String getName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "name" attribute
     */
    public org.apache.xmlbeans.XmlNCName xgetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlNCName target = null;
            target = (org.apache.xmlbeans.XmlNCName)get_store().find_attribute_user(NAME$4);
            return target;
        }
    }
    
    /**
     * Sets the "name" attribute
     */
    public void setName(java.lang.String name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$4);
            }
            target.setStringValue(name);
        }
    }
    
    /**
     * Sets (as xml) the "name" attribute
     */
    public void xsetName(org.apache.xmlbeans.XmlNCName name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlNCName target = null;
            target = (org.apache.xmlbeans.XmlNCName)get_store().find_attribute_user(NAME$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlNCName)get_store().add_attribute_user(NAME$4);
            }
            target.set(name);
        }
    }
    
    /**
     * Gets the "interface" attribute
     */
    public javax.xml.namespace.QName getInterface()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(INTERFACE$6);
            if (target == null)
            {
                return null;
            }
            return target.getQNameValue();
        }
    }
    
    /**
     * Gets (as xml) the "interface" attribute
     */
    public org.apache.xmlbeans.XmlQName xgetInterface()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlQName target = null;
            target = (org.apache.xmlbeans.XmlQName)get_store().find_attribute_user(INTERFACE$6);
            return target;
        }
    }
    
    /**
     * Sets the "interface" attribute
     */
    public void setInterface(javax.xml.namespace.QName xinterface)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(INTERFACE$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(INTERFACE$6);
            }
            target.setQNameValue(xinterface);
        }
    }
    
    /**
     * Sets (as xml) the "interface" attribute
     */
    public void xsetInterface(org.apache.xmlbeans.XmlQName xinterface)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlQName target = null;
            target = (org.apache.xmlbeans.XmlQName)get_store().find_attribute_user(INTERFACE$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlQName)get_store().add_attribute_user(INTERFACE$6);
            }
            target.set(xinterface);
        }
    }
    
    /**
     * Gets the "specializes" attribute
     */
    public java.util.List getSpecializes()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SPECIALIZES$8);
            if (target == null)
            {
                return null;
            }
            return target.getListValue();
        }
    }
    
    /**
     * Gets (as xml) the "specializes" attribute
     */
    public org.activemq.ws.xmlbeans.resource.md.SpecializesType xgetSpecializes()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.SpecializesType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.SpecializesType)get_store().find_attribute_user(SPECIALIZES$8);
            return target;
        }
    }
    
    /**
     * True if has "specializes" attribute
     */
    public boolean isSetSpecializes()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(SPECIALIZES$8) != null;
        }
    }
    
    /**
     * Sets the "specializes" attribute
     */
    public void setSpecializes(java.util.List specializes)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SPECIALIZES$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(SPECIALIZES$8);
            }
            target.setListValue(specializes);
        }
    }
    
    /**
     * Sets (as xml) the "specializes" attribute
     */
    public void xsetSpecializes(org.activemq.ws.xmlbeans.resource.md.SpecializesType specializes)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.SpecializesType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.SpecializesType)get_store().find_attribute_user(SPECIALIZES$8);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.md.SpecializesType)get_store().add_attribute_user(SPECIALIZES$8);
            }
            target.set(specializes);
        }
    }
    
    /**
     * Unsets the "specializes" attribute
     */
    public void unsetSpecializes()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(SPECIALIZES$8);
        }
    }
    
    /**
     * Gets the "wsdlLocation" attribute
     */
    public java.util.List getWsdlLocation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(WSDLLOCATION$10);
            if (target == null)
            {
                return null;
            }
            return target.getListValue();
        }
    }
    
    /**
     * Gets (as xml) the "wsdlLocation" attribute
     */
    public org.activemq.ws.xmlbeans.resource.md.PairsOfURIType xgetWsdlLocation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.PairsOfURIType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.PairsOfURIType)get_store().find_attribute_user(WSDLLOCATION$10);
            return target;
        }
    }
    
    /**
     * True if has "wsdlLocation" attribute
     */
    public boolean isSetWsdlLocation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(WSDLLOCATION$10) != null;
        }
    }
    
    /**
     * Sets the "wsdlLocation" attribute
     */
    public void setWsdlLocation(java.util.List wsdlLocation)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(WSDLLOCATION$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(WSDLLOCATION$10);
            }
            target.setListValue(wsdlLocation);
        }
    }
    
    /**
     * Sets (as xml) the "wsdlLocation" attribute
     */
    public void xsetWsdlLocation(org.activemq.ws.xmlbeans.resource.md.PairsOfURIType wsdlLocation)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.PairsOfURIType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.PairsOfURIType)get_store().find_attribute_user(WSDLLOCATION$10);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.md.PairsOfURIType)get_store().add_attribute_user(WSDLLOCATION$10);
            }
            target.set(wsdlLocation);
        }
    }
    
    /**
     * Unsets the "wsdlLocation" attribute
     */
    public void unsetWsdlLocation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(WSDLLOCATION$10);
        }
    }
    
    /**
     * Gets the "metadataDescriptorLocation" attribute
     */
    public java.util.List getMetadataDescriptorLocation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(METADATADESCRIPTORLOCATION$12);
            if (target == null)
            {
                return null;
            }
            return target.getListValue();
        }
    }
    
    /**
     * Gets (as xml) the "metadataDescriptorLocation" attribute
     */
    public org.activemq.ws.xmlbeans.resource.md.PairsOfURIType xgetMetadataDescriptorLocation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.PairsOfURIType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.PairsOfURIType)get_store().find_attribute_user(METADATADESCRIPTORLOCATION$12);
            return target;
        }
    }
    
    /**
     * True if has "metadataDescriptorLocation" attribute
     */
    public boolean isSetMetadataDescriptorLocation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(METADATADESCRIPTORLOCATION$12) != null;
        }
    }
    
    /**
     * Sets the "metadataDescriptorLocation" attribute
     */
    public void setMetadataDescriptorLocation(java.util.List metadataDescriptorLocation)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(METADATADESCRIPTORLOCATION$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(METADATADESCRIPTORLOCATION$12);
            }
            target.setListValue(metadataDescriptorLocation);
        }
    }
    
    /**
     * Sets (as xml) the "metadataDescriptorLocation" attribute
     */
    public void xsetMetadataDescriptorLocation(org.activemq.ws.xmlbeans.resource.md.PairsOfURIType metadataDescriptorLocation)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.md.PairsOfURIType target = null;
            target = (org.activemq.ws.xmlbeans.resource.md.PairsOfURIType)get_store().find_attribute_user(METADATADESCRIPTORLOCATION$12);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.md.PairsOfURIType)get_store().add_attribute_user(METADATADESCRIPTORLOCATION$12);
            }
            target.set(metadataDescriptorLocation);
        }
    }
    
    /**
     * Unsets the "metadataDescriptorLocation" attribute
     */
    public void unsetMetadataDescriptorLocation()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(METADATADESCRIPTORLOCATION$12);
        }
    }
}
