Examples of FilterCapabilities


Examples of org.geotools.filter.FilterCapabilities

        Filter f = ff.dwithin(geomAtt, geom, 10, "");
        runTest(f, new FilterCapabilities(DWithin.class), geomAtt);
  }
  public void testEQUALS() throws Exception{
        Filter f = ff.equals(geomAtt, geom);
        runTest(f, new FilterCapabilities(Equals.class), geomAtt);
  }

Examples of org.geotools.filter.FilterCapabilities

        Filter f = ff.equals(geomAtt, geom);
        runTest(f, new FilterCapabilities(Equals.class), geomAtt);
  }
  public void testINTERSECTS() throws Exception{
        Filter f = ff.intersects(geomAtt, geom);
        runTest(f, new FilterCapabilities(Intersects.class), geomAtt);
  }

Examples of org.geotools.filter.FilterCapabilities

        Filter f = ff.intersects(geomAtt, geom);
        runTest(f, new FilterCapabilities(Intersects.class), geomAtt);
  }
  public void testOVERLAPS() throws Exception{
        Filter f = ff.overlaps(geomAtt, geom);
        runTest(f, new FilterCapabilities(Overlaps.class), geomAtt);
  }

Examples of org.geotools.filter.FilterCapabilities

        Filter f = ff.overlaps(geomAtt, geom);
        runTest(f, new FilterCapabilities(Overlaps.class), geomAtt);
  }
  public void testTOUCHES() throws Exception{
        Filter f = ff.touches(geomAtt, geom);
        runTest(f, new FilterCapabilities(Touches.class), geomAtt);   
  }

Examples of org.geotools.filter.FilterCapabilities

        Filter f = ff.touches(geomAtt, geom);
        runTest(f, new FilterCapabilities(Touches.class), geomAtt);   
  }
  public void testWITHIN() throws Exception{
        Filter f = ff.within(geomAtt, geom);
        runTest(f, new FilterCapabilities(Within.class), geomAtt);
  }

Examples of org.geotools.filter.FilterCapabilities

  public void testNoSupportedFunctionExpression() throws Exception {
    Map hints=new HashMap();
    InputStream in = TestData.openStream("xml/capabilities/WFSGetCapsNoFunctionExpressions.xml");
        WFSCapabilities obj=(WFSCapabilities) DocumentFactory.getInstance(in, hints, Level.WARNING);
        FilterCapabilities filterCapabilities = obj.getFilterCapabilities();
    assertFalse(filterCapabilities.supports(FilterCapabilities.FUNCTIONS));
   
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_DISJOINT));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_EQUALS));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_DWITHIN));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_BEYOND));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_INTERSECT));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_TOUCHES));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_CROSSES));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_WITHIN));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_CONTAINS));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_OVERLAPS));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_BBOX));
   
    assertTrue(filterCapabilities.supports(FilterCapabilities.LOGICAL));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SIMPLE_ARITHMETIC));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SIMPLE_COMPARISONS));

    assertTrue(filterCapabilities.supports(FilterCapabilities.BETWEEN));
    assertTrue(filterCapabilities.supports(FilterCapabilities.NULL_CHECK));
    assertTrue(filterCapabilities.supports(FilterCapabilities.LIKE));
   
  }

Examples of org.geotools.filter.FilterCapabilities

 
  public void testSomeSupportedFunctionExpression() throws Exception {
    Map hints=new HashMap();
    InputStream in = TestData.openStream("xml/capabilities/WFSGetCapsSomeFunctionExpressions.xml");
        WFSCapabilities obj=(WFSCapabilities) DocumentFactory.getInstance(in, hints, Level.WARNING);
        FilterCapabilities filterCapabilities = obj.getFilterCapabilities();
       
    assertTrue("supports functions", filterCapabilities.supports(FilterCapabilities.FUNCTIONS));
   
    assertTrue(filterCapabilities.supports(FilterFunction_distance.class));
    assertFalse(filterCapabilities.supports(FilterFunction_abs.class));
    assertFalse(filterCapabilities.supports(FilterFunction_geometryType.class));

    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_DISJOINT));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_EQUALS));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_DWITHIN));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_BEYOND));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_INTERSECT));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_TOUCHES));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_CROSSES));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_WITHIN));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_CONTAINS));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_OVERLAPS));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_BBOX));
   
    assertTrue(filterCapabilities.supports(FilterCapabilities.LOGICAL));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SIMPLE_ARITHMETIC));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SIMPLE_COMPARISONS));

    assertTrue(filterCapabilities.supports(FilterCapabilities.BETWEEN));
    assertTrue(filterCapabilities.supports(FilterCapabilities.NULL_CHECK));
    assertTrue(filterCapabilities.supports(FilterCapabilities.LIKE));
  }

Examples of org.geotools.filter.FilterCapabilities

 
  public void testGeoserverSupportedFunctionExpression() throws Exception {
    Map hints=new HashMap();
    InputStream in = TestData.openStream("xml/capabilities/WFSGetCapsGeoserverFunctionExpressions.xml");
        WFSCapabilities obj=(WFSCapabilities) DocumentFactory.getInstance(in, hints, Level.WARNING);
        FilterCapabilities filterCapabilities = obj.getFilterCapabilities();
       
    boolean supports = filterCapabilities.supports(FilterCapabilities.FUNCTIONS);
        assertTrue("supports functions", supports);
   
    assertTrue("supports distance", filterCapabilities.supports(FilterFunction_distance.class));
    assertTrue("supports filter", filterCapabilities.supports(FilterFunction_abs.class));
    assertTrue("supports geometry", filterCapabilities.supports(FilterFunction_geometryType.class));

    assertTrue("supports disjoint", filterCapabilities.supports(FilterCapabilities.SPATIAL_DISJOINT));
    assertTrue("supports equals", filterCapabilities.supports(FilterCapabilities.SPATIAL_EQUALS));
    assertTrue("supports dwithin", filterCapabilities.supports(FilterCapabilities.SPATIAL_DWITHIN));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_BEYOND));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_INTERSECT));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_TOUCHES));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_CROSSES));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_WITHIN));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_CONTAINS));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_OVERLAPS));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SPATIAL_BBOX));
   
    assertTrue(filterCapabilities.supports(FilterCapabilities.LOGICAL));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SIMPLE_ARITHMETIC));
    assertTrue(filterCapabilities.supports(FilterCapabilities.SIMPLE_COMPARISONS));

    assertTrue(filterCapabilities.supports(FilterCapabilities.BETWEEN));
    assertTrue(filterCapabilities.supports(FilterCapabilities.NULL_CHECK));
    assertTrue(filterCapabilities.supports(FilterCapabilities.LIKE));
  }

Examples of org.opengis.filter.capability.FilterCapabilities

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setFilterCapabilities(FilterCapabilities newFilterCapabilities) {
        FilterCapabilities oldFilterCapabilities = filterCapabilities;
        filterCapabilities = newFilterCapabilities;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, WfsPackage.WFS_CAPABILITIES_TYPE__FILTER_CAPABILITIES, oldFilterCapabilities, filterCapabilities));
    }

Examples of org.opengis.filter.capability.FilterCapabilities

        assertEquals(40.882078D, (Double) bbox.getUpperCorner().get(1), 1E-6);

    }

    void assertFilterCapabilities(WFSCapabilitiesType caps) {
        FilterCapabilities fc = (FilterCapabilities) caps.getFilterCapabilities();

        assertNotNull(fc.getSpatialCapabilities());
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators());
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperators());
        assertEquals(11, fc.getSpatialCapabilities().getSpatialOperators().getOperators().size());

        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("Disjoint"));
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("Equals"));
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("DWithin"));
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("Beyond"));
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("Intersect"));
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("Touches"));
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("Crosses"));
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("Within"));
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("Contains"));
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("Overlaps"));
        assertNotNull(fc.getSpatialCapabilities().getSpatialOperators().getOperator("BBOX"));

        assertNotNull(fc.getScalarCapabilities());
        assertTrue(fc.getScalarCapabilities().hasLogicalOperators());
        assertNotNull(fc.getScalarCapabilities().getArithmeticOperators());
        assertNotNull(fc.getScalarCapabilities().getComparisonOperators());

        assertTrue(fc.getScalarCapabilities().getArithmeticOperators().hasSimpleArithmetic());
        assertNotNull(fc.getScalarCapabilities().getArithmeticOperators().getFunctions());
        assertEquals(7, fc.getScalarCapabilities().getArithmeticOperators().getFunctions()
                .getFunctionNames().size());

        Collection<Operator> operators = fc.getScalarCapabilities().getComparisonOperators()
                .getOperators();

        assertEquals(3, operators.size());// "Simple_Comparisons" is commented out on purpose

        assertNotNull(fc.getScalarCapabilities().getComparisonOperators().getOperator("Between"));
        assertNotNull(fc.getScalarCapabilities().getComparisonOperators().getOperator("Like"));
        assertNotNull(fc.getScalarCapabilities().getComparisonOperators().getOperator("NullCheck"));
    }
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.