Class ItemsValidator
java.lang.Object
com.inductiveautomation.ignition.common.jsonschema.BaseJsonValidator
com.inductiveautomation.ignition.common.jsonschema.ItemsValidator
- All Implemented Interfaces:
- JsonValidator
A validator (keyed off 
items) that either defines a schema for all items in an arbitrarily long sequence,
 or a validator with a fixed set of schemas - both the contents and the number of those child schemas must
 match to be valid.- 
Field SummaryFieldsFields inherited from interface com.inductiveautomation.ignition.common.jsonschema.JsonValidatorAT_ROOT
- 
Constructor SummaryConstructorsConstructorDescriptionItemsValidator(String schemaPath, com.inductiveautomation.ignition.common.gson.JsonElement schemaNode, JsonSchema parentSchema) 
- 
Method SummaryModifier and TypeMethodDescriptioncom.inductiveautomation.ignition.common.gson.JsonArraycom.inductiveautomation.ignition.common.gson.JsonArrayderiveDefaultArray(boolean includeExample) findSchemaForIndex(int index) Optional<com.inductiveautomation.ignition.common.gson.JsonElement>booleanvalidate(com.inductiveautomation.ignition.common.gson.JsonElement node, com.inductiveautomation.ignition.common.gson.JsonElement rootNode, String at) Validate the given JsonElement, the given node is the child node of the root node at given data path.Methods inherited from class com.inductiveautomation.ignition.common.jsonschema.BaseJsonValidatorasInt, buildValidationMessage, debug, equals, getParentSchema, getSchemaNode, getSchemaPath, getSubSchema, getValidatorType, greaterThan, hasSubSchema, lessThan, obtainSubSchemaNode, parseErrorCode, useRefCache, validate
- 
Field Details- 
PROPERTY- See Also:
 
 
- 
- 
Constructor Details- 
ItemsValidatorpublic ItemsValidator(String schemaPath, com.inductiveautomation.ignition.common.gson.JsonElement schemaNode, JsonSchema parentSchema) 
 
- 
- 
Method Details- 
findSchemaForIndex
- 
getSchemas- Returns:
- a sequence of schemas underneath this validator.
 
- 
isBoundedSchemapublic boolean isBoundedSchema()- Returns:
- true if this validator is constrained to a fixed sequence of items, or false if it applies a schema to all items in an arbitrary sequence.
 
- 
validatepublic Set<ValidationMessage> validate(com.inductiveautomation.ignition.common.gson.JsonElement node, com.inductiveautomation.ignition.common.gson.JsonElement rootNode, String at) Description copied from interface:JsonValidatorValidate the given JsonElement, the given node is the child node of the root node at given data path.- Parameters:
- node- JsonElement
- rootNode- JsonElement
- at- String
- Returns:
- A list of ValidationMessage if there is any validation error, or an empty list if there is no error.
 
- 
deriveDefaultArraypublic com.inductiveautomation.ignition.common.gson.JsonArray deriveDefaultArray()
- 
deriveDefaultArraypublic com.inductiveautomation.ignition.common.gson.JsonArray deriveDefaultArray(boolean includeExample) 
- 
getDefaultItem
 
-