Package com.networknt.schema
Class SchemaContext
- java.lang.Object
-
- com.networknt.schema.SchemaContext
-
public class SchemaContext extends Object
The schema context associated with a schema and all its validators.
-
-
Constructor Summary
Constructors Constructor Description SchemaContext(Dialect dialect, SchemaRegistry schemaRegistry)SchemaContext(Dialect dialect, SchemaRegistry schemaRegistry, ConcurrentMap<String,Schema> schemaReferences, ConcurrentMap<String,Schema> schemaResources, ConcurrentMap<String,Schema> dynamicAnchors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DialectgetDialect()ConcurrentMap<String,Schema>getDynamicAnchors()Gets the dynamic anchors.ConcurrentMap<String,Schema>getSchemaReferences()Gets the schema references identified by the ref uri.SchemaRegistrygetSchemaRegistry()SchemaRegistryConfiggetSchemaRegistryConfig()ConcurrentMap<String,Schema>getSchemaResources()Gets the schema resources identified by id.booleanisDiscriminatorKeywordEnabled()booleanisNullableKeywordEnabled()SchemanewSchema(SchemaLocation schemaLocation, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema)KeywordValidatornewValidator(SchemaLocation schemaLocation, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema)StringresolveSchemaId(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
-
-
Constructor Detail
-
SchemaContext
public SchemaContext(Dialect dialect, SchemaRegistry schemaRegistry)
-
SchemaContext
public SchemaContext(Dialect dialect, SchemaRegistry schemaRegistry, ConcurrentMap<String,Schema> schemaReferences, ConcurrentMap<String,Schema> schemaResources, ConcurrentMap<String,Schema> dynamicAnchors)
-
-
Method Detail
-
newSchema
public Schema newSchema(SchemaLocation schemaLocation, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema)
-
newValidator
public KeywordValidator newValidator(SchemaLocation schemaLocation, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema)
-
resolveSchemaId
public String resolveSchemaId(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
getSchemaRegistry
public SchemaRegistry getSchemaRegistry()
-
getSchemaRegistryConfig
public SchemaRegistryConfig getSchemaRegistryConfig()
-
getSchemaReferences
public ConcurrentMap<String,Schema> getSchemaReferences()
Gets the schema references identified by the ref uri.- Returns:
- the schema references
-
getSchemaResources
public ConcurrentMap<String,Schema> getSchemaResources()
Gets the schema resources identified by id.- Returns:
- the schema resources
-
getDynamicAnchors
public ConcurrentMap<String,Schema> getDynamicAnchors()
Gets the dynamic anchors.- Returns:
- the dynamic anchors
-
getDialect
public Dialect getDialect()
-
isDiscriminatorKeywordEnabled
public boolean isDiscriminatorKeywordEnabled()
-
isNullableKeywordEnabled
public boolean isNullableKeywordEnabled()
-
-