View Javadoc
1   /*
2    * An XML document type.
3    * Localname: NonFederalResources
4    * Namespace: http://apply.grants.gov/forms/SF424A-V1.0
5    * Java type: gov.grants.apply.forms.sf424AV10.NonFederalResourcesDocument
6    *
7    * Automatically generated - do not modify.
8    */
9   package gov.grants.apply.forms.sf424AV10.impl;
10  /**
11   * A document containing one NonFederalResources(@http://apply.grants.gov/forms/SF424A-V1.0) element.
12   *
13   * This is a complex type.
14   */
15  public class NonFederalResourcesDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements gov.grants.apply.forms.sf424AV10.NonFederalResourcesDocument
16  {
17      private static final long serialVersionUID = 1L;
18      
19      public NonFederalResourcesDocumentImpl(org.apache.xmlbeans.SchemaType sType)
20      {
21          super(sType);
22      }
23      
24      private static final javax.xml.namespace.QName NONFEDERALRESOURCES$0 = 
25          new javax.xml.namespace.QName("http://apply.grants.gov/forms/SF424A-V1.0", "NonFederalResources");
26      
27      
28      /**
29       * Gets the "NonFederalResources" element
30       */
31      public gov.grants.apply.forms.sf424AV10.NonFederalResourcesDocument.NonFederalResources getNonFederalResources()
32      {
33          synchronized (monitor())
34          {
35              check_orphaned();
36              gov.grants.apply.forms.sf424AV10.NonFederalResourcesDocument.NonFederalResources target = null;
37              target = (gov.grants.apply.forms.sf424AV10.NonFederalResourcesDocument.NonFederalResources)get_store().find_element_user(NONFEDERALRESOURCES$0, 0);
38              if (target == null)
39              {
40                  return null;
41              }
42              return target;
43          }
44      }
45      
46      /**
47       * Sets the "NonFederalResources" element
48       */
49      public void setNonFederalResources(gov.grants.apply.forms.sf424AV10.NonFederalResourcesDocument.NonFederalResources nonFederalResources)
50      {
51          generatedSetterHelperImpl(nonFederalResources, NONFEDERALRESOURCES$0, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
52      }
53      
54      /**
55       * Appends and returns a new empty "NonFederalResources" element
56       */
57      public gov.grants.apply.forms.sf424AV10.NonFederalResourcesDocument.NonFederalResources addNewNonFederalResources()
58      {
59          synchronized (monitor())
60          {
61              check_orphaned();
62              gov.grants.apply.forms.sf424AV10.NonFederalResourcesDocument.NonFederalResources target = null;
63              target = (gov.grants.apply.forms.sf424AV10.NonFederalResourcesDocument.NonFederalResources)get_store().add_element_user(NONFEDERALRESOURCES$0);
64              return target;
65          }
66      }
67      /**
68       * An XML NonFederalResources(@http://apply.grants.gov/forms/SF424A-V1.0).
69       *
70       * This is a complex type.
71       */
72      public static class NonFederalResourcesImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements gov.grants.apply.forms.sf424AV10.NonFederalResourcesDocument.NonFederalResources
73      {
74          private static final long serialVersionUID = 1L;
75          
76          public NonFederalResourcesImpl(org.apache.xmlbeans.SchemaType sType)
77          {
78              super(sType);
79          }
80          
81          private static final javax.xml.namespace.QName RESOURCELINEITEM$0 = 
82              new javax.xml.namespace.QName("http://apply.grants.gov/forms/SF424A-V1.0", "ResourceLineItem");
83          private static final javax.xml.namespace.QName RESOURCETOTALS$2 = 
84              new javax.xml.namespace.QName("http://apply.grants.gov/forms/SF424A-V1.0", "ResourceTotals");
85          
86          
87          /**
88           * Gets array of all "ResourceLineItem" elements
89           */
90          public gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem[] getResourceLineItemArray()
91          {
92              synchronized (monitor())
93              {
94                  check_orphaned();
95                  java.util.List targetList = new java.util.ArrayList();
96                  get_store().find_all_element_users(RESOURCELINEITEM$0, targetList);
97                  gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem[] result = new gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem[targetList.size()];
98                  targetList.toArray(result);
99                  return result;
100             }
101         }
102         
103         /**
104          * Gets ith "ResourceLineItem" element
105          */
106         public gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem getResourceLineItemArray(int i)
107         {
108             synchronized (monitor())
109             {
110                 check_orphaned();
111                 gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem target = null;
112                 target = (gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem)get_store().find_element_user(RESOURCELINEITEM$0, i);
113                 if (target == null)
114                 {
115                     throw new IndexOutOfBoundsException();
116                 }
117                 return target;
118             }
119         }
120         
121         /**
122          * Returns number of "ResourceLineItem" element
123          */
124         public int sizeOfResourceLineItemArray()
125         {
126             synchronized (monitor())
127             {
128                 check_orphaned();
129                 return get_store().count_elements(RESOURCELINEITEM$0);
130             }
131         }
132         
133         /**
134          * Sets array of all "ResourceLineItem" element  WARNING: This method is not atomicaly synchronized.
135          */
136         public void setResourceLineItemArray(gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem[] resourceLineItemArray)
137         {
138             check_orphaned();
139             arraySetterHelper(resourceLineItemArray, RESOURCELINEITEM$0);
140         }
141         
142         /**
143          * Sets ith "ResourceLineItem" element
144          */
145         public void setResourceLineItemArray(int i, gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem resourceLineItem)
146         {
147             generatedSetterHelperImpl(resourceLineItem, RESOURCELINEITEM$0, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);
148         }
149         
150         /**
151          * Inserts and returns a new empty value (as xml) as the ith "ResourceLineItem" element
152          */
153         public gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem insertNewResourceLineItem(int i)
154         {
155             synchronized (monitor())
156             {
157                 check_orphaned();
158                 gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem target = null;
159                 target = (gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem)get_store().insert_element_user(RESOURCELINEITEM$0, i);
160                 return target;
161             }
162         }
163         
164         /**
165          * Appends and returns a new empty value (as xml) as the last "ResourceLineItem" element
166          */
167         public gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem addNewResourceLineItem()
168         {
169             synchronized (monitor())
170             {
171                 check_orphaned();
172                 gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem target = null;
173                 target = (gov.grants.apply.forms.sf424AV10.ResourceLineItemDocument.ResourceLineItem)get_store().add_element_user(RESOURCELINEITEM$0);
174                 return target;
175             }
176         }
177         
178         /**
179          * Removes the ith "ResourceLineItem" element
180          */
181         public void removeResourceLineItem(int i)
182         {
183             synchronized (monitor())
184             {
185                 check_orphaned();
186                 get_store().remove_element(RESOURCELINEITEM$0, i);
187             }
188         }
189         
190         /**
191          * Gets the "ResourceTotals" element
192          */
193         public gov.grants.apply.forms.sf424AV10.ResourceTotalsDocument.ResourceTotals getResourceTotals()
194         {
195             synchronized (monitor())
196             {
197                 check_orphaned();
198                 gov.grants.apply.forms.sf424AV10.ResourceTotalsDocument.ResourceTotals target = null;
199                 target = (gov.grants.apply.forms.sf424AV10.ResourceTotalsDocument.ResourceTotals)get_store().find_element_user(RESOURCETOTALS$2, 0);
200                 if (target == null)
201                 {
202                     return null;
203                 }
204                 return target;
205             }
206         }
207         
208         /**
209          * True if has "ResourceTotals" element
210          */
211         public boolean isSetResourceTotals()
212         {
213             synchronized (monitor())
214             {
215                 check_orphaned();
216                 return get_store().count_elements(RESOURCETOTALS$2) != 0;
217             }
218         }
219         
220         /**
221          * Sets the "ResourceTotals" element
222          */
223         public void setResourceTotals(gov.grants.apply.forms.sf424AV10.ResourceTotalsDocument.ResourceTotals resourceTotals)
224         {
225             generatedSetterHelperImpl(resourceTotals, RESOURCETOTALS$2, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
226         }
227         
228         /**
229          * Appends and returns a new empty "ResourceTotals" element
230          */
231         public gov.grants.apply.forms.sf424AV10.ResourceTotalsDocument.ResourceTotals addNewResourceTotals()
232         {
233             synchronized (monitor())
234             {
235                 check_orphaned();
236                 gov.grants.apply.forms.sf424AV10.ResourceTotalsDocument.ResourceTotals target = null;
237                 target = (gov.grants.apply.forms.sf424AV10.ResourceTotalsDocument.ResourceTotals)get_store().add_element_user(RESOURCETOTALS$2);
238                 return target;
239             }
240         }
241         
242         /**
243          * Unsets the "ResourceTotals" element
244          */
245         public void unsetResourceTotals()
246         {
247             synchronized (monitor())
248             {
249                 check_orphaned();
250                 get_store().remove_element(RESOURCETOTALS$2, 0);
251             }
252         }
253     }
254 }