Package org.opengis.filter.expression

Examples of org.opengis.filter.expression.Literal


   *            the name of the geometry field ("the_geom")
   * @return filter
   */
  public Filter createContainsFilter(Geometry geometry, String geomName) {
    Expression nameExpression = FF.property(geomName);
    Literal geomLiteral = FF.literal(geometry);
    return FF.contains(nameExpression, geomLiteral);
  }
View Full Code Here


   *            the name of the geometry field ("the_geom")
   * @return filter
   */
  public Filter createWithinFilter(Geometry geometry, String geomName) {
    Expression nameExpression = FF.property(geomName);
    Literal geomLiteral = FF.literal(geometry);
    return FF.within(nameExpression, geomLiteral);
  }
View Full Code Here

   *            the name of the geometry field ("the_geom")
   * @return filter
   */
  public Filter createIntersectsFilter(Geometry geometry, String geomName) {
    Expression nameExpression = FF.property(geomName);
    Literal geomLiteral = FF.literal(geometry);
    return FF.intersects(nameExpression, geomLiteral);
  }
View Full Code Here

   *            the name of the geometry field ("the_geom")
   * @return filter
   */
  public Filter createTouchesFilter(Geometry geometry, String geomName) {
    Expression nameExpression = FF.property(geomName);
    Literal geomLiteral = FF.literal(geometry);
    return FF.touches(nameExpression, geomLiteral);
  }
View Full Code Here

   *            the name of the geometry field ("the_geom")
   * @return filter
   */
  public Filter createOverlapsFilter(Geometry geometry, String geomName) {
    Expression nameExpression = FF.property(geomName);
    Literal geomLiteral = FF.literal(geometry);
    return FF.overlaps(nameExpression, geomLiteral);
  }
View Full Code Here

                // get File
              
                // Commented out as Simone has removed the API we were using               
                String locationAttributeName = "location"; // imageReader.getLocationAttributeName();
                Object attribute = f.getAttribute(locationAttributeName);
                Literal eq = getFilterFactory().literal(attribute);
                Filter filter = getFilterFactory().equals(
                        getFilterFactory().property(locationAttributeName), eq);

                File file = null;//imageReader.getImageFile(filter);
                // update file info
View Full Code Here

    public void testSVGGraphicsFactory() throws Exception {
        URL url = GeoToolsTest.class.getResource("example.svg");
       
        SVGGraphicFactory svgFactory = new SVGGraphicFactory();
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Literal expr = ff.literal( url.toExternalForm() );
       
        Icon icon = svgFactory.getIcon(null, expr, "image/svg",16 );
        assertNotNull( icon );
       
    }
View Full Code Here

                if( !binding.isAssignableFrom(Double.class)){
                    return Appropriate.NOT_APPROPRIATE.getScore();
                }
            }
            if (expression instanceof Literal) {
                Literal literal = (Literal) expression;
                Double number = literal.evaluate(null, Double.class);
               
                if (number != null) {
                    if (number >= 0 && number <= 1.0) {
                        return Appropriate.APPROPRIATE.getScore();
                    }
View Full Code Here

                    try {
                        listen(false); // don't listen while updating controls
                        Expression expr = getExpression();

                        if (expr instanceof Literal) {
                            Literal literal = (Literal) expr;
                            Color color = literal.evaluate(null, Color.class);
                            if (color != null) {
                                feedback();
                                refreshSelection( redSpinner, redScale, color.getRed() );
                                refreshSelection( greenSpinner, greenScale, color.getGreen() );
                                refreshSelection( blueSpinner, blueScale, color.getBlue() );
View Full Code Here

     */
    public static class Factory extends ExpressionViewerFactory {
        @Override
        public int score(ExpressionInput input, Expression expression) {
            if (expression instanceof Literal) {
                Literal literal = (Literal) expression;
                Color color = literal.evaluate(null, Color.class);
                if (color != null) {
                    return Appropriate.APPROPRIATE.getScore();
                }
            }
            return Appropriate.NOT_APPROPRIATE.getScore();
View Full Code Here

TOP

Related Classes of org.opengis.filter.expression.Literal

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.