Class JsonSchemaContentValidator
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.resource.AbstractResourceLoader
-
- gov.nist.secauto.metaschema.core.model.validation.AbstractContentValidator
-
- gov.nist.secauto.metaschema.core.model.validation.JsonSchemaContentValidator
-
- All Implemented Interfaces:
IResourceLoader
,IContentValidator
public class JsonSchemaContentValidator extends AbstractContentValidator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonSchemaContentValidator.JsonValidationFinding
-
Constructor Summary
Constructors Modifier Constructor Description JsonSchemaContentValidator(InputStream is)
JsonSchemaContentValidator(Reader reader)
protected
JsonSchemaContentValidator(org.everit.json.schema.Schema schema)
JsonSchemaContentValidator(org.json.JSONObject jsonSchema)
protected
JsonSchemaContentValidator(org.json.JSONTokener tokenizer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stream<JsonSchemaContentValidator.JsonValidationFinding>
handleValidationException(org.everit.json.schema.ValidationException ex, URI documentUri)
IValidationResult
validate(InputStream is, URI documentUri)
Validate the resource associated with the provided input streamis
.IValidationResult
validate(org.json.JSONObject json, URI documentUri)
-
Methods inherited from class gov.nist.secauto.metaschema.core.model.validation.AbstractContentValidator
validate
-
Methods inherited from class gov.nist.secauto.metaschema.core.resource.AbstractResourceLoader
getUriResolver, resolve, setUriResolver
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.validation.IContentValidator
validate, validate
-
-
-
-
Constructor Detail
-
JsonSchemaContentValidator
public JsonSchemaContentValidator(@NonNull Reader reader)
-
JsonSchemaContentValidator
public JsonSchemaContentValidator(@NonNull InputStream is)
-
JsonSchemaContentValidator
public JsonSchemaContentValidator(@NonNull org.json.JSONObject jsonSchema)
-
JsonSchemaContentValidator
protected JsonSchemaContentValidator(@NonNull org.json.JSONTokener tokenizer)
-
JsonSchemaContentValidator
protected JsonSchemaContentValidator(@NonNull org.everit.json.schema.Schema schema)
-
-
Method Detail
-
validate
public IValidationResult validate(InputStream is, URI documentUri) throws IOException
Description copied from interface:IContentValidator
Validate the resource associated with the provided input streamis
.- Parameters:
is
- an input stream to access the resourcedocumentUri
- the URI of the resource to validate- Returns:
- the result of the validation
- Throws:
IOException
- if an error occurred while performing validation
-
validate
@NonNull public IValidationResult validate(@NonNull org.json.JSONObject json, @NonNull URI documentUri)
-
handleValidationException
@NonNull protected Stream<JsonSchemaContentValidator.JsonValidationFinding> handleValidationException(@NonNull org.everit.json.schema.ValidationException ex, @NonNull URI documentUri)
-
-