
gov.nist.secauto.metaschema.model.testing.xmlbeans.impl.GenerateSchemaDocumentImpl Maven / Gradle / Ivy
/*
* An XML document type.
* Localname: generate-schema
* Namespace: http://csrc.nist.gov/ns/metaschema/test-suite/1.0
* Java type: gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerateSchemaDocument
*
* Automatically generated - do not modify.
*/
package gov.nist.secauto.metaschema.model.testing.xmlbeans.impl;
import javax.xml.namespace.QName;
import org.apache.xmlbeans.QNameSet;
import org.apache.xmlbeans.XmlObject;
/**
* A document containing one generate-schema(@http://csrc.nist.gov/ns/metaschema/test-suite/1.0) element.
*
* This is a complex type.
*/
public class GenerateSchemaDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerateSchemaDocument {
private static final long serialVersionUID = 1L;
public GenerateSchemaDocumentImpl(org.apache.xmlbeans.SchemaType sType) {
super(sType);
}
private static final QName[] PROPERTY_QNAME = {
new QName("http://csrc.nist.gov/ns/metaschema/test-suite/1.0", "generate-schema"),
};
/**
* Gets the "generate-schema" element
*/
@Override
public gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerateSchemaDocument.GenerateSchema getGenerateSchema() {
synchronized (monitor()) {
check_orphaned();
gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerateSchemaDocument.GenerateSchema target = null;
target = (gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerateSchemaDocument.GenerateSchema)get_store().find_element_user(PROPERTY_QNAME[0], 0);
return (target == null) ? null : target;
}
}
/**
* Sets the "generate-schema" element
*/
@Override
public void setGenerateSchema(gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerateSchemaDocument.GenerateSchema generateSchema) {
generatedSetterHelperImpl(generateSchema, PROPERTY_QNAME[0], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
}
/**
* Appends and returns a new empty "generate-schema" element
*/
@Override
public gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerateSchemaDocument.GenerateSchema addNewGenerateSchema() {
synchronized (monitor()) {
check_orphaned();
gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerateSchemaDocument.GenerateSchema target = null;
target = (gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerateSchemaDocument.GenerateSchema)get_store().add_element_user(PROPERTY_QNAME[0]);
return target;
}
}
/**
* An XML generate-schema(@http://csrc.nist.gov/ns/metaschema/test-suite/1.0).
*
* This is a complex type.
*/
public static class GenerateSchemaImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerateSchemaDocument.GenerateSchema {
private static final long serialVersionUID = 1L;
public GenerateSchemaImpl(org.apache.xmlbeans.SchemaType sType) {
super(sType);
}
private static final QName[] PROPERTY_QNAME = {
new QName("http://csrc.nist.gov/ns/metaschema/test-suite/1.0", "metaschema"),
new QName("http://csrc.nist.gov/ns/metaschema/test-suite/1.0", "generation-case"),
new QName("", "generation-result"),
new QName("", "validation-result"),
};
/**
* Gets the "metaschema" element
*/
@Override
public gov.nist.secauto.metaschema.model.testing.xmlbeans.MetaschemaDocument.Metaschema getMetaschema() {
synchronized (monitor()) {
check_orphaned();
gov.nist.secauto.metaschema.model.testing.xmlbeans.MetaschemaDocument.Metaschema target = null;
target = (gov.nist.secauto.metaschema.model.testing.xmlbeans.MetaschemaDocument.Metaschema)get_store().find_element_user(PROPERTY_QNAME[0], 0);
return (target == null) ? null : target;
}
}
/**
* Sets the "metaschema" element
*/
@Override
public void setMetaschema(gov.nist.secauto.metaschema.model.testing.xmlbeans.MetaschemaDocument.Metaschema metaschema) {
generatedSetterHelperImpl(metaschema, PROPERTY_QNAME[0], 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
}
/**
* Appends and returns a new empty "metaschema" element
*/
@Override
public gov.nist.secauto.metaschema.model.testing.xmlbeans.MetaschemaDocument.Metaschema addNewMetaschema() {
synchronized (monitor()) {
check_orphaned();
gov.nist.secauto.metaschema.model.testing.xmlbeans.MetaschemaDocument.Metaschema target = null;
target = (gov.nist.secauto.metaschema.model.testing.xmlbeans.MetaschemaDocument.Metaschema)get_store().add_element_user(PROPERTY_QNAME[0]);
return target;
}
}
/**
* Gets a List of "generation-case" elements
*/
@Override
public java.util.List getGenerationCaseList() {
synchronized (monitor()) {
check_orphaned();
return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(
this::getGenerationCaseArray,
this::setGenerationCaseArray,
this::insertNewGenerationCase,
this::removeGenerationCase,
this::sizeOfGenerationCaseArray
);
}
}
/**
* Gets array of all "generation-case" elements
*/
@Override
public gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType[] getGenerationCaseArray() {
return getXmlObjectArray(PROPERTY_QNAME[1], new gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType[0]);
}
/**
* Gets ith "generation-case" element
*/
@Override
public gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType getGenerationCaseArray(int i) {
synchronized (monitor()) {
check_orphaned();
gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType target = null;
target = (gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType)get_store().find_element_user(PROPERTY_QNAME[1], i);
if (target == null) {
throw new IndexOutOfBoundsException();
}
return target;
}
}
/**
* Returns number of "generation-case" element
*/
@Override
public int sizeOfGenerationCaseArray() {
synchronized (monitor()) {
check_orphaned();
return get_store().count_elements(PROPERTY_QNAME[1]);
}
}
/**
* Sets array of all "generation-case" element WARNING: This method is not atomicaly synchronized.
*/
@Override
public void setGenerationCaseArray(gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType[] generationCaseArray) {
check_orphaned();
arraySetterHelper(generationCaseArray, PROPERTY_QNAME[1]);
}
/**
* Sets ith "generation-case" element
*/
@Override
public void setGenerationCaseArray(int i, gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType generationCase) {
generatedSetterHelperImpl(generationCase, 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 "generation-case" element
*/
@Override
public gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType insertNewGenerationCase(int i) {
synchronized (monitor()) {
check_orphaned();
gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType target = null;
target = (gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType)get_store().insert_element_user(PROPERTY_QNAME[1], i);
return target;
}
}
/**
* Appends and returns a new empty value (as xml) as the last "generation-case" element
*/
@Override
public gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType addNewGenerationCase() {
synchronized (monitor()) {
check_orphaned();
gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType target = null;
target = (gov.nist.secauto.metaschema.model.testing.xmlbeans.GenerationCaseType)get_store().add_element_user(PROPERTY_QNAME[1]);
return target;
}
}
/**
* Removes the ith "generation-case" element
*/
@Override
public void removeGenerationCase(int i) {
synchronized (monitor()) {
check_orphaned();
get_store().remove_element(PROPERTY_QNAME[1], i);
}
}
/**
* Gets the "generation-result" attribute
*/
@Override
public java.lang.Boolean getGenerationResult() {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[2]);
if (target == null) {
target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(PROPERTY_QNAME[2]);
}
return (target == null) ? null : gov.nist.secauto.metaschema.model.testing.xmlbeans.handler.GenerationResultType.decodeGenerationResultType(target);
}
}
/**
* True if has "generation-result" attribute
*/
@Override
public boolean isSetGenerationResult() {
synchronized (monitor()) {
check_orphaned();
return get_store().find_attribute_user(PROPERTY_QNAME[2]) != null;
}
}
/**
* Sets the "generation-result" attribute
*/
@Override
public void setGenerationResult(java.lang.Boolean generationResult) {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PROPERTY_QNAME[2]);
if (target == null) {
target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROPERTY_QNAME[2]);
}
gov.nist.secauto.metaschema.model.testing.xmlbeans.handler.GenerationResultType.encodeGenerationResultType(generationResult, target);
}
}
/**
* Unsets the "generation-result" attribute
*/
@Override
public void unsetGenerationResult() {
synchronized (monitor()) {
check_orphaned();
get_store().remove_attribute(PROPERTY_QNAME[2]);
}
}
/**
* Gets the "validation-result" attribute
*/
@Override
public java.lang.Boolean getValidationResult() {
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_default_attribute_value(PROPERTY_QNAME[3]);
}
return (target == null) ? null : gov.nist.secauto.metaschema.model.testing.xmlbeans.handler.ValidationResultType.decodeValidationResultType(target);
}
}
/**
* True if has "validation-result" attribute
*/
@Override
public boolean isSetValidationResult() {
synchronized (monitor()) {
check_orphaned();
return get_store().find_attribute_user(PROPERTY_QNAME[3]) != null;
}
}
/**
* Sets the "validation-result" attribute
*/
@Override
public void setValidationResult(java.lang.Boolean validationResult) {
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]);
}
gov.nist.secauto.metaschema.model.testing.xmlbeans.handler.ValidationResultType.encodeValidationResultType(validationResult, target);
}
}
/**
* Unsets the "validation-result" attribute
*/
@Override
public void unsetValidationResult() {
synchronized (monitor()) {
check_orphaned();
get_store().remove_attribute(PROPERTY_QNAME[3]);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy