Class JsonSchemaValidationWorkflowRunnerBuilder<T extends com.google.protobuf.MessageOrBuilder>
java.lang.Object
org.phenopackets.phenopackettools.validator.core.ValidationWorkflowRunnerBuilder<T>
org.phenopackets.phenopackettools.validator.jsonschema.JsonSchemaValidationWorkflowRunnerBuilder<T>
- Type Parameters:
T- one of top-level elements of the Phenopacket schema.
public abstract class JsonSchemaValidationWorkflowRunnerBuilder<T extends com.google.protobuf.MessageOrBuilder>
extends ValidationWorkflowRunnerBuilder<T>
A builder for
JsonSchemaValidationWorkflowRunner.
Build the JsonSchemaValidationWorkflowRunner by providing JSON schema documents
either as Path or URLs, and PhenopacketValidators for performing semantic validation.
-
Field Summary
FieldsFields inherited from class org.phenopackets.phenopackettools.validator.core.ValidationWorkflowRunnerBuilder
semanticValidators, syntaxValidators -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllJsonSchemaPaths(Iterable<Path> paths) Add JSON schemas in bulk.addAllJsonSchemaUrls(List<URL> urls) Add JSON schemas in bulk.addJsonSchema(URL url) Register a JSON schema present at a givenurlto be used as a syntax validator.addJsonSchema(Path path) Register a JSON schema present at a givenpathto be used as a syntax validator.abstract JsonSchemaValidationWorkflowRunner<T>build()Finish building theJsonSchemaValidationWorkflowRunner.Methods inherited from class org.phenopackets.phenopackettools.validator.core.ValidationWorkflowRunnerBuilder
addAllSemanticValidators, addAllSyntaxValidators, addSemanticValidator, addSyntaxValidator
-
Field Details
-
jsonSchemaUrls
-
-
Constructor Details
-
JsonSchemaValidationWorkflowRunnerBuilder
protected JsonSchemaValidationWorkflowRunnerBuilder()
-
-
Method Details
-
addJsonSchema
public JsonSchemaValidationWorkflowRunnerBuilder<T> addJsonSchema(Path path) throws MalformedURLException Register a JSON schema present at a givenpathto be used as a syntax validator. Thepathwill be interpreted as aURL.- Parameters:
path- path to the JSON schema document- Returns:
- the builder
- Throws:
MalformedURLException- if thepathcannot be converted to a well-formattedURL
-
addJsonSchema
Register a JSON schema present at a givenurlto be used as a syntax validator.- Parameters:
url- url to the JSON schema document- Returns:
- the builder
-
addAllJsonSchemaPaths
public JsonSchemaValidationWorkflowRunnerBuilder<T> addAllJsonSchemaPaths(Iterable<Path> paths) throws MalformedURLException Add JSON schemas in bulk.- Parameters:
paths- an iterable of paths pointing to JSON schema documents- Returns:
- the builder
- Throws:
MalformedURLException- See Also:
-
addAllJsonSchemaUrls
Add JSON schemas in bulk.- Parameters:
urls- an iterable of urls pointing to JSON schema documents- Returns:
- the builder
- See Also:
-
build
Finish building theJsonSchemaValidationWorkflowRunner.- Specified by:
buildin classValidationWorkflowRunnerBuilder<T extends com.google.protobuf.MessageOrBuilder>- Returns:
- the runner
-