Package org.opengis.filter

Examples of org.opengis.filter.Filter.accept()


                    FeatureSource<SimpleFeatureType, SimpleFeature> source = layer.getResource(FeatureSource.class, ProgressManager.instance().get());
                    SimpleFeatureType schema=source.getSchema();              
                    //FilterFactory fac=CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
                    //final List<String> queryAtts = obtainQueryAttributesForFeatureTable(schema);
                   
                    Set<String> required = (Set<String>) filter.accept( new FilterAttributeExtractor(), null );
                    String[] names = required.toArray( new String[ required.size()]);
                    final DefaultQuery query=new DefaultQuery(schema.getName().getLocalPart(), filter, names );
                   
                    FeatureCollection<SimpleFeatureType, SimpleFeature> features;
                    features = source.getFeatures( query ); // we just want the FeatureID no attributes needed
View Full Code Here


                    }
            } else {
                DefaultQuery defaultQuery = new DefaultQuery(source.getSchema().getName().getLocalPart(),
                        filter, new String[0]);
                // TODO: Remove this workaround in 2.6.1 (note this has no performance impact)
                Set<String> required = (Set) filter.accept( new FilterAttributeExtractor(), null );               
                defaultQuery.setPropertyNames( required.toArray(new String[0]) );
               
                // get features that are just fids no attributes
                FeatureCollection<SimpleFeatureType, SimpleFeature>  features = source.getFeatures(defaultQuery);
                long start=System.currentTimeMillis();
View Full Code Here

     */
    public void visit(Rule rule) {
        Filter filter = rule.getFilter();

        if (filter != null) {
            filter.accept(this, null);
        }

        Symbolizer[] symbolizers = rule.getSymbolizers();

        if (symbolizers != null) {
View Full Code Here

        }
        // not or and and simplify (if there is any include/exclude we'll get
        // a very simple result ;-)
        Filter or = ff.or(filters);
        SimplifyingFilterVisitor simplifier = new SimplifyingFilterVisitor();
        return (Filter) or.accept(simplifier, null);
    }

    /**
     * Selects the rules active at this zoom level
     * @param style
View Full Code Here

                                return name;
                            }
                            ;
                        };

                    filter.accept(new AbstractFilterVisitor(visitor), null);
                }

                // extract collection
                VersioningFeatureSource store = (VersioningFeatureSource) source;
                FeatureCollection<SimpleFeatureType, SimpleFeature> logs = store.getLog(query
View Full Code Here

                                return name;
                            }
                            ;
                        };

                    filter.accept(new AbstractFilterVisitor(visitor), null);
                }

                // extract collection
                VersioningFeatureSource store = (VersioningFeatureSource) source;
                FeatureDiffReader differences = store.getDifferences(query.getFromFeatureVersion(),
View Full Code Here

    final Filter reprojectedFilter = (Filter) remappedFilter.accept(visitor, null);
        if(Log.isDebugEnabled(Geonet.SEARCH_ENGINE))
            Log.debug(Geonet.SEARCH_ENGINE,"Reprojected Filter is "+reprojectedFilter);

        // -- extract an envelope/bbox for the whole filter expression
        Envelope bounds = (Envelope) reprojectedFilter.accept(
                ExtractBoundsFilterVisitor.BOUNDS_VISITOR,
                DefaultGeographicCRS.WGS84);
        if(Log.isDebugEnabled(Geonet.SEARCH_ENGINE))
            Log.debug(Geonet.SEARCH_ENGINE,"Filter Envelope is "+bounds);
       
View Full Code Here

       
    final Filter finalFilter = (Filter) reprojectedFilter.accept(new WithinUpdater(), null);
        if(Log.isDebugEnabled(Geonet.SEARCH_ENGINE))
            Log.debug(Geonet.SEARCH_ENGINE,"Adjusted within Filter is "+finalFilter);

        Boolean disjointFilter = (Boolean) finalFilter.accept(new DisjointDetector(), false);
        if( disjointFilter ){
            return new FullScanFilter(query, numHits, bounds, sourceAccessor){
                @Override
                protected Filter createFilter(FeatureSource<SimpleFeatureType, SimpleFeature> source)
                {
View Full Code Here

//            }else{
//                output.startElement(getNamespace(), FilterSchema.getInstance().getElements()[2].getName(),
//                    null);
            }
            FilterEncodingPreProcessor visitor=getFilterEncodingPreProcessor(hints);
            filter.accept(visitor,null);
            // valid filter can have either a normal "filter" defining an test
            if( !visitor.getFilter().equals(Filter.EXCLUDE) ){
              encodeFilter(visitor.getFilter(),output,hints);
            }
            // or it can have a "selection" of specific feature IDs
View Full Code Here

            Filter simplified = (Filter) sourceFilter.accept(visitor, null);
           
            // then perform the splits
            PostPreProcessFilterSplittingVisitor unpacker = new PostPreProcessFilterSplittingVisitor(
                    sqlEncoder.getCapabilities(), featureType, null);
            simplified.accept(unpacker, null);

            SimplifyingFilterVisitor filterSimplifier = new SimplifyingFilterVisitor();
            final String typeName = this.featureType.getTypeName();
            FIDValidator validator = new SimplifyingFilterVisitor.TypeNameDotNumberFidValidator(
                    typeName);
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.