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

net.opengis.wmts.x10.impl.StyleDocumentImpl Maven / Gradle / Ivy

The newest version!
/*
 * An XML document type.
 * Localname: Style
 * Namespace: http://www.opengis.net/wmts/1.0
 * Java type: net.opengis.wmts.x10.StyleDocument
 *
 * Automatically generated - do not modify.
 */
package net.opengis.wmts.x10.impl;

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

/**
 * A document containing one Style(@http://www.opengis.net/wmts/1.0) element.
 *
 * This is a complex type.
 */
public class StyleDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.opengis.wmts.x10.StyleDocument {
    private static final long serialVersionUID = 1L;

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

    private static final QName[] PROPERTY_QNAME = {
        new QName("http://www.opengis.net/wmts/1.0", "Style"),
    };


    /**
     * Gets the "Style" element
     */
    @Override
    public net.opengis.wmts.x10.StyleDocument.Style getStyle() {
        synchronized (monitor()) {
            check_orphaned();
            net.opengis.wmts.x10.StyleDocument.Style target = null;
            target = (net.opengis.wmts.x10.StyleDocument.Style)get_store().find_element_user(PROPERTY_QNAME[0], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * Sets the "Style" element
     */
    @Override
    public void setStyle(net.opengis.wmts.x10.StyleDocument.Style style) {
        generatedSetterHelperImpl(style, PROPERTY_QNAME[0], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "Style" element
     */
    @Override
    public net.opengis.wmts.x10.StyleDocument.Style addNewStyle() {
        synchronized (monitor()) {
            check_orphaned();
            net.opengis.wmts.x10.StyleDocument.Style target = null;
            target = (net.opengis.wmts.x10.StyleDocument.Style)get_store().add_element_user(PROPERTY_QNAME[0]);
            return target;
        }
    }
    /**
     * An XML Style(@http://www.opengis.net/wmts/1.0).
     *
     * This is a complex type.
     */
    public static class StyleImpl extends net.opengis.ows.x11.impl.DescriptionTypeImpl implements net.opengis.wmts.x10.StyleDocument.Style {
        private static final long serialVersionUID = 1L;

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

        private static final QName[] PROPERTY_QNAME = {
            new QName("http://www.opengis.net/ows/1.1", "Identifier"),
            new QName("http://www.opengis.net/wmts/1.0", "LegendURL"),
            new QName("", "isDefault"),
        };


        /**
         * Gets the "Identifier" element
         */
        @Override
        public net.opengis.ows.x11.CodeType getIdentifier() {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.ows.x11.CodeType target = null;
                target = (net.opengis.ows.x11.CodeType)get_store().find_element_user(PROPERTY_QNAME[0], 0);
                return (target == null) ? null : target;
            }
        }

        /**
         * Sets the "Identifier" element
         */
        @Override
        public void setIdentifier(net.opengis.ows.x11.CodeType identifier) {
            generatedSetterHelperImpl(identifier, PROPERTY_QNAME[0], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
        }

        /**
         * Appends and returns a new empty "Identifier" element
         */
        @Override
        public net.opengis.ows.x11.CodeType addNewIdentifier() {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.ows.x11.CodeType target = null;
                target = (net.opengis.ows.x11.CodeType)get_store().add_element_user(PROPERTY_QNAME[0]);
                return target;
            }
        }

        /**
         * Gets a List of "LegendURL" elements
         */
        @Override
        public java.util.List getLegendURLList() {
            synchronized (monitor()) {
                check_orphaned();
                return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                    this::getLegendURLArray,
                    this::setLegendURLArray,
                    this::insertNewLegendURL,
                    this::removeLegendURL,
                    this::sizeOfLegendURLArray
                );
            }
        }

        /**
         * Gets array of all "LegendURL" elements
         */
        @Override
        public net.opengis.wmts.x10.LegendURLDocument.LegendURL[] getLegendURLArray() {
            return getXmlObjectArray(PROPERTY_QNAME[1], new net.opengis.wmts.x10.LegendURLDocument.LegendURL[0]);
        }

        /**
         * Gets ith "LegendURL" element
         */
        @Override
        public net.opengis.wmts.x10.LegendURLDocument.LegendURL getLegendURLArray(int i) {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.wmts.x10.LegendURLDocument.LegendURL target = null;
                target = (net.opengis.wmts.x10.LegendURLDocument.LegendURL)get_store().find_element_user(PROPERTY_QNAME[1], i);
                if (target == null) {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }

        /**
         * Returns number of "LegendURL" element
         */
        @Override
        public int sizeOfLegendURLArray() {
            synchronized (monitor()) {
                check_orphaned();
                return get_store().count_elements(PROPERTY_QNAME[1]);
            }
        }

        /**
         * Sets array of all "LegendURL" element  WARNING: This method is not atomicaly synchronized.
         */
        @Override
        public void setLegendURLArray(net.opengis.wmts.x10.LegendURLDocument.LegendURL[] legendURLArray) {
            check_orphaned();
            arraySetterHelper(legendURLArray, PROPERTY_QNAME[1]);
        }

        /**
         * Sets ith "LegendURL" element
         */
        @Override
        public void setLegendURLArray(int i, net.opengis.wmts.x10.LegendURLDocument.LegendURL legendURL) {
            generatedSetterHelperImpl(legendURL, PROPERTY_QNAME[1], i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
        }

        /**
         * Inserts and returns a new empty value (as xml) as the ith "LegendURL" element
         */
        @Override
        public net.opengis.wmts.x10.LegendURLDocument.LegendURL insertNewLegendURL(int i) {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.wmts.x10.LegendURLDocument.LegendURL target = null;
                target = (net.opengis.wmts.x10.LegendURLDocument.LegendURL)get_store().insert_element_user(PROPERTY_QNAME[1], i);
                return target;
            }
        }

        /**
         * Appends and returns a new empty value (as xml) as the last "LegendURL" element
         */
        @Override
        public net.opengis.wmts.x10.LegendURLDocument.LegendURL addNewLegendURL() {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.wmts.x10.LegendURLDocument.LegendURL target = null;
                target = (net.opengis.wmts.x10.LegendURLDocument.LegendURL)get_store().add_element_user(PROPERTY_QNAME[1]);
                return target;
            }
        }

        /**
         * Removes the ith "LegendURL" element
         */
        @Override
        public void removeLegendURL(int i) {
            synchronized (monitor()) {
                check_orphaned();
                get_store().remove_element(PROPERTY_QNAME[1], i);
            }
        }

        /**
         * Gets the "isDefault" attribute
         */
        @Override
        public boolean getIsDefault() {
            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) ? false : target.getBooleanValue();
            }
        }

        /**
         * Gets (as xml) the "isDefault" attribute
         */
        @Override
        public org.apache.xmlbeans.XmlBoolean xgetIsDefault() {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.XmlBoolean target = null;
                target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(PROPERTY_QNAME[2]);
                return target;
            }
        }

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

        /**
         * Sets the "isDefault" attribute
         */
        @Override
        public void setIsDefault(boolean isDefault) {
            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.setBooleanValue(isDefault);
            }
        }

        /**
         * Sets (as xml) the "isDefault" attribute
         */
        @Override
        public void xsetIsDefault(org.apache.xmlbeans.XmlBoolean isDefault) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.XmlBoolean target = null;
                target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(PROPERTY_QNAME[2]);
                if (target == null) {
                    target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(PROPERTY_QNAME[2]);
                }
                target.set(isDefault);
            }
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy