Package com.networknt.schema
Class Error.BuilderSupport<S>
- java.lang.Object
-
- com.networknt.schema.Error.BuilderSupport<S>
-
- Direct Known Subclasses:
Error.Builder,MessageSourceError.BuilderSupport
- Enclosing class:
- Error
public abstract static class Error.BuilderSupport<S> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Object[]argumentsprotected Map<String,Object>detailsprotected NodePathevaluationPathprotected MessageFormatformatprotected NodePathinstanceLocationprotected com.fasterxml.jackson.databind.JsonNodeinstanceNodeprotected Stringkeywordprotected Stringmessageprotected MessageFormattermessageFormatterprotected StringmessageKeyprotected Supplier<String>messageSupplierprotected SchemaLocationschemaLocationprotected com.fasterxml.jackson.databind.JsonNodeschemaNode
-
Constructor Summary
Constructors Constructor Description BuilderSupport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Sarguments(Object... arguments)Errorbuild()Sdetails(Map<String,Object> details)SevaluationPath(NodePath evaluationPath)The evaluation path is the set of keys, starting from the schema root, through which evaluation passes to reach the schema object that produced a specific result.Sformat(MessageFormat format)protected Object[]getArguments()protected Map<String,Object>getDetails()protected NodePathgetEvaluationPath()protected MessageFormatgetFormat()protected NodePathgetInstanceLocation()protected StringgetKeyword()protected StringgetMessage()protected Object[]getMessageArguments()protected MessageFormattergetMessageFormatter()protected StringgetMessageKey()protected Supplier<String>getMessageSupplier()protected SchemaLocationgetSchemaLocation()Sindex(Integer index)SinstanceLocation(NodePath instanceLocation)The instance location is the location of the JSON value within the root instance being validated.SinstanceNode(com.fasterxml.jackson.databind.JsonNode instanceNode)Skeyword(String keyword)Smessage(String message)Explicitly sets the message pattern to be used.SmessageFormatter(MessageFormatter messageFormatter)SmessageKey(String messageKey)SmessageSupplier(Supplier<String> messageSupplier)Sproperty(String properties)SschemaLocation(SchemaLocation schemaLocation)The schema location is the canonical URI of the schema object plus a JSON Pointer fragment indicating the subschema that produced a result.SschemaNode(com.fasterxml.jackson.databind.JsonNode schemaNode)abstract Sself()
-
-
-
Field Detail
-
keyword
protected String keyword
-
evaluationPath
protected NodePath evaluationPath
-
schemaLocation
protected SchemaLocation schemaLocation
-
instanceLocation
protected NodePath instanceLocation
-
arguments
protected Object[] arguments
-
format
protected MessageFormat format
-
message
protected String message
-
messageFormatter
protected MessageFormatter messageFormatter
-
messageKey
protected String messageKey
-
instanceNode
protected com.fasterxml.jackson.databind.JsonNode instanceNode
-
schemaNode
protected com.fasterxml.jackson.databind.JsonNode schemaNode
-
-
Method Detail
-
self
public abstract S self()
-
instanceLocation
public S instanceLocation(NodePath instanceLocation)
The instance location is the location of the JSON value within the root instance being validated.- Parameters:
instanceLocation- the instance location- Returns:
- the builder
-
schemaLocation
public S schemaLocation(SchemaLocation schemaLocation)
The schema location is the canonical URI of the schema object plus a JSON Pointer fragment indicating the subschema that produced a result. In contrast with the evaluation path, the schema location MUST NOT include by-reference applicators such as $ref or $dynamicRef.- Parameters:
schemaLocation- the schema location- Returns:
- the builder
-
evaluationPath
public S evaluationPath(NodePath evaluationPath)
The evaluation path is the set of keys, starting from the schema root, through which evaluation passes to reach the schema object that produced a specific result.- Parameters:
evaluationPath- the evaluation path- Returns:
- the builder
-
format
public S format(MessageFormat format)
-
message
public S message(String message)
Explicitly sets the message pattern to be used.If set the message supplier and message formatter will be ignored.
- Parameters:
message- the message pattern- Returns:
- the builder
-
messageFormatter
public S messageFormatter(MessageFormatter messageFormatter)
-
instanceNode
public S instanceNode(com.fasterxml.jackson.databind.JsonNode instanceNode)
-
schemaNode
public S schemaNode(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
build
public Error build()
-
getMessageArguments
protected Object[] getMessageArguments()
-
getKeyword
protected String getKeyword()
-
getEvaluationPath
protected NodePath getEvaluationPath()
-
getSchemaLocation
protected SchemaLocation getSchemaLocation()
-
getInstanceLocation
protected NodePath getInstanceLocation()
-
getArguments
protected Object[] getArguments()
-
getFormat
protected MessageFormat getFormat()
-
getMessage
protected String getMessage()
-
getMessageFormatter
protected MessageFormatter getMessageFormatter()
-
getMessageKey
protected String getMessageKey()
-
-