Package org.openl.rules.dt.validator
Class DecisionTableAnalyzer
- java.lang.Object
-
- org.openl.rules.dt.validator.DecisionTableAnalyzer
-
public class DecisionTableAnalyzer extends Object
-
-
Constructor Summary
Constructors Constructor Description DecisionTableAnalyzer(IDecisionTable decisionTable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsFormula(IBaseDecisionRow row)IDecisionTablegetDecisionTable()IDomain<?>getParameterDomain(String parameterName, IBaseDecisionRow condition)IDomain<?>getSignatureParameterDomain(String parameterName)Map<String,DecisionTableParamDescription>getUsedParams()IParameterDeclaration[]referencedSignatureParams(IBaseDecisionRow row)Goes through the condition in algorithm column and search the params that are income parameters from the signature.Iterator<DecisionTableParamDescription>tableParams()IOpenClasstransformSignatureType(IParameterDeclaration paramDeclarationFromSignature, IDecisionTableValidatedObject decisionTableToValidate)Takes the paramDeclarationFromSignature and transform its type to appropriate for validating.
-
-
-
Constructor Detail
-
DecisionTableAnalyzer
public DecisionTableAnalyzer(IDecisionTable decisionTable)
-
-
Method Detail
-
containsFormula
public boolean containsFormula(IBaseDecisionRow row)
-
tableParams
public Iterator<DecisionTableParamDescription> tableParams()
-
getDecisionTable
public IDecisionTable getDecisionTable()
-
getParameterDomain
public IDomain<?> getParameterDomain(String parameterName, IBaseDecisionRow condition)
-
referencedSignatureParams
public IParameterDeclaration[] referencedSignatureParams(IBaseDecisionRow row)
Goes through the condition in algorithm column and search the params that are income parameters from the signature.- Parameters:
row- Full row of the each condition. It includes condition name, algorithm, initialization, and all rule cells.- Returns:
- parameters that are income(from the signature) that are using in current row.
-
transformSignatureType
public IOpenClass transformSignatureType(IParameterDeclaration paramDeclarationFromSignature, IDecisionTableValidatedObject decisionTableToValidate)
Takes the paramDeclarationFromSignature and transform its type to appropriate for validating. seeDecisionTableValidatedObject.transformParameterType(IParameterDeclaration).- Parameters:
paramDeclarationFromSignature- parameter declaration from the signature.decisionTableToValidate- decision table that is being validated.- Returns:
- new type for paramDeclarationFromSignature appropriate for validation.
-
getUsedParams
public Map<String,DecisionTableParamDescription> getUsedParams()
-
-