Examples of evaluate()


Examples of org.apache.archiva.consumers.functors.ConsumerWantsFilePredicate.evaluate()

        ConsumerWantsFilePredicate predicate = new ConsumerWantsFilePredicate();
        BaseFile baseFile = new BaseFile( repoLocation, localFile );
        predicate.setBasefile( baseFile );

        assertFalse( predicate.evaluate( consumer ) );
    }

    @Test
    public void testConsumptionOfOtherMetadata()
    {

Examples of org.apache.axiom.om.xpath.AXIOMXPath.evaluate()

                // this should not cause a runtime exception!
            }
        }

        try {
            Object o = sourceXPath.evaluate(synCtx.getEnvelope());
            if (o instanceof OMNode) {
                return (OMNode) o;
            } else if (o instanceof List && !((List) o).isEmpty()) {
                return (OMNode) ((List) o).get(0)// Always fetches *only* the first
            } else {

Examples of org.apache.batik.script.Interpreter.evaluate()

        interpreter.bindObject(EVENT_NAME, evt);
        interpreter.bindObject(ALTERNATE_EVENT_NAME, evt);
           
        try {
            checkCompatibleScriptURL(lang, docPURL);
            interpreter.evaluate(script);
        } catch (InterpreterException ie) {
            handleInterpreterException(ie);
        } catch (SecurityException se) {
            handleSecurityException(se);
        }

Examples of org.apache.beehive.netui.script.el.ParsedExpression.evaluate()

    }

    public static final Object evaluate(String exprStr, NetUIVariableResolver vr) {
        ParsedExpression expr = parse(exprStr);
        assert expr != null;
        return expr.evaluate(vr);
    }

    public static final void update(String exprStr, Object value, NetUIVariableResolver vr) {
        ParsedExpression expr = parse(exprStr);
        assert expr != null;

Examples of org.apache.camel.Expression.evaluate()

        // the result is either the result of the expression or the input stream as-is because its binary content
        Object result;
        if (exp != null) {
            try {
                result = exp.evaluate(exchange, Object.class);
                log.debug("Evaluated expression as: {} with: {}", result, exchange);
            } finally {
                if (!getEndpoint().isCacheScript()) {
                    // some languages add themselves as a service which we then need to remove if we are not cached
                    ServiceHelper.stopService(exp);

Examples of org.apache.camel.builder.ExpressionClause.evaluate()

            public void run() {
                Exchange exchange = getReceivedExchanges().get(0);
                assertTrue("No exchange received for counter: " + 0, exchange != null);

                Object actualBody = exchange.getIn().getBody();
                Object expectedBody = clause.evaluate(exchange, Object.class);

                assertEquals("Body of message: " + 0, expectedBody, actualBody);
            }
        });

Examples of org.apache.camel.builder.xml.XPathBuilder.evaluate()

            document = xmlCipher.doFinal(document, document.getDocumentElement());
        } else {
                         
            XPathBuilder xpathBuilder = new XPathBuilder(secureTag);
            xpathBuilder.setNamespaceContext(getNamespaceContext());
            NodeList nodeList = xpathBuilder.evaluate(exchange, NodeList.class);
           
           
            for (int i = 0; i < nodeList.getLength(); i++) {
                Node node = nodeList.item(i);
                document = node.getOwnerDocument();

Examples of org.apache.cayenne.exp.Expression.evaluate()

    public void testEvaluateADD() throws Exception {
        Expression add = new ASTAdd(new Object[] {
                new Integer(1), new Double(5.5)
        });
        assertEquals(6.5, ((Number) add.evaluate(null)).doubleValue(), 0.0001);
    }

    public void testEvaluateSubtract() throws Exception {
        Expression subtract = new ASTSubtract(new Object[] {
                new Integer(1), new Double(0.1), new Double(0.2)

Examples of org.apache.cocoon.el.Expression.evaluate()

   
    private Token processNewExpression(Token expr, ExpressionFactory expressionFactory, ObjectModel newObjectModel) throws PatternException {
        Object result;
        try {
            Expression newExpression = expressionFactory.getExpression(expr.getStringValue());
            result = newExpression.evaluate(newObjectModel);
        } catch (ExpressionException e) {
            throw new PatternException("Cannot evaluate new expression '" + expr.getStringValue() + "' in expression "
                                       + "'" + this.originalExpr + "'", e);
        }
        return new Token(EXPR, result == null ? "" : result.toString());

Examples of org.apache.commons.betwixt.expression.Expression.evaluate()

                            if(idExpression == null) {
                                   throw new IntrospectionException(
                                         "The specified id property wasn't found in the bean ("
                                        + idAttribute + ").");
                            }
                            Object exp = idExpression.evaluate( context );
                            if (exp == null) {
                                // we'll use a random id
                                log.debug("Using random id");
                                id = idGenerator.nextId();
                               
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.