View Javadoc
1   /*
2    * An XML document type.
3    * Localname: Token
4    * Namespace: http://apply.grants.gov/system/GrantsCommonElements-V1.0
5    * Java type: gov.grants.apply.system.grantsCommonElementsV10.TokenDocument
6    *
7    * Automatically generated - do not modify.
8    */
9   package gov.grants.apply.system.grantsCommonElementsV10.impl;
10  /**
11   * A document containing one Token(@http://apply.grants.gov/system/GrantsCommonElements-V1.0) element.
12   *
13   * This is a complex type.
14   */
15  public class TokenDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements gov.grants.apply.system.grantsCommonElementsV10.TokenDocument
16  {
17      private static final long serialVersionUID = 1L;
18      
19      public TokenDocumentImpl(org.apache.xmlbeans.SchemaType sType)
20      {
21          super(sType);
22      }
23      
24      private static final javax.xml.namespace.QName TOKEN$0 = 
25          new javax.xml.namespace.QName("http://apply.grants.gov/system/GrantsCommonElements-V1.0", "Token");
26      
27      
28      /**
29       * Gets the "Token" element
30       */
31      public gov.grants.apply.system.grantsCommonElementsV10.TokenDocument.Token getToken()
32      {
33          synchronized (monitor())
34          {
35              check_orphaned();
36              gov.grants.apply.system.grantsCommonElementsV10.TokenDocument.Token target = null;
37              target = (gov.grants.apply.system.grantsCommonElementsV10.TokenDocument.Token)get_store().find_element_user(TOKEN$0, 0);
38              if (target == null)
39              {
40                  return null;
41              }
42              return target;
43          }
44      }
45      
46      /**
47       * Sets the "Token" element
48       */
49      public void setToken(gov.grants.apply.system.grantsCommonElementsV10.TokenDocument.Token token)
50      {
51          generatedSetterHelperImpl(token, TOKEN$0, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
52      }
53      
54      /**
55       * Appends and returns a new empty "Token" element
56       */
57      public gov.grants.apply.system.grantsCommonElementsV10.TokenDocument.Token addNewToken()
58      {
59          synchronized (monitor())
60          {
61              check_orphaned();
62              gov.grants.apply.system.grantsCommonElementsV10.TokenDocument.Token target = null;
63              target = (gov.grants.apply.system.grantsCommonElementsV10.TokenDocument.Token)get_store().add_element_user(TOKEN$0);
64              return target;
65          }
66      }
67      /**
68       * An XML Token(@http://apply.grants.gov/system/GrantsCommonElements-V1.0).
69       *
70       * This is a complex type.
71       */
72      public static class TokenImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements gov.grants.apply.system.grantsCommonElementsV10.TokenDocument.Token
73      {
74          private static final long serialVersionUID = 1L;
75          
76          public TokenImpl(org.apache.xmlbeans.SchemaType sType)
77          {
78              super(sType);
79          }
80          
81          private static final javax.xml.namespace.QName USERID$0 = 
82              new javax.xml.namespace.QName("http://apply.grants.gov/system/GrantsCommonElements-V1.0", "UserID");
83          private static final javax.xml.namespace.QName TOKENID$2 = 
84              new javax.xml.namespace.QName("http://apply.grants.gov/system/GrantsCommonElements-V1.0", "TokenId");
85          private static final javax.xml.namespace.QName DUNS$4 = 
86              new javax.xml.namespace.QName("http://apply.grants.gov/system/GrantsCommonElements-V1.0", "DUNS");
87          private static final javax.xml.namespace.QName FULLNAME$6 = 
88              new javax.xml.namespace.QName("http://apply.grants.gov/system/GrantsCommonElements-V1.0", "FullName");
89          private static final javax.xml.namespace.QName AORSTATUS$8 = 
90              new javax.xml.namespace.QName("http://apply.grants.gov/system/GrantsCommonElements-V1.0", "AORStatus");
91          private static final javax.xml.namespace.QName TOKENEXPIRATION$10 = 
92              new javax.xml.namespace.QName("http://apply.grants.gov/system/GrantsCommonElements-V1.0", "TokenExpiration");
93          
94          
95          /**
96           * Gets the "UserID" element
97           */
98          public java.lang.String getUserID()
99          {
100             synchronized (monitor())
101             {
102                 check_orphaned();
103                 org.apache.xmlbeans.SimpleValue target = null;
104                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USERID$0, 0);
105                 if (target == null)
106                 {
107                     return null;
108                 }
109                 return target.getStringValue();
110             }
111         }
112         
113         /**
114          * Gets (as xml) the "UserID" element
115          */
116         public gov.grants.apply.system.grantsCommonTypesV10.UserIDType xgetUserID()
117         {
118             synchronized (monitor())
119             {
120                 check_orphaned();
121                 gov.grants.apply.system.grantsCommonTypesV10.UserIDType target = null;
122                 target = (gov.grants.apply.system.grantsCommonTypesV10.UserIDType)get_store().find_element_user(USERID$0, 0);
123                 return target;
124             }
125         }
126         
127         /**
128          * Sets the "UserID" element
129          */
130         public void setUserID(java.lang.String userID)
131         {
132             synchronized (monitor())
133             {
134                 check_orphaned();
135                 org.apache.xmlbeans.SimpleValue target = null;
136                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USERID$0, 0);
137                 if (target == null)
138                 {
139                     target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(USERID$0);
140                 }
141                 target.setStringValue(userID);
142             }
143         }
144         
145         /**
146          * Sets (as xml) the "UserID" element
147          */
148         public void xsetUserID(gov.grants.apply.system.grantsCommonTypesV10.UserIDType userID)
149         {
150             synchronized (monitor())
151             {
152                 check_orphaned();
153                 gov.grants.apply.system.grantsCommonTypesV10.UserIDType target = null;
154                 target = (gov.grants.apply.system.grantsCommonTypesV10.UserIDType)get_store().find_element_user(USERID$0, 0);
155                 if (target == null)
156                 {
157                     target = (gov.grants.apply.system.grantsCommonTypesV10.UserIDType)get_store().add_element_user(USERID$0);
158                 }
159                 target.set(userID);
160             }
161         }
162         
163         /**
164          * Gets the "TokenId" element
165          */
166         public java.lang.String getTokenId()
167         {
168             synchronized (monitor())
169             {
170                 check_orphaned();
171                 org.apache.xmlbeans.SimpleValue target = null;
172                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOKENID$2, 0);
173                 if (target == null)
174                 {
175                     return null;
176                 }
177                 return target.getStringValue();
178             }
179         }
180         
181         /**
182          * Gets (as xml) the "TokenId" element
183          */
184         public gov.grants.apply.system.grantsCommonTypesV10.TokenIdType xgetTokenId()
185         {
186             synchronized (monitor())
187             {
188                 check_orphaned();
189                 gov.grants.apply.system.grantsCommonTypesV10.TokenIdType target = null;
190                 target = (gov.grants.apply.system.grantsCommonTypesV10.TokenIdType)get_store().find_element_user(TOKENID$2, 0);
191                 return target;
192             }
193         }
194         
195         /**
196          * True if has "TokenId" element
197          */
198         public boolean isSetTokenId()
199         {
200             synchronized (monitor())
201             {
202                 check_orphaned();
203                 return get_store().count_elements(TOKENID$2) != 0;
204             }
205         }
206         
207         /**
208          * Sets the "TokenId" element
209          */
210         public void setTokenId(java.lang.String tokenId)
211         {
212             synchronized (monitor())
213             {
214                 check_orphaned();
215                 org.apache.xmlbeans.SimpleValue target = null;
216                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOKENID$2, 0);
217                 if (target == null)
218                 {
219                     target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TOKENID$2);
220                 }
221                 target.setStringValue(tokenId);
222             }
223         }
224         
225         /**
226          * Sets (as xml) the "TokenId" element
227          */
228         public void xsetTokenId(gov.grants.apply.system.grantsCommonTypesV10.TokenIdType tokenId)
229         {
230             synchronized (monitor())
231             {
232                 check_orphaned();
233                 gov.grants.apply.system.grantsCommonTypesV10.TokenIdType target = null;
234                 target = (gov.grants.apply.system.grantsCommonTypesV10.TokenIdType)get_store().find_element_user(TOKENID$2, 0);
235                 if (target == null)
236                 {
237                     target = (gov.grants.apply.system.grantsCommonTypesV10.TokenIdType)get_store().add_element_user(TOKENID$2);
238                 }
239                 target.set(tokenId);
240             }
241         }
242         
243         /**
244          * Unsets the "TokenId" element
245          */
246         public void unsetTokenId()
247         {
248             synchronized (monitor())
249             {
250                 check_orphaned();
251                 get_store().remove_element(TOKENID$2, 0);
252             }
253         }
254         
255         /**
256          * Gets the "DUNS" element
257          */
258         public java.lang.String getDUNS()
259         {
260             synchronized (monitor())
261             {
262                 check_orphaned();
263                 org.apache.xmlbeans.SimpleValue target = null;
264                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DUNS$4, 0);
265                 if (target == null)
266                 {
267                     return null;
268                 }
269                 return target.getStringValue();
270             }
271         }
272         
273         /**
274          * Gets (as xml) the "DUNS" element
275          */
276         public gov.grants.apply.system.grantsCommonTypesV10.DUNSType xgetDUNS()
277         {
278             synchronized (monitor())
279             {
280                 check_orphaned();
281                 gov.grants.apply.system.grantsCommonTypesV10.DUNSType target = null;
282                 target = (gov.grants.apply.system.grantsCommonTypesV10.DUNSType)get_store().find_element_user(DUNS$4, 0);
283                 return target;
284             }
285         }
286         
287         /**
288          * True if has "DUNS" element
289          */
290         public boolean isSetDUNS()
291         {
292             synchronized (monitor())
293             {
294                 check_orphaned();
295                 return get_store().count_elements(DUNS$4) != 0;
296             }
297         }
298         
299         /**
300          * Sets the "DUNS" element
301          */
302         public void setDUNS(java.lang.String duns)
303         {
304             synchronized (monitor())
305             {
306                 check_orphaned();
307                 org.apache.xmlbeans.SimpleValue target = null;
308                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DUNS$4, 0);
309                 if (target == null)
310                 {
311                     target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DUNS$4);
312                 }
313                 target.setStringValue(duns);
314             }
315         }
316         
317         /**
318          * Sets (as xml) the "DUNS" element
319          */
320         public void xsetDUNS(gov.grants.apply.system.grantsCommonTypesV10.DUNSType duns)
321         {
322             synchronized (monitor())
323             {
324                 check_orphaned();
325                 gov.grants.apply.system.grantsCommonTypesV10.DUNSType target = null;
326                 target = (gov.grants.apply.system.grantsCommonTypesV10.DUNSType)get_store().find_element_user(DUNS$4, 0);
327                 if (target == null)
328                 {
329                     target = (gov.grants.apply.system.grantsCommonTypesV10.DUNSType)get_store().add_element_user(DUNS$4);
330                 }
331                 target.set(duns);
332             }
333         }
334         
335         /**
336          * Unsets the "DUNS" element
337          */
338         public void unsetDUNS()
339         {
340             synchronized (monitor())
341             {
342                 check_orphaned();
343                 get_store().remove_element(DUNS$4, 0);
344             }
345         }
346         
347         /**
348          * Gets the "FullName" element
349          */
350         public java.lang.String getFullName()
351         {
352             synchronized (monitor())
353             {
354                 check_orphaned();
355                 org.apache.xmlbeans.SimpleValue target = null;
356                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FULLNAME$6, 0);
357                 if (target == null)
358                 {
359                     return null;
360                 }
361                 return target.getStringValue();
362             }
363         }
364         
365         /**
366          * Gets (as xml) the "FullName" element
367          */
368         public gov.grants.apply.system.grantsCommonTypesV10.FullNameType xgetFullName()
369         {
370             synchronized (monitor())
371             {
372                 check_orphaned();
373                 gov.grants.apply.system.grantsCommonTypesV10.FullNameType target = null;
374                 target = (gov.grants.apply.system.grantsCommonTypesV10.FullNameType)get_store().find_element_user(FULLNAME$6, 0);
375                 return target;
376             }
377         }
378         
379         /**
380          * True if has "FullName" element
381          */
382         public boolean isSetFullName()
383         {
384             synchronized (monitor())
385             {
386                 check_orphaned();
387                 return get_store().count_elements(FULLNAME$6) != 0;
388             }
389         }
390         
391         /**
392          * Sets the "FullName" element
393          */
394         public void setFullName(java.lang.String fullName)
395         {
396             synchronized (monitor())
397             {
398                 check_orphaned();
399                 org.apache.xmlbeans.SimpleValue target = null;
400                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FULLNAME$6, 0);
401                 if (target == null)
402                 {
403                     target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FULLNAME$6);
404                 }
405                 target.setStringValue(fullName);
406             }
407         }
408         
409         /**
410          * Sets (as xml) the "FullName" element
411          */
412         public void xsetFullName(gov.grants.apply.system.grantsCommonTypesV10.FullNameType fullName)
413         {
414             synchronized (monitor())
415             {
416                 check_orphaned();
417                 gov.grants.apply.system.grantsCommonTypesV10.FullNameType target = null;
418                 target = (gov.grants.apply.system.grantsCommonTypesV10.FullNameType)get_store().find_element_user(FULLNAME$6, 0);
419                 if (target == null)
420                 {
421                     target = (gov.grants.apply.system.grantsCommonTypesV10.FullNameType)get_store().add_element_user(FULLNAME$6);
422                 }
423                 target.set(fullName);
424             }
425         }
426         
427         /**
428          * Unsets the "FullName" element
429          */
430         public void unsetFullName()
431         {
432             synchronized (monitor())
433             {
434                 check_orphaned();
435                 get_store().remove_element(FULLNAME$6, 0);
436             }
437         }
438         
439         /**
440          * Gets the "AORStatus" element
441          */
442         public gov.grants.apply.system.grantsCommonTypesV10.AORStatusType.Enum getAORStatus()
443         {
444             synchronized (monitor())
445             {
446                 check_orphaned();
447                 org.apache.xmlbeans.SimpleValue target = null;
448                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AORSTATUS$8, 0);
449                 if (target == null)
450                 {
451                     return null;
452                 }
453                 return (gov.grants.apply.system.grantsCommonTypesV10.AORStatusType.Enum)target.getEnumValue();
454             }
455         }
456         
457         /**
458          * Gets (as xml) the "AORStatus" element
459          */
460         public gov.grants.apply.system.grantsCommonTypesV10.AORStatusType xgetAORStatus()
461         {
462             synchronized (monitor())
463             {
464                 check_orphaned();
465                 gov.grants.apply.system.grantsCommonTypesV10.AORStatusType target = null;
466                 target = (gov.grants.apply.system.grantsCommonTypesV10.AORStatusType)get_store().find_element_user(AORSTATUS$8, 0);
467                 return target;
468             }
469         }
470         
471         /**
472          * Sets the "AORStatus" element
473          */
474         public void setAORStatus(gov.grants.apply.system.grantsCommonTypesV10.AORStatusType.Enum aorStatus)
475         {
476             synchronized (monitor())
477             {
478                 check_orphaned();
479                 org.apache.xmlbeans.SimpleValue target = null;
480                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AORSTATUS$8, 0);
481                 if (target == null)
482                 {
483                     target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(AORSTATUS$8);
484                 }
485                 target.setEnumValue(aorStatus);
486             }
487         }
488         
489         /**
490          * Sets (as xml) the "AORStatus" element
491          */
492         public void xsetAORStatus(gov.grants.apply.system.grantsCommonTypesV10.AORStatusType aorStatus)
493         {
494             synchronized (monitor())
495             {
496                 check_orphaned();
497                 gov.grants.apply.system.grantsCommonTypesV10.AORStatusType target = null;
498                 target = (gov.grants.apply.system.grantsCommonTypesV10.AORStatusType)get_store().find_element_user(AORSTATUS$8, 0);
499                 if (target == null)
500                 {
501                     target = (gov.grants.apply.system.grantsCommonTypesV10.AORStatusType)get_store().add_element_user(AORSTATUS$8);
502                 }
503                 target.set(aorStatus);
504             }
505         }
506         
507         /**
508          * Gets the "TokenExpiration" element
509          */
510         public java.util.Calendar getTokenExpiration()
511         {
512             synchronized (monitor())
513             {
514                 check_orphaned();
515                 org.apache.xmlbeans.SimpleValue target = null;
516                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOKENEXPIRATION$10, 0);
517                 if (target == null)
518                 {
519                     return null;
520                 }
521                 return target.getCalendarValue();
522             }
523         }
524         
525         /**
526          * Gets (as xml) the "TokenExpiration" element
527          */
528         public org.apache.xmlbeans.XmlDateTime xgetTokenExpiration()
529         {
530             synchronized (monitor())
531             {
532                 check_orphaned();
533                 org.apache.xmlbeans.XmlDateTime target = null;
534                 target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(TOKENEXPIRATION$10, 0);
535                 return target;
536             }
537         }
538         
539         /**
540          * True if has "TokenExpiration" element
541          */
542         public boolean isSetTokenExpiration()
543         {
544             synchronized (monitor())
545             {
546                 check_orphaned();
547                 return get_store().count_elements(TOKENEXPIRATION$10) != 0;
548             }
549         }
550         
551         /**
552          * Sets the "TokenExpiration" element
553          */
554         public void setTokenExpiration(java.util.Calendar tokenExpiration)
555         {
556             synchronized (monitor())
557             {
558                 check_orphaned();
559                 org.apache.xmlbeans.SimpleValue target = null;
560                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOKENEXPIRATION$10, 0);
561                 if (target == null)
562                 {
563                     target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TOKENEXPIRATION$10);
564                 }
565                 target.setCalendarValue(tokenExpiration);
566             }
567         }
568         
569         /**
570          * Sets (as xml) the "TokenExpiration" element
571          */
572         public void xsetTokenExpiration(org.apache.xmlbeans.XmlDateTime tokenExpiration)
573         {
574             synchronized (monitor())
575             {
576                 check_orphaned();
577                 org.apache.xmlbeans.XmlDateTime target = null;
578                 target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(TOKENEXPIRATION$10, 0);
579                 if (target == null)
580                 {
581                     target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(TOKENEXPIRATION$10);
582                 }
583                 target.set(tokenExpiration);
584             }
585         }
586         
587         /**
588          * Unsets the "TokenExpiration" element
589          */
590         public void unsetTokenExpiration()
591         {
592             synchronized (monitor())
593             {
594                 check_orphaned();
595                 get_store().remove_element(TOKENEXPIRATION$10, 0);
596             }
597         }
598     }
599 }