Package com.networknt.schema
Class ValidationContext
- java.lang.Object
-
- com.networknt.schema.ValidationContext
-
public class ValidationContext extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private SchemaValidatorsConfig
config
private java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema>
dynamicAnchors
private JsonSchemaFactory
jsonSchemaFactory
private JsonMetaSchema
metaSchema
private java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema>
schemaReferences
private java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema>
schemaResources
-
Constructor Summary
Constructors Constructor Description ValidationContext(JsonMetaSchema metaSchema, JsonSchemaFactory jsonSchemaFactory, SchemaValidatorsConfig config)
ValidationContext(JsonMetaSchema metaSchema, JsonSchemaFactory jsonSchemaFactory, SchemaValidatorsConfig config, java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> schemaReferences, java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> schemaResources, java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> dynamicAnchors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<SpecVersion.VersionFlag>
activeDialect()
SchemaValidatorsConfig
getConfig()
java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema>
getDynamicAnchors()
Gets the dynamic anchors.JsonSchemaFactory
getJsonSchemaFactory()
JsonMetaSchema
getMetaSchema()
java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema>
getSchemaReferences()
Gets the schema references identified by the ref uri.java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema>
getSchemaResources()
Gets the schema resources identified by id.JsonSchema
newSchema(SchemaLocation schemaLocation, JsonNodePath evaluationPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema)
JsonValidator
newValidator(SchemaLocation schemaLocation, JsonNodePath evaluationPath, java.lang.String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema)
java.lang.String
resolveSchemaId(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
-
-
Field Detail
-
metaSchema
private final JsonMetaSchema metaSchema
-
jsonSchemaFactory
private final JsonSchemaFactory jsonSchemaFactory
-
config
private final SchemaValidatorsConfig config
-
schemaReferences
private final java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> schemaReferences
-
schemaResources
private final java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> schemaResources
-
dynamicAnchors
private final java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> dynamicAnchors
-
-
Constructor Detail
-
ValidationContext
public ValidationContext(JsonMetaSchema metaSchema, JsonSchemaFactory jsonSchemaFactory, SchemaValidatorsConfig config)
-
ValidationContext
public ValidationContext(JsonMetaSchema metaSchema, JsonSchemaFactory jsonSchemaFactory, SchemaValidatorsConfig config, java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> schemaReferences, java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> schemaResources, java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> dynamicAnchors)
-
-
Method Detail
-
newSchema
public JsonSchema newSchema(SchemaLocation schemaLocation, JsonNodePath evaluationPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema)
-
newValidator
public JsonValidator newValidator(SchemaLocation schemaLocation, JsonNodePath evaluationPath, java.lang.String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema)
-
resolveSchemaId
public java.lang.String resolveSchemaId(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
getJsonSchemaFactory
public JsonSchemaFactory getJsonSchemaFactory()
-
getConfig
public SchemaValidatorsConfig getConfig()
-
getSchemaReferences
public java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> getSchemaReferences()
Gets the schema references identified by the ref uri.- Returns:
- the schema references
-
getSchemaResources
public java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> getSchemaResources()
Gets the schema resources identified by id.- Returns:
- the schema resources
-
getDynamicAnchors
public java.util.concurrent.ConcurrentMap<java.lang.String,JsonSchema> getDynamicAnchors()
Gets the dynamic anchors.- Returns:
- the dynamic anchors
-
getMetaSchema
public JsonMetaSchema getMetaSchema()
-
activeDialect
public java.util.Optional<SpecVersion.VersionFlag> activeDialect()
-
-