Interface ValidationWorkflowRunner<T extends com.google.protobuf.MessageOrBuilder>

Type Parameters:
T - type of the top-level element of the Phenopacket Schema.
All Known Implementing Classes:
JsonSchemaValidationWorkflowRunner

public interface ValidationWorkflowRunner<T extends com.google.protobuf.MessageOrBuilder>
ValidationWorkflowRunner validates selected top-level element of the Phenopacket Schema.

The validation is performed on 3 input types: validate(MessageOrBuilder) validates an existing top-level element, validate(String) validates input formatted either in PhenopacketFormat.JSON or PhenopacketFormat.YAML, and validate(byte[]) validates a pile of bytes that can be in either of the PhenopacketFormats.

Validator provides a list with ValidatorInfo that describes validations done by the ValidationWorkflowRunner.

The validation is generally done in 2 phases, syntax and semantic phases. The syntax phase checks if the building blocks meet the requirements independently (e.g. all required fields are defined for a Resource). The semantic validation checks for presence of errors in the context of the entire top-level element (e.g. a phenopacket contains an HPO term but an HPO Resource is missing in MetaData).