Package org.geotools.filter

Examples of org.geotools.filter.FilterCapabilities


            }
            // END OF HACK
            if (isJoining || mappedSource instanceof JDBCFeatureSource
                    || mappedSource instanceof JDBCFeatureStore) {
                // has database as data source, we can use the data source filter capabilities
                FilterCapabilities capabilities = getFilterCapabilities(mappedSource);
                ComplexFilterSplitter splitter = new ComplexFilterSplitter(capabilities, mapping);
                Filter filter = query.getFilter();
                filter.accept(splitter, null);
                Filter preFilter = splitter.getFilterPre();
                query.setFilter(preFilter);
View Full Code Here


        return Types.isSimpleContentType(mapping.getTargetFeature().getType());
    }

    private static FilterCapabilities getFilterCapabilities(FeatureSource mappedSource)
            throws IllegalArgumentException {
        FilterCapabilities capabilities = null;
        if (mappedSource instanceof JDBCFeatureSource) {
            capabilities = ((JDBCFeatureSource) mappedSource).getDataStore()
                    .getFilterCapabilities();
        } else if (mappedSource instanceof JDBCFeatureStore) {
            capabilities = ((JDBCFeatureStore) mappedSource).getDataStore().getFilterCapabilities();
View Full Code Here

        looseBBOX = dialect.isLooseBBOXEnabled();
    }

    @Override
    protected FilterCapabilities createFilterCapabilities() {
        FilterCapabilities caps = new FilterCapabilities();
        caps.addAll(SQLDialect.BASE_DBMS_CAPABILITIES);

        // adding the spatial filters support
        caps.addType(BBOX.class);
        caps.addType(Contains.class);
        caps.addType(Crosses.class);
        caps.addType(Disjoint.class);
        caps.addType(Equals.class);
        caps.addType(Intersects.class);
        caps.addType(Overlaps.class);
        caps.addType(Touches.class);
        caps.addType(Within.class);
        caps.addType(DWithin.class);
        caps.addType(Beyond.class);

        return caps;
    }
View Full Code Here

        this.looseBBOXEnabled = looseBBOXEnabled;
    }
   
    @Override
    protected FilterCapabilities createFilterCapabilities() {
        FilterCapabilities caps = new FilterCapabilities();
        caps.addAll(SQLDialect.BASE_DBMS_CAPABILITIES);

        // adding the spatial filters support
        caps.addType(BBOX.class);
        caps.addType(Contains.class);
        caps.addType(Crosses.class);
        caps.addType(Disjoint.class);
        caps.addType(Equals.class);
        caps.addType(Intersects.class);
        caps.addType(Overlaps.class);
        caps.addType(Touches.class);
        caps.addType(Within.class);
        caps.addType(DWithin.class);
        caps.addType(Beyond.class);
       
        caps.addType(FilterFunction_sdonn.class);
       
        //temporal filters
        caps.addType(After.class);
        caps.addType(Before.class);
        caps.addType(Begins.class);
        caps.addType(BegunBy.class);
        caps.addType(During.class);
        caps.addType(TOverlaps.class);
        caps.addType(Ends.class);
        caps.addType(EndedBy.class);
        caps.addType(TEquals.class);
       
        return caps;
    }
View Full Code Here

 
  public void testBBOX() throws Exception{
    // JE:  this test fails but I am not sure if it is a bug or expected behaviour 
    // I wrote this test so it may be correct but it maybe wrong.  Someone that knows should look at this.
    Filter f = ff.bbox(geomAtt, 10, 10, 20, 20, "");
    runTest(f, new FilterCapabilities(BBOX.class), geomAtt);
  }
View Full Code Here

    Filter f = ff.bbox(geomAtt, 10, 10, 20, 20, "");
    runTest(f, new FilterCapabilities(BBOX.class), geomAtt);
  }
  public void testBEYOND() throws Exception{
    Filter f = ff.beyond(geomAtt, geom, 10, "");
    runTest(f, new FilterCapabilities(Beyond.class), geomAtt);
  }
View Full Code Here

    Filter f = ff.beyond(geomAtt, geom, 10, "");
    runTest(f, new FilterCapabilities(Beyond.class), geomAtt);
  }
  public void testCONTAINS() throws Exception{
        Filter f = ff.contains(geomAtt, geom);
        runTest(f, new FilterCapabilities(Contains.class), geomAtt);
  }
View Full Code Here

        Filter f = ff.contains(geomAtt, geom);
        runTest(f, new FilterCapabilities(Contains.class), geomAtt);
  }
  public void testCROSSES() throws Exception{
        Filter f = ff.crosses(geomAtt, geom);
        runTest(f, new FilterCapabilities(Crosses.class), geomAtt);
  }
View Full Code Here

        Filter f = ff.crosses(geomAtt, geom);
        runTest(f, new FilterCapabilities(Crosses.class), geomAtt);
  }
  public void testDISJOINT() throws Exception{
        Filter f = ff.disjoint(geomAtt, geom);
        runTest(f, new FilterCapabilities(Disjoint.class), geomAtt);
  }
View Full Code Here

        Filter f = ff.disjoint(geomAtt, geom);
        runTest(f, new FilterCapabilities(Disjoint.class), geomAtt);
  }
  public void tesDWITHINt() throws Exception{
        Filter f = ff.dwithin(geomAtt, geom, 10, "");
        runTest(f, new FilterCapabilities(DWithin.class), geomAtt);
  }
View Full Code Here

TOP

Related Classes of org.geotools.filter.FilterCapabilities

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.