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

gov.nist.secauto.metaschema.model.xmlbeans.impl.METASCHEMACONSTRAINTSDocumentImpl Maven / Gradle / Ivy

There is a newer version: 0.12.2
Show newest version
/*
 * An XML document type.
 * Localname: METASCHEMA-CONSTRAINTS
 * Namespace: http://csrc.nist.gov/ns/oscal/metaschema/1.0
 * Java type: gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument
 *
 * Automatically generated - do not modify.
 */
package gov.nist.secauto.metaschema.model.xmlbeans.impl;

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

/**
 * A document containing one METASCHEMA-CONSTRAINTS(@http://csrc.nist.gov/ns/oscal/metaschema/1.0) element.
 *
 * This is a complex type.
 */
public class METASCHEMACONSTRAINTSDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument {
    private static final long serialVersionUID = 1L;

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

    private static final QName[] PROPERTY_QNAME = {
        new QName("http://csrc.nist.gov/ns/oscal/metaschema/1.0", "METASCHEMA-CONSTRAINTS"),
    };


    /**
     * Gets the "METASCHEMA-CONSTRAINTS" element
     */
    @Override
    public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS getMETASCHEMACONSTRAINTS() {
        synchronized (monitor()) {
            check_orphaned();
            gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS target = null;
            target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS)get_store().find_element_user(PROPERTY_QNAME[0], 0);
            return (target == null) ? null : target;
        }
    }

    /**
     * Sets the "METASCHEMA-CONSTRAINTS" element
     */
    @Override
    public void setMETASCHEMACONSTRAINTS(gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS metaschemaconstraints) {
        generatedSetterHelperImpl(metaschemaconstraints, PROPERTY_QNAME[0], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "METASCHEMA-CONSTRAINTS" element
     */
    @Override
    public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS addNewMETASCHEMACONSTRAINTS() {
        synchronized (monitor()) {
            check_orphaned();
            gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS target = null;
            target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS)get_store().add_element_user(PROPERTY_QNAME[0]);
            return target;
        }
    }
    /**
     * An XML METASCHEMA-CONSTRAINTS(@http://csrc.nist.gov/ns/oscal/metaschema/1.0).
     *
     * This is a complex type.
     */
    public static class METASCHEMACONSTRAINTSImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS {
        private static final long serialVersionUID = 1L;

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

        private static final QName[] PROPERTY_QNAME = {
            new QName("http://csrc.nist.gov/ns/oscal/metaschema/1.0", "name"),
            new QName("http://csrc.nist.gov/ns/oscal/metaschema/1.0", "version"),
            new QName("http://csrc.nist.gov/ns/oscal/metaschema/1.0", "import"),
            new QName("http://csrc.nist.gov/ns/oscal/metaschema/1.0", "scope"),
            new QName("http://csrc.nist.gov/ns/oscal/metaschema/1.0", "remarks"),
        };


        /**
         * Gets the "name" element
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.MarkupLineDatatype getName() {
            synchronized (monitor()) {
                check_orphaned();
                gov.nist.secauto.metaschema.model.xmlbeans.MarkupLineDatatype target = null;
                target = (gov.nist.secauto.metaschema.model.xmlbeans.MarkupLineDatatype)get_store().find_element_user(PROPERTY_QNAME[0], 0);
                return (target == null) ? null : target;
            }
        }

        /**
         * Sets the "name" element
         */
        @Override
        public void setName(gov.nist.secauto.metaschema.model.xmlbeans.MarkupLineDatatype name) {
            generatedSetterHelperImpl(name, PROPERTY_QNAME[0], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
        }

        /**
         * Appends and returns a new empty "name" element
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.MarkupLineDatatype addNewName() {
            synchronized (monitor()) {
                check_orphaned();
                gov.nist.secauto.metaschema.model.xmlbeans.MarkupLineDatatype target = null;
                target = (gov.nist.secauto.metaschema.model.xmlbeans.MarkupLineDatatype)get_store().add_element_user(PROPERTY_QNAME[0]);
                return target;
            }
        }

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

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

        /**
         * Gets a List of "import" elements
         */
        @Override
        public java.util.List getImportList() {
            synchronized (monitor()) {
                check_orphaned();
                return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                    this::getImportArray,
                    this::setImportArray,
                    this::insertNewImport,
                    this::removeImport,
                    this::sizeOfImportArray
                );
            }
        }

        /**
         * Gets array of all "import" elements
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import[] getImportArray() {
            return getXmlObjectArray(PROPERTY_QNAME[2], new gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import[0]);
        }

        /**
         * Gets ith "import" element
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import getImportArray(int i) {
            synchronized (monitor()) {
                check_orphaned();
                gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import target = null;
                target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import)get_store().find_element_user(PROPERTY_QNAME[2], i);
                if (target == null) {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }

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

        /**
         * Sets array of all "import" element  WARNING: This method is not atomicaly synchronized.
         */
        @Override
        public void setImportArray(gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import[] ximportArray) {
            check_orphaned();
            arraySetterHelper(ximportArray, PROPERTY_QNAME[2]);
        }

        /**
         * Sets ith "import" element
         */
        @Override
        public void setImportArray(int i, gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import ximport) {
            generatedSetterHelperImpl(ximport, 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 "import" element
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import insertNewImport(int i) {
            synchronized (monitor()) {
                check_orphaned();
                gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import target = null;
                target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import)get_store().insert_element_user(PROPERTY_QNAME[2], i);
                return target;
            }
        }

        /**
         * Appends and returns a new empty value (as xml) as the last "import" element
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import addNewImport() {
            synchronized (monitor()) {
                check_orphaned();
                gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import target = null;
                target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import)get_store().add_element_user(PROPERTY_QNAME[2]);
                return target;
            }
        }

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

        /**
         * Gets a List of "scope" elements
         */
        @Override
        public java.util.List getScopeList() {
            synchronized (monitor()) {
                check_orphaned();
                return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                    this::getScopeArray,
                    this::setScopeArray,
                    this::insertNewScope,
                    this::removeScope,
                    this::sizeOfScopeArray
                );
            }
        }

        /**
         * Gets array of all "scope" elements
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope[] getScopeArray() {
            return getXmlObjectArray(PROPERTY_QNAME[3], new gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope[0]);
        }

        /**
         * Gets ith "scope" element
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope getScopeArray(int i) {
            synchronized (monitor()) {
                check_orphaned();
                gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope target = null;
                target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope)get_store().find_element_user(PROPERTY_QNAME[3], i);
                if (target == null) {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }

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

        /**
         * Sets array of all "scope" element  WARNING: This method is not atomicaly synchronized.
         */
        @Override
        public void setScopeArray(gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope[] scopeArray) {
            check_orphaned();
            arraySetterHelper(scopeArray, PROPERTY_QNAME[3]);
        }

        /**
         * Sets ith "scope" element
         */
        @Override
        public void setScopeArray(int i, gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope scope) {
            generatedSetterHelperImpl(scope, 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 "scope" element
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope insertNewScope(int i) {
            synchronized (monitor()) {
                check_orphaned();
                gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope target = null;
                target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope)get_store().insert_element_user(PROPERTY_QNAME[3], i);
                return target;
            }
        }

        /**
         * Appends and returns a new empty value (as xml) as the last "scope" element
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope addNewScope() {
            synchronized (monitor()) {
                check_orphaned();
                gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope target = null;
                target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope)get_store().add_element_user(PROPERTY_QNAME[3]);
                return target;
            }
        }

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

        /**
         * Gets the "remarks" element
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.RemarksType getRemarks() {
            synchronized (monitor()) {
                check_orphaned();
                gov.nist.secauto.metaschema.model.xmlbeans.RemarksType target = null;
                target = (gov.nist.secauto.metaschema.model.xmlbeans.RemarksType)get_store().find_element_user(PROPERTY_QNAME[4], 0);
                return (target == null) ? null : target;
            }
        }

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

        /**
         * Sets the "remarks" element
         */
        @Override
        public void setRemarks(gov.nist.secauto.metaschema.model.xmlbeans.RemarksType remarks) {
            generatedSetterHelperImpl(remarks, PROPERTY_QNAME[4], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
        }

        /**
         * Appends and returns a new empty "remarks" element
         */
        @Override
        public gov.nist.secauto.metaschema.model.xmlbeans.RemarksType addNewRemarks() {
            synchronized (monitor()) {
                check_orphaned();
                gov.nist.secauto.metaschema.model.xmlbeans.RemarksType target = null;
                target = (gov.nist.secauto.metaschema.model.xmlbeans.RemarksType)get_store().add_element_user(PROPERTY_QNAME[4]);
                return target;
            }
        }

        /**
         * Unsets the "remarks" element
         */
        @Override
        public void unsetRemarks() {
            synchronized (monitor()) {
                check_orphaned();
                get_store().remove_element(PROPERTY_QNAME[4], 0);
            }
        }
        /**
         * An XML import(@http://csrc.nist.gov/ns/oscal/metaschema/1.0).
         *
         * This is a complex type.
         */
        public static class ImportImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Import {
            private static final long serialVersionUID = 1L;

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

            private static final QName[] PROPERTY_QNAME = {
                new QName("", "href"),
            };


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

            /**
             * Sets the "href" attribute
             */
            @Override
            public void setHref(java.lang.String href) {
                synchronized (monitor()) {
                    check_orphaned();
                    org.apache.xmlbeans.SimpleValue target = null;
                    target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[0]);
                    if (target == null) {
                      target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[0]);
                    }
                    target.setStringValue(href);
                }
            }
        }
        /**
         * An XML scope(@http://csrc.nist.gov/ns/oscal/metaschema/1.0).
         *
         * This is a complex type.
         */
        public static class ScopeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope {
            private static final long serialVersionUID = 1L;

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

            private static final QName[] PROPERTY_QNAME = {
                new QName("http://csrc.nist.gov/ns/oscal/metaschema/1.0", "assembly"),
                new QName("http://csrc.nist.gov/ns/oscal/metaschema/1.0", "field"),
                new QName("http://csrc.nist.gov/ns/oscal/metaschema/1.0", "flag"),
                new QName("", "metaschema-namespace"),
                new QName("", "metaschema-short-name"),
            };


            /**
             * Gets a List of "assembly" elements
             */
            @Override
            public java.util.List getAssemblyList() {
                synchronized (monitor()) {
                    check_orphaned();
                    return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                      this::getAssemblyArray,
                      this::setAssemblyArray,
                      this::insertNewAssembly,
                      this::removeAssembly,
                      this::sizeOfAssemblyArray
                    );
                }
            }

            /**
             * Gets array of all "assembly" elements
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly[] getAssemblyArray() {
                return getXmlObjectArray(PROPERTY_QNAME[0], new gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly[0]);
            }

            /**
             * Gets ith "assembly" element
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly getAssemblyArray(int i) {
                synchronized (monitor()) {
                    check_orphaned();
                    gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly target = null;
                    target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly)get_store().find_element_user(PROPERTY_QNAME[0], i);
                    if (target == null) {
                      throw new IndexOutOfBoundsException();
                    }
                    return target;
                }
            }

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

            /**
             * Sets array of all "assembly" element  WARNING: This method is not atomicaly synchronized.
             */
            @Override
            public void setAssemblyArray(gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly[] assemblyArray) {
                check_orphaned();
                arraySetterHelper(assemblyArray, PROPERTY_QNAME[0]);
            }

            /**
             * Sets ith "assembly" element
             */
            @Override
            public void setAssemblyArray(int i, gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly assembly) {
                generatedSetterHelperImpl(assembly, 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 "assembly" element
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly insertNewAssembly(int i) {
                synchronized (monitor()) {
                    check_orphaned();
                    gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly target = null;
                    target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly)get_store().insert_element_user(PROPERTY_QNAME[0], i);
                    return target;
                }
            }

            /**
             * Appends and returns a new empty value (as xml) as the last "assembly" element
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly addNewAssembly() {
                synchronized (monitor()) {
                    check_orphaned();
                    gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly target = null;
                    target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly)get_store().add_element_user(PROPERTY_QNAME[0]);
                    return target;
                }
            }

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

            /**
             * Gets a List of "field" elements
             */
            @Override
            public java.util.List getFieldList() {
                synchronized (monitor()) {
                    check_orphaned();
                    return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                      this::getFieldArray,
                      this::setFieldArray,
                      this::insertNewField,
                      this::removeField,
                      this::sizeOfFieldArray
                    );
                }
            }

            /**
             * Gets array of all "field" elements
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field[] getFieldArray() {
                return getXmlObjectArray(PROPERTY_QNAME[1], new gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field[0]);
            }

            /**
             * Gets ith "field" element
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field getFieldArray(int i) {
                synchronized (monitor()) {
                    check_orphaned();
                    gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field target = null;
                    target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field)get_store().find_element_user(PROPERTY_QNAME[1], i);
                    if (target == null) {
                      throw new IndexOutOfBoundsException();
                    }
                    return target;
                }
            }

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

            /**
             * Sets array of all "field" element  WARNING: This method is not atomicaly synchronized.
             */
            @Override
            public void setFieldArray(gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field[] fieldArray) {
                check_orphaned();
                arraySetterHelper(fieldArray, PROPERTY_QNAME[1]);
            }

            /**
             * Sets ith "field" element
             */
            @Override
            public void setFieldArray(int i, gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field field) {
                generatedSetterHelperImpl(field, 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 "field" element
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field insertNewField(int i) {
                synchronized (monitor()) {
                    check_orphaned();
                    gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field target = null;
                    target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field)get_store().insert_element_user(PROPERTY_QNAME[1], i);
                    return target;
                }
            }

            /**
             * Appends and returns a new empty value (as xml) as the last "field" element
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field addNewField() {
                synchronized (monitor()) {
                    check_orphaned();
                    gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field target = null;
                    target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field)get_store().add_element_user(PROPERTY_QNAME[1]);
                    return target;
                }
            }

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

            /**
             * Gets a List of "flag" elements
             */
            @Override
            public java.util.List getFlagList() {
                synchronized (monitor()) {
                    check_orphaned();
                    return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
                      this::getFlagArray,
                      this::setFlagArray,
                      this::insertNewFlag,
                      this::removeFlag,
                      this::sizeOfFlagArray
                    );
                }
            }

            /**
             * Gets array of all "flag" elements
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag[] getFlagArray() {
                return getXmlObjectArray(PROPERTY_QNAME[2], new gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag[0]);
            }

            /**
             * Gets ith "flag" element
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag getFlagArray(int i) {
                synchronized (monitor()) {
                    check_orphaned();
                    gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag target = null;
                    target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag)get_store().find_element_user(PROPERTY_QNAME[2], i);
                    if (target == null) {
                      throw new IndexOutOfBoundsException();
                    }
                    return target;
                }
            }

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

            /**
             * Sets array of all "flag" element  WARNING: This method is not atomicaly synchronized.
             */
            @Override
            public void setFlagArray(gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag[] flagArray) {
                check_orphaned();
                arraySetterHelper(flagArray, PROPERTY_QNAME[2]);
            }

            /**
             * Sets ith "flag" element
             */
            @Override
            public void setFlagArray(int i, gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag flag) {
                generatedSetterHelperImpl(flag, 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 "flag" element
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag insertNewFlag(int i) {
                synchronized (monitor()) {
                    check_orphaned();
                    gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag target = null;
                    target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag)get_store().insert_element_user(PROPERTY_QNAME[2], i);
                    return target;
                }
            }

            /**
             * Appends and returns a new empty value (as xml) as the last "flag" element
             */
            @Override
            public gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag addNewFlag() {
                synchronized (monitor()) {
                    check_orphaned();
                    gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag target = null;
                    target = (gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag)get_store().add_element_user(PROPERTY_QNAME[2]);
                    return target;
                }
            }

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

            /**
             * Gets the "metaschema-namespace" attribute
             */
            @Override
            public java.lang.String getMetaschemaNamespace() {
                synchronized (monitor()) {
                    check_orphaned();
                    org.apache.xmlbeans.SimpleValue target = null;
                    target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[3]);
                    return (target == null) ? null : target.getStringValue();
                }
            }

            /**
             * Sets the "metaschema-namespace" attribute
             */
            @Override
            public void setMetaschemaNamespace(java.lang.String metaschemaNamespace) {
                synchronized (monitor()) {
                    check_orphaned();
                    org.apache.xmlbeans.SimpleValue target = null;
                    target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[3]);
                    if (target == null) {
                      target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[3]);
                    }
                    target.setStringValue(metaschemaNamespace);
                }
            }

            /**
             * Gets the "metaschema-short-name" attribute
             */
            @Override
            public java.lang.String getMetaschemaShortName() {
                synchronized (monitor()) {
                    check_orphaned();
                    org.apache.xmlbeans.SimpleValue target = null;
                    target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[4]);
                    return (target == null) ? null : target.getStringValue();
                }
            }

            /**
             * Sets the "metaschema-short-name" attribute
             */
            @Override
            public void setMetaschemaShortName(java.lang.String metaschemaShortName) {
                synchronized (monitor()) {
                    check_orphaned();
                    org.apache.xmlbeans.SimpleValue target = null;
                    target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[4]);
                    if (target == null) {
                      target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[4]);
                    }
                    target.setStringValue(metaschemaShortName);
                }
            }
            /**
             * An XML assembly(@http://csrc.nist.gov/ns/oscal/metaschema/1.0).
             *
             * This is a complex type.
             */
            public static class AssemblyImpl extends gov.nist.secauto.metaschema.model.xmlbeans.impl.DefineAssemblyConstraintsTypeImpl implements gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Assembly {
                private static final long serialVersionUID = 1L;

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

                private static final QName[] PROPERTY_QNAME = {
                    new QName("", "target"),
                };


                /**
                 * Gets the "target" attribute
                 */
                @Override
                public gov.nist.secauto.metaschema.model.common.metapath.MetapathExpression getTarget() {
                    synchronized (monitor()) {
                      check_orphaned();
                      org.apache.xmlbeans.SimpleValue target = null;
                      target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[0]);
                      return (target == null) ? null : gov.nist.secauto.metaschema.model.xmlbeans.handler.MetapathExpressionHandler.decodeMetaschemaPathType(target);
                    }
                }

                /**
                 * Sets the "target" attribute
                 */
                @Override
                public void setTarget(gov.nist.secauto.metaschema.model.common.metapath.MetapathExpression targetValue) {
                    synchronized (monitor()) {
                      check_orphaned();
                      org.apache.xmlbeans.SimpleValue target = null;
                      target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[0]);
                      if (target == null) {
                        target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[0]);
                      }
                      gov.nist.secauto.metaschema.model.xmlbeans.handler.MetapathExpressionHandler.encodeMetaschemaPathType(targetValue, target);
                    }
                }
            }
            /**
             * An XML field(@http://csrc.nist.gov/ns/oscal/metaschema/1.0).
             *
             * This is a complex type.
             */
            public static class FieldImpl extends gov.nist.secauto.metaschema.model.xmlbeans.impl.DefineFieldConstraintsTypeImpl implements gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Field {
                private static final long serialVersionUID = 1L;

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

                private static final QName[] PROPERTY_QNAME = {
                    new QName("", "target"),
                };


                /**
                 * Gets the "target" attribute
                 */
                @Override
                public gov.nist.secauto.metaschema.model.common.metapath.MetapathExpression getTarget() {
                    synchronized (monitor()) {
                      check_orphaned();
                      org.apache.xmlbeans.SimpleValue target = null;
                      target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[0]);
                      return (target == null) ? null : gov.nist.secauto.metaschema.model.xmlbeans.handler.MetapathExpressionHandler.decodeMetaschemaPathType(target);
                    }
                }

                /**
                 * Sets the "target" attribute
                 */
                @Override
                public void setTarget(gov.nist.secauto.metaschema.model.common.metapath.MetapathExpression targetValue) {
                    synchronized (monitor()) {
                      check_orphaned();
                      org.apache.xmlbeans.SimpleValue target = null;
                      target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[0]);
                      if (target == null) {
                        target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[0]);
                      }
                      gov.nist.secauto.metaschema.model.xmlbeans.handler.MetapathExpressionHandler.encodeMetaschemaPathType(targetValue, target);
                    }
                }
            }
            /**
             * An XML flag(@http://csrc.nist.gov/ns/oscal/metaschema/1.0).
             *
             * This is a complex type.
             */
            public static class FlagImpl extends gov.nist.secauto.metaschema.model.xmlbeans.impl.DefineFlagConstraintsTypeImpl implements gov.nist.secauto.metaschema.model.xmlbeans.METASCHEMACONSTRAINTSDocument.METASCHEMACONSTRAINTS.Scope.Flag {
                private static final long serialVersionUID = 1L;

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

                private static final QName[] PROPERTY_QNAME = {
                    new QName("", "target"),
                };


                /**
                 * Gets the "target" attribute
                 */
                @Override
                public gov.nist.secauto.metaschema.model.common.metapath.MetapathExpression getTarget() {
                    synchronized (monitor()) {
                      check_orphaned();
                      org.apache.xmlbeans.SimpleValue target = null;
                      target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[0]);
                      return (target == null) ? null : gov.nist.secauto.metaschema.model.xmlbeans.handler.MetapathExpressionHandler.decodeMetaschemaPathType(target);
                    }
                }

                /**
                 * Sets the "target" attribute
                 */
                @Override
                public void setTarget(gov.nist.secauto.metaschema.model.common.metapath.MetapathExpression targetValue) {
                    synchronized (monitor()) {
                      check_orphaned();
                      org.apache.xmlbeans.SimpleValue target = null;
                      target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[0]);
                      if (target == null) {
                        target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[0]);
                      }
                      gov.nist.secauto.metaschema.model.xmlbeans.handler.MetapathExpressionHandler.encodeMetaschemaPathType(targetValue, target);
                    }
                }
            }
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy