public static DiscoMatchType calculateCompositeMatchType ( MatchType bestMatch , MatchType worstMatch ) { if ( bestMatch instanceof LogicConceptMatchType && worstMatch instanceof LogicConceptMatchType ) { return calculateCompositeMatchType ( ( LogicConceptMatchType ) bestMatch , ( LogicConceptMatchType ) worstMatch ) ; } return DiscoMatchType . Fail ; }
Given the best and worst match figure out the match type for the composite . The composite match type is determined by the worst case except when it is a FAIL . In this case if the best is EXACT or PLUGIN the composite match will be PARTIAL_PLUGIN . If the best is SUBSUMES it is PARTIAL_SUBSUMES .