예제 #1
0
        protected internal virtual DmnExpressionImpl CreateFromInputEntry(IDmnElementTransformContext context,
                                                                          IInputEntry inputEntry)
        {
            var condition = CreateDmnElement(context, inputEntry);

            condition.Id   = inputEntry.Id;
            condition.Name = inputEntry.Label;
            condition.ExpressionLanguage = DmnExpressionTransformHelper.GetExpressionLanguage(context, inputEntry);
            condition.Expression         = DmnExpressionTransformHelper.GetExpression(inputEntry);

            return(condition);
        }
        protected internal virtual DmnExpressionImpl CreateFromLiteralExpressionEntry(
            IDmnElementTransformContext context, ILiteralExpression literalExpression)
        {
            var dmnExpression = CreateDmnElement(context, literalExpression);

            dmnExpression.Id   = literalExpression.Id;
            dmnExpression.Name = literalExpression.Label;
            dmnExpression.ExpressionLanguage = DmnExpressionTransformHelper.GetExpressionLanguage(context,
                                                                                                  literalExpression);
            dmnExpression.Expression = DmnExpressionTransformHelper.GetExpression(literalExpression);

            return(dmnExpression);
        }
        protected internal virtual DmnExpressionImpl CreateFromInputExpression(IDmnElementTransformContext context,
                                                                               IInputExpression inputExpression)
        {
            var dmnExpression = CreateDmnElement(context, inputExpression);

            dmnExpression.Id                 = inputExpression.Id;
            dmnExpression.Name               = inputExpression.Label;
            dmnExpression.TypeDefinition     = DmnExpressionTransformHelper.CreateTypeDefinition(context, inputExpression);
            dmnExpression.ExpressionLanguage = DmnExpressionTransformHelper.GetExpressionLanguage(context,
                                                                                                  inputExpression);
            dmnExpression.Expression = DmnExpressionTransformHelper.GetExpression(inputExpression);

            return(dmnExpression);
        }