Class JsonSchemaValidationWorkflowRunner<T extends com.google.protobuf.MessageOrBuilder>

java.lang.Object
org.phenopackets.phenopackettools.validator.jsonschema.JsonSchemaValidationWorkflowRunner<T>
Type Parameters:
T - must be one of the three top-level elements of the Phenopacket schema: PhenopacketOrBuilder, FamilyOrBuilder, or CohortOrBuilder.
All Implemented Interfaces:
ValidationWorkflowRunner<T>

public class JsonSchemaValidationWorkflowRunner<T extends com.google.protobuf.MessageOrBuilder> extends Object implements ValidationWorkflowRunner<T>
Validates if given top-level element satisfies the following criteria:
  • data format requirements - for instance if the element is a valid JSON document if JSON input is provided
  • basic Phenopacket schema requirements - the requirements described by the reference documentation. Absence of a required field is an ValidationLevel.ERROR and absence of a recommended field is a ValidationLevel.WARNING.
  • custom requirements - requirements provided in a JSON schema document(s) provided by the user.
  • semantic requirements - requirements checked by PhenopacketValidators provided by the user.

The validation is performed in steps as outlined by the list above. Note that the data format validation must pass in order for the latter steps to run.

Use one of JsonSchemaValidationWorkflowRunner.Builders provided via static constructors (e.g. phenopacketBuilder()) to build the validation workflow.