Package com.volantis.xml.expression

Examples of com.volantis.xml.expression.ExpressionParser


        if (expr == null) {
            forwardError(dynamicProcess,
                    "'expr' attribute must be specified on " + element);
        } else {
            ExpressionFactory factory = ExpressionFactory.getDefaultInstance();
            ExpressionParser parser = factory.createExpressionParser();
            try {
                // Parse, and evaluate the expression.
                Expression expression = parser.parse(expr);
                Value value = expression.evaluate(context);

                // Stream the value's contents into the process following the
                // dynamic process. Don't do it into the dynamic process as
                // that will cause any markup to get reevaluated.
View Full Code Here


        // initalize the parser that will be use to parse XPath expressions
        XMLPipelineFactory pipelineFactory =
                getPipelineContext().getPipelineFactory();
        ExpressionFactory expressionFactory =
                pipelineFactory.getExpressionFactory();
        ExpressionParser parser = expressionFactory.createExpressionParser();

        // create a process that can evaluate expressions
        ExpressionProcess expressionProcess = createExpressionProcess(parser);

        DISelectConditionalProcess diSelectProcess = new DISelectConditionalProcess(parser);
View Full Code Here

     * Tests the createParser() method
     * @throws Exception if an  error is encountered
     */
    public void testCreateParser() throws Exception {
        // ensure the correct object is created       
        ExpressionParser parser = factory.createExpressionParser();
        assertTrue("JXPathExpressionFactory createParser() should create " +
                   "JXPathExpressionParser instance",
                   (parser instanceof JXPathExpressionParser));
    }
View Full Code Here

    private Sequence evaluateExpression(
            final ExpressionContext expressionContext,
            String expressionAsString)
            throws ExtendedSAXException {
        ExpressionFactory factory = expressionContext.getFactory();
        ExpressionParser parser = factory.createExpressionParser();
        Sequence sequence;
        try {
            Expression expression = parser.parse(expressionAsString);
            Value value = expression.evaluate(expressionContext);
            sequence = value.getSequence();
        } catch (ExpressionException e) {
            throw new ExtendedSAXException(e);
        }
View Full Code Here

                "invalid-num-of-args",
                new Object[]{NAME, 1, arguments.length}));
        }

        ExpressionFactory expressionFactory = context.getFactory();
        ExpressionParser parser = expressionFactory.createExpressionParser();

        Expression expression = parser.parse(arguments[0].stringValue().asJavaString());
        return expression.evaluate(context);
    }
View Full Code Here

        // If we got her it is not a vlaid component name
        return valid;
    }

    public RuntimePolicyReferenceExpression parseUnquotedExpression(String unquotedExpression) {
        ExpressionParser parser = getExpressionParser();

        Expression expression;
        try {
            expression = parser.parse(unquotedExpression);
        } catch (ExpressionException e) {
            throw new ExtendedRuntimeException(e);
        }

        RuntimeProject project = projectProvider.getCurrentProject();
View Full Code Here

        if (expressionContext != null) {
            ExpressionFactory expressionFactory =
                expressionContext.getFactory();

            ExpressionParser parser =
                expressionFactory.createExpressionParser();

            result = parser.parse(expression);
        } else {
            logger.warn("missing-expression-context");
        }

        return result;
View Full Code Here

TOP

Related Classes of com.volantis.xml.expression.ExpressionParser

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.