Package org.opengis.filter.expression

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


    }
   
    @Test
    public void testLiteralExpression() throws Exception {
        Expression literal = ff.literal(new Integer(0));
        List unrolledExpressions = (List) literal.accept(visitor, null);
        assertEquals(1, unrolledExpressions.size());
        assertSame(literal, unrolledExpressions.get(0));
    }

    @Test
View Full Code Here


     * @param expression
     */
    private void visitCqlExpression(String expression) {
        Expression parsed = ExpressionExtractor.extractCqlExpressions(expression);
        if(parsed != null)
            parsed.accept(this, null);
    }

    /**
     * @see org.geotools.styling.StyleVisitor#visit(org.geotools.styling.ExternalGraphic)
     */
 
View Full Code Here

                            return true;
                        plainGeometries.add(attribute);
                    } else {
                        Expression g = s.getGeometry();
                        extractor.clear();
                        g.accept(extractor, null);
                        Set<String> attributes = extractor.getAttributeNameSet();
                        for (String attribute : attributes) {
                            if(plainGeometries.contains(attribute))
                                return true;
                            if(txGeometries.contains(attribute))
View Full Code Here

                return getAttributeCRS((PropertyName) geometry, schema);
            } else if(geometry == null) {
                return getAttributeCRS(null, schema);
            } else {
                StyleAttributeExtractor attExtractor = new StyleAttributeExtractor();
                geometry.accept(attExtractor, null);
                for(PropertyName name : attExtractor.getAttributes()) {
                    if(name.evaluate(schema) instanceof GeometryDescriptor) {
                        return getAttributeCRS(name, schema);
                    }
                }
View Full Code Here

            Expression s1 = getParameter(function, 0, true);
            Expression s2 = getParameter(function, 1, true);
            out.write("(");
            s1.accept(this, String.class);
            out.write(" || ");
            s2.accept(this, String.class);
            out.write(")");
        } else if (function instanceof FilterFunction_strEndsWith) {
            Expression str = getParameter(function, 0, true);
            Expression end = getParameter(function, 1, true);
View Full Code Here

            out.write("( right (");
            str.accept(this, String.class);
            out.write(",length( ");
            if (end instanceof Literal)
                out.write(" cast (");
            end.accept(this, String.class);
            if (end instanceof Literal)
                out.write(" as  VARCHAR(32672))");
            out.write("))=");
            end.accept(this, String.class);
            out.write(")");
View Full Code Here

                out.write(" cast (");
            end.accept(this, String.class);
            if (end instanceof Literal)
                out.write(" as  VARCHAR(32672))");
            out.write("))=");
            end.accept(this, String.class);
            out.write(")");
            out.write("then 1 else 0 end ");

        } else if (function instanceof FilterFunction_strStartsWith) {
            Expression str = getParameter(function, 0, true);
View Full Code Here

            out.write("( left (");
            str.accept(this, String.class);
            out.write(",length( ");
            if (start instanceof Literal)
                out.write(" cast (");
            start.accept(this, String.class);
            if (start instanceof Literal)
                out.write(" as  VARCHAR(32672))");
            out.write("))=");
            start.accept(this, String.class);
            out.write(")");
View Full Code Here

                out.write(" cast (");
            start.accept(this, String.class);
            if (start instanceof Literal)
                out.write(" as  VARCHAR(32672))");
            out.write("))=");
            start.accept(this, String.class);
            out.write(")");
            out.write("then 1 else 0 end ");

        } else if (function instanceof FilterFunction_strEqualsIgnoreCase) {
            Expression first = getParameter(function, 0, true);
View Full Code Here

            Expression second = getParameter(function, 1, true);
            out.write(" case when ");
            out.write("(lower(");
            first.accept(this, String.class);
            out.write(") = lower(");
            second.accept(this, String.class);
            out.write("))");
            out.write("then 1 else 0 end ");
        } else if (function instanceof FilterFunction_strIndexOf) {
            Expression first = getParameter(function, 0, true);
            Expression second = getParameter(function, 1, true);
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.