
Package ca.uhn.fhir.validation
Class ValidationResult
- java.lang.Object
-
- ca.uhn.fhir.validation.ValidationResult
-
public class ValidationResult extends Object
Encapsulates the results of validation- Since:
- 0.7
- See Also:
FhirValidator
-
-
Constructor Summary
Constructors Constructor Description ValidationResult(FhirContext theCtx, List<SingleValidationMessage> theMessages)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<SingleValidationMessage>
getMessages()
IBaseOperationOutcome
getOperationOutcome()
Deprecated.UsetoOperationOutcome()
instead since this method returns a view.boolean
isSuccessful()
Was the validation successful (in other words, do we have no issues that are at severityResultSeverityEnum.ERROR
orResultSeverityEnum.FATAL
.void
populateOperationOutcome(IBaseOperationOutcome theOperationOutcome)
Populate an operation outcome with the results of the validationIBaseOperationOutcome
toOperationOutcome()
Create an OperationOutcome resource which contains all of the messages found as a result of this validationString
toString()
-
-
-
Constructor Detail
-
ValidationResult
public ValidationResult(FhirContext theCtx, List<SingleValidationMessage> theMessages)
-
-
Method Detail
-
getMessages
public List<SingleValidationMessage> getMessages()
-
isSuccessful
public boolean isSuccessful()
Was the validation successful (in other words, do we have no issues that are at severityResultSeverityEnum.ERROR
orResultSeverityEnum.FATAL
. A validation is still considered successful if it only has issues at levelResultSeverityEnum.WARNING
or lower.- Returns:
- true if the validation was successful
-
getOperationOutcome
@Deprecated public IBaseOperationOutcome getOperationOutcome()
Deprecated.UsetoOperationOutcome()
instead since this method returns a view.toOperationOutcome()
is identical to this method, but has a more suitable name so this method will be removed at some point.
-
toOperationOutcome
public IBaseOperationOutcome toOperationOutcome()
Create an OperationOutcome resource which contains all of the messages found as a result of this validation
-
populateOperationOutcome
public void populateOperationOutcome(IBaseOperationOutcome theOperationOutcome)
Populate an operation outcome with the results of the validation
-
-