All Downloads are FREE. Search and download functionalities are using the official Maven repository.

no.kith.xmlstds.impl.TNImpl Maven / Gradle / Ivy

/*
 * XML Type:  TN
 * Namespace: http://www.kith.no/xmlstds
 * Java type: no.kith.xmlstds.TN
 *
 * Automatically generated - do not modify.
 */
package no.kith.xmlstds.impl;

import javax.xml.namespace.QName;
import org.apache.xmlbeans.QNameSet;
import org.apache.xmlbeans.XmlObject;

/**
 * An XML TN(@http://www.kith.no/xmlstds).
 *
 * This is a complex type.
 */
public class TNImpl extends no.kith.xmlstds.impl.EDImpl implements no.kith.xmlstds.TN {
    private static final long serialVersionUID = 1L;

    public TNImpl(org.apache.xmlbeans.SchemaType sType) {
        super(sType);
    }

    private static final QName[] PROPERTY_QNAME = {
        new QName("http://www.kith.no/xmlstds", "REF"),
        new QName("http://www.kith.no/xmlstds", "COMPN"),
        new QName("http://www.kith.no/xmlstds", "IC"),
        new QName("http://www.kith.no/xmlstds", "ICA"),
        new QName("http://www.kith.no/xmlstds", "NULL"),
    };


    /**
     * Gets the "REF" element
     */
    @Override
    public no.kith.xmlstds.URL getREF() {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.URL target = null;
            target = (no.kith.xmlstds.URL)get_store().find_element_user(PROPERTY_QNAME[0], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * True if has "REF" element
     */
    @Override
    public boolean isSetREF() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().count_elements(PROPERTY_QNAME[0]) != 0;
        }
    }

    /**
     * Sets the "REF" element
     */
    @Override
    public void setREF(no.kith.xmlstds.URL ref) {
        generatedSetterHelperImpl(ref, PROPERTY_QNAME[0], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "REF" element
     */
    @Override
    public no.kith.xmlstds.URL addNewREF() {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.URL target = null;
            target = (no.kith.xmlstds.URL)get_store().add_element_user(PROPERTY_QNAME[0]);
            return target;
        }
    }

    /**
     * Unsets the "REF" element
     */
    @Override
    public void unsetREF() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_element(PROPERTY_QNAME[0], 0);
        }
    }

    /**
     * Gets the "COMPN" attribute
     */
    @Override
    public no.kith.xmlstds.COMPNAttribute.COMPN.Enum getCOMPN() {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[1]);
            return (target == null) ? null : (no.kith.xmlstds.COMPNAttribute.COMPN.Enum)target.getEnumValue();
        }
    }

    /**
     * Gets (as xml) the "COMPN" attribute
     */
    @Override
    public no.kith.xmlstds.COMPNAttribute.COMPN xgetCOMPN() {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.COMPNAttribute.COMPN target = null;
            target = (no.kith.xmlstds.COMPNAttribute.COMPN)get_store().find_attribute_user(PROPERTY_QNAME[1]);
            return target;
        }
    }

    /**
     * True if has "COMPN" attribute
     */
    @Override
    public boolean isSetCOMPN() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().find_attribute_user(PROPERTY_QNAME[1]) != null;
        }
    }

    /**
     * Sets the "COMPN" attribute
     */
    @Override
    public void setCOMPN(no.kith.xmlstds.COMPNAttribute.COMPN.Enum compn) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[1]);
            if (target == null) {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[1]);
            }
            target.setEnumValue(compn);
        }
    }

    /**
     * Sets (as xml) the "COMPN" attribute
     */
    @Override
    public void xsetCOMPN(no.kith.xmlstds.COMPNAttribute.COMPN compn) {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.COMPNAttribute.COMPN target = null;
            target = (no.kith.xmlstds.COMPNAttribute.COMPN)get_store().find_attribute_user(PROPERTY_QNAME[1]);
            if (target == null) {
                target = (no.kith.xmlstds.COMPNAttribute.COMPN)get_store().add_attribute_user(PROPERTY_QNAME[1]);
            }
            target.set(compn);
        }
    }

    /**
     * Unsets the "COMPN" attribute
     */
    @Override
    public void unsetCOMPN() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_attribute(PROPERTY_QNAME[1]);
        }
    }

    /**
     * Gets the "IC" attribute
     */
    @Override
    public byte[] getIC() {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[2]);
            return (target == null) ? null : target.getByteArrayValue();
        }
    }

    /**
     * Gets (as xml) the "IC" attribute
     */
    @Override
    public no.kith.xmlstds.ICAttribute.IC xgetIC() {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.ICAttribute.IC target = null;
            target = (no.kith.xmlstds.ICAttribute.IC)get_store().find_attribute_user(PROPERTY_QNAME[2]);
            return target;
        }
    }

    /**
     * True if has "IC" attribute
     */
    @Override
    public boolean isSetIC() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().find_attribute_user(PROPERTY_QNAME[2]) != null;
        }
    }

    /**
     * Sets the "IC" attribute
     */
    @Override
    public void setIC(byte[] ic) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[2]);
            if (target == null) {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[2]);
            }
            target.setByteArrayValue(ic);
        }
    }

    /**
     * Sets (as xml) the "IC" attribute
     */
    @Override
    public void xsetIC(no.kith.xmlstds.ICAttribute.IC ic) {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.ICAttribute.IC target = null;
            target = (no.kith.xmlstds.ICAttribute.IC)get_store().find_attribute_user(PROPERTY_QNAME[2]);
            if (target == null) {
                target = (no.kith.xmlstds.ICAttribute.IC)get_store().add_attribute_user(PROPERTY_QNAME[2]);
            }
            target.set(ic);
        }
    }

    /**
     * Unsets the "IC" attribute
     */
    @Override
    public void unsetIC() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_attribute(PROPERTY_QNAME[2]);
        }
    }

    /**
     * Gets the "ICA" attribute
     */
    @Override
    public no.kith.xmlstds.ICAAttribute.ICA.Enum getICA() {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[3]);
            if (target == null) {
                target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(PROPERTY_QNAME[3]);
            }
            return (target == null) ? null : (no.kith.xmlstds.ICAAttribute.ICA.Enum)target.getEnumValue();
        }
    }

    /**
     * Gets (as xml) the "ICA" attribute
     */
    @Override
    public no.kith.xmlstds.ICAAttribute.ICA xgetICA() {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.ICAAttribute.ICA target = null;
            target = (no.kith.xmlstds.ICAAttribute.ICA)get_store().find_attribute_user(PROPERTY_QNAME[3]);
            if (target == null) {
                target = (no.kith.xmlstds.ICAAttribute.ICA)get_default_attribute_value(PROPERTY_QNAME[3]);
            }
            return target;
        }
    }

    /**
     * True if has "ICA" attribute
     */
    @Override
    public boolean isSetICA() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().find_attribute_user(PROPERTY_QNAME[3]) != null;
        }
    }

    /**
     * Sets the "ICA" attribute
     */
    @Override
    public void setICA(no.kith.xmlstds.ICAAttribute.ICA.Enum ica) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[3]);
            if (target == null) {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[3]);
            }
            target.setEnumValue(ica);
        }
    }

    /**
     * Sets (as xml) the "ICA" attribute
     */
    @Override
    public void xsetICA(no.kith.xmlstds.ICAAttribute.ICA ica) {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.ICAAttribute.ICA target = null;
            target = (no.kith.xmlstds.ICAAttribute.ICA)get_store().find_attribute_user(PROPERTY_QNAME[3]);
            if (target == null) {
                target = (no.kith.xmlstds.ICAAttribute.ICA)get_store().add_attribute_user(PROPERTY_QNAME[3]);
            }
            target.set(ica);
        }
    }

    /**
     * Unsets the "ICA" attribute
     */
    @Override
    public void unsetICA() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_attribute(PROPERTY_QNAME[3]);
        }
    }

    /**
     * Gets the "NULL" attribute
     */
    @Override
    public no.kith.xmlstds.NULLAttribute.NULL.Enum getNULL() {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[4]);
            return (target == null) ? null : (no.kith.xmlstds.NULLAttribute.NULL.Enum)target.getEnumValue();
        }
    }

    /**
     * Gets (as xml) the "NULL" attribute
     */
    @Override
    public no.kith.xmlstds.NULLAttribute.NULL xgetNULL() {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.NULLAttribute.NULL target = null;
            target = (no.kith.xmlstds.NULLAttribute.NULL)get_store().find_attribute_user(PROPERTY_QNAME[4]);
            return target;
        }
    }

    /**
     * True if has "NULL" attribute
     */
    @Override
    public boolean isSetNULL() {
        synchronized (monitor()) {
            check_orphaned();
            return get_store().find_attribute_user(PROPERTY_QNAME[4]) != null;
        }
    }

    /**
     * Sets the "NULL" attribute
     */
    @Override
    public void setNULL(no.kith.xmlstds.NULLAttribute.NULL.Enum xnull) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[4]);
            if (target == null) {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[4]);
            }
            target.setEnumValue(xnull);
        }
    }

    /**
     * Sets (as xml) the "NULL" attribute
     */
    @Override
    public void xsetNULL(no.kith.xmlstds.NULLAttribute.NULL xnull) {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.NULLAttribute.NULL target = null;
            target = (no.kith.xmlstds.NULLAttribute.NULL)get_store().find_attribute_user(PROPERTY_QNAME[4]);
            if (target == null) {
                target = (no.kith.xmlstds.NULLAttribute.NULL)get_store().add_attribute_user(PROPERTY_QNAME[4]);
            }
            target.set(xnull);
        }
    }

    /**
     * Unsets the "NULL" attribute
     */
    @Override
    public void unsetNULL() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_attribute(PROPERTY_QNAME[4]);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy