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

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

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

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

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


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

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

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

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

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


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

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

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

        /**
         * Appends and returns a new empty "Contents" element
         */
        @Override
        public net.opengis.wmts.x10.ContentsType addNewContents() {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.wmts.x10.ContentsType target = null;
                target = (net.opengis.wmts.x10.ContentsType)get_store().add_element_user(PROPERTY_QNAME[0]);
                return target;
            }
        }

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

        /**
         * Gets a List of "Themes" elements
         */
        @Override
        public java.util.List getThemesList() {
            synchronized (monitor()) {
                check_orphaned();
                return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                    this::getThemesArray,
                    this::setThemesArray,
                    this::insertNewThemes,
                    this::removeThemes,
                    this::sizeOfThemesArray
                );
            }
        }

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

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

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

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

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

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

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

        /**
         * Gets a List of "WSDL" elements
         */
        @Override
        public java.util.List getWSDLList() {
            synchronized (monitor()) {
                check_orphaned();
                return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                    this::getWSDLArray,
                    this::setWSDLArray,
                    this::insertNewWSDL,
                    this::removeWSDL,
                    this::sizeOfWSDLArray
                );
            }
        }

        /**
         * Gets array of all "WSDL" elements
         */
        @Override
        public net.opengis.ows.x11.OnlineResourceType[] getWSDLArray() {
            return getXmlObjectArray(PROPERTY_QNAME[2], new net.opengis.ows.x11.OnlineResourceType[0]);
        }

        /**
         * Gets ith "WSDL" element
         */
        @Override
        public net.opengis.ows.x11.OnlineResourceType getWSDLArray(int i) {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.ows.x11.OnlineResourceType target = null;
                target = (net.opengis.ows.x11.OnlineResourceType)get_store().find_element_user(PROPERTY_QNAME[2], i);
                if (target == null) {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }

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

        /**
         * Sets array of all "WSDL" element  WARNING: This method is not atomicaly synchronized.
         */
        @Override
        public void setWSDLArray(net.opengis.ows.x11.OnlineResourceType[] wsdlArray) {
            check_orphaned();
            arraySetterHelper(wsdlArray, PROPERTY_QNAME[2]);
        }

        /**
         * Sets ith "WSDL" element
         */
        @Override
        public void setWSDLArray(int i, net.opengis.ows.x11.OnlineResourceType wsdl) {
            generatedSetterHelperImpl(wsdl, PROPERTY_QNAME[2], i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
        }

        /**
         * Inserts and returns a new empty value (as xml) as the ith "WSDL" element
         */
        @Override
        public net.opengis.ows.x11.OnlineResourceType insertNewWSDL(int i) {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.ows.x11.OnlineResourceType target = null;
                target = (net.opengis.ows.x11.OnlineResourceType)get_store().insert_element_user(PROPERTY_QNAME[2], i);
                return target;
            }
        }

        /**
         * Appends and returns a new empty value (as xml) as the last "WSDL" element
         */
        @Override
        public net.opengis.ows.x11.OnlineResourceType addNewWSDL() {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.ows.x11.OnlineResourceType target = null;
                target = (net.opengis.ows.x11.OnlineResourceType)get_store().add_element_user(PROPERTY_QNAME[2]);
                return target;
            }
        }

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

        /**
         * Gets a List of "ServiceMetadataURL" elements
         */
        @Override
        public java.util.List getServiceMetadataURLList() {
            synchronized (monitor()) {
                check_orphaned();
                return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                    this::getServiceMetadataURLArray,
                    this::setServiceMetadataURLArray,
                    this::insertNewServiceMetadataURL,
                    this::removeServiceMetadataURL,
                    this::sizeOfServiceMetadataURLArray
                );
            }
        }

        /**
         * Gets array of all "ServiceMetadataURL" elements
         */
        @Override
        public net.opengis.ows.x11.OnlineResourceType[] getServiceMetadataURLArray() {
            return getXmlObjectArray(PROPERTY_QNAME[3], new net.opengis.ows.x11.OnlineResourceType[0]);
        }

        /**
         * Gets ith "ServiceMetadataURL" element
         */
        @Override
        public net.opengis.ows.x11.OnlineResourceType getServiceMetadataURLArray(int i) {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.ows.x11.OnlineResourceType target = null;
                target = (net.opengis.ows.x11.OnlineResourceType)get_store().find_element_user(PROPERTY_QNAME[3], i);
                if (target == null) {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }

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

        /**
         * Sets array of all "ServiceMetadataURL" element  WARNING: This method is not atomicaly synchronized.
         */
        @Override
        public void setServiceMetadataURLArray(net.opengis.ows.x11.OnlineResourceType[] serviceMetadataURLArray) {
            check_orphaned();
            arraySetterHelper(serviceMetadataURLArray, PROPERTY_QNAME[3]);
        }

        /**
         * Sets ith "ServiceMetadataURL" element
         */
        @Override
        public void setServiceMetadataURLArray(int i, net.opengis.ows.x11.OnlineResourceType serviceMetadataURL) {
            generatedSetterHelperImpl(serviceMetadataURL, PROPERTY_QNAME[3], i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
        }

        /**
         * Inserts and returns a new empty value (as xml) as the ith "ServiceMetadataURL" element
         */
        @Override
        public net.opengis.ows.x11.OnlineResourceType insertNewServiceMetadataURL(int i) {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.ows.x11.OnlineResourceType target = null;
                target = (net.opengis.ows.x11.OnlineResourceType)get_store().insert_element_user(PROPERTY_QNAME[3], i);
                return target;
            }
        }

        /**
         * Appends and returns a new empty value (as xml) as the last "ServiceMetadataURL" element
         */
        @Override
        public net.opengis.ows.x11.OnlineResourceType addNewServiceMetadataURL() {
            synchronized (monitor()) {
                check_orphaned();
                net.opengis.ows.x11.OnlineResourceType target = null;
                target = (net.opengis.ows.x11.OnlineResourceType)get_store().add_element_user(PROPERTY_QNAME[3]);
                return target;
            }
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy