Package uk.gov.gchq.gaffer.store.schema
Class SchemaElementDefinitionValidator
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.schema.SchemaElementDefinitionValidator
-
public class SchemaElementDefinitionValidator extends Object
AnSchemaElementDefinitionValidator
validates 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 boolean
equals(Object o)
int
hashCode()
uk.gov.gchq.koryphe.ValidationResult
validate(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 allPredicate
s andBinaryOperator
s 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
- theElementDefinition
to validate- Returns:
- true if the element definition is valid, otherwise false and an error is logged
-
-