net.opengis.wmts.x10.impl.ThemesDocumentImpl Maven / Gradle / Ivy
The newest version!
/*
* An XML document type.
* Localname: Themes
* Namespace: http://www.opengis.net/wmts/1.0
* Java type: net.opengis.wmts.x10.ThemesDocument
*
* 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 Themes(@http://www.opengis.net/wmts/1.0) element.
*
* This is a complex type.
*/
public class ThemesDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.opengis.wmts.x10.ThemesDocument {
private static final long serialVersionUID = 1L;
public ThemesDocumentImpl(org.apache.xmlbeans.SchemaType sType) {
super(sType);
}
private static final QName[] PROPERTY_QNAME = {
new QName("http://www.opengis.net/wmts/1.0", "Themes"),
};
/**
* Gets the "Themes" element
*/
@Override
public net.opengis.wmts.x10.ThemesDocument.Themes getThemes() {
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[0], 0);
return (target == null) ? null : target;
}
}
/**
* Sets the "Themes" element
*/
@Override
public void setThemes(net.opengis.wmts.x10.ThemesDocument.Themes themes) {
generatedSetterHelperImpl(themes, PROPERTY_QNAME[0], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
}
/**
* Appends and returns a new empty "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[0]);
return target;
}
}
/**
* An XML Themes(@http://www.opengis.net/wmts/1.0).
*
* This is a complex type.
*/
public static class ThemesImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.opengis.wmts.x10.ThemesDocument.Themes {
private static final long serialVersionUID = 1L;
public ThemesImpl(org.apache.xmlbeans.SchemaType sType) {
super(sType);
}
private static final QName[] PROPERTY_QNAME = {
new QName("http://www.opengis.net/wmts/1.0", "Theme"),
};
/**
* 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[0], 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[0], 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[0]);
}
}
/**
* 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[0]);
}
/**
* Sets ith "Theme" element
*/
@Override
public void setThemeArray(int i, net.opengis.wmts.x10.ThemeDocument.Theme theme) {
generatedSetterHelperImpl(theme, PROPERTY_QNAME[0], 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[0], 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[0]);
return target;
}
}
/**
* Removes the ith "Theme" element
*/
@Override
public void removeTheme(int i) {
synchronized (monitor()) {
check_orphaned();
get_store().remove_element(PROPERTY_QNAME[0], i);
}
}
}
}