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

net.wirelabs.jmaps.model.map.impl.MapDocumentImpl Maven / Gradle / Ivy

The newest version!
/*
 * An XML document type.
 * Localname: map
 * Namespace: http://www.wirelabs.net/jmaps/model/map
 * Java type: net.wirelabs.jmaps.model.map.MapDocument
 *
 * Automatically generated - do not modify.
 */
package net.wirelabs.jmaps.model.map.impl;

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

/**
 * A document containing one map(@http://www.wirelabs.net/jmaps/model/map) element.
 *
 * This is a complex type.
 */
public class MapDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.wirelabs.jmaps.model.map.MapDocument {
    private static final long serialVersionUID = 1L;

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

    private static final QName[] PROPERTY_QNAME = {
        new QName("http://www.wirelabs.net/jmaps/model/map", "map"),
    };


    /**
     * Gets the "map" element
     */
    @Override
    public net.wirelabs.jmaps.model.map.MapDocument.Map getMap() {
        synchronized (monitor()) {
            check_orphaned();
            net.wirelabs.jmaps.model.map.MapDocument.Map target = null;
            target = (net.wirelabs.jmaps.model.map.MapDocument.Map)get_store().find_element_user(PROPERTY_QNAME[0], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * Sets the "map" element
     */
    @Override
    public void setMap(net.wirelabs.jmaps.model.map.MapDocument.Map map) {
        generatedSetterHelperImpl(map, PROPERTY_QNAME[0], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "map" element
     */
    @Override
    public net.wirelabs.jmaps.model.map.MapDocument.Map addNewMap() {
        synchronized (monitor()) {
            check_orphaned();
            net.wirelabs.jmaps.model.map.MapDocument.Map target = null;
            target = (net.wirelabs.jmaps.model.map.MapDocument.Map)get_store().add_element_user(PROPERTY_QNAME[0]);
            return target;
        }
    }
    /**
     * An XML map(@http://www.wirelabs.net/jmaps/model/map).
     *
     * This is a complex type.
     */
    public static class MapImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.wirelabs.jmaps.model.map.MapDocument.Map {
        private static final long serialVersionUID = 1L;

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

        private static final QName[] PROPERTY_QNAME = {
            new QName("http://www.wirelabs.net/jmaps/model/map", "name"),
            new QName("http://www.wirelabs.net/jmaps/model/map", "layer"),
            new QName("http://www.wirelabs.net/jmaps/model/map", "copyright"),
        };


        /**
         * Gets the "name" element
         */
        @Override
        public java.lang.String getName() {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PROPERTY_QNAME[0], 0);
                return (target == null) ? null : target.getStringValue();
            }
        }

        /**
         * Gets (as xml) the "name" element
         */
        @Override
        public org.apache.xmlbeans.XmlString xgetName() {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PROPERTY_QNAME[0], 0);
                return target;
            }
        }

        /**
         * Sets the "name" element
         */
        @Override
        public void setName(java.lang.String name) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PROPERTY_QNAME[0], 0);
                if (target == null) {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PROPERTY_QNAME[0]);
                }
                target.setStringValue(name);
            }
        }

        /**
         * Sets (as xml) the "name" element
         */
        @Override
        public void xsetName(org.apache.xmlbeans.XmlString name) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PROPERTY_QNAME[0], 0);
                if (target == null) {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(PROPERTY_QNAME[0]);
                }
                target.set(name);
            }
        }

        /**
         * Gets a List of "layer" elements
         */
        @Override
        public java.util.List getLayerList() {
            synchronized (monitor()) {
                check_orphaned();
                return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                    this::getLayerArray,
                    this::setLayerArray,
                    this::insertNewLayer,
                    this::removeLayer,
                    this::sizeOfLayerArray
                );
            }
        }

        /**
         * Gets array of all "layer" elements
         */
        @Override
        public net.wirelabs.jmaps.model.map.LayerDocument.Layer[] getLayerArray() {
            return getXmlObjectArray(PROPERTY_QNAME[1], new net.wirelabs.jmaps.model.map.LayerDocument.Layer[0]);
        }

        /**
         * Gets ith "layer" element
         */
        @Override
        public net.wirelabs.jmaps.model.map.LayerDocument.Layer getLayerArray(int i) {
            synchronized (monitor()) {
                check_orphaned();
                net.wirelabs.jmaps.model.map.LayerDocument.Layer target = null;
                target = (net.wirelabs.jmaps.model.map.LayerDocument.Layer)get_store().find_element_user(PROPERTY_QNAME[1], i);
                if (target == null) {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }

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

        /**
         * Sets array of all "layer" element  WARNING: This method is not atomicaly synchronized.
         */
        @Override
        public void setLayerArray(net.wirelabs.jmaps.model.map.LayerDocument.Layer[] layerArray) {
            check_orphaned();
            arraySetterHelper(layerArray, PROPERTY_QNAME[1]);
        }

        /**
         * Sets ith "layer" element
         */
        @Override
        public void setLayerArray(int i, net.wirelabs.jmaps.model.map.LayerDocument.Layer layer) {
            generatedSetterHelperImpl(layer, 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 "layer" element
         */
        @Override
        public net.wirelabs.jmaps.model.map.LayerDocument.Layer insertNewLayer(int i) {
            synchronized (monitor()) {
                check_orphaned();
                net.wirelabs.jmaps.model.map.LayerDocument.Layer target = null;
                target = (net.wirelabs.jmaps.model.map.LayerDocument.Layer)get_store().insert_element_user(PROPERTY_QNAME[1], i);
                return target;
            }
        }

        /**
         * Appends and returns a new empty value (as xml) as the last "layer" element
         */
        @Override
        public net.wirelabs.jmaps.model.map.LayerDocument.Layer addNewLayer() {
            synchronized (monitor()) {
                check_orphaned();
                net.wirelabs.jmaps.model.map.LayerDocument.Layer target = null;
                target = (net.wirelabs.jmaps.model.map.LayerDocument.Layer)get_store().add_element_user(PROPERTY_QNAME[1]);
                return target;
            }
        }

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

        /**
         * Gets the "copyright" element
         */
        @Override
        public java.lang.String getCopyright() {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PROPERTY_QNAME[2], 0);
                return (target == null) ? null : target.getStringValue();
            }
        }

        /**
         * Gets (as xml) the "copyright" element
         */
        @Override
        public org.apache.xmlbeans.XmlString xgetCopyright() {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PROPERTY_QNAME[2], 0);
                return target;
            }
        }

        /**
         * Sets the "copyright" element
         */
        @Override
        public void setCopyright(java.lang.String copyright) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PROPERTY_QNAME[2], 0);
                if (target == null) {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PROPERTY_QNAME[2]);
                }
                target.setStringValue(copyright);
            }
        }

        /**
         * Sets (as xml) the "copyright" element
         */
        @Override
        public void xsetCopyright(org.apache.xmlbeans.XmlString copyright) {
            synchronized (monitor()) {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PROPERTY_QNAME[2], 0);
                if (target == null) {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(PROPERTY_QNAME[2]);
                }
                target.set(copyright);
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy