Package org.drools.guvnor.client.decisiontable.analysis.condition

Examples of org.drools.guvnor.client.decisiontable.analysis.condition.ConditionDetector


                        realCellValue = visibleCellValue;
                        cellIsNotBlank = visibleCellValue.hasValue();
                    }
                    // Blank cells are ignored
                    if ( cellIsNotBlank ) {
                        ConditionDetector conditionDetector = buildConditionDetector( model,
                                                                                      pattern,
                                                                                      conditionCol,
                                                                                      realCellValue );
                        rowDetector.putOrMergeConditionDetector( conditionDetector );
                    }
View Full Code Here


        String operator = conditionCol.getOperator();
        String type = model.getType( conditionCol,
                                     sce );
        // Retrieve "Guvnor" enums
        String[] allValueList = model.getValueList( conditionCol );
        ConditionDetector newDetector;
        if ( allValueList.length != 0 ) {
            // Guvnor enum
            newDetector = new EnumConditionDetector( pattern,
                                                     factField,
                                                     Arrays.asList( allValueList ),
View Full Code Here

        return conditionDetectorMap.get(key);
    }

    public void putOrMergeConditionDetector(ConditionDetector conditionDetector) {
        ConditionDetectorKey key = conditionDetector.getKey();
        ConditionDetector originalConditionDetector = conditionDetectorMap.get(key);
        ConditionDetector mergedConditionDetector;
        if (originalConditionDetector == null) {
            mergedConditionDetector = conditionDetector;
        } else {
            mergedConditionDetector = originalConditionDetector.merge(conditionDetector);
        }
View Full Code Here

    }

    private void detectImpossibleMatch(Analysis analysis) {
        for (Map.Entry<ConditionDetectorKey, ConditionDetector> entry : conditionDetectorMap.entrySet()) {
            ConditionDetectorKey key = entry.getKey();
            ConditionDetector conditionDetector = entry.getValue();
            if (conditionDetector.isImpossibleMatch()) {
                analysis.addImpossibleMatch("Impossible match on " + key.getFactField());
            }
        }
    }
View Full Code Here

    private void detectConflict(Analysis analysis, RowDetector otherRowDetector) {
        boolean overlappingCondition = true;
        boolean hasUnrecognizedCondition = false;
        for (Map.Entry<ConditionDetectorKey, ConditionDetector> entry : conditionDetectorMap.entrySet()) {
            ConditionDetectorKey key = entry.getKey();
            ConditionDetector conditionDetector = entry.getValue();
            ConditionDetector otherConditionDetector = otherRowDetector.getConditionDetector(key);
            // If 1 field is in both
            if (otherConditionDetector != null) {
                ConditionDetector mergedConditionDetector = conditionDetector.merge(otherConditionDetector);
                if (mergedConditionDetector.isImpossibleMatch()) {
                    // If 1 field is in both and not overlapping then the entire 2 rows are not overlapping
                    overlappingCondition = false;
                }
                if (mergedConditionDetector.hasUnrecognizedConstraint()) {
                    // If 1 field is in both and unrecognized, then the 2 rows might not be overlapping
                    hasUnrecognizedCondition = true;
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.decisiontable.analysis.condition.ConditionDetector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.