Examples of ExpressionContext


Examples of cambridge.runtime.ExpressionContext

   @Test
   public void testThird() {
      try {
         TemplateTokenizer tokenizer = new TemplateTokenizer(IfElseTest.class.getResourceAsStream("ifelse.html"));
         TemplateParser parser = new TemplateParser(tokenizer, Expressions.cambridgeExpressionLanguage);
         ExpressionContext context = new MapExpressionContext();
         context.put("var3", true);

         TemplateDocument t = parser.parse();
         assertNotNull(t);
         FragmentList fragments = t.normalize();
View Full Code Here

Examples of com.alibaba.antx.config.generator.expr.ExpressionContext

    /**
     * ȡֵ�����㡣
     */
    public static Object evaluate(String name, final Map props) {
        return new ReferenceExpression(name).evaluate(new ExpressionContext() {
            public Object get(String key) {
                return props.get(key);
            }

            public void put(String key, Object value) {
View Full Code Here

Examples of com.alibaba.citrus.expr.ExpressionContext

        if (value == null) {
            value = internalGet(key);
        }

        ExpressionContext parentContext = getParentContext();

        if (value == null && parentContext != null) {
            value = parentContext.get(key);
        }

        return decorate(value);
    }
View Full Code Here

Examples of com.bacoder.parser.java.JavaParser.ExpressionContext

        getChild(context, StatementExpressionContext.class);
    if (statementExpressionContext != null) {
      ExpressionStatement expressionStatement =
          createNode(statementExpressionContext, ExpressionStatement.class);

      ExpressionContext expressionContext =
          getChild(statementExpressionContext, ExpressionContext.class);
      if (expressionContext != null) {
        expressionStatement.setExpression(
            getAdapter(ExpressionAdapter.class).adapt(expressionContext));
      }
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

            envTracker.pushEnvironmentInteraction(environmentInteraction);
        }

        // factor an Expression context passing in both the Environment
        // Interaction and Namespace prefix trackers
        ExpressionContext expressionContext =
                wrapper.getExpressionFactory().
                createExpressionContext(envTracker, namespaceTracker);

        // Construct and return  XMLPipelineContextImpl
        // using the arguments provided
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

            throws ExpressionException {

        ExpressionFactory expressionFactory =
                ExpressionFactory.getDefaultInstance();

        ExpressionContext expressionContext =
                pipelineContext.getExpressionContext();

        Expression expression =
                expressionFactory.createExpressionParser().parse(
                    expressionString);
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

        TValue value = model.getParameterBlock().query(parameter);

        XMLPipelineContext pipelineContext = dynamicProcess.getPipelineContext();

        ExpressionContext context = pipelineContext.getExpressionContext();

        // The given name could be a prefixed name, so go through these
        // hoops to ensure that we register the variable against the
        // correct namespace (the namespace for no prefix is "no namespace"
        // according to http://www.w3.org/TR/xpath20/#id-variables - this
        // is modelled using the "default namespace" for variables)
        NamespacePrefixTracker namespacePrefixTracker =
                context.getNamespacePrefixTracker();
        ExpandedName name = namespacePrefixTracker.resolveQName(
                new ImmutableQName(variable), "");

        // Create a new TemplateExpressionValue
        TemplateExpressionValue initialValue = new TemplateExpressionValue(
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

                    Expression expression = parser.parse(value);

                    // obtain the ExpressionContext from the PipelineContext
                    // the ExpressionContext is needed in order to evaluate the
                    // expression parsed
                    ExpressionContext expressionContext =
                            pipelineContext.getExpressionContext();

                    // Evaluate the expression and cast to a boolean.
                    boolean result = PipelineExpressionHelper.fnBoolean(
                            expression.evaluate(
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

    /**
     * Tests the empty sequence input gives an empty sequence result.
     */
    public void testEmptySequenceInput() throws Exception {
        ExpressionContext context = createExpressionContext();
        ExpressionFactory factory = context.getFactory();
        Function tokenize = new TokenizeFunction();
        Sequence sequence = Sequence.EMPTY;
        Value search = factory.createStringValue("a");
        Value retVal = tokenize.invoke(context, new Value[]{sequence, search});

View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

    /**
     * Tests the empty string input gives an empty sequence result.
     */
    public void testEmptyStringInput() throws Exception {
        ExpressionContext context = createExpressionContext();
        ExpressionFactory factory = context.getFactory();
        Function tokenize = new TokenizeFunction();
        Sequence sequence = createSequence(factory,
                new String[]{""});
        Value search = factory.createStringValue("a");
        Value retVal = tokenize.invoke(context, new Value[]{sequence, search});
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.