Package com.networknt.schema.dialect
Class Dialect
java.lang.Object
com.networknt.schema.dialect.Dialect
A dialect represents the set of keywords and semantics that can be used to
evaluate a schema. The dialect can be uniquely identified by its IRI which
points to the meta-schema used to validate schemas written for that dialect.
The dialect for a particular schema is indicated using the $schema keyword.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder forDialect.static interfaceFactory for creating a format keyword. -
Method Summary
Modifier and TypeMethodDescriptionstatic Dialect.BuilderCreate a builder.static Dialect.BuilderCreate a builder without keywords or formats.static Dialect.BuilderCreate a builder.booleangetId()inthashCode()newValidator(SchemaContext schemaContext, SchemaLocation schemaLocation, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema) Creates a new validator of the keyword.readAnchor(com.fasterxml.jackson.databind.JsonNode schemaNode) readDynamicAnchor(com.fasterxml.jackson.databind.JsonNode schemaNode) readId(com.fasterxml.jackson.databind.JsonNode schemaNode) toString()
-
Method Details
-
builder
Create a builder without keywords or formats.- Parameters:
id- the IRI of the dialect that will be defined via this builder.- Returns:
- a builder instance without any keywords or formats - usually not what one needs.
-
builder
Create a builder.- Parameters:
id- the IRI of your new Dialect that will be defined via this builder.blueprint- the Dialect to base your custom Dialect on.- Returns:
- a builder instance preconfigured to be the same as blueprint, but with a different uri.
-
builder
Create a builder.- Parameters:
blueprint- the Dialect to base your custom Dialect on.- Returns:
- a builder instance preconfigured to be the same as blueprint
-
getIdKeyword
-
readId
-
readAnchor
-
readDynamicAnchor
-
getId
-
getKeywords
-
getVocabularies
-
getSpecificationVersion
-
newValidator
public KeywordValidator newValidator(SchemaContext schemaContext, SchemaLocation schemaLocation, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema) Creates a new validator of the keyword.- Parameters:
schemaContext- the schema contextschemaLocation- the schema locationkeyword- the keywordschemaNode- the schema nodeparentSchema- the parent schema- Returns:
- the validator
-
toString
-
hashCode
public int hashCode() -
equals
-