Package mc.core.domain.base.dobj.calc
Class MandatoryAttributeCalculator
java.lang.Object
mc.core.system.base.BasePojo
mc.core.domain.base.dobj.calc.MandatoryAttributeCalculator
public class MandatoryAttributeCalculator
extends mc.core.system.base.BasePojo
calculates a data quality score and simple quality gate based on which attributes are missing and which are
maintained. Does not take content into account. the gate is < 40% RED, < 60% yellow and < 80% green by default
could be extended/overwritten to calculate based on e.g. mandatory for a given channel or for other use cases.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumsimple customer specific quality gate < 40% RED, < 60% yellow and < 80% green -
Constructor Summary
ConstructorsConstructorDescriptionMandatoryAttributeCalculator(ComplexEntity entity, Locale locale) this constructor does not perform the mandatory calculation work initially. -
Method Summary
Modifier and TypeMethodDescriptionreturn the pair, keeping for legacy reasons.return list of all mandatory type attributes and classification attributesintcount of mandatory attributesfloatmandatory score calculated as (mandatory - missing )/mandatoryintcount of attributes missing valuesreturn a quality gate, a traffic light indicating data quality R Y G
-
Constructor Details
-
MandatoryAttributeCalculator
this constructor does not perform the mandatory calculation work initially.- Parameters:
entity-locale-
-
-
Method Details
-
mandatoryMissing
- Returns:
- list of missing attributes defined as mandatory on type entity or classification
-
mandatoryAttributes
return list of all mandatory type attributes and classification attributes- Returns:
-
mandatoryAndMissingPair
return the pair, keeping for legacy reasons.- Returns:
- pair of left: mandatory right: missing mandatory attributes
-
mandatoryScore
public float mandatoryScore()mandatory score calculated as (mandatory - missing )/mandatory- Returns:
-
mandatoryCount
public int mandatoryCount()count of mandatory attributes -
missingCount
public int missingCount()count of attributes missing values- Returns:
-
qualityGate
return a quality gate, a traffic light indicating data quality R Y G- Returns:
- a
MandatoryAttributeCalculator.QualityGate
-