public abstract class BaseJsonValidator extends java.lang.Object implements JsonValidator
AT_ROOT
Constructor and Description |
---|
BaseJsonValidator(java.lang.String schemaPath,
com.google.gson.JsonElement schemaNode,
JsonSchema parentSchema,
ValidatorTypeCode validatorType) |
BaseJsonValidator(java.lang.String schemaPath,
com.google.gson.JsonElement schemaNode,
JsonSchema parentSchema,
ValidatorTypeCode validatorType,
boolean useRefCache) |
BaseJsonValidator(java.lang.String schemaPath,
com.google.gson.JsonElement schemaNode,
JsonSchema parentSchema,
ValidatorTypeCode validatorType,
JsonSchema subSchema) |
BaseJsonValidator(java.lang.String schemaPath,
com.google.gson.JsonElement schemaNode,
JsonSchema parentSchema,
ValidatorTypeCode validatorType,
JsonSchema subSchema,
boolean useRefCache) |
Modifier and Type | Method and Description |
---|---|
int |
asInt(com.google.gson.JsonElement element) |
protected ValidationMessage |
buildValidationMessage(java.lang.String at,
java.lang.String... arguments) |
protected void |
debug(org.slf4j.Logger logger,
com.google.gson.JsonElement node,
com.google.gson.JsonElement rootNode,
java.lang.String at) |
protected boolean |
equals(double n1,
double n2) |
protected JsonSchema |
getParentSchema() |
protected com.google.gson.JsonElement |
getSchemaNode() |
protected java.lang.String |
getSchemaPath() |
protected JsonSchema |
getSubSchema() |
protected ValidatorTypeCode |
getValidatorType() |
protected boolean |
greaterThan(double n1,
double n2) |
protected boolean |
hasSubSchema() |
protected boolean |
lessThan(double n1,
double n2) |
protected JsonSchema |
obtainSubSchemaNode(com.google.gson.JsonElement schemaNode) |
protected void |
parseErrorCode(java.lang.String errorCodeKey) |
protected boolean |
useRefCache() |
java.util.Set<ValidationMessage> |
validate(com.google.gson.JsonElement node)
Validate the given root JsonElement, starting at the root of the data path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validate
public BaseJsonValidator(java.lang.String schemaPath, com.google.gson.JsonElement schemaNode, JsonSchema parentSchema, ValidatorTypeCode validatorType)
public BaseJsonValidator(java.lang.String schemaPath, com.google.gson.JsonElement schemaNode, JsonSchema parentSchema, ValidatorTypeCode validatorType, JsonSchema subSchema, boolean useRefCache)
public BaseJsonValidator(java.lang.String schemaPath, com.google.gson.JsonElement schemaNode, JsonSchema parentSchema, ValidatorTypeCode validatorType, JsonSchema subSchema)
public BaseJsonValidator(java.lang.String schemaPath, com.google.gson.JsonElement schemaNode, JsonSchema parentSchema, ValidatorTypeCode validatorType, boolean useRefCache)
protected java.lang.String getSchemaPath()
protected com.google.gson.JsonElement getSchemaNode()
protected JsonSchema getParentSchema()
protected JsonSchema getSubSchema()
protected boolean hasSubSchema()
protected boolean useRefCache()
protected JsonSchema obtainSubSchemaNode(com.google.gson.JsonElement schemaNode)
public java.util.Set<ValidationMessage> validate(com.google.gson.JsonElement node)
JsonValidator
validate
in interface JsonValidator
node
- JsonElementprotected boolean equals(double n1, double n2)
protected boolean greaterThan(double n1, double n2)
protected boolean lessThan(double n1, double n2)
protected void parseErrorCode(java.lang.String errorCodeKey)
protected ValidationMessage buildValidationMessage(java.lang.String at, java.lang.String... arguments)
protected void debug(org.slf4j.Logger logger, com.google.gson.JsonElement node, com.google.gson.JsonElement rootNode, java.lang.String at)
protected ValidatorTypeCode getValidatorType()
public int asInt(com.google.gson.JsonElement element)