Class JsonMetaSchema
java.lang.Object
com.networknt.schema.JsonMetaSchema
Represents a meta-schema which is uniquely identified by its IRI.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder forJsonMetaSchema.static interfaceFactory for creating a format keyword. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JsonMetaSchema.Builderprivate final Stringprivate final Stringprivate static final org.slf4j.Loggerprivate final SpecVersion.VersionFlag -
Constructor Summary
ConstructorsConstructorDescriptionJsonMetaSchema(String iri, String idKeyword, Map<String, Keyword> keywords, Map<String, Boolean> vocabularies, SpecVersion.VersionFlag specification, JsonMetaSchema.Builder builder) -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonMetaSchema.Builderbuilder(JsonMetaSchema blueprint) Create a builder.static JsonMetaSchema.BuilderCreate a builder without keywords or formats.static JsonMetaSchema.Builderbuilder(String iri, JsonMetaSchema blueprint) Create a builder.booleangetIri()static JsonMetaSchemastatic JsonMetaSchemastatic JsonMetaSchemagetV4()static JsonMetaSchemagetV6()static JsonMetaSchemagetV7()inthashCode()newValidator(ValidationContext validationContext, SchemaLocation schemaLocation, JsonNodePath evaluationPath, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema 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) private static StringtoString()
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
iri
-
idKeyword
-
keywords
-
vocabularies
-
specification
-
builder
-
-
Constructor Details
-
JsonMetaSchema
JsonMetaSchema(String iri, String idKeyword, Map<String, Keyword> keywords, Map<String, Boolean> vocabularies, SpecVersion.VersionFlag specification, JsonMetaSchema.Builder builder)
-
-
Method Details
-
getV4
-
getV6
-
getV7
-
getV201909
-
getV202012
-
builder
Create a builder without keywords or formats.Use
getV4()for the Draft 4 Metaschema, or if you need a builder based on Draft4, useJsonMetaSchema.builder("http://your-metaschema-iri", JsonMetaSchema.getV4()).build();- Parameters:
iri- the IRI of the metaschema 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:
iri- the IRI of your new JsonMetaSchema that will be defined via this builder.blueprint- the JsonMetaSchema to base your custom JsonMetaSchema on.- Returns:
- a builder instance preconfigured to be the same as blueprint, but with a different uri.
-
builder
Create a builder.- Parameters:
blueprint- the JsonMetaSchema to base your custom JsonMetaSchema on.- Returns:
- a builder instance preconfigured to be the same as blueprint
-
getIdKeyword
-
readId
-
readAnchor
-
readDynamicAnchor
-
readText
-
getIri
-
getKeywords
-
getVocabularies
-
getSpecification
-
newValidator
public JsonValidator newValidator(ValidationContext validationContext, SchemaLocation schemaLocation, JsonNodePath evaluationPath, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema) Creates a new validator of the keyword.- Parameters:
validationContext- the validation contextschemaLocation- the schema locationevaluationPath- the evaluation pathkeyword- the keywordschemaNode- the schema nodeparentSchema- the parent schema- Returns:
- the validator
-
toString
-
hashCode
-
equals
-