Package org.opengis.filter.expression

Examples of org.opengis.filter.expression.Literal.evaluate()


            refreshControls(null, name, null);
            feedback();
            return;
        } else if (expr instanceof Literal) {
            Literal literal = (Literal) expr;
            Double percent = literal.evaluate(null, Double.class);
            if (percent != null) {
                refreshControls(percent, null, null);
                feedback();
                return;
            }
View Full Code Here


                    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

                        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

    void handleOpacity(Expression opacity) {
        if(opacity == null)
            return;
        if(opacity instanceof Literal) {
            Literal lo = (Literal) opacity;
            double value = ((Double) lo.evaluate(null, Double.class)).doubleValue();
            translucentSymbolizers = translucentSymbolizers || value != 1;
        } else {
            // we cannot know, so we assume some will be non opaque
            translucentSymbolizers = true;
        }
View Full Code Here

    void handleColor(Expression color) {
        if(color == null)
            return;
        if(color instanceof Literal) {
            Literal lc = (Literal) color;
            String rgbColor = (String) lc.evaluate(null, String.class);
            colors.add(Color.decode(rgbColor));
        } else {
            unknownColors = true;
        }
    }
View Full Code Here

        wmfp.setRoot(rootDir);
       
        try {
            // Adds library to cache
            Literal exp = ff.literal("wkt.properties");
            wmfp.addToCachePublic(exp.evaluate(feature, String.class));
           
            // Check "ls" has been loaded
            assertEquals(wmfp.getFromCachePublic("wkt.properties", "ls"),
                    "LINESTRING(0.0 0.25, 0.25 0.25, 0.5 0.75, 0.75 0.25, 1.00 0.25)");
           
View Full Code Here

        wmfp.setRoot(rootDir);
       
        try {
            // Adds 1st library to cache
            Literal exp = ff.literal("wkt.properties");
            wmfp.addToCachePublic(exp.evaluate(feature, String.class));
           
            // Adds 2nd library to cache
            exp = ff.literal("wkt2.properties");
            wmfp.addToCachePublic(exp.evaluate(feature, String.class));
           
View Full Code Here

            Literal exp = ff.literal("wkt.properties");
            wmfp.addToCachePublic(exp.evaluate(feature, String.class));
           
            // Adds 2nd library to cache
            exp = ff.literal("wkt2.properties");
            wmfp.addToCachePublic(exp.evaluate(feature, String.class));
           
            // Check "ls" has been loaded
            assertEquals(wmfp.getFromCachePublic("wkt.properties", "ls"),
                    "LINESTRING(0.0 0.25, 0.25 0.25, 0.5 0.75, 0.75 0.25, 1.00 0.25)");
           
View Full Code Here

        }
       
        void labelContent(Expression expr) {
            if(expr instanceof Literal) {
                Literal literalLabel = ((Literal) expr);
                String label = literalLabel.evaluate(null, String.class);
                if(label != null) {
                    // do we need a CDATA expansion?
                    if(label.matches("^\\s+.*$|^.*\\s+$|^.*\\s{2,}.*$")) {
                        cdata(label);
                    } else {
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.