Package org.geotools.filter

Examples of org.geotools.filter.FunctionExpression


        }
       
        Function newFunction(List<Expression> parameters, Literal fallback) throws Exception {
            // cache lookup
            if (FunctionExpression.class.isAssignableFrom(clazz)) {
                FunctionExpression function = (FunctionExpression) clazz.newInstance();
                if(parameters != null) {
                    function.setParameters(parameters);
                }
                if( fallback != null ){
                    function.setFallbackValue( fallback );
                }
                return function;
            }
            if(FunctionImpl.class.isAssignableFrom(clazz)) {
                FunctionImpl function = (FunctionImpl) clazz.newInstance();
                if(parameters != null){
                    function.setParameters( parameters );
                }
                if(fallback != null){
                    function.setFallbackValue( fallback );
                }
                return function;
            }
            //Function function = (Function) functionClass.newInstance();
            Constructor<Function> constructor = clazz.getConstructor( new Class[]{ List.class, Literal.class} );
View Full Code Here


            Map hints) throws IOException, OperationNotSupportedException {
            if (!canEncode(element, value, hints)) {
                return;
            }

            FunctionExpression me = (FunctionExpression) value;
            AttributesImpl ai = new AttributesImpl();
            ai.addAttribute(element.getNamespace().toString(), "name", null,
                "string", me.getName());
            output.startElement(element.getNamespace(), element.getName(), ai);

            for( org.opengis.filter.expression.Expression arg : me.getParameters() ){
                elems[0].getType().encode(null, arg, output, hints);
            }
            output.endElement(element.getNamespace(), element.getName());
        }
View Full Code Here

             {
              sortedFunctions.add(it.next());
             }
            
             //write them now that functions are sorted by name
             FunctionExpression exp = null;
             it = sortedFunctions.iterator();
             while it.hasNext()   )
             {
                 FunctionExpression fe = (FunctionExpression) it.next();
                 String funName = fe.getName();
                 int    funNArgs= fe.getArgCount();
                
                 AttributesImpl atts = new AttributesImpl();
                 atts.addAttribute("", "nArgs", "nArgs", "", funNArgs+"");
                
                 element(prefix +"Function_Name",funName,atts);             
View Full Code Here

TOP

Related Classes of org.geotools.filter.FunctionExpression

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.