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

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

The newest version!
/*
 * An XML document type.
 * Localname: Theme
 * Namespace: http://www.opengis.net/wmts/1.0
 * Java type: net.opengis.wmts.x10.ThemeDocument
 *
 * 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 Theme(@http://www.opengis.net/wmts/1.0) element.
 *
 * This is a complex type.
 */
public class ThemeDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.opengis.wmts.x10.ThemeDocument {
    private static final long serialVersionUID = 1L;

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

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


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

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

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

        public ThemeImpl(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", "Theme"),
            new QName("http://www.opengis.net/wmts/1.0", "LayerRef"),
        };


        /**
         * 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 "Theme" elements
         */
        @Override
        public java.util.List getThemeList() {
            synchronized (monitor()) {
                check_orphaned();
                return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                    this::getThemeArray,
                    this::setThemeArray,
                    this::insertNewTheme,
                    this::removeTheme,
                    this::sizeOfThemeArray
                );
            }
        }

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

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

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

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

        /**
         * Sets ith "Theme" element
         */
        @Override
        public void setThemeArray(int i, net.opengis.wmts.x10.ThemeDocument.Theme theme) {
            generatedSetterHelperImpl(theme, 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 "Theme" element
         */
        @Override
        public net.opengis.wmts.x10.ThemeDocument.Theme insertNewTheme(int i) {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.wmts.x10.ThemeDocument.Theme target = null;
                target = (net.opengis.wmts.x10.ThemeDocument.Theme)get_store().insert_element_user(PROPERTY_QNAME[1], i);
                return target;
            }
        }

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

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

        /**
         * Gets a List of "LayerRef" elements
         */
        @Override
        public java.util.List getLayerRefList() {
            synchronized (monitor()) {
                check_orphaned();
                return new org.apache.xmlbeans.impl.values.JavaListObject<>(
                    this::getLayerRefArray,
                    this::setLayerRefArray,
                    this::insertLayerRef,
                    this::removeLayerRef,
                    this::sizeOfLayerRefArray
                );
            }
        }

        /**
         * Gets array of all "LayerRef" elements
         */
        @Override
        public java.lang.String[] getLayerRefArray() {
            return getObjectArray(PROPERTY_QNAME[2], org.apache.xmlbeans.SimpleValue::getStringValue, String[]::new);
        }

        /**
         * Gets ith "LayerRef" element
         */
        @Override
        public java.lang.String getLayerRefArray(int i) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PROPERTY_QNAME[2], i);
                if (target == null) {
                    throw new IndexOutOfBoundsException();
                }
                return target.getStringValue();
            }
        }

        /**
         * Gets (as xml) a List of "LayerRef" elements
         */
        @Override
        public java.util.List xgetLayerRefList() {
            synchronized (monitor()) {
                check_orphaned();
                return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                    this::xgetLayerRefArray,
                    this::xsetLayerRefArray,
                    this::insertNewLayerRef,
                    this::removeLayerRef,
                    this::sizeOfLayerRefArray
                );
            }
        }

        /**
         * Gets (as xml) array of all "LayerRef" elements
         */
        @Override
        public org.apache.xmlbeans.XmlAnyURI[] xgetLayerRefArray() {
            return xgetArray(PROPERTY_QNAME[2], org.apache.xmlbeans.XmlAnyURI[]::new);
        }

        /**
         * Gets (as xml) ith "LayerRef" element
         */
        @Override
        public org.apache.xmlbeans.XmlAnyURI xgetLayerRefArray(int i) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.XmlAnyURI target = null;
                target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_element_user(PROPERTY_QNAME[2], i);
                if (target == null) {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }

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

        /**
         * Sets array of all "LayerRef" element
         */
        @Override
        public void setLayerRefArray(java.lang.String[] layerRefArray) {
            synchronized (monitor()) {
                check_orphaned();
                arraySetterHelper(layerRefArray, PROPERTY_QNAME[2]);
            }
        }

        /**
         * Sets ith "LayerRef" element
         */
        @Override
        public void setLayerRefArray(int i, java.lang.String layerRef) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PROPERTY_QNAME[2], i);
                if (target == null) {
                    throw new IndexOutOfBoundsException();
                }
                target.setStringValue(layerRef);
            }
        }

        /**
         * Sets (as xml) array of all "LayerRef" element
         */
        @Override
        public void xsetLayerRefArray(org.apache.xmlbeans.XmlAnyURI[]layerRefArray) {
            synchronized (monitor()) {
                check_orphaned();
                arraySetterHelper(layerRefArray, PROPERTY_QNAME[2]);
            }
        }

        /**
         * Sets (as xml) ith "LayerRef" element
         */
        @Override
        public void xsetLayerRefArray(int i, org.apache.xmlbeans.XmlAnyURI layerRef) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.XmlAnyURI target = null;
                target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_element_user(PROPERTY_QNAME[2], i);
                if (target == null) {
                    throw new IndexOutOfBoundsException();
                }
                target.set(layerRef);
            }
        }

        /**
         * Inserts the value as the ith "LayerRef" element
         */
        @Override
        public void insertLayerRef(int i, java.lang.String layerRef) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target =
                    (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(PROPERTY_QNAME[2], i);
                target.setStringValue(layerRef);
            }
        }

        /**
         * Appends the value as the last "LayerRef" element
         */
        @Override
        public void addLayerRef(java.lang.String layerRef) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PROPERTY_QNAME[2]);
                target.setStringValue(layerRef);
            }
        }

        /**
         * Inserts and returns a new empty value (as xml) as the ith "LayerRef" element
         */
        @Override
        public org.apache.xmlbeans.XmlAnyURI insertNewLayerRef(int i) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.XmlAnyURI target = null;
                target = (org.apache.xmlbeans.XmlAnyURI)get_store().insert_element_user(PROPERTY_QNAME[2], i);
                return target;
            }
        }

        /**
         * Appends and returns a new empty value (as xml) as the last "LayerRef" element
         */
        @Override
        public org.apache.xmlbeans.XmlAnyURI addNewLayerRef() {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.XmlAnyURI target = null;
                target = (org.apache.xmlbeans.XmlAnyURI)get_store().add_element_user(PROPERTY_QNAME[2]);
                return target;
            }
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy