View Javadoc

1   /*
2    * An XML document type.
3    * Localname: commit
4    * Namespace: 
5    * Java type: org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument
6    *
7    * Automatically generated - do not modify.
8    */
9   package org.codehaus.mojo.scmchangelog.scm.svn.xml.impl;
10  /**
11   * A document containing one commit(@) element.
12   *
13   * This is a complex type.
14   */
15  public class CommitDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument
16  {
17      
18      public CommitDocumentImpl(org.apache.xmlbeans.SchemaType sType)
19      {
20          super(sType);
21      }
22      
23      private static final javax.xml.namespace.QName COMMIT$0 = 
24          new javax.xml.namespace.QName("", "commit");
25      
26      
27      /**
28       * Gets the "commit" element
29       */
30      public org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit getCommit()
31      {
32          synchronized (monitor())
33          {
34              check_orphaned();
35              org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit target = null;
36              target = (org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit)get_store().find_element_user(COMMIT$0, 0);
37              if (target == null)
38              {
39                  return null;
40              }
41              return target;
42          }
43      }
44      
45      /**
46       * Sets the "commit" element
47       */
48      public void setCommit(org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit commit)
49      {
50          synchronized (monitor())
51          {
52              check_orphaned();
53              org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit target = null;
54              target = (org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit)get_store().find_element_user(COMMIT$0, 0);
55              if (target == null)
56              {
57                  target = (org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit)get_store().add_element_user(COMMIT$0);
58              }
59              target.set(commit);
60          }
61      }
62      
63      /**
64       * Appends and returns a new empty "commit" element
65       */
66      public org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit addNewCommit()
67      {
68          synchronized (monitor())
69          {
70              check_orphaned();
71              org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit target = null;
72              target = (org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit)get_store().add_element_user(COMMIT$0);
73              return target;
74          }
75      }
76      /**
77       * An XML commit(@).
78       *
79       * This is a complex type.
80       */
81      public static class CommitImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.codehaus.mojo.scmchangelog.scm.svn.xml.CommitDocument.Commit
82      {
83          
84          public CommitImpl(org.apache.xmlbeans.SchemaType sType)
85          {
86              super(sType);
87          }
88          
89          private static final javax.xml.namespace.QName AUTHOR$0 = 
90              new javax.xml.namespace.QName("", "author");
91          private static final javax.xml.namespace.QName DATE$2 = 
92              new javax.xml.namespace.QName("", "date");
93          private static final javax.xml.namespace.QName REVISION$4 = 
94              new javax.xml.namespace.QName("", "revision");
95          
96          
97          /**
98           * Gets the "author" element
99           */
100         public java.lang.String getAuthor()
101         {
102             synchronized (monitor())
103             {
104                 check_orphaned();
105                 org.apache.xmlbeans.SimpleValue target = null;
106                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AUTHOR$0, 0);
107                 if (target == null)
108                 {
109                     return null;
110                 }
111                 return target.getStringValue();
112             }
113         }
114         
115         /**
116          * Gets (as xml) the "author" element
117          */
118         public org.codehaus.mojo.scmchangelog.scm.svn.xml.UsernameType xgetAuthor()
119         {
120             synchronized (monitor())
121             {
122                 check_orphaned();
123                 org.codehaus.mojo.scmchangelog.scm.svn.xml.UsernameType target = null;
124                 target = (org.codehaus.mojo.scmchangelog.scm.svn.xml.UsernameType)get_store().find_element_user(AUTHOR$0, 0);
125                 return target;
126             }
127         }
128         
129         /**
130          * True if has "author" element
131          */
132         public boolean isSetAuthor()
133         {
134             synchronized (monitor())
135             {
136                 check_orphaned();
137                 return get_store().count_elements(AUTHOR$0) != 0;
138             }
139         }
140         
141         /**
142          * Sets the "author" element
143          */
144         public void setAuthor(java.lang.String author)
145         {
146             synchronized (monitor())
147             {
148                 check_orphaned();
149                 org.apache.xmlbeans.SimpleValue target = null;
150                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AUTHOR$0, 0);
151                 if (target == null)
152                 {
153                     target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(AUTHOR$0);
154                 }
155                 target.setStringValue(author);
156             }
157         }
158         
159         /**
160          * Sets (as xml) the "author" element
161          */
162         public void xsetAuthor(org.codehaus.mojo.scmchangelog.scm.svn.xml.UsernameType author)
163         {
164             synchronized (monitor())
165             {
166                 check_orphaned();
167                 org.codehaus.mojo.scmchangelog.scm.svn.xml.UsernameType target = null;
168                 target = (org.codehaus.mojo.scmchangelog.scm.svn.xml.UsernameType)get_store().find_element_user(AUTHOR$0, 0);
169                 if (target == null)
170                 {
171                     target = (org.codehaus.mojo.scmchangelog.scm.svn.xml.UsernameType)get_store().add_element_user(AUTHOR$0);
172                 }
173                 target.set(author);
174             }
175         }
176         
177         /**
178          * Unsets the "author" element
179          */
180         public void unsetAuthor()
181         {
182             synchronized (monitor())
183             {
184                 check_orphaned();
185                 get_store().remove_element(AUTHOR$0, 0);
186             }
187         }
188         
189         /**
190          * Gets the "date" element
191          */
192         public java.util.Calendar getDate()
193         {
194             synchronized (monitor())
195             {
196                 check_orphaned();
197                 org.apache.xmlbeans.SimpleValue target = null;
198                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DATE$2, 0);
199                 if (target == null)
200                 {
201                     return null;
202                 }
203                 return target.getCalendarValue();
204             }
205         }
206         
207         /**
208          * Gets (as xml) the "date" element
209          */
210         public org.apache.xmlbeans.XmlDateTime xgetDate()
211         {
212             synchronized (monitor())
213             {
214                 check_orphaned();
215                 org.apache.xmlbeans.XmlDateTime target = null;
216                 target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(DATE$2, 0);
217                 return target;
218             }
219         }
220         
221         /**
222          * True if has "date" element
223          */
224         public boolean isSetDate()
225         {
226             synchronized (monitor())
227             {
228                 check_orphaned();
229                 return get_store().count_elements(DATE$2) != 0;
230             }
231         }
232         
233         /**
234          * Sets the "date" element
235          */
236         public void setDate(java.util.Calendar date)
237         {
238             synchronized (monitor())
239             {
240                 check_orphaned();
241                 org.apache.xmlbeans.SimpleValue target = null;
242                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DATE$2, 0);
243                 if (target == null)
244                 {
245                     target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DATE$2);
246                 }
247                 target.setCalendarValue(date);
248             }
249         }
250         
251         /**
252          * Sets (as xml) the "date" element
253          */
254         public void xsetDate(org.apache.xmlbeans.XmlDateTime date)
255         {
256             synchronized (monitor())
257             {
258                 check_orphaned();
259                 org.apache.xmlbeans.XmlDateTime target = null;
260                 target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(DATE$2, 0);
261                 if (target == null)
262                 {
263                     target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(DATE$2);
264                 }
265                 target.set(date);
266             }
267         }
268         
269         /**
270          * Unsets the "date" element
271          */
272         public void unsetDate()
273         {
274             synchronized (monitor())
275             {
276                 check_orphaned();
277                 get_store().remove_element(DATE$2, 0);
278             }
279         }
280         
281         /**
282          * Gets the "revision" attribute
283          */
284         public java.math.BigInteger getRevision()
285         {
286             synchronized (monitor())
287             {
288                 check_orphaned();
289                 org.apache.xmlbeans.SimpleValue target = null;
290                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REVISION$4);
291                 if (target == null)
292                 {
293                     return null;
294                 }
295                 return target.getBigIntegerValue();
296             }
297         }
298         
299         /**
300          * Gets (as xml) the "revision" attribute
301          */
302         public org.codehaus.mojo.scmchangelog.scm.svn.xml.RevnumType xgetRevision()
303         {
304             synchronized (monitor())
305             {
306                 check_orphaned();
307                 org.codehaus.mojo.scmchangelog.scm.svn.xml.RevnumType target = null;
308                 target = (org.codehaus.mojo.scmchangelog.scm.svn.xml.RevnumType)get_store().find_attribute_user(REVISION$4);
309                 return target;
310             }
311         }
312         
313         /**
314          * Sets the "revision" attribute
315          */
316         public void setRevision(java.math.BigInteger revision)
317         {
318             synchronized (monitor())
319             {
320                 check_orphaned();
321                 org.apache.xmlbeans.SimpleValue target = null;
322                 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REVISION$4);
323                 if (target == null)
324                 {
325                     target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(REVISION$4);
326                 }
327                 target.setBigIntegerValue(revision);
328             }
329         }
330         
331         /**
332          * Sets (as xml) the "revision" attribute
333          */
334         public void xsetRevision(org.codehaus.mojo.scmchangelog.scm.svn.xml.RevnumType revision)
335         {
336             synchronized (monitor())
337             {
338                 check_orphaned();
339                 org.codehaus.mojo.scmchangelog.scm.svn.xml.RevnumType target = null;
340                 target = (org.codehaus.mojo.scmchangelog.scm.svn.xml.RevnumType)get_store().find_attribute_user(REVISION$4);
341                 if (target == null)
342                 {
343                     target = (org.codehaus.mojo.scmchangelog.scm.svn.xml.RevnumType)get_store().add_attribute_user(REVISION$4);
344                 }
345                 target.set(revision);
346             }
347         }
348     }
349 }