Package org.apache.camel.builder

Examples of org.apache.camel.builder.SimpleBuilder


            } catch (ClassNotFoundException e) {
                throw ObjectHelper.wrapRuntimeCamelException(e);
            }
        }

        SimpleBuilder answer = new SimpleBuilder(getExpression());
        answer.setResultType(resultType);
        return answer;
    }
View Full Code Here


        this.resultType = resultType;
    }

    @Override
    public Expression createExpression(CamelContext camelContext) {
        SimpleBuilder answer = new SimpleBuilder(getExpression());
        answer.setResultType(resultType);
        return answer;
    }
View Full Code Here

            } catch (ClassNotFoundException e) {
                throw ObjectHelper.wrapRuntimeCamelException(e);
            }
        }

        SimpleBuilder answer = new SimpleBuilder(getExpression());
        answer.setResultType(resultType);
        return answer;
    }
View Full Code Here

        String exp = getExpression();
        if (isTrim() && exp != null) {
            exp = exp.trim();
        }

        SimpleBuilder answer = new SimpleBuilder(exp);
        answer.setResultType(resultType);
        return answer;
    }
View Full Code Here

     * @param expression the expression
     * @return a definition which describes the expression
     */
    public static ExpressionDefinition toExpressionDefinition(Expression expression) {
        if (expression instanceof SimpleBuilder) {
            SimpleBuilder builder = (SimpleBuilder) expression;
            // we keep the original expression by using the constructor that accepts an expression
            SimpleExpression answer = new SimpleExpression(builder);
            answer.setExpression(builder.getText());
            answer.setResultType(builder.getResultType());
            return answer;
        } else if (expression instanceof XPathBuilder) {
            XPathBuilder builder = (XPathBuilder) expression;
            // we keep the original expression by using the constructor that accepts an expression
            XPathExpression answer = new XPathExpression(builder);
            answer.setExpression(builder.getText());
            answer.setResultType(builder.getResultType());
            return answer;
        } else if (expression instanceof ValueBuilder) {
            ValueBuilder builder = (ValueBuilder) expression;
            expression = builder.getExpression();
        }

        if (expression instanceof ExpressionDefinition) {
            return (ExpressionDefinition) expression;
        }
View Full Code Here

     * @param predicate the predicate
     * @return a definition which describes the predicate
     */
    public static ExpressionDefinition toExpressionDefinition(Predicate predicate) {
        if (predicate instanceof SimpleBuilder) {
            SimpleBuilder builder = (SimpleBuilder) predicate;
            // we keep the original expression by using the constructor that accepts an expression
            SimpleExpression answer = new SimpleExpression(builder);
            answer.setExpression(builder.getText());
            return answer;
        } else if (predicate instanceof XPathBuilder) {
            XPathBuilder builder = (XPathBuilder) predicate;
            // we keep the original expression by using the constructor that accepts an expression
            XPathExpression answer = new XPathExpression(builder);
            answer.setExpression(builder.getText());
            return answer;
        }

        if (predicate instanceof ExpressionDefinition) {
            return (ExpressionDefinition) predicate;
View Full Code Here

TOP

Related Classes of org.apache.camel.builder.SimpleBuilder

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.