Class AttributeValidator


  • public final class AttributeValidator
    extends Object
    author Pascal Knueppel
    created at: 30.11.2019 - 22:48

    • Constructor Detail

      • AttributeValidator

        public AttributeValidator()
    • Method Detail

      • validateTextNode

        public static void validateTextNode​(SchemaAttribute schemaAttribute,
                                            String value)
        validates if the given value matches the requirements of the schema attribute
        Parameters:
        schemaAttribute - the attribute definition
        value - the value that should be checked
      • validateNumberNode

        public static void validateNumberNode​(SchemaAttribute schemaAttribute,
                                              double value)
        verifies that the value of this node does match its requirements from the attribute
        Parameters:
        schemaAttribute - the attribute definition
        value - the value of this node
      • validateArrayNode

        public static void validateArrayNode​(SchemaAttribute schemaAttribute,
                                             com.fasterxml.jackson.databind.node.ArrayNode arrayNode)
        verifies that the given array node does match its requirements if requirements have been set
        Parameters:
        schemaAttribute - the attribute definition
        arrayNode - the array node that must match the requirements of the definition