Package org.geotools.filter.text.cql2

Examples of org.geotools.filter.text.cql2.CQLRelGeoOpTest


            Geometry g = (Geometry) result.getBuilt();

            return g;
           
        } catch (ClassCastException e) {
            throw new CQLException("fail in geometry parsing");
        }
    }
View Full Code Here


        Literal built = (Literal)resut.getBuilt();
        final String pattern = (String)built.getValue();

        // validates the length
        if(pattern.length() != 9){
            throw new CQLException("the pattern DE-9IM must have nine (9) characters", token, getStatement() );
        }
       
        // validates that the pattern has only the characters T,F,*,0,1,2
        String patternUC = pattern.toUpperCase();
       
        char[] validFlags = new char[]{'T', 'F', '*', '0', '1', '2'};
        for (int i = 0; i < validFlags.length; i++) {
            char character = patternUC.charAt(i);
           
            boolean found = false;
            for (int j = 0; j < validFlags.length; j++) {
                if(validFlags[j] == character){
                    found = true;
                    break;
                }
            }
            if(!found){
                throw new CQLException("the pattern DE-9IM must have only the following characters: T, F, *, 0, 1, 2", token, getStatement() );
            }
        }
       
        Literal patternExpr = getFilterFactory().literal(pattern);
       
View Full Code Here

     */
    public void compileFilter() throws CQLException{
        try {
            super.FilterCompilationUnit();
        } catch (TokenMgrError tokenError){
            throw new CQLException(tokenError.getMessage(),getTokenInPosition(0), this.source);
        } catch(CQLException e){
            throw e;
           
        } catch (ParseException e) {
            throw new CQLException(e.getMessage(), getTokenInPosition(0), e.getCause(), this.source);
        }
    }
View Full Code Here

     */
    public void compileExpression() throws CQLException{
        try {
            super.ExpressionCompilationUnit();
        } catch (TokenMgrError tokenError){
            throw new CQLException(tokenError.getMessage(),getTokenInPosition(0), this.source);
        } catch(CQLException e){
            throw e;
        } catch (ParseException e) {
            throw new CQLException(e.getMessage(), getTokenInPosition(0), e.getCause(), this.source);
        }
    }
View Full Code Here

     */
    public void compileFilterList() throws CQLException{
        try {
            super.FilterListCompilationUnit();
        } catch (TokenMgrError tokenError){
            throw new CQLException(tokenError.getMessage(),getTokenInPosition(0), this.source);
        } catch(CQLException e){
            throw e;
        } catch (ParseException e) {
            throw new CQLException(e.getMessage(), getTokenInPosition(0), e.getCause(), this.source);
        }
    }
View Full Code Here

               
                logicFilter = this.builder.buildNotFilter();
                break;

            default:
                throw new CQLException(
                        "Expression not supported. And, Or, Not is required",
                        getTokenInPosition(0), this.source);
            }

            return logicFilter;
        } catch (IllegalFilterException ife) {
            throw new CQLException("Exception building LogicFilter",
                    getTokenInPosition(0), ife, this.source);
        }
    }
View Full Code Here

            break;
        case JJTROUTINEINVOCATION_GEOOP_OVERLAP_NODE:
            filter = this.builder.buildSpatialOverlapsFilter();
            break;
        default:
            throw new CQLException("Binary spatial operator unexpected");
        }

        return filter;
    }
View Full Code Here

            filter = this.builder.buildSpatialBeyondFilter();
            break;

        default:
            throw new CQLException("Binary spatial operator unexpected");
        }

        return filter;
    }
View Full Code Here

        case JJTPERIOD_WITH_DURATION_DATE_NODE:
            filter = this.builder.buildBeforeOrDuring();
            break;

        default:
            throw new CQLException(
                    "unexpeted date time expression in temporal predicate.",
                    node.getToken(), this.source);
        }

        return filter;
View Full Code Here

            filter = this.builder.buildDuringOrAfter();

            break;

        default:
            throw new CQLException(
                    "unexpeted date time expression in temporal predicate.",
                    node.getToken(), this.source);
        }

        return filter;
View Full Code Here

TOP

Related Classes of org.geotools.filter.text.cql2.CQLRelGeoOpTest

Copyright © 2018 www.massapicom. 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.