001: /*
002: * An XML document type.
003: * Localname: root
004: * Namespace: http://xmlbeans.apache.org/samples/any
005: * Java type: org.apache.xmlbeans.samples.any.RootDocument
006: *
007: * Automatically generated - do not modify.
008: */
009: package org.apache.xmlbeans.samples.any.impl;
010:
011: /**
012: * A document containing one root(@http://xmlbeans.apache.org/samples/any) element.
013: *
014: * This is a complex type.
015: */
016: public class RootDocumentImpl extends
017: org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
018: org.apache.xmlbeans.samples.any.RootDocument {
019:
020: public RootDocumentImpl(org.apache.xmlbeans.SchemaType sType) {
021: super (sType);
022: }
023:
024: private static final javax.xml.namespace.QName ROOT$0 = new javax.xml.namespace.QName(
025: "http://xmlbeans.apache.org/samples/any", "root");
026:
027: /**
028: * Gets the "root" element
029: */
030: public org.apache.xmlbeans.samples.any.RootDocument.Root getRoot() {
031: synchronized (monitor()) {
032: check_orphaned();
033: org.apache.xmlbeans.samples.any.RootDocument.Root target = null;
034: target = (org.apache.xmlbeans.samples.any.RootDocument.Root) get_store()
035: .find_element_user(ROOT$0, 0);
036: if (target == null) {
037: return null;
038: }
039: return target;
040: }
041: }
042:
043: /**
044: * Sets the "root" element
045: */
046: public void setRoot(
047: org.apache.xmlbeans.samples.any.RootDocument.Root root) {
048: synchronized (monitor()) {
049: check_orphaned();
050: org.apache.xmlbeans.samples.any.RootDocument.Root target = null;
051: target = (org.apache.xmlbeans.samples.any.RootDocument.Root) get_store()
052: .find_element_user(ROOT$0, 0);
053: if (target == null) {
054: target = (org.apache.xmlbeans.samples.any.RootDocument.Root) get_store()
055: .add_element_user(ROOT$0);
056: }
057: target.set(root);
058: }
059: }
060:
061: /**
062: * Appends and returns a new empty "root" element
063: */
064: public org.apache.xmlbeans.samples.any.RootDocument.Root addNewRoot() {
065: synchronized (monitor()) {
066: check_orphaned();
067: org.apache.xmlbeans.samples.any.RootDocument.Root target = null;
068: target = (org.apache.xmlbeans.samples.any.RootDocument.Root) get_store()
069: .add_element_user(ROOT$0);
070: return target;
071: }
072: }
073:
074: /**
075: * An XML root(@http://xmlbeans.apache.org/samples/any).
076: *
077: * This is a complex type.
078: */
079: public static class RootImpl extends
080: org.apache.xmlbeans.impl.values.XmlComplexContentImpl
081: implements
082: org.apache.xmlbeans.samples.any.RootDocument.Root {
083:
084: public RootImpl(org.apache.xmlbeans.SchemaType sType) {
085: super (sType);
086: }
087:
088: private static final javax.xml.namespace.QName STRINGELEMENT$0 = new javax.xml.namespace.QName(
089: "http://xmlbeans.apache.org/samples/any",
090: "stringelement");
091: private static final javax.xml.namespace.QName ARRAYOFANY$2 = new javax.xml.namespace.QName(
092: "http://xmlbeans.apache.org/samples/any", "arrayofany");
093:
094: /**
095: * Gets the "stringelement" element
096: */
097: public java.lang.String getStringelement() {
098: synchronized (monitor()) {
099: check_orphaned();
100: org.apache.xmlbeans.SimpleValue target = null;
101: target = (org.apache.xmlbeans.SimpleValue) get_store()
102: .find_element_user(STRINGELEMENT$0, 0);
103: if (target == null) {
104: return null;
105: }
106: return target.getStringValue();
107: }
108: }
109:
110: /**
111: * Gets (as xml) the "stringelement" element
112: */
113: public org.apache.xmlbeans.XmlString xgetStringelement() {
114: synchronized (monitor()) {
115: check_orphaned();
116: org.apache.xmlbeans.XmlString target = null;
117: target = (org.apache.xmlbeans.XmlString) get_store()
118: .find_element_user(STRINGELEMENT$0, 0);
119: return target;
120: }
121: }
122:
123: /**
124: * Sets the "stringelement" element
125: */
126: public void setStringelement(java.lang.String stringelement) {
127: synchronized (monitor()) {
128: check_orphaned();
129: org.apache.xmlbeans.SimpleValue target = null;
130: target = (org.apache.xmlbeans.SimpleValue) get_store()
131: .find_element_user(STRINGELEMENT$0, 0);
132: if (target == null) {
133: target = (org.apache.xmlbeans.SimpleValue) get_store()
134: .add_element_user(STRINGELEMENT$0);
135: }
136: target.setStringValue(stringelement);
137: }
138: }
139:
140: /**
141: * Sets (as xml) the "stringelement" element
142: */
143: public void xsetStringelement(
144: org.apache.xmlbeans.XmlString stringelement) {
145: synchronized (monitor()) {
146: check_orphaned();
147: org.apache.xmlbeans.XmlString target = null;
148: target = (org.apache.xmlbeans.XmlString) get_store()
149: .find_element_user(STRINGELEMENT$0, 0);
150: if (target == null) {
151: target = (org.apache.xmlbeans.XmlString) get_store()
152: .add_element_user(STRINGELEMENT$0);
153: }
154: target.set(stringelement);
155: }
156: }
157:
158: /**
159: * Gets the "arrayofany" element
160: */
161: public org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany getArrayofany() {
162: synchronized (monitor()) {
163: check_orphaned();
164: org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany target = null;
165: target = (org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany) get_store()
166: .find_element_user(ARRAYOFANY$2, 0);
167: if (target == null) {
168: return null;
169: }
170: return target;
171: }
172: }
173:
174: /**
175: * Sets the "arrayofany" element
176: */
177: public void setArrayofany(
178: org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany arrayofany) {
179: synchronized (monitor()) {
180: check_orphaned();
181: org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany target = null;
182: target = (org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany) get_store()
183: .find_element_user(ARRAYOFANY$2, 0);
184: if (target == null) {
185: target = (org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany) get_store()
186: .add_element_user(ARRAYOFANY$2);
187: }
188: target.set(arrayofany);
189: }
190: }
191:
192: /**
193: * Appends and returns a new empty "arrayofany" element
194: */
195: public org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany addNewArrayofany() {
196: synchronized (monitor()) {
197: check_orphaned();
198: org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany target = null;
199: target = (org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany) get_store()
200: .add_element_user(ARRAYOFANY$2);
201: return target;
202: }
203: }
204:
205: /**
206: * An XML arrayofany(@http://xmlbeans.apache.org/samples/any).
207: *
208: * This is a complex type.
209: */
210: public static class ArrayofanyImpl extends
211: org.apache.xmlbeans.impl.values.XmlComplexContentImpl
212: implements
213: org.apache.xmlbeans.samples.any.RootDocument.Root.Arrayofany {
214:
215: public ArrayofanyImpl(org.apache.xmlbeans.SchemaType sType) {
216: super(sType);
217: }
218:
219: }
220: }
221: }
|