Package org.opengis.filter.expression

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


    StringBuilder output = asStringBuilder(extraData);

    ExpressionToText visitor = new ExpressionToText();
    Expression expr = filter.getExpression1();
    expr.accept(visitor, output);
    output.append(" ").append(operator).append(" ");
    filter.getExpression2().accept(visitor, output);

    return output;
  }
View Full Code Here


        final String pattern = filter.getLiteral();

        Expression expr =  filter.getExpression();
       
    expr.accept(new ExpressionToText(), output);

    if(filter.isMatchingCase()){
          output.append(" LIKE ");
    } else {
          output.append(" ILIKE ");
View Full Code Here

        StringBuilder output = asStringBuilder(extraData);
       
        output.append(geoOperation).append("(");
        Expression expr = filter.getExpression1();
        ExpressionToText visitor = new ExpressionToText();
    expr.accept(visitor, output);
        output.append(", ");
        filter.getExpression2().accept(visitor, output);
        output.append(")");
       
        return output;
View Full Code Here

            Expression s1 = getParameter(function, 0, true);
            Expression s2 = getParameter(function, 1, true);
            out.write("(");
            s1.accept(delegate, String.class);
            out.write(" || ");
            s2.accept(delegate, 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(" LIKE ");
            if(end instanceof Literal) {
                out.write("'%" + end.evaluate(null, String.class) + "'");
            } else {
                out.write("('%' || ");
                end.accept(delegate, String.class);
                out.write(")");
            }
            out.write(")");
        } else if(function instanceof FilterFunction_strStartsWith) {
            Expression str = getParameter(function, 0, true);
View Full Code Here

            out.write(" LIKE ");
            if(start instanceof Literal) {
                out.write("'" + start.evaluate(null, String.class) + "%'");
            } else {
                out.write("(");
                start.accept(delegate, String.class);
                out.write(" || '%')");
            }
            out.write(")");
        } else if(function instanceof FilterFunction_strEqualsIgnoreCase) {
            Expression first = getParameter(function, 0, true);
View Full Code Here

            Expression second = getParameter(function, 1, true);
           
            out.write("(lower(");
            first.accept(delegate, String.class);
            out.write(") = lower(");
            second.accept(delegate, String.class);
            out.write("::text))");
        } else if(function instanceof FilterFunction_strIndexOf) {
            Expression first = getParameter(function, 0, true);
            Expression second = getParameter(function, 1, true);
           
View Full Code Here

           
            // would be a simple call, but strIndexOf returns zero based indices
            out.write("(strpos(");
            first.accept(delegate, String.class);
            out.write(", ");
            second.accept(delegate, String.class);
            out.write(") - 1)");
        } else if(function instanceof FilterFunction_strSubstring) {
            Expression string = getParameter(function, 0, true);
            Expression start = getParameter(function, 1, true);
            Expression end = getParameter(function, 2, true);
View Full Code Here

            out.write("substr(");
            string.accept(delegate, String.class);
            out.write(", ");
            start.accept(delegate, Integer.class);
            out.write(" + 1, (");
            end.accept(delegate, Integer.class);
            out.write(" - ");
            start.accept(delegate, Integer.class);
            out.write("))");
        } else if(function instanceof FilterFunction_strSubstringStart) {
            Expression string = getParameter(function, 0, true);
View Full Code Here

           
            // postgres does sub(string, start, count)... count instead of end, and 1 based indices
            out.write("substr(");
            string.accept(delegate, String.class);
            out.write(", ");
            start.accept(delegate, Integer.class);
            out.write(" + 1)");
        } else if(function instanceof FilterFunction_strTrim) {
            Expression string = getParameter(function, 0, true);
           
            out.write("trim(both ' ' from ");
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.