Examples of evaluate()


Examples of org.ocpsoft.rewrite.config.Rule.evaluate()

               context.clear();
               DefaultParameterValueStore values = new DefaultParameterValueStore();
               context.put(ParameterValueStore.class, values);
               context.setState(RewriteState.EVALUATING);

               if (rule.evaluate(event, context))
               {
                  if (handleBindings(event, context, values))
                  {
                     context.setState(RewriteState.PERFORMING);
                     if (log.isDebugEnabled())

Examples of org.ocpsoft.rewrite.servlet.config.Query.evaluate()

         {
            Set<String> parameters = getPathRequestParameters();
            for (String param : parameters) {
               Query query = Query.parameterExists(param);
               query.setParameterStore(store);
               if (!query.evaluate(event, context))
               {
                  return false;
               }
            }
            Redirect redirect = Redirect.permanent(((HttpInboundServletRewrite) event).getContextPath()

Examples of org.opendope.conditions.Condition.evaluate()

          conditionId);
      if (c == null) {
        log.error("Missing condition " + conditionId);
      }

      if ( c.evaluate(wordMLPackage, customXmlDataStorageParts, conditions, xPaths) ) {
        log.debug("so keeping");

        List<Object> newContent = new ArrayList<Object>();
        newContent.add(sdt);
        return newContent;

Examples of org.opengis.coverage.grid.GridCoverage.evaluate()

        ArcGridFormat format = new ArcGridFormat();
        GridCoverage gc = format.getReader(is).read(null);
       
        assertTrue(new Envelope(-145.4, 145.6, -41.8, -42.1).contains(new ReferencedEnvelope(gc.getEnvelope())));
       
        double[] valueInside = (double[]) gc.evaluate(new DirectPosition2D(145.55, -42));
        assertEquals(615.0, valueInside[0]);
        double[] valueOutside = (double[]) gc.evaluate(new DirectPosition2D(145.57, -41.9));
        // this should really be NaN...
        assertEquals(0.0, valueOutside[0]);

Examples of org.opengis.filter.And.evaluate()

        // Test AND for false positives
        And filter = fac.and(filterFalse, filterTrue);

        LOGGER.finer( filter.toString());           
        LOGGER.finer( "contains feature: " + filter.evaluate(testFeature));
        assertTrue(!filter.evaluate(testFeature));

        // Test AND for false positives
        filter = fac.and(filterTrue, filterFalse);

Examples of org.opengis.filter.Filter.evaluate()

    Filter and = filterService.createAndFilter(left, right);
    // test both true
    TestFeature f = new TestFeature();
    f.expectAndReturn("a", "3");
    f.expectAndReturn("b", "4");
    Assert.assertTrue(and.evaluate(f));
    // test left false
    f.clear();
    f.expectAndReturn("a", "2");
    f.expectAndReturn("b", "4");
    Assert.assertFalse(and.evaluate(f));

Examples of org.opengis.filter.Id.evaluate()

    }

    public void testFid() {
        Id ff = fac.id(new HashSet<FeatureId>());
        assertFalse(ff.evaluate(testFeature));
        ff = fac.id(Collections.singleton(fac.featureId(testFeature.getID())));
        assertTrue(ff.evaluate(testFeature));
        assertFalse(ff.evaluate(null));
        assertFalse(ff.evaluate(new Object()));
    }

Examples of org.opengis.filter.Or.evaluate()

        // Test OR for false negatives
        Or filter = fac.or(filterFalse, filterTrue);

        LOGGER.finer( filter.toString());           
        LOGGER.finer( "contains feature: " + filter.evaluate(testFeature));
        assertTrue(filter.evaluate(testFeature));

        // Test OR for false negatives
        filter = fac.or(filterTrue, filterTrue);

Examples of org.opengis.filter.PropertyIsBetween.evaluate()

        PropertyName testAttribute = fac.property("testInteger");
        Literal testLiteralUpper = fac.literal(1003);

        // String tests
        PropertyIsBetween filter = fac.between(testAttribute, testLiteralLower, testLiteralUpper);
        assertTrue(filter.evaluate(testFeature));

        // Test for false positive.
        testLiteralLower = fac.literal(1);
        testLiteralUpper = fac.literal(1000);
        filter = fac.between(testAttribute, testLiteralLower, testLiteralUpper);

Examples of org.opengis.filter.PropertyIsEqualTo.evaluate()

    public void testOperandsSameType() {
        Expression e1 = filterFactory.literal(1);
        Expression e2 = filterFactory.literal(1);

        PropertyIsEqualTo equal = filterFactory.equals(e1, e2);
        assertTrue(equal.evaluate(null));
    }

    public void testOperandsShort() {
        Expression literalShort42 = filterFactory.literal( (short) 42 );
        Expression literalString42 = filterFactory.literal("42");
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.