001package org.hl7.fhir.dstu2.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 036import java.util.ArrayList; 037import java.util.List; 038 039import ca.uhn.fhir.model.api.annotation.Block; 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 044import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; 045import org.hl7.fhir.exceptions.FHIRException; 046import org.hl7.fhir.utilities.Utilities; 047/** 048 * A collection of error, warning or information messages that result from a system action. 049 */ 050@ResourceDef(name="OperationOutcome", profile="http://hl7.org/fhir/Profile/OperationOutcome") 051public class OperationOutcome extends DomainResource implements IBaseOperationOutcome { 052 053 public enum IssueSeverity { 054 /** 055 * The issue caused the action to fail, and no further checking could be performed. 056 */ 057 FATAL, 058 /** 059 * The issue is sufficiently important to cause the action to fail. 060 */ 061 ERROR, 062 /** 063 * The issue is not important enough to cause the action to fail, but may cause it to be performed suboptimally or in a way that is not as desired. 064 */ 065 WARNING, 066 /** 067 * The issue has no relation to the degree of success of the action. 068 */ 069 INFORMATION, 070 /** 071 * added to help the parsers 072 */ 073 NULL; 074 public static IssueSeverity fromCode(String codeString) throws FHIRException { 075 if (codeString == null || "".equals(codeString)) 076 return null; 077 if ("fatal".equals(codeString)) 078 return FATAL; 079 if ("error".equals(codeString)) 080 return ERROR; 081 if ("warning".equals(codeString)) 082 return WARNING; 083 if ("information".equals(codeString)) 084 return INFORMATION; 085 throw new FHIRException("Unknown IssueSeverity code '"+codeString+"'"); 086 } 087 public String toCode() { 088 switch (this) { 089 case FATAL: return "fatal"; 090 case ERROR: return "error"; 091 case WARNING: return "warning"; 092 case INFORMATION: return "information"; 093 default: return "?"; 094 } 095 } 096 public String getSystem() { 097 switch (this) { 098 case FATAL: return "http://hl7.org/fhir/issue-severity"; 099 case ERROR: return "http://hl7.org/fhir/issue-severity"; 100 case WARNING: return "http://hl7.org/fhir/issue-severity"; 101 case INFORMATION: return "http://hl7.org/fhir/issue-severity"; 102 default: return "?"; 103 } 104 } 105 public String getDefinition() { 106 switch (this) { 107 case FATAL: return "The issue caused the action to fail, and no further checking could be performed."; 108 case ERROR: return "The issue is sufficiently important to cause the action to fail."; 109 case WARNING: return "The issue is not important enough to cause the action to fail, but may cause it to be performed suboptimally or in a way that is not as desired."; 110 case INFORMATION: return "The issue has no relation to the degree of success of the action."; 111 default: return "?"; 112 } 113 } 114 public String getDisplay() { 115 switch (this) { 116 case FATAL: return "Fatal"; 117 case ERROR: return "Error"; 118 case WARNING: return "Warning"; 119 case INFORMATION: return "Information"; 120 default: return "?"; 121 } 122 } 123 } 124 125 public static class IssueSeverityEnumFactory implements EnumFactory<IssueSeverity> { 126 public IssueSeverity fromCode(String codeString) throws IllegalArgumentException { 127 if (codeString == null || "".equals(codeString)) 128 if (codeString == null || "".equals(codeString)) 129 return null; 130 if ("fatal".equals(codeString)) 131 return IssueSeverity.FATAL; 132 if ("error".equals(codeString)) 133 return IssueSeverity.ERROR; 134 if ("warning".equals(codeString)) 135 return IssueSeverity.WARNING; 136 if ("information".equals(codeString)) 137 return IssueSeverity.INFORMATION; 138 throw new IllegalArgumentException("Unknown IssueSeverity code '"+codeString+"'"); 139 } 140 public Enumeration<IssueSeverity> fromType(Base code) throws FHIRException { 141 if (code == null || code.isEmpty()) 142 return null; 143 String codeString = ((PrimitiveType) code).asStringValue(); 144 if (codeString == null || "".equals(codeString)) 145 return null; 146 if ("fatal".equals(codeString)) 147 return new Enumeration<IssueSeverity>(this, IssueSeverity.FATAL); 148 if ("error".equals(codeString)) 149 return new Enumeration<IssueSeverity>(this, IssueSeverity.ERROR); 150 if ("warning".equals(codeString)) 151 return new Enumeration<IssueSeverity>(this, IssueSeverity.WARNING); 152 if ("information".equals(codeString)) 153 return new Enumeration<IssueSeverity>(this, IssueSeverity.INFORMATION); 154 throw new FHIRException("Unknown IssueSeverity code '"+codeString+"'"); 155 } 156 public String toCode(IssueSeverity code) { 157 if (code == IssueSeverity.FATAL) 158 return "fatal"; 159 if (code == IssueSeverity.ERROR) 160 return "error"; 161 if (code == IssueSeverity.WARNING) 162 return "warning"; 163 if (code == IssueSeverity.INFORMATION) 164 return "information"; 165 return "?"; 166 } 167 } 168 169 public enum IssueType { 170 /** 171 * Content invalid against the specification or a profile. 172 */ 173 INVALID, 174 /** 175 * A structural issue in the content such as wrong namespace, or unable to parse the content completely, or invalid json syntax. 176 */ 177 STRUCTURE, 178 /** 179 * A required element is missing. 180 */ 181 REQUIRED, 182 /** 183 * An element value is invalid. 184 */ 185 VALUE, 186 /** 187 * A content validation rule failed - e.g. a schematron rule. 188 */ 189 INVARIANT, 190 /** 191 * An authentication/authorization/permissions issue of some kind. 192 */ 193 SECURITY, 194 /** 195 * The client needs to initiate an authentication process. 196 */ 197 LOGIN, 198 /** 199 * The user or system was not able to be authenticated (either there is no process, or the proferred token is unacceptable). 200 */ 201 UNKNOWN, 202 /** 203 * User session expired; a login may be required. 204 */ 205 EXPIRED, 206 /** 207 * The user does not have the rights to perform this action. 208 */ 209 FORBIDDEN, 210 /** 211 * Some information was not or may not have been returned due to business rules, consent or privacy rules, or access permission constraints. This information may be accessible through alternate processes. 212 */ 213 SUPPRESSED, 214 /** 215 * Processing issues. These are expected to be final e.g. there is no point resubmitting the same content unchanged. 216 */ 217 PROCESSING, 218 /** 219 * The resource or profile is not supported. 220 */ 221 NOTSUPPORTED, 222 /** 223 * An attempt was made to create a duplicate record. 224 */ 225 DUPLICATE, 226 /** 227 * The reference provided was not found. In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the content is not found further into the application architecture. 228 */ 229 NOTFOUND, 230 /** 231 * Provided content is too long (typically, this is a denial of service protection type of error). 232 */ 233 TOOLONG, 234 /** 235 * The code or system could not be understood, or it was not valid in the context of a particular ValueSet.code. 236 */ 237 CODEINVALID, 238 /** 239 * An extension was found that was not acceptable, could not be resolved, or a modifierExtension was not recognized. 240 */ 241 EXTENSION, 242 /** 243 * The operation was stopped to protect server resources; e.g. a request for a value set expansion on all of SNOMED CT. 244 */ 245 TOOCOSTLY, 246 /** 247 * The content/operation failed to pass some business rule, and so could not proceed. 248 */ 249 BUSINESSRULE, 250 /** 251 * Content could not be accepted because of an edit conflict (i.e. version aware updates) (In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the conflict is discovered further into the application architecture.) 252 */ 253 CONFLICT, 254 /** 255 * Not all data sources typically accessed could be reached, or responded in time, so the returned information may not be complete. 256 */ 257 INCOMPLETE, 258 /** 259 * Transient processing issues. The system receiving the error may be able to resubmit the same content once an underlying issue is resolved. 260 */ 261 TRANSIENT, 262 /** 263 * A resource/record locking failure (usually in an underlying database). 264 */ 265 LOCKERROR, 266 /** 267 * The persistent store is unavailable; e.g. the database is down for maintenance or similar action. 268 */ 269 NOSTORE, 270 /** 271 * An unexpected internal error has occurred. 272 */ 273 EXCEPTION, 274 /** 275 * An internal timeout has occurred. 276 */ 277 TIMEOUT, 278 /** 279 * The system is not prepared to handle this request due to load management. 280 */ 281 THROTTLED, 282 /** 283 * A message unrelated to the processing success of the completed operation (examples of the latter include things like reminders of password expiry, system maintenance times, etc.). 284 */ 285 INFORMATIONAL, 286 /** 287 * added to help the parsers 288 */ 289 NULL; 290 public static IssueType fromCode(String codeString) throws FHIRException { 291 if (codeString == null || "".equals(codeString)) 292 return null; 293 if ("invalid".equals(codeString)) 294 return INVALID; 295 if ("structure".equals(codeString)) 296 return STRUCTURE; 297 if ("required".equals(codeString)) 298 return REQUIRED; 299 if ("value".equals(codeString)) 300 return VALUE; 301 if ("invariant".equals(codeString)) 302 return INVARIANT; 303 if ("security".equals(codeString)) 304 return SECURITY; 305 if ("login".equals(codeString)) 306 return LOGIN; 307 if ("unknown".equals(codeString)) 308 return UNKNOWN; 309 if ("expired".equals(codeString)) 310 return EXPIRED; 311 if ("forbidden".equals(codeString)) 312 return FORBIDDEN; 313 if ("suppressed".equals(codeString)) 314 return SUPPRESSED; 315 if ("processing".equals(codeString)) 316 return PROCESSING; 317 if ("not-supported".equals(codeString)) 318 return NOTSUPPORTED; 319 if ("duplicate".equals(codeString)) 320 return DUPLICATE; 321 if ("not-found".equals(codeString)) 322 return NOTFOUND; 323 if ("too-long".equals(codeString)) 324 return TOOLONG; 325 if ("code-invalid".equals(codeString)) 326 return CODEINVALID; 327 if ("extension".equals(codeString)) 328 return EXTENSION; 329 if ("too-costly".equals(codeString)) 330 return TOOCOSTLY; 331 if ("business-rule".equals(codeString)) 332 return BUSINESSRULE; 333 if ("conflict".equals(codeString)) 334 return CONFLICT; 335 if ("incomplete".equals(codeString)) 336 return INCOMPLETE; 337 if ("transient".equals(codeString)) 338 return TRANSIENT; 339 if ("lock-error".equals(codeString)) 340 return LOCKERROR; 341 if ("no-store".equals(codeString)) 342 return NOSTORE; 343 if ("exception".equals(codeString)) 344 return EXCEPTION; 345 if ("timeout".equals(codeString)) 346 return TIMEOUT; 347 if ("throttled".equals(codeString)) 348 return THROTTLED; 349 if ("informational".equals(codeString)) 350 return INFORMATIONAL; 351 throw new FHIRException("Unknown IssueType code '"+codeString+"'"); 352 } 353 public String toCode() { 354 switch (this) { 355 case INVALID: return "invalid"; 356 case STRUCTURE: return "structure"; 357 case REQUIRED: return "required"; 358 case VALUE: return "value"; 359 case INVARIANT: return "invariant"; 360 case SECURITY: return "security"; 361 case LOGIN: return "login"; 362 case UNKNOWN: return "unknown"; 363 case EXPIRED: return "expired"; 364 case FORBIDDEN: return "forbidden"; 365 case SUPPRESSED: return "suppressed"; 366 case PROCESSING: return "processing"; 367 case NOTSUPPORTED: return "not-supported"; 368 case DUPLICATE: return "duplicate"; 369 case NOTFOUND: return "not-found"; 370 case TOOLONG: return "too-long"; 371 case CODEINVALID: return "code-invalid"; 372 case EXTENSION: return "extension"; 373 case TOOCOSTLY: return "too-costly"; 374 case BUSINESSRULE: return "business-rule"; 375 case CONFLICT: return "conflict"; 376 case INCOMPLETE: return "incomplete"; 377 case TRANSIENT: return "transient"; 378 case LOCKERROR: return "lock-error"; 379 case NOSTORE: return "no-store"; 380 case EXCEPTION: return "exception"; 381 case TIMEOUT: return "timeout"; 382 case THROTTLED: return "throttled"; 383 case INFORMATIONAL: return "informational"; 384 default: return "?"; 385 } 386 } 387 public String getSystem() { 388 switch (this) { 389 case INVALID: return "http://hl7.org/fhir/issue-type"; 390 case STRUCTURE: return "http://hl7.org/fhir/issue-type"; 391 case REQUIRED: return "http://hl7.org/fhir/issue-type"; 392 case VALUE: return "http://hl7.org/fhir/issue-type"; 393 case INVARIANT: return "http://hl7.org/fhir/issue-type"; 394 case SECURITY: return "http://hl7.org/fhir/issue-type"; 395 case LOGIN: return "http://hl7.org/fhir/issue-type"; 396 case UNKNOWN: return "http://hl7.org/fhir/issue-type"; 397 case EXPIRED: return "http://hl7.org/fhir/issue-type"; 398 case FORBIDDEN: return "http://hl7.org/fhir/issue-type"; 399 case SUPPRESSED: return "http://hl7.org/fhir/issue-type"; 400 case PROCESSING: return "http://hl7.org/fhir/issue-type"; 401 case NOTSUPPORTED: return "http://hl7.org/fhir/issue-type"; 402 case DUPLICATE: return "http://hl7.org/fhir/issue-type"; 403 case NOTFOUND: return "http://hl7.org/fhir/issue-type"; 404 case TOOLONG: return "http://hl7.org/fhir/issue-type"; 405 case CODEINVALID: return "http://hl7.org/fhir/issue-type"; 406 case EXTENSION: return "http://hl7.org/fhir/issue-type"; 407 case TOOCOSTLY: return "http://hl7.org/fhir/issue-type"; 408 case BUSINESSRULE: return "http://hl7.org/fhir/issue-type"; 409 case CONFLICT: return "http://hl7.org/fhir/issue-type"; 410 case INCOMPLETE: return "http://hl7.org/fhir/issue-type"; 411 case TRANSIENT: return "http://hl7.org/fhir/issue-type"; 412 case LOCKERROR: return "http://hl7.org/fhir/issue-type"; 413 case NOSTORE: return "http://hl7.org/fhir/issue-type"; 414 case EXCEPTION: return "http://hl7.org/fhir/issue-type"; 415 case TIMEOUT: return "http://hl7.org/fhir/issue-type"; 416 case THROTTLED: return "http://hl7.org/fhir/issue-type"; 417 case INFORMATIONAL: return "http://hl7.org/fhir/issue-type"; 418 default: return "?"; 419 } 420 } 421 public String getDefinition() { 422 switch (this) { 423 case INVALID: return "Content invalid against the specification or a profile."; 424 case STRUCTURE: return "A structural issue in the content such as wrong namespace, or unable to parse the content completely, or invalid json syntax."; 425 case REQUIRED: return "A required element is missing."; 426 case VALUE: return "An element value is invalid."; 427 case INVARIANT: return "A content validation rule failed - e.g. a schematron rule."; 428 case SECURITY: return "An authentication/authorization/permissions issue of some kind."; 429 case LOGIN: return "The client needs to initiate an authentication process."; 430 case UNKNOWN: return "The user or system was not able to be authenticated (either there is no process, or the proferred token is unacceptable)."; 431 case EXPIRED: return "User session expired; a login may be required."; 432 case FORBIDDEN: return "The user does not have the rights to perform this action."; 433 case SUPPRESSED: return "Some information was not or may not have been returned due to business rules, consent or privacy rules, or access permission constraints. This information may be accessible through alternate processes."; 434 case PROCESSING: return "Processing issues. These are expected to be final e.g. there is no point resubmitting the same content unchanged."; 435 case NOTSUPPORTED: return "The resource or profile is not supported."; 436 case DUPLICATE: return "An attempt was made to create a duplicate record."; 437 case NOTFOUND: return "The reference provided was not found. In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the content is not found further into the application architecture."; 438 case TOOLONG: return "Provided content is too long (typically, this is a denial of service protection type of error)."; 439 case CODEINVALID: return "The code or system could not be understood, or it was not valid in the context of a particular ValueSet.code."; 440 case EXTENSION: return "An extension was found that was not acceptable, could not be resolved, or a modifierExtension was not recognized."; 441 case TOOCOSTLY: return "The operation was stopped to protect server resources; e.g. a request for a value set expansion on all of SNOMED CT."; 442 case BUSINESSRULE: return "The content/operation failed to pass some business rule, and so could not proceed."; 443 case CONFLICT: return "Content could not be accepted because of an edit conflict (i.e. version aware updates) (In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the conflict is discovered further into the application architecture.)"; 444 case INCOMPLETE: return "Not all data sources typically accessed could be reached, or responded in time, so the returned information may not be complete."; 445 case TRANSIENT: return "Transient processing issues. The system receiving the error may be able to resubmit the same content once an underlying issue is resolved."; 446 case LOCKERROR: return "A resource/record locking failure (usually in an underlying database)."; 447 case NOSTORE: return "The persistent store is unavailable; e.g. the database is down for maintenance or similar action."; 448 case EXCEPTION: return "An unexpected internal error has occurred."; 449 case TIMEOUT: return "An internal timeout has occurred."; 450 case THROTTLED: return "The system is not prepared to handle this request due to load management."; 451 case INFORMATIONAL: return "A message unrelated to the processing success of the completed operation (examples of the latter include things like reminders of password expiry, system maintenance times, etc.)."; 452 default: return "?"; 453 } 454 } 455 public String getDisplay() { 456 switch (this) { 457 case INVALID: return "Invalid Content"; 458 case STRUCTURE: return "Structural Issue"; 459 case REQUIRED: return "Required element missing"; 460 case VALUE: return "Element value invalid"; 461 case INVARIANT: return "Validation rule failed"; 462 case SECURITY: return "Security Problem"; 463 case LOGIN: return "Login Required"; 464 case UNKNOWN: return "Unknown User"; 465 case EXPIRED: return "Session Expired"; 466 case FORBIDDEN: return "Forbidden"; 467 case SUPPRESSED: return "Information Suppressed"; 468 case PROCESSING: return "Processing Failure"; 469 case NOTSUPPORTED: return "Content not supported"; 470 case DUPLICATE: return "Duplicate"; 471 case NOTFOUND: return "Not Found"; 472 case TOOLONG: return "Content Too Long"; 473 case CODEINVALID: return "Invalid Code"; 474 case EXTENSION: return "Unacceptable Extension"; 475 case TOOCOSTLY: return "Operation Too Costly"; 476 case BUSINESSRULE: return "Business Rule Violation"; 477 case CONFLICT: return "Edit Version Conflict"; 478 case INCOMPLETE: return "Incomplete Results"; 479 case TRANSIENT: return "Transient Issue"; 480 case LOCKERROR: return "Lock Error"; 481 case NOSTORE: return "No Store Available"; 482 case EXCEPTION: return "Exception"; 483 case TIMEOUT: return "Timeout"; 484 case THROTTLED: return "Throttled"; 485 case INFORMATIONAL: return "Informational Note"; 486 default: return "?"; 487 } 488 } 489 } 490 491 public static class IssueTypeEnumFactory implements EnumFactory<IssueType> { 492 public IssueType fromCode(String codeString) throws IllegalArgumentException { 493 if (codeString == null || "".equals(codeString)) 494 if (codeString == null || "".equals(codeString)) 495 return null; 496 if ("invalid".equals(codeString)) 497 return IssueType.INVALID; 498 if ("structure".equals(codeString)) 499 return IssueType.STRUCTURE; 500 if ("required".equals(codeString)) 501 return IssueType.REQUIRED; 502 if ("value".equals(codeString)) 503 return IssueType.VALUE; 504 if ("invariant".equals(codeString)) 505 return IssueType.INVARIANT; 506 if ("security".equals(codeString)) 507 return IssueType.SECURITY; 508 if ("login".equals(codeString)) 509 return IssueType.LOGIN; 510 if ("unknown".equals(codeString)) 511 return IssueType.UNKNOWN; 512 if ("expired".equals(codeString)) 513 return IssueType.EXPIRED; 514 if ("forbidden".equals(codeString)) 515 return IssueType.FORBIDDEN; 516 if ("suppressed".equals(codeString)) 517 return IssueType.SUPPRESSED; 518 if ("processing".equals(codeString)) 519 return IssueType.PROCESSING; 520 if ("not-supported".equals(codeString)) 521 return IssueType.NOTSUPPORTED; 522 if ("duplicate".equals(codeString)) 523 return IssueType.DUPLICATE; 524 if ("not-found".equals(codeString)) 525 return IssueType.NOTFOUND; 526 if ("too-long".equals(codeString)) 527 return IssueType.TOOLONG; 528 if ("code-invalid".equals(codeString)) 529 return IssueType.CODEINVALID; 530 if ("extension".equals(codeString)) 531 return IssueType.EXTENSION; 532 if ("too-costly".equals(codeString)) 533 return IssueType.TOOCOSTLY; 534 if ("business-rule".equals(codeString)) 535 return IssueType.BUSINESSRULE; 536 if ("conflict".equals(codeString)) 537 return IssueType.CONFLICT; 538 if ("incomplete".equals(codeString)) 539 return IssueType.INCOMPLETE; 540 if ("transient".equals(codeString)) 541 return IssueType.TRANSIENT; 542 if ("lock-error".equals(codeString)) 543 return IssueType.LOCKERROR; 544 if ("no-store".equals(codeString)) 545 return IssueType.NOSTORE; 546 if ("exception".equals(codeString)) 547 return IssueType.EXCEPTION; 548 if ("timeout".equals(codeString)) 549 return IssueType.TIMEOUT; 550 if ("throttled".equals(codeString)) 551 return IssueType.THROTTLED; 552 if ("informational".equals(codeString)) 553 return IssueType.INFORMATIONAL; 554 throw new IllegalArgumentException("Unknown IssueType code '"+codeString+"'"); 555 } 556 public Enumeration<IssueType> fromType(Base code) throws FHIRException { 557 if (code == null || code.isEmpty()) 558 return null; 559 String codeString = ((PrimitiveType) code).asStringValue(); 560 if (codeString == null || "".equals(codeString)) 561 return null; 562 if ("invalid".equals(codeString)) 563 return new Enumeration<IssueType>(this, IssueType.INVALID); 564 if ("structure".equals(codeString)) 565 return new Enumeration<IssueType>(this, IssueType.STRUCTURE); 566 if ("required".equals(codeString)) 567 return new Enumeration<IssueType>(this, IssueType.REQUIRED); 568 if ("value".equals(codeString)) 569 return new Enumeration<IssueType>(this, IssueType.VALUE); 570 if ("invariant".equals(codeString)) 571 return new Enumeration<IssueType>(this, IssueType.INVARIANT); 572 if ("security".equals(codeString)) 573 return new Enumeration<IssueType>(this, IssueType.SECURITY); 574 if ("login".equals(codeString)) 575 return new Enumeration<IssueType>(this, IssueType.LOGIN); 576 if ("unknown".equals(codeString)) 577 return new Enumeration<IssueType>(this, IssueType.UNKNOWN); 578 if ("expired".equals(codeString)) 579 return new Enumeration<IssueType>(this, IssueType.EXPIRED); 580 if ("forbidden".equals(codeString)) 581 return new Enumeration<IssueType>(this, IssueType.FORBIDDEN); 582 if ("suppressed".equals(codeString)) 583 return new Enumeration<IssueType>(this, IssueType.SUPPRESSED); 584 if ("processing".equals(codeString)) 585 return new Enumeration<IssueType>(this, IssueType.PROCESSING); 586 if ("not-supported".equals(codeString)) 587 return new Enumeration<IssueType>(this, IssueType.NOTSUPPORTED); 588 if ("duplicate".equals(codeString)) 589 return new Enumeration<IssueType>(this, IssueType.DUPLICATE); 590 if ("not-found".equals(codeString)) 591 return new Enumeration<IssueType>(this, IssueType.NOTFOUND); 592 if ("too-long".equals(codeString)) 593 return new Enumeration<IssueType>(this, IssueType.TOOLONG); 594 if ("code-invalid".equals(codeString)) 595 return new Enumeration<IssueType>(this, IssueType.CODEINVALID); 596 if ("extension".equals(codeString)) 597 return new Enumeration<IssueType>(this, IssueType.EXTENSION); 598 if ("too-costly".equals(codeString)) 599 return new Enumeration<IssueType>(this, IssueType.TOOCOSTLY); 600 if ("business-rule".equals(codeString)) 601 return new Enumeration<IssueType>(this, IssueType.BUSINESSRULE); 602 if ("conflict".equals(codeString)) 603 return new Enumeration<IssueType>(this, IssueType.CONFLICT); 604 if ("incomplete".equals(codeString)) 605 return new Enumeration<IssueType>(this, IssueType.INCOMPLETE); 606 if ("transient".equals(codeString)) 607 return new Enumeration<IssueType>(this, IssueType.TRANSIENT); 608 if ("lock-error".equals(codeString)) 609 return new Enumeration<IssueType>(this, IssueType.LOCKERROR); 610 if ("no-store".equals(codeString)) 611 return new Enumeration<IssueType>(this, IssueType.NOSTORE); 612 if ("exception".equals(codeString)) 613 return new Enumeration<IssueType>(this, IssueType.EXCEPTION); 614 if ("timeout".equals(codeString)) 615 return new Enumeration<IssueType>(this, IssueType.TIMEOUT); 616 if ("throttled".equals(codeString)) 617 return new Enumeration<IssueType>(this, IssueType.THROTTLED); 618 if ("informational".equals(codeString)) 619 return new Enumeration<IssueType>(this, IssueType.INFORMATIONAL); 620 throw new FHIRException("Unknown IssueType code '"+codeString+"'"); 621 } 622 public String toCode(IssueType code) { 623 if (code == IssueType.INVALID) 624 return "invalid"; 625 if (code == IssueType.STRUCTURE) 626 return "structure"; 627 if (code == IssueType.REQUIRED) 628 return "required"; 629 if (code == IssueType.VALUE) 630 return "value"; 631 if (code == IssueType.INVARIANT) 632 return "invariant"; 633 if (code == IssueType.SECURITY) 634 return "security"; 635 if (code == IssueType.LOGIN) 636 return "login"; 637 if (code == IssueType.UNKNOWN) 638 return "unknown"; 639 if (code == IssueType.EXPIRED) 640 return "expired"; 641 if (code == IssueType.FORBIDDEN) 642 return "forbidden"; 643 if (code == IssueType.SUPPRESSED) 644 return "suppressed"; 645 if (code == IssueType.PROCESSING) 646 return "processing"; 647 if (code == IssueType.NOTSUPPORTED) 648 return "not-supported"; 649 if (code == IssueType.DUPLICATE) 650 return "duplicate"; 651 if (code == IssueType.NOTFOUND) 652 return "not-found"; 653 if (code == IssueType.TOOLONG) 654 return "too-long"; 655 if (code == IssueType.CODEINVALID) 656 return "code-invalid"; 657 if (code == IssueType.EXTENSION) 658 return "extension"; 659 if (code == IssueType.TOOCOSTLY) 660 return "too-costly"; 661 if (code == IssueType.BUSINESSRULE) 662 return "business-rule"; 663 if (code == IssueType.CONFLICT) 664 return "conflict"; 665 if (code == IssueType.INCOMPLETE) 666 return "incomplete"; 667 if (code == IssueType.TRANSIENT) 668 return "transient"; 669 if (code == IssueType.LOCKERROR) 670 return "lock-error"; 671 if (code == IssueType.NOSTORE) 672 return "no-store"; 673 if (code == IssueType.EXCEPTION) 674 return "exception"; 675 if (code == IssueType.TIMEOUT) 676 return "timeout"; 677 if (code == IssueType.THROTTLED) 678 return "throttled"; 679 if (code == IssueType.INFORMATIONAL) 680 return "informational"; 681 return "?"; 682 } 683 } 684 685 @Block() 686 public static class OperationOutcomeIssueComponent extends BackboneElement implements IBaseBackboneElement { 687 /** 688 * Indicates whether the issue indicates a variation from successful processing. 689 */ 690 @Child(name = "severity", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 691 @Description(shortDefinition="fatal | error | warning | information", formalDefinition="Indicates whether the issue indicates a variation from successful processing." ) 692 protected Enumeration<IssueSeverity> severity; 693 694 /** 695 * Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element. 696 */ 697 @Child(name = "code", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) 698 @Description(shortDefinition="Error or warning code", formalDefinition="Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element." ) 699 protected Enumeration<IssueType> code; 700 701 /** 702 * Additional details about the error. This may be a text description of the error, or a system code that identifies the error. 703 */ 704 @Child(name = "details", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 705 @Description(shortDefinition="Additional details about the error", formalDefinition="Additional details about the error. This may be a text description of the error, or a system code that identifies the error." ) 706 protected CodeableConcept details; 707 708 /** 709 * Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue. 710 */ 711 @Child(name = "diagnostics", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 712 @Description(shortDefinition="Additional diagnostic information about the issue", formalDefinition="Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue." ) 713 protected StringType diagnostics; 714 715 /** 716 * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. 717 */ 718 @Child(name = "location", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 719 @Description(shortDefinition="XPath of element(s) related to issue", formalDefinition="A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised." ) 720 protected List<StringType> location; 721 722 private static final long serialVersionUID = 930165515L; 723 724 /* 725 * Constructor 726 */ 727 public OperationOutcomeIssueComponent() { 728 super(); 729 } 730 731 /* 732 * Constructor 733 */ 734 public OperationOutcomeIssueComponent(Enumeration<IssueSeverity> severity, Enumeration<IssueType> code) { 735 super(); 736 this.severity = severity; 737 this.code = code; 738 } 739 740 /** 741 * @return {@link #severity} (Indicates whether the issue indicates a variation from successful processing.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value 742 */ 743 public Enumeration<IssueSeverity> getSeverityElement() { 744 if (this.severity == null) 745 if (Configuration.errorOnAutoCreate()) 746 throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.severity"); 747 else if (Configuration.doAutoCreate()) 748 this.severity = new Enumeration<IssueSeverity>(new IssueSeverityEnumFactory()); // bb 749 return this.severity; 750 } 751 752 public boolean hasSeverityElement() { 753 return this.severity != null && !this.severity.isEmpty(); 754 } 755 756 public boolean hasSeverity() { 757 return this.severity != null && !this.severity.isEmpty(); 758 } 759 760 /** 761 * @param value {@link #severity} (Indicates whether the issue indicates a variation from successful processing.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value 762 */ 763 public OperationOutcomeIssueComponent setSeverityElement(Enumeration<IssueSeverity> value) { 764 this.severity = value; 765 return this; 766 } 767 768 /** 769 * @return Indicates whether the issue indicates a variation from successful processing. 770 */ 771 public IssueSeverity getSeverity() { 772 return this.severity == null ? null : this.severity.getValue(); 773 } 774 775 /** 776 * @param value Indicates whether the issue indicates a variation from successful processing. 777 */ 778 public OperationOutcomeIssueComponent setSeverity(IssueSeverity value) { 779 if (this.severity == null) 780 this.severity = new Enumeration<IssueSeverity>(new IssueSeverityEnumFactory()); 781 this.severity.setValue(value); 782 return this; 783 } 784 785 /** 786 * @return {@link #code} (Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 787 */ 788 public Enumeration<IssueType> getCodeElement() { 789 if (this.code == null) 790 if (Configuration.errorOnAutoCreate()) 791 throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.code"); 792 else if (Configuration.doAutoCreate()) 793 this.code = new Enumeration<IssueType>(new IssueTypeEnumFactory()); // bb 794 return this.code; 795 } 796 797 public boolean hasCodeElement() { 798 return this.code != null && !this.code.isEmpty(); 799 } 800 801 public boolean hasCode() { 802 return this.code != null && !this.code.isEmpty(); 803 } 804 805 /** 806 * @param value {@link #code} (Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 807 */ 808 public OperationOutcomeIssueComponent setCodeElement(Enumeration<IssueType> value) { 809 this.code = value; 810 return this; 811 } 812 813 /** 814 * @return Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element. 815 */ 816 public IssueType getCode() { 817 return this.code == null ? null : this.code.getValue(); 818 } 819 820 /** 821 * @param value Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element. 822 */ 823 public OperationOutcomeIssueComponent setCode(IssueType value) { 824 if (this.code == null) 825 this.code = new Enumeration<IssueType>(new IssueTypeEnumFactory()); 826 this.code.setValue(value); 827 return this; 828 } 829 830 /** 831 * @return {@link #details} (Additional details about the error. This may be a text description of the error, or a system code that identifies the error.) 832 */ 833 public CodeableConcept getDetails() { 834 if (this.details == null) 835 if (Configuration.errorOnAutoCreate()) 836 throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.details"); 837 else if (Configuration.doAutoCreate()) 838 this.details = new CodeableConcept(); // cc 839 return this.details; 840 } 841 842 public boolean hasDetails() { 843 return this.details != null && !this.details.isEmpty(); 844 } 845 846 /** 847 * @param value {@link #details} (Additional details about the error. This may be a text description of the error, or a system code that identifies the error.) 848 */ 849 public OperationOutcomeIssueComponent setDetails(CodeableConcept value) { 850 this.details = value; 851 return this; 852 } 853 854 /** 855 * @return {@link #diagnostics} (Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.). This is the underlying object with id, value and extensions. The accessor "getDiagnostics" gives direct access to the value 856 */ 857 public StringType getDiagnosticsElement() { 858 if (this.diagnostics == null) 859 if (Configuration.errorOnAutoCreate()) 860 throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.diagnostics"); 861 else if (Configuration.doAutoCreate()) 862 this.diagnostics = new StringType(); // bb 863 return this.diagnostics; 864 } 865 866 public boolean hasDiagnosticsElement() { 867 return this.diagnostics != null && !this.diagnostics.isEmpty(); 868 } 869 870 public boolean hasDiagnostics() { 871 return this.diagnostics != null && !this.diagnostics.isEmpty(); 872 } 873 874 /** 875 * @param value {@link #diagnostics} (Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.). This is the underlying object with id, value and extensions. The accessor "getDiagnostics" gives direct access to the value 876 */ 877 public OperationOutcomeIssueComponent setDiagnosticsElement(StringType value) { 878 this.diagnostics = value; 879 return this; 880 } 881 882 /** 883 * @return Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue. 884 */ 885 public String getDiagnostics() { 886 return this.diagnostics == null ? null : this.diagnostics.getValue(); 887 } 888 889 /** 890 * @param value Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue. 891 */ 892 public OperationOutcomeIssueComponent setDiagnostics(String value) { 893 if (Utilities.noString(value)) 894 this.diagnostics = null; 895 else { 896 if (this.diagnostics == null) 897 this.diagnostics = new StringType(); 898 this.diagnostics.setValue(value); 899 } 900 return this; 901 } 902 903 /** 904 * @return {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) 905 */ 906 public List<StringType> getLocation() { 907 if (this.location == null) 908 this.location = new ArrayList<StringType>(); 909 return this.location; 910 } 911 912 public boolean hasLocation() { 913 if (this.location == null) 914 return false; 915 for (StringType item : this.location) 916 if (!item.isEmpty()) 917 return true; 918 return false; 919 } 920 921 /** 922 * @return {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) 923 */ 924 // syntactic sugar 925 public StringType addLocationElement() {//2 926 StringType t = new StringType(); 927 if (this.location == null) 928 this.location = new ArrayList<StringType>(); 929 this.location.add(t); 930 return t; 931 } 932 933 /** 934 * @param value {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) 935 */ 936 public OperationOutcomeIssueComponent addLocation(String value) { //1 937 StringType t = new StringType(); 938 t.setValue(value); 939 if (this.location == null) 940 this.location = new ArrayList<StringType>(); 941 this.location.add(t); 942 return this; 943 } 944 945 /** 946 * @param value {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) 947 */ 948 public boolean hasLocation(String value) { 949 if (this.location == null) 950 return false; 951 for (StringType v : this.location) 952 if (v.equals(value)) // string 953 return true; 954 return false; 955 } 956 957 protected void listChildren(List<Property> childrenList) { 958 super.listChildren(childrenList); 959 childrenList.add(new Property("severity", "code", "Indicates whether the issue indicates a variation from successful processing.", 0, java.lang.Integer.MAX_VALUE, severity)); 960 childrenList.add(new Property("code", "code", "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.", 0, java.lang.Integer.MAX_VALUE, code)); 961 childrenList.add(new Property("details", "CodeableConcept", "Additional details about the error. This may be a text description of the error, or a system code that identifies the error.", 0, java.lang.Integer.MAX_VALUE, details)); 962 childrenList.add(new Property("diagnostics", "string", "Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.", 0, java.lang.Integer.MAX_VALUE, diagnostics)); 963 childrenList.add(new Property("location", "string", "A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.", 0, java.lang.Integer.MAX_VALUE, location)); 964 } 965 966 @Override 967 public void setProperty(String name, Base value) throws FHIRException { 968 if (name.equals("severity")) 969 this.severity = new IssueSeverityEnumFactory().fromType(value); // Enumeration<IssueSeverity> 970 else if (name.equals("code")) 971 this.code = new IssueTypeEnumFactory().fromType(value); // Enumeration<IssueType> 972 else if (name.equals("details")) 973 this.details = castToCodeableConcept(value); // CodeableConcept 974 else if (name.equals("diagnostics")) 975 this.diagnostics = castToString(value); // StringType 976 else if (name.equals("location")) 977 this.getLocation().add(castToString(value)); 978 else 979 super.setProperty(name, value); 980 } 981 982 @Override 983 public Base addChild(String name) throws FHIRException { 984 if (name.equals("severity")) { 985 throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.severity"); 986 } 987 else if (name.equals("code")) { 988 throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.code"); 989 } 990 else if (name.equals("details")) { 991 this.details = new CodeableConcept(); 992 return this.details; 993 } 994 else if (name.equals("diagnostics")) { 995 throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.diagnostics"); 996 } 997 else if (name.equals("location")) { 998 throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.location"); 999 } 1000 else 1001 return super.addChild(name); 1002 } 1003 1004 public OperationOutcomeIssueComponent copy() { 1005 OperationOutcomeIssueComponent dst = new OperationOutcomeIssueComponent(); 1006 copyValues(dst); 1007 dst.severity = severity == null ? null : severity.copy(); 1008 dst.code = code == null ? null : code.copy(); 1009 dst.details = details == null ? null : details.copy(); 1010 dst.diagnostics = diagnostics == null ? null : diagnostics.copy(); 1011 if (location != null) { 1012 dst.location = new ArrayList<StringType>(); 1013 for (StringType i : location) 1014 dst.location.add(i.copy()); 1015 }; 1016 return dst; 1017 } 1018 1019 @Override 1020 public boolean equalsDeep(Base other) { 1021 if (!super.equalsDeep(other)) 1022 return false; 1023 if (!(other instanceof OperationOutcomeIssueComponent)) 1024 return false; 1025 OperationOutcomeIssueComponent o = (OperationOutcomeIssueComponent) other; 1026 return compareDeep(severity, o.severity, true) && compareDeep(code, o.code, true) && compareDeep(details, o.details, true) 1027 && compareDeep(diagnostics, o.diagnostics, true) && compareDeep(location, o.location, true); 1028 } 1029 1030 @Override 1031 public boolean equalsShallow(Base other) { 1032 if (!super.equalsShallow(other)) 1033 return false; 1034 if (!(other instanceof OperationOutcomeIssueComponent)) 1035 return false; 1036 OperationOutcomeIssueComponent o = (OperationOutcomeIssueComponent) other; 1037 return compareValues(severity, o.severity, true) && compareValues(code, o.code, true) && compareValues(diagnostics, o.diagnostics, true) 1038 && compareValues(location, o.location, true); 1039 } 1040 1041 public boolean isEmpty() { 1042 return super.isEmpty() && (severity == null || severity.isEmpty()) && (code == null || code.isEmpty()) 1043 && (details == null || details.isEmpty()) && (diagnostics == null || diagnostics.isEmpty()) 1044 && (location == null || location.isEmpty()); 1045 } 1046 1047 public String fhirType() { 1048 return "OperationOutcome.issue"; 1049 1050 } 1051 1052 } 1053 1054 /** 1055 * An error, warning or information message that results from a system action. 1056 */ 1057 @Child(name = "issue", type = {}, order=0, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1058 @Description(shortDefinition="A single issue associated with the action", formalDefinition="An error, warning or information message that results from a system action." ) 1059 protected List<OperationOutcomeIssueComponent> issue; 1060 1061 private static final long serialVersionUID = -152150052L; 1062 1063 /* 1064 * Constructor 1065 */ 1066 public OperationOutcome() { 1067 super(); 1068 } 1069 1070 /** 1071 * @return {@link #issue} (An error, warning or information message that results from a system action.) 1072 */ 1073 public List<OperationOutcomeIssueComponent> getIssue() { 1074 if (this.issue == null) 1075 this.issue = new ArrayList<OperationOutcomeIssueComponent>(); 1076 return this.issue; 1077 } 1078 1079 public boolean hasIssue() { 1080 if (this.issue == null) 1081 return false; 1082 for (OperationOutcomeIssueComponent item : this.issue) 1083 if (!item.isEmpty()) 1084 return true; 1085 return false; 1086 } 1087 1088 /** 1089 * @return {@link #issue} (An error, warning or information message that results from a system action.) 1090 */ 1091 // syntactic sugar 1092 public OperationOutcomeIssueComponent addIssue() { //3 1093 OperationOutcomeIssueComponent t = new OperationOutcomeIssueComponent(); 1094 if (this.issue == null) 1095 this.issue = new ArrayList<OperationOutcomeIssueComponent>(); 1096 this.issue.add(t); 1097 return t; 1098 } 1099 1100 // syntactic sugar 1101 public OperationOutcome addIssue(OperationOutcomeIssueComponent t) { //3 1102 if (t == null) 1103 return this; 1104 if (this.issue == null) 1105 this.issue = new ArrayList<OperationOutcomeIssueComponent>(); 1106 this.issue.add(t); 1107 return this; 1108 } 1109 1110 protected void listChildren(List<Property> childrenList) { 1111 super.listChildren(childrenList); 1112 childrenList.add(new Property("issue", "", "An error, warning or information message that results from a system action.", 0, java.lang.Integer.MAX_VALUE, issue)); 1113 } 1114 1115 @Override 1116 public void setProperty(String name, Base value) throws FHIRException { 1117 if (name.equals("issue")) 1118 this.getIssue().add((OperationOutcomeIssueComponent) value); 1119 else 1120 super.setProperty(name, value); 1121 } 1122 1123 @Override 1124 public Base addChild(String name) throws FHIRException { 1125 if (name.equals("issue")) { 1126 return addIssue(); 1127 } 1128 else 1129 return super.addChild(name); 1130 } 1131 1132 public String fhirType() { 1133 return "OperationOutcome"; 1134 1135 } 1136 1137 public OperationOutcome copy() { 1138 OperationOutcome dst = new OperationOutcome(); 1139 copyValues(dst); 1140 if (issue != null) { 1141 dst.issue = new ArrayList<OperationOutcomeIssueComponent>(); 1142 for (OperationOutcomeIssueComponent i : issue) 1143 dst.issue.add(i.copy()); 1144 }; 1145 return dst; 1146 } 1147 1148 protected OperationOutcome typedCopy() { 1149 return copy(); 1150 } 1151 1152 @Override 1153 public boolean equalsDeep(Base other) { 1154 if (!super.equalsDeep(other)) 1155 return false; 1156 if (!(other instanceof OperationOutcome)) 1157 return false; 1158 OperationOutcome o = (OperationOutcome) other; 1159 return compareDeep(issue, o.issue, true); 1160 } 1161 1162 @Override 1163 public boolean equalsShallow(Base other) { 1164 if (!super.equalsShallow(other)) 1165 return false; 1166 if (!(other instanceof OperationOutcome)) 1167 return false; 1168 OperationOutcome o = (OperationOutcome) other; 1169 return true; 1170 } 1171 1172 public boolean isEmpty() { 1173 return super.isEmpty() && (issue == null || issue.isEmpty()); 1174 } 1175 1176 @Override 1177 public ResourceType getResourceType() { 1178 return ResourceType.OperationOutcome; 1179 } 1180 1181 1182}