/*
 * An XML attribute type.
 * Localname: version
 * Namespace: http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
 * Java type: org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.VersionAttribute
 *
 * Automatically generated - do not modify.
 */
package org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.impl;
/**
 * A document containing one version(@http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd) attribute.
 *
 * This is a complex type.
 */
public class VersionAttributeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.VersionAttribute
{
    
    public VersionAttributeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName VERSION$0 = 
        new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "version");
    
    
    /**
     * Gets the "version" attribute
     */
    public java.lang.String getVersion()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VERSION$0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "version" attribute
     */
    public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString xgetVersion()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().find_attribute_user(VERSION$0);
            return target;
        }
    }
    
    /**
     * True if has "version" attribute
     */
    public boolean isSetVersion()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(VERSION$0) != null;
        }
    }
    
    /**
     * Sets the "version" attribute
     */
    public void setVersion(java.lang.String version)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VERSION$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(VERSION$0);
            }
            target.setStringValue(version);
        }
    }
    
    /**
     * Sets (as xml) the "version" attribute
     */
    public void xsetVersion(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString version)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().find_attribute_user(VERSION$0);
            if (target == null)
            {
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().add_attribute_user(VERSION$0);
            }
            target.set(version);
        }
    }
    
    /**
     * Unsets the "version" attribute
     */
    public void unsetVersion()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(VERSION$0);
        }
    }
}
