View Javadoc
1 /* 2 * An XML document type. 3 * Localname: ingredient 4 * Namespace: http://mrl.sf.net 5 * Java type: net.sf.mrl.IngredientDocument 6 * 7 * Automatically generated - do not modify. 8 */ 9 package net.sf.mrl.impl; 10 /*** 11 * A document containing one ingredient(@http://mrl.sf.net) element. 12 * 13 * This is a complex type. 14 */ 15 public class IngredientDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.sf.mrl.IngredientDocument 16 { 17 18 public IngredientDocumentImpl(org.apache.xmlbeans.SchemaType sType) 19 { 20 super(sType); 21 } 22 23 private static final javax.xml.namespace.QName INGREDIENT$0 = 24 new javax.xml.namespace.QName("http://mrl.sf.net", "ingredient"); 25 26 27 /*** 28 * Gets the "ingredient" element 29 */ 30 public net.sf.mrl.IngredientDocument.Ingredient getIngredient() 31 { 32 synchronized (monitor()) 33 { 34 check_orphaned(); 35 net.sf.mrl.IngredientDocument.Ingredient target = null; 36 target = (net.sf.mrl.IngredientDocument.Ingredient)get_store().find_element_user(INGREDIENT$0, 0); 37 if (target == null) 38 { 39 return null; 40 } 41 return target; 42 } 43 } 44 45 /*** 46 * Sets the "ingredient" element 47 */ 48 public void setIngredient(net.sf.mrl.IngredientDocument.Ingredient ingredient) 49 { 50 synchronized (monitor()) 51 { 52 check_orphaned(); 53 net.sf.mrl.IngredientDocument.Ingredient target = null; 54 target = (net.sf.mrl.IngredientDocument.Ingredient)get_store().find_element_user(INGREDIENT$0, 0); 55 if (target == null) 56 { 57 target = (net.sf.mrl.IngredientDocument.Ingredient)get_store().add_element_user(INGREDIENT$0); 58 } 59 target.set(ingredient); 60 } 61 } 62 63 /*** 64 * Appends and returns a new empty "ingredient" element 65 */ 66 public net.sf.mrl.IngredientDocument.Ingredient addNewIngredient() 67 { 68 synchronized (monitor()) 69 { 70 check_orphaned(); 71 net.sf.mrl.IngredientDocument.Ingredient target; 72 target = (net.sf.mrl.IngredientDocument.Ingredient)get_store().add_element_user(INGREDIENT$0); 73 return target; 74 } 75 } 76 /*** 77 * An XML ingredient(@http://mrl.sf.net). 78 * 79 * This is a complex type. 80 */ 81 public static class IngredientImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.sf.mrl.IngredientDocument.Ingredient 82 { 83 84 public IngredientImpl(org.apache.xmlbeans.SchemaType sType) 85 { 86 super(sType); 87 } 88 89 private static final javax.xml.namespace.QName AMOUNT$0 = 90 new javax.xml.namespace.QName("http://mrl.sf.net", "amount"); 91 private static final javax.xml.namespace.QName PRECONDITION$2 = 92 new javax.xml.namespace.QName("http://mrl.sf.net", "pre-condition"); 93 private static final javax.xml.namespace.QName NAME$4 = 94 new javax.xml.namespace.QName("http://mrl.sf.net", "name"); 95 private static final javax.xml.namespace.QName POSTCONDITION$6 = 96 new javax.xml.namespace.QName("http://mrl.sf.net", "post-condition"); 97 private static final javax.xml.namespace.QName OPTIONAL$8 = 98 new javax.xml.namespace.QName("", "optional"); 99 100 101 /*** 102 * Gets the "amount" element 103 */ 104 public net.sf.mrl.AmountDocument.Amount getAmount() 105 { 106 synchronized (monitor()) 107 { 108 check_orphaned(); 109 net.sf.mrl.AmountDocument.Amount target = null; 110 target = (net.sf.mrl.AmountDocument.Amount)get_store().find_element_user(AMOUNT$0, 0); 111 if (target == null) 112 { 113 return null; 114 } 115 return target; 116 } 117 } 118 119 /*** 120 * Sets the "amount" element 121 */ 122 public void setAmount(net.sf.mrl.AmountDocument.Amount amount) 123 { 124 synchronized (monitor()) 125 { 126 check_orphaned(); 127 net.sf.mrl.AmountDocument.Amount target = null; 128 target = (net.sf.mrl.AmountDocument.Amount)get_store().find_element_user(AMOUNT$0, 0); 129 if (target == null) 130 { 131 target = (net.sf.mrl.AmountDocument.Amount)get_store().add_element_user(AMOUNT$0); 132 } 133 target.set(amount); 134 } 135 } 136 137 /*** 138 * Appends and returns a new empty "amount" element 139 */ 140 public net.sf.mrl.AmountDocument.Amount addNewAmount() 141 { 142 synchronized (monitor()) 143 { 144 check_orphaned(); 145 net.sf.mrl.AmountDocument.Amount target; 146 target = (net.sf.mrl.AmountDocument.Amount)get_store().add_element_user(AMOUNT$0); 147 return target; 148 } 149 } 150 151 /*** 152 * Gets the "pre-condition" element 153 */ 154 public java.lang.String getPreCondition() 155 { 156 synchronized (monitor()) 157 { 158 check_orphaned(); 159 org.apache.xmlbeans.SimpleValue target = null; 160 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PRECONDITION$2, 0); 161 if (target == null) 162 { 163 return null; 164 } 165 return target.getStringValue(); 166 } 167 } 168 169 /*** 170 * Gets (as xml) the "pre-condition" element 171 */ 172 public org.apache.xmlbeans.XmlString xgetPreCondition() 173 { 174 synchronized (monitor()) 175 { 176 check_orphaned(); 177 org.apache.xmlbeans.XmlString target = null; 178 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PRECONDITION$2, 0); 179 return target; 180 } 181 } 182 183 /*** 184 * True if has "pre-condition" element 185 */ 186 public boolean isSetPreCondition() 187 { 188 synchronized (monitor()) 189 { 190 check_orphaned(); 191 return get_store().count_elements(PRECONDITION$2) != 0; 192 } 193 } 194 195 /*** 196 * Sets the "pre-condition" element 197 */ 198 public void setPreCondition(java.lang.String preCondition) 199 { 200 synchronized (monitor()) 201 { 202 check_orphaned(); 203 org.apache.xmlbeans.SimpleValue target = null; 204 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PRECONDITION$2, 0); 205 if (target == null) 206 { 207 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PRECONDITION$2); 208 } 209 target.setStringValue(preCondition); 210 } 211 } 212 213 /*** 214 * Sets (as xml) the "pre-condition" element 215 */ 216 public void xsetPreCondition(org.apache.xmlbeans.XmlString preCondition) 217 { 218 synchronized (monitor()) 219 { 220 check_orphaned(); 221 org.apache.xmlbeans.XmlString target = null; 222 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PRECONDITION$2, 0); 223 if (target == null) 224 { 225 target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(PRECONDITION$2); 226 } 227 target.set(preCondition); 228 } 229 } 230 231 /*** 232 * Unsets the "pre-condition" element 233 */ 234 public void unsetPreCondition() 235 { 236 synchronized (monitor()) 237 { 238 check_orphaned(); 239 get_store().remove_element(PRECONDITION$2, 0); 240 } 241 } 242 243 /*** 244 * Gets the "name" element 245 */ 246 public java.lang.String getName() 247 { 248 synchronized (monitor()) 249 { 250 check_orphaned(); 251 org.apache.xmlbeans.SimpleValue target = null; 252 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$4, 0); 253 if (target == null) 254 { 255 return null; 256 } 257 return target.getStringValue(); 258 } 259 } 260 261 /*** 262 * Gets (as xml) the "name" element 263 */ 264 public org.apache.xmlbeans.XmlString xgetName() 265 { 266 synchronized (monitor()) 267 { 268 check_orphaned(); 269 org.apache.xmlbeans.XmlString target = null; 270 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(NAME$4, 0); 271 return target; 272 } 273 } 274 275 /*** 276 * Sets the "name" element 277 */ 278 public void setName(java.lang.String name) 279 { 280 synchronized (monitor()) 281 { 282 check_orphaned(); 283 org.apache.xmlbeans.SimpleValue target = null; 284 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$4, 0); 285 if (target == null) 286 { 287 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$4); 288 } 289 target.setStringValue(name); 290 } 291 } 292 293 /*** 294 * Sets (as xml) the "name" element 295 */ 296 public void xsetName(org.apache.xmlbeans.XmlString name) 297 { 298 synchronized (monitor()) 299 { 300 check_orphaned(); 301 org.apache.xmlbeans.XmlString target = null; 302 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(NAME$4, 0); 303 if (target == null) 304 { 305 target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(NAME$4); 306 } 307 target.set(name); 308 } 309 } 310 311 /*** 312 * Gets the "post-condition" element 313 */ 314 public java.lang.String getPostCondition() 315 { 316 synchronized (monitor()) 317 { 318 check_orphaned(); 319 org.apache.xmlbeans.SimpleValue target = null; 320 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(POSTCONDITION$6, 0); 321 if (target == null) 322 { 323 return null; 324 } 325 return target.getStringValue(); 326 } 327 } 328 329 /*** 330 * Gets (as xml) the "post-condition" element 331 */ 332 public org.apache.xmlbeans.XmlString xgetPostCondition() 333 { 334 synchronized (monitor()) 335 { 336 check_orphaned(); 337 org.apache.xmlbeans.XmlString target = null; 338 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(POSTCONDITION$6, 0); 339 return target; 340 } 341 } 342 343 /*** 344 * True if has "post-condition" element 345 */ 346 public boolean isSetPostCondition() 347 { 348 synchronized (monitor()) 349 { 350 check_orphaned(); 351 return get_store().count_elements(POSTCONDITION$6) != 0; 352 } 353 } 354 355 /*** 356 * Sets the "post-condition" element 357 */ 358 public void setPostCondition(java.lang.String postCondition) 359 { 360 synchronized (monitor()) 361 { 362 check_orphaned(); 363 org.apache.xmlbeans.SimpleValue target = null; 364 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(POSTCONDITION$6, 0); 365 if (target == null) 366 { 367 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(POSTCONDITION$6); 368 } 369 target.setStringValue(postCondition); 370 } 371 } 372 373 /*** 374 * Sets (as xml) the "post-condition" element 375 */ 376 public void xsetPostCondition(org.apache.xmlbeans.XmlString postCondition) 377 { 378 synchronized (monitor()) 379 { 380 check_orphaned(); 381 org.apache.xmlbeans.XmlString target = null; 382 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(POSTCONDITION$6, 0); 383 if (target == null) 384 { 385 target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(POSTCONDITION$6); 386 } 387 target.set(postCondition); 388 } 389 } 390 391 /*** 392 * Unsets the "post-condition" element 393 */ 394 public void unsetPostCondition() 395 { 396 synchronized (monitor()) 397 { 398 check_orphaned(); 399 get_store().remove_element(POSTCONDITION$6, 0); 400 } 401 } 402 403 /*** 404 * Gets the "optional" attribute 405 */ 406 public boolean getOptional() 407 { 408 synchronized (monitor()) 409 { 410 check_orphaned(); 411 org.apache.xmlbeans.SimpleValue target = null; 412 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(OPTIONAL$8); 413 if (target == null) 414 { 415 return false; 416 } 417 return target.getBooleanValue(); 418 } 419 } 420 421 /*** 422 * Gets (as xml) the "optional" attribute 423 */ 424 public org.apache.xmlbeans.XmlBoolean xgetOptional() 425 { 426 synchronized (monitor()) 427 { 428 check_orphaned(); 429 org.apache.xmlbeans.XmlBoolean target = null; 430 target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(OPTIONAL$8); 431 return target; 432 } 433 } 434 435 /*** 436 * True if has "optional" attribute 437 */ 438 public boolean isSetOptional() 439 { 440 synchronized (monitor()) 441 { 442 check_orphaned(); 443 return get_store().find_attribute_user(OPTIONAL$8) != null; 444 } 445 } 446 447 /*** 448 * Sets the "optional" attribute 449 */ 450 public void setOptional(boolean optional) 451 { 452 synchronized (monitor()) 453 { 454 check_orphaned(); 455 org.apache.xmlbeans.SimpleValue target = null; 456 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(OPTIONAL$8); 457 if (target == null) 458 { 459 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(OPTIONAL$8); 460 } 461 target.setBooleanValue(optional); 462 } 463 } 464 465 /*** 466 * Sets (as xml) the "optional" attribute 467 */ 468 public void xsetOptional(org.apache.xmlbeans.XmlBoolean optional) 469 { 470 synchronized (monitor()) 471 { 472 check_orphaned(); 473 org.apache.xmlbeans.XmlBoolean target = null; 474 target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(OPTIONAL$8); 475 if (target == null) 476 { 477 target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(OPTIONAL$8); 478 } 479 target.set(optional); 480 } 481 } 482 483 /*** 484 * Unsets the "optional" attribute 485 */ 486 public void unsetOptional() 487 { 488 synchronized (monitor()) 489 { 490 check_orphaned(); 491 get_store().remove_attribute(OPTIONAL$8); 492 } 493 } 494 } 495 }

This page was automatically generated by Maven