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
for running base validation, and additional JSON schema-based
validation (provide either Path
s or URL
s to JSON schema documents),
and PhenopacketValidator
s for performing additional validation.
-
Field Summary
Fields inherited from class org.phenopackets.phenopackettools.validator.core.ValidationWorkflowRunnerBuilder
semanticValidators, syntaxValidators, validators
-
Constructor Summary
-
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 givenurl
to be used as a validator.addJsonSchema
(Path path) Register a JSON schema present at a givenpath
to be used as a validator.abstract JsonSchemaValidationWorkflowRunner<T>
build()
Finish building theJsonSchemaValidationWorkflowRunner
.Methods inherited from class org.phenopackets.phenopackettools.validator.core.ValidationWorkflowRunnerBuilder
addAllSemanticValidators, addAllSyntaxValidators, addSemanticValidator, addSyntaxValidator, addValidator, addValidators
-
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 givenpath
to be used as a validator. Thepath
will be interpreted as aURL
.- Parameters:
path
- path to the JSON schema document- Returns:
- the builder
- Throws:
MalformedURLException
- if thepath
cannot be converted to a well-formattedURL
-
addJsonSchema
Register a JSON schema present at a givenurl
to be used as a 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:
build
in classValidationWorkflowRunnerBuilder<T extends com.google.protobuf.MessageOrBuilder>
- Returns:
- the runner
-