Examples of accept()


Examples of org.opengis.filter.expression.Function.accept()

    public void testFunction() throws Exception {
        Function fe = ff.function("strIndexOf",
                ff.property("/measurement/determinand_description"), ff
                        .literal("determinand_description_1"));

        List unrolledExpressions = (List) fe.accept(visitor, null);

        Expression unmapped = (Expression) unrolledExpressions.get(0);
        assertTrue(unmapped instanceof Function);
        List params = ((Function) unmapped).getParameters();
        assertEquals(2, params.size());
View Full Code Here

Examples of org.opengis.filter.expression.Literal.accept()

    propertyName.accept(visitor, output);

        output.append(" ").append(temporalOperator).append(" ");
       
        Literal expr2 = (Literal) filter.getExpression2();
        expr2.accept(visitor, output);

        return output;
  }

  public static Object buildDuring(During during, Object extraData) {
View Full Code Here

Examples of org.opengis.filter.expression.Multiply.accept()

    @Test
    public void testMathExpression() throws Exception {
        Literal literal = ff.literal(new Integer(2));
        Multiply mathExp = ff.multiply(ff.property("measurement/result"), literal);

        List unrolledExpressions = (List) mathExp.accept(visitor, null);

        assertEquals(1, unrolledExpressions.size());
        Expression unmapped = (Expression) unrolledExpressions.get(0);
        assertTrue(unmapped instanceof Multiply);
        Multiply mathUnmapped = (Multiply) unmapped;
View Full Code Here

Examples of org.opengis.filter.expression.PropertyName.accept()

    }
   
    @Test
    public void testPropertyName() throws Exception {
        PropertyName ae = ff.property("/wq_plus/measurement/result");
        List unrolled = (List) ae.accept(visitor, null);
        assertNotNull(unrolled);
        assertEquals(1, unrolled.size());

        Expression unmappedExpr = (Expression) unrolled.get(0);
        assertTrue(unmappedExpr instanceof PropertyName);
View Full Code Here

Examples of org.opengis.filter.spatial.BBOX.accept()

    }
   
    public void testBboxReproject() {
        // see if coordinates gets flipped, urn forces lat/lon interpretation
        BBOX bbox = ff.bbox(ff.property("geom"), 10, 15, 20, 25, "urn:x-ogc:def:crs:EPSG:6.11.2:4326");
        Filter clone = (Filter) bbox.accept(reprojector, null);
        assertNotSame(bbox, clone);
        BBOX clonedBbox = (BBOX) clone;
        assertEquals(bbox.getPropertyName(), clonedBbox.getPropertyName());
        assertTrue(15 == clonedBbox.getMinX());
        assertTrue(10 == clonedBbox.getMinY());
View Full Code Here

Examples of org.opengis.filter.spatial.Intersects.accept()

        LineString ls = gf.createLineString(new Coordinate[] {new Coordinate(10, 15), new Coordinate(20, 25)});
        ls.setUserData(CRS.decode("urn:x-ogc:def:crs:EPSG:6.11.2:4326"));
       
        // see if coordinates gets flipped, urn forces lat/lon interpretation
        Intersects original = ff.intersects(ff.property("geom"), ff.literal(ls));
        Filter clone = (Filter) original.accept(reprojector, null);
        assertNotSame(original, clone);
        Intersects isClone = (Intersects) clone;
        assertEquals(isClone.getExpression1(), original.getExpression1());
        LineString clonedLs = (LineString) ((Literal) isClone.getExpression2()).getValue();
        assertTrue(15 == clonedLs.getCoordinateN(0).x);
View Full Code Here

Examples of org.opengis.filter.temporal.AnyInteracts.accept()

      FilterFactory ff = CommonFactoryFinder.getFilterFactory((Hints) null);
      AnyInteracts filter = ff.anyInteracts(ff.property("date"), newSampleDate());
     
        FilterToCQL toCQL = new FilterToCQL();
        filter.accept( toCQL, null ).toString();
    }

    @Test
    public void testIntersectsPoint() throws Exception{
     
View Full Code Here

Examples of org.opengis.filter.temporal.Begins.accept()

     
      FilterFactory ff = CommonFactoryFinder.getFilterFactory((Hints) null);
      Begins filter = ff.begins(ff.property("date"), newSampleDate());
     
        FilterToCQL toCQL = new FilterToCQL();
        filter.accept( toCQL, null ).toString();
    }

    @Test (expected=UnsupportedOperationException.class)
    public void testBegunByUnsuported() throws Exception{
     
View Full Code Here

Examples of org.opengis.filter.temporal.BegunBy.accept()

     
      FilterFactory ff = CommonFactoryFinder.getFilterFactory((Hints) null);
      BegunBy filter = ff.begunBy(ff.property("date"), newSampleDate());
     
        FilterToCQL toCQL = new FilterToCQL();
        filter.accept( toCQL, null ).toString();
    }
   
    @Test (expected=UnsupportedOperationException.class)
    public void testAnyInteractsUnsuported() throws Exception{
View Full Code Here

Examples of org.opengis.filter.temporal.EndedBy.accept()

     
      FilterFactory ff = CommonFactoryFinder.getFilterFactory((Hints) null);
      EndedBy filter = ff.endedBy(ff.property("date"), newSampleDate());
     
        FilterToCQL toCQL = new FilterToCQL();
        filter.accept( toCQL, null ).toString();
    }

    @Test (expected=UnsupportedOperationException.class)
    public void testEndsUnsuported() throws Exception{
     
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.