Package org.geotools.xml.filter

Examples of org.geotools.xml.filter.FilterEncodingPreProcessor


        super(store);
        compliance = filterCompliance;
    }

    protected  FeatureReader<SimpleFeatureType, SimpleFeature> wrapWithFilteringFeatureReader(Filter postFilter,  FeatureReader<SimpleFeatureType, SimpleFeature> reader, Filter processedFilter) {
        FilterEncodingPreProcessor visitor = new FilterEncodingPreProcessor(COMPLIANCE_LEVEL);
        processedFilter.accept(visitor, null);
       
        if( visitor.requiresPostProcessing() )
            return new FilteringFeatureReader<SimpleFeatureType, SimpleFeature>(reader, processedFilter);
        else
            return new FilteringFeatureReader<SimpleFeatureType, SimpleFeature>(reader, postFilter);
           
    }
View Full Code Here


        public StrictFeatureReader(Transaction transaction, Query query, Integer level) throws IOException {
            init(transaction, query, level);
        }

        protected void init( Transaction transaction, Query query, Integer level ) throws IOException {
            FilterEncodingPreProcessor visitor = new FilterEncodingPreProcessor(level);
            query.getFilter().accept(visitor,null);
           
            this.transaction=transaction;
            if( visitor.requiresPostProcessing() && query.getPropertyNames()!=Query.ALL_NAMES){
                FilterAttributeExtractor attributeExtractor=new FilterAttributeExtractor();
                query.getFilter().accept( attributeExtractor, null );
                Set<String> properties = new HashSet<String>(attributeExtractor.getAttributeNameSet());
                properties.addAll(Arrays.asList(query.getPropertyNames()));
                this.query = new Query(query);
                this.query.setPropertyNames((String[]) properties.toArray(new String[0]));
            } else {
                this.query=query;
            }
           
            this.filter=visitor.getFilter();

            Query nonFidQuery=new Query(query);
            Id fidFilter = visitor.getFidFilter();
            nonFidQuery.setFilter(fidFilter);
            if( fidFilter.getIDs().size()>0 ){
                delegate = StrictWFSStrategy.super.createFeatureReader(transaction, nonFidQuery);
            }else{
                delegate=nextReader();
View Full Code Here

TOP

Related Classes of org.geotools.xml.filter.FilterEncodingPreProcessor

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.