PageRenderTime 56ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/projects/castor-1.3.3/xmlctf-framework/target/generated-sources/castor/org/exolab/castor/tests/framework/testDescriptor/TestDescriptor.java

https://gitlab.com/essere.lab.public/qualitas.class-corpus
Java | 528 lines | 187 code | 58 blank | 283 comment | 5 complexity | d279a9a05a745e358165672371f0014e MD5 | raw file
  1. /*
  2. * This class was automatically generated with
  3. * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
  4. * Schema.
  5. * $Id$
  6. */
  7. package org.exolab.castor.tests.framework.testDescriptor;
  8. /**
  9. * Castor Testing Framework Test Descriptor XML Schema
  10. * <p>
  11. * Namespace: http://castor.exolab.org/Test
  12. * <p>
  13. * This schema is used to generate the
  14. * org.exolab.castor.tests.framework.testdescriptor package
  15. * Note: This schema is under evolution and subject to change.
  16. * This schema is under the Exolab license.
  17. *
  18. *
  19. * @version $Revision$ $Date$
  20. */
  21. public class TestDescriptor implements java.io.Serializable {
  22. //--------------------------/
  23. //- Class/Member Variables -/
  24. //--------------------------/
  25. /**
  26. * Field _name.
  27. */
  28. private java.lang.String _name;
  29. /**
  30. * Field _author.
  31. */
  32. private java.lang.String _author;
  33. /**
  34. * Field _commentList.
  35. */
  36. private java.util.List _commentList;
  37. /**
  38. * Field _category.
  39. */
  40. private org.exolab.castor.tests.framework.testDescriptor.types.CategoryType _category;
  41. /**
  42. * Encapsulates information about a bug fix, including the
  43. * reporter's
  44. * name (or Email address), the date of the report and of the
  45. * fix,
  46. * and one or more comments about the bug.
  47. *
  48. */
  49. private org.exolab.castor.tests.framework.testDescriptor.BugFix _bugFix;
  50. /**
  51. * Field _minimumJavaVersion.
  52. */
  53. private float _minimumJavaVersion;
  54. /**
  55. * keeps track of state for field: _minimumJavaVersion
  56. */
  57. private boolean _has_minimumJavaVersion;
  58. /**
  59. * Field _maximumJavaVersion.
  60. */
  61. private float _maximumJavaVersion;
  62. /**
  63. * keeps track of state for field: _maximumJavaVersion
  64. */
  65. private boolean _has_maximumJavaVersion;
  66. /**
  67. * Field _testDescriptorChoice.
  68. */
  69. private org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice _testDescriptorChoice;
  70. //----------------/
  71. //- Constructors -/
  72. //----------------/
  73. public TestDescriptor() {
  74. super();
  75. this._commentList = new java.util.ArrayList();
  76. }
  77. //-----------/
  78. //- Methods -/
  79. //-----------/
  80. /**
  81. *
  82. *
  83. * @param vComment
  84. * @throws java.lang.IndexOutOfBoundsException if the index
  85. * given is outside the bounds of the collection
  86. */
  87. public void addComment(
  88. final java.lang.String vComment)
  89. throws java.lang.IndexOutOfBoundsException {
  90. this._commentList.add(vComment);
  91. }
  92. /**
  93. *
  94. *
  95. * @param index
  96. * @param vComment
  97. * @throws java.lang.IndexOutOfBoundsException if the index
  98. * given is outside the bounds of the collection
  99. */
  100. public void addComment(
  101. final int index,
  102. final java.lang.String vComment)
  103. throws java.lang.IndexOutOfBoundsException {
  104. this._commentList.add(index, vComment);
  105. }
  106. /**
  107. */
  108. public void deleteMaximumJavaVersion(
  109. ) {
  110. this._has_maximumJavaVersion= false;
  111. }
  112. /**
  113. */
  114. public void deleteMinimumJavaVersion(
  115. ) {
  116. this._has_minimumJavaVersion= false;
  117. }
  118. /**
  119. * Method enumerateComment.
  120. *
  121. * @return an Enumeration over all possible elements of this
  122. * collection
  123. */
  124. public java.util.Enumeration enumerateComment(
  125. ) {
  126. return java.util.Collections.enumeration(this._commentList);
  127. }
  128. /**
  129. * Returns the value of field 'author'.
  130. *
  131. * @return the value of field 'Author'.
  132. */
  133. public java.lang.String getAuthor(
  134. ) {
  135. return this._author;
  136. }
  137. /**
  138. * Returns the value of field 'bugFix'. The field 'bugFix' has
  139. * the following description: Encapsulates information about a
  140. * bug fix, including the reporter's
  141. * name (or Email address), the date of the report and of the
  142. * fix,
  143. * and one or more comments about the bug.
  144. *
  145. *
  146. * @return the value of field 'BugFix'.
  147. */
  148. public org.exolab.castor.tests.framework.testDescriptor.BugFix getBugFix(
  149. ) {
  150. return this._bugFix;
  151. }
  152. /**
  153. * Returns the value of field 'category'.
  154. *
  155. * @return the value of field 'Category'.
  156. */
  157. public org.exolab.castor.tests.framework.testDescriptor.types.CategoryType getCategory(
  158. ) {
  159. return this._category;
  160. }
  161. /**
  162. * Method getComment.
  163. *
  164. * @param index
  165. * @throws java.lang.IndexOutOfBoundsException if the index
  166. * given is outside the bounds of the collection
  167. * @return the value of the java.lang.String at the given index
  168. */
  169. public java.lang.String getComment(
  170. final int index)
  171. throws java.lang.IndexOutOfBoundsException {
  172. // check bounds for index
  173. if (index < 0 || index >= this._commentList.size()) {
  174. throw new IndexOutOfBoundsException("getComment: Index value '" + index + "' not in range [0.." + (this._commentList.size() - 1) + "]");
  175. }
  176. return (java.lang.String) _commentList.get(index);
  177. }
  178. /**
  179. * Method getComment.Returns the contents of the collection in
  180. * an Array. <p>Note: Just in case the collection contents
  181. * are changing in another thread, we pass a 0-length Array of
  182. * the correct type into the API call. This way we <i>know</i>
  183. * that the Array returned is of exactly the correct length.
  184. *
  185. * @return this collection as an Array
  186. */
  187. public java.lang.String[] getComment(
  188. ) {
  189. java.lang.String[] array = new java.lang.String[0];
  190. return (java.lang.String[]) this._commentList.toArray(array);
  191. }
  192. /**
  193. * Method getCommentCount.
  194. *
  195. * @return the size of this collection
  196. */
  197. public int getCommentCount(
  198. ) {
  199. return this._commentList.size();
  200. }
  201. /**
  202. * Returns the value of field 'maximumJavaVersion'.
  203. *
  204. * @return the value of field 'MaximumJavaVersion'.
  205. */
  206. public float getMaximumJavaVersion(
  207. ) {
  208. return this._maximumJavaVersion;
  209. }
  210. /**
  211. * Returns the value of field 'minimumJavaVersion'.
  212. *
  213. * @return the value of field 'MinimumJavaVersion'.
  214. */
  215. public float getMinimumJavaVersion(
  216. ) {
  217. return this._minimumJavaVersion;
  218. }
  219. /**
  220. * Returns the value of field 'name'.
  221. *
  222. * @return the value of field 'Name'.
  223. */
  224. public java.lang.String getName(
  225. ) {
  226. return this._name;
  227. }
  228. /**
  229. * Returns the value of field 'testDescriptorChoice'.
  230. *
  231. * @return the value of field 'TestDescriptorChoice'.
  232. */
  233. public org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice getTestDescriptorChoice(
  234. ) {
  235. return this._testDescriptorChoice;
  236. }
  237. /**
  238. * Method hasMaximumJavaVersion.
  239. *
  240. * @return true if at least one MaximumJavaVersion has been adde
  241. */
  242. public boolean hasMaximumJavaVersion(
  243. ) {
  244. return this._has_maximumJavaVersion;
  245. }
  246. /**
  247. * Method hasMinimumJavaVersion.
  248. *
  249. * @return true if at least one MinimumJavaVersion has been adde
  250. */
  251. public boolean hasMinimumJavaVersion(
  252. ) {
  253. return this._has_minimumJavaVersion;
  254. }
  255. /**
  256. * Method isValid.
  257. *
  258. * @return true if this object is valid according to the schema
  259. */
  260. public boolean isValid(
  261. ) {
  262. try {
  263. validate();
  264. } catch (org.exolab.castor.xml.ValidationException vex) {
  265. return false;
  266. }
  267. return true;
  268. }
  269. /**
  270. * Method iterateComment.
  271. *
  272. * @return an Iterator over all possible elements in this
  273. * collection
  274. */
  275. public java.util.Iterator iterateComment(
  276. ) {
  277. return this._commentList.iterator();
  278. }
  279. /**
  280. *
  281. *
  282. * @param out
  283. * @throws org.exolab.castor.xml.MarshalException if object is
  284. * null or if any SAXException is thrown during marshaling
  285. * @throws org.exolab.castor.xml.ValidationException if this
  286. * object is an invalid instance according to the schema
  287. */
  288. public void marshal(
  289. final java.io.Writer out)
  290. throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
  291. org.exolab.castor.xml.Marshaller.marshal(this, out);
  292. }
  293. /**
  294. *
  295. *
  296. * @param handler
  297. * @throws java.io.IOException if an IOException occurs during
  298. * marshaling
  299. * @throws org.exolab.castor.xml.ValidationException if this
  300. * object is an invalid instance according to the schema
  301. * @throws org.exolab.castor.xml.MarshalException if object is
  302. * null or if any SAXException is thrown during marshaling
  303. */
  304. public void marshal(
  305. final org.xml.sax.ContentHandler handler)
  306. throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
  307. org.exolab.castor.xml.Marshaller.marshal(this, handler);
  308. }
  309. /**
  310. */
  311. public void removeAllComment(
  312. ) {
  313. this._commentList.clear();
  314. }
  315. /**
  316. * Method removeComment.
  317. *
  318. * @param vComment
  319. * @return true if the object was removed from the collection.
  320. */
  321. public boolean removeComment(
  322. final java.lang.String vComment) {
  323. boolean removed = _commentList.remove(vComment);
  324. return removed;
  325. }
  326. /**
  327. * Method removeCommentAt.
  328. *
  329. * @param index
  330. * @return the element removed from the collection
  331. */
  332. public java.lang.String removeCommentAt(
  333. final int index) {
  334. java.lang.Object obj = this._commentList.remove(index);
  335. return (java.lang.String) obj;
  336. }
  337. /**
  338. * Sets the value of field 'author'.
  339. *
  340. * @param author the value of field 'author'.
  341. */
  342. public void setAuthor(
  343. final java.lang.String author) {
  344. this._author = author;
  345. }
  346. /**
  347. * Sets the value of field 'bugFix'. The field 'bugFix' has the
  348. * following description: Encapsulates information about a bug
  349. * fix, including the reporter's
  350. * name (or Email address), the date of the report and of the
  351. * fix,
  352. * and one or more comments about the bug.
  353. *
  354. *
  355. * @param bugFix the value of field 'bugFix'.
  356. */
  357. public void setBugFix(
  358. final org.exolab.castor.tests.framework.testDescriptor.BugFix bugFix) {
  359. this._bugFix = bugFix;
  360. }
  361. /**
  362. * Sets the value of field 'category'.
  363. *
  364. * @param category the value of field 'category'.
  365. */
  366. public void setCategory(
  367. final org.exolab.castor.tests.framework.testDescriptor.types.CategoryType category) {
  368. this._category = category;
  369. }
  370. /**
  371. *
  372. *
  373. * @param index
  374. * @param vComment
  375. * @throws java.lang.IndexOutOfBoundsException if the index
  376. * given is outside the bounds of the collection
  377. */
  378. public void setComment(
  379. final int index,
  380. final java.lang.String vComment)
  381. throws java.lang.IndexOutOfBoundsException {
  382. // check bounds for index
  383. if (index < 0 || index >= this._commentList.size()) {
  384. throw new IndexOutOfBoundsException("setComment: Index value '" + index + "' not in range [0.." + (this._commentList.size() - 1) + "]");
  385. }
  386. this._commentList.set(index, vComment);
  387. }
  388. /**
  389. *
  390. *
  391. * @param vCommentArray
  392. */
  393. public void setComment(
  394. final java.lang.String[] vCommentArray) {
  395. //-- copy array
  396. _commentList.clear();
  397. for (int i = 0; i < vCommentArray.length; i++) {
  398. this._commentList.add(vCommentArray[i]);
  399. }
  400. }
  401. /**
  402. * Sets the value of field 'maximumJavaVersion'.
  403. *
  404. * @param maximumJavaVersion the value of field
  405. * 'maximumJavaVersion'.
  406. */
  407. public void setMaximumJavaVersion(
  408. final float maximumJavaVersion) {
  409. this._maximumJavaVersion = maximumJavaVersion;
  410. this._has_maximumJavaVersion = true;
  411. }
  412. /**
  413. * Sets the value of field 'minimumJavaVersion'.
  414. *
  415. * @param minimumJavaVersion the value of field
  416. * 'minimumJavaVersion'.
  417. */
  418. public void setMinimumJavaVersion(
  419. final float minimumJavaVersion) {
  420. this._minimumJavaVersion = minimumJavaVersion;
  421. this._has_minimumJavaVersion = true;
  422. }
  423. /**
  424. * Sets the value of field 'name'.
  425. *
  426. * @param name the value of field 'name'.
  427. */
  428. public void setName(
  429. final java.lang.String name) {
  430. this._name = name;
  431. }
  432. /**
  433. * Sets the value of field 'testDescriptorChoice'.
  434. *
  435. * @param testDescriptorChoice the value of field
  436. * 'testDescriptorChoice'.
  437. */
  438. public void setTestDescriptorChoice(
  439. final org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice testDescriptorChoice) {
  440. this._testDescriptorChoice = testDescriptorChoice;
  441. }
  442. /**
  443. * Method unmarshal.
  444. *
  445. * @param reader
  446. * @throws org.exolab.castor.xml.MarshalException if object is
  447. * null or if any SAXException is thrown during marshaling
  448. * @throws org.exolab.castor.xml.ValidationException if this
  449. * object is an invalid instance according to the schema
  450. * @return the unmarshaled
  451. * org.exolab.castor.tests.framework.testDescriptor.TestDescriptor
  452. */
  453. public static org.exolab.castor.tests.framework.testDescriptor.TestDescriptor unmarshal(
  454. final java.io.Reader reader)
  455. throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
  456. return (org.exolab.castor.tests.framework.testDescriptor.TestDescriptor) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.tests.framework.testDescriptor.TestDescriptor.class, reader);
  457. }
  458. /**
  459. *
  460. *
  461. * @throws org.exolab.castor.xml.ValidationException if this
  462. * object is an invalid instance according to the schema
  463. */
  464. public void validate(
  465. )
  466. throws org.exolab.castor.xml.ValidationException {
  467. org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
  468. validator.validate(this);
  469. }
  470. }