/*
 * XML Type:  Relationship
 * Namespace: http://schemas.xmlsoap.org/ws/2004/08/addressing
 * Java type: org.codehaus.activemq.ws.schema.addressing.Relationship
 *
 * Automatically generated - do not modify.
 */
package org.codehaus.activemq.ws.schema.addressing.impl;

/**
 * An XML Relationship(@http://schemas.xmlsoap.org/ws/2004/08/addressing).
 * <p/>
 * This is an atomic type that is a restriction of org.apache.xmlbeans.XmlAnyURI.
 */
public class RelationshipImpl extends org.apache.xmlbeans.impl.values.JavaUriHolderEx implements org.codehaus.activemq.ws.schema.addressing.Relationship {

    public RelationshipImpl(org.apache.xmlbeans.SchemaType sType) {
        super(sType, true);
    }

    protected RelationshipImpl(org.apache.xmlbeans.SchemaType sType, boolean b) {
        super(sType, b);
    }

    private static final javax.xml.namespace.QName RELATIONSHIPTYPE$0 =
            new javax.xml.namespace.QName("", "RelationshipType");


    /**
     * Gets the "RelationshipType" attribute
     */
    public javax.xml.namespace.QName getRelationshipType() {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue) get_store().find_attribute_user(RELATIONSHIPTYPE$0);
            if (target == null) {
                return null;
            }
            return target.getQNameValue();
        }
    }

    /**
     * Gets (as xml) the "RelationshipType" attribute
     */
    public org.apache.xmlbeans.XmlQName xgetRelationshipType() {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.XmlQName target = null;
            target = (org.apache.xmlbeans.XmlQName) get_store().find_attribute_user(RELATIONSHIPTYPE$0);
            return target;
        }
    }

    /**
     * True if has "RelationshipType" attribute
     */
    public boolean isSetRelationshipType() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().find_attribute_user(RELATIONSHIPTYPE$0) != null;
        }
    }

    /**
     * Sets the "RelationshipType" attribute
     */
    public void setRelationshipType(javax.xml.namespace.QName relationshipType) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue) get_store().find_attribute_user(RELATIONSHIPTYPE$0);
            if (target == null) {
                target = (org.apache.xmlbeans.SimpleValue) get_store().add_attribute_user(RELATIONSHIPTYPE$0);
            }
            target.setQNameValue(relationshipType);
        }
    }

    /**
     * Sets (as xml) the "RelationshipType" attribute
     */
    public void xsetRelationshipType(org.apache.xmlbeans.XmlQName relationshipType) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.XmlQName target = null;
            target = (org.apache.xmlbeans.XmlQName) get_store().find_attribute_user(RELATIONSHIPTYPE$0);
            if (target == null) {
                target = (org.apache.xmlbeans.XmlQName) get_store().add_attribute_user(RELATIONSHIPTYPE$0);
            }
            target.set(relationshipType);
        }
    }

    /**
     * Unsets the "RelationshipType" attribute
     */
    public void unsetRelationshipType() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_attribute(RELATIONSHIPTYPE$0);
        }
    }
}
