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

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

There is a newer version: 4.2.0
Show newest version
/*
 * An XML attribute type.
 * Localname: ENC
 * Namespace: http://www.kith.no/xmlstds
 * Java type: no.kith.xmlstds.ENCAttribute
 *
 * 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;

/**
 * A document containing one ENC(@http://www.kith.no/xmlstds) attribute.
 *
 * This is a complex type.
 */
public class ENCAttributeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements no.kith.xmlstds.ENCAttribute {
    private static final long serialVersionUID = 1L;

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

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


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

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

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

    /**
     * Sets the "ENC" attribute
     */
    @Override
    public void setENC(no.kith.xmlstds.ENCAttribute.ENC.Enum enc) {
        synchronized (monitor()) {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[0]);
            if (target == null) {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[0]);
            }
            target.setEnumValue(enc);
        }
    }

    /**
     * Sets (as xml) the "ENC" attribute
     */
    @Override
    public void xsetENC(no.kith.xmlstds.ENCAttribute.ENC enc) {
        synchronized (monitor()) {
            check_orphaned();
            no.kith.xmlstds.ENCAttribute.ENC target = null;
            target = (no.kith.xmlstds.ENCAttribute.ENC)get_store().find_attribute_user(PROPERTY_QNAME[0]);
            if (target == null) {
                target = (no.kith.xmlstds.ENCAttribute.ENC)get_store().add_attribute_user(PROPERTY_QNAME[0]);
            }
            target.set(enc);
        }
    }

    /**
     * Unsets the "ENC" attribute
     */
    @Override
    public void unsetENC() {
        synchronized (monitor()) {
            check_orphaned();
            get_store().remove_attribute(PROPERTY_QNAME[0]);
        }
    }
    /**
     * An XML ENC(@http://www.kith.no/xmlstds).
     *
     * This is an atomic type that is a restriction of no.kith.xmlstds.ENCAttribute$ENC.
     */
    public static class ENCImpl extends org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx implements no.kith.xmlstds.ENCAttribute.ENC {
        private static final long serialVersionUID = 1L;

        public ENCImpl(org.apache.xmlbeans.SchemaType sType) {
            super(sType, false);
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy