Class WalkEvent
java.lang.Object
com.networknt.schema.walk.WalkEvent
Encapsulation of Walk data that is passed into the
JsonSchemaWalkListener.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ExecutionContextprivate JsonNodePathprivate com.fasterxml.jackson.databind.JsonNodeprivate Stringprivate com.fasterxml.jackson.databind.JsonNodeprivate JsonSchemaprivate JsonValidator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WalkEvent.WalkEventBuilderbuilder()Gets the execution context.Gets the instance location of the instance node.com.fasterxml.jackson.databind.JsonNodeGets the instance node.Gets the keyword.com.fasterxml.jackson.databind.JsonNodeGets the root instance node.Gets the schema that will be used to evaluate the instance node.<T extends JsonValidator>
TGets the validator that corresponds with the keyword.toString()
-
Field Details
-
executionContext
-
schema
-
keyword
-
rootNode
private com.fasterxml.jackson.databind.JsonNode rootNode -
instanceNode
private com.fasterxml.jackson.databind.JsonNode instanceNode -
instanceLocation
-
validator
-
-
Constructor Details
-
WalkEvent
public WalkEvent()
-
-
Method Details
-
getExecutionContext
Gets the execution context.As the listeners should be state-less, this allows listeners to store data in the collector context.
- Returns:
- the execution context
-
getSchema
Gets the schema that will be used to evaluate the instance node.For the keyword listener, this will allow getting the validator for the given keyword.
- Returns:
- the schema
-
getKeyword
-
getRootNode
public com.fasterxml.jackson.databind.JsonNode getRootNode()Gets the root instance node.This makes it possible to get the parent node, for instance by getting the instance location parent and using the root node.
- Returns:
- the root node
-
getInstanceNode
public com.fasterxml.jackson.databind.JsonNode getInstanceNode()Gets the instance node.- Returns:
- the instance node
-
getInstanceLocation
Gets the instance location of the instance node.- Returns:
- the instance location of the instance node
-
getValidator
Gets the validator that corresponds with the keyword.- Type Parameters:
T- the type of the validator- Returns:
- the validator
-
toString
-
builder
-