Package uk.gov.gchq.gaffer.store.schema
Class SchemaElementDefinitionValidator
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.schema.SchemaElementDefinitionValidator
-
public class SchemaElementDefinitionValidator extends Object
AnSchemaElementDefinitionValidatorvalidates aSchemaElementDefinition. 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 Summary
Constructors Constructor Description SchemaElementDefinitionValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()uk.gov.gchq.koryphe.ValidationResultvalidate(SchemaElementDefinition elementDef)Checks each identifier and property has a type associated with it.
-
-
-
Method Detail
-
validate
public uk.gov.gchq.koryphe.ValidationResult validate(SchemaElementDefinition elementDef)
Checks each identifier and property has a type associated with it. Checks allPredicates andBinaryOperators 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- theElementDefinitionto validate- Returns:
- true if the element definition is valid, otherwise false and an error is logged
-
-