Class SchemaElementDefinitionValidator


  • public class SchemaElementDefinitionValidator
    extends Object
    An SchemaElementDefinitionValidator validates a SchemaElementDefinition. Checks all function input and output types are compatible with the properties and identifiers provided. To be able to aggregate 2 similar elements together ALL properties have to be aggregated together. So this validator checks that either no properties have aggregator functions or all properties have aggregator functions defined.
    • Constructor Detail

      • SchemaElementDefinitionValidator

        public SchemaElementDefinitionValidator()
    • Method Detail

      • validate

        public uk.gov.gchq.koryphe.ValidationResult validate​(SchemaElementDefinition elementDef)
        Checks each identifier and property has a type associated with it. Checks all Predicates and BinaryOperators defined are compatible with the identifiers and properties - this is done by comparing the function input and output types with the identifier and property types.
        Parameters:
        elementDef - the ElementDefinition to validate
        Returns:
        true if the element definition is valid, otherwise false and an error is logged
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object