Examples of FunctionName


Examples of org.opengis.filter.capability.FunctionName

        Map<Name,FunctionDescriptor> functionMap = new HashMap<Name,FunctionDescriptor>();

        Set<Function> functions = CommonFactoryFinder.getFunctions(null);
        for (Iterator<Function> i = functions.iterator(); i.hasNext();) {
            Function function = (Function) i.next();
            FunctionName functionName = getFunctionName( function );
            Name name = functionName.getFunctionName();

            FunctionDescriptor fd = new FunctionDescriptor( functionName, (Class<Function>) function.getClass() );

            // needed to insert justin's name hack here to ensure consistent lookup
            Name key = functionName(name);
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

                        List<org.opengis.parameter.Parameter<?>> args = new ArrayList<org.opengis.parameter.Parameter<?>>( argumentNames.size() );
                        for(String argumentName : argumentNames ){
                            args.add( parameterInfo.get(argumentName));
                        }

                        FunctionName functionName = new FunctionNameImpl(processName, result, args);
                        functionNames.add(functionName);
                        processToFunction.put(processName, functionName);
                    }
                }
            }
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

                .literal(BufferFeatureCollectionFactory.BUFFER.key), ff.literal(1000));
        // build the function and call it
        Function buffer = ff.function("gt:BufferFeatureCollection", featuresParam, bufferParam);
       
        // check the metadata
        FunctionName fn = buffer.getFunctionName();
        assertEquals("gt:BufferFeatureCollection", fn.getName());
        assertEquals(2, fn.getArgumentCount());
        assertEquals(FeatureCollection.class, fn.getReturn().getType());
       
        // run and check results
        SimpleFeatureCollection buffered = (SimpleFeatureCollection) buffer.evaluate(features);
        assertEquals(features.size(), buffered.size());
        GeometryDescriptor gd = buffered.getSchema().getGeometryDescriptor();
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

       
        Functions functions = operators.getFunctions();
        if( functions == null ) return false;
       
        // Note that only function name is checked here
        FunctionName found = functions.getFunctionName( function.getName() );
        // And that's enough to assess if the function is supported
        return found != null;
    }
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

            for (String file : filterRoot.list()) {
                if (file.endsWith(".py")) {
                    PythonFilterFunctionAdapter adapter =
                        new PythonFilterFunctionAdapter(new File(filterRoot, file), py);
                    for(String name : adapter.getNames()) {
                        FunctionName fname =
                            ff.functionName(name, adapter.getParameterNames(name).size());
                        names.add(fname);
                    }
                }
            }
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

             
                Set<FunctionName> functions = getAvailableFunctionNames();
                Iterator it = functions.iterator();

                while (it.hasNext()) {
                    FunctionName fname = (FunctionName) it.next();
                    AttributesImpl atts = new AttributesImpl();
                    atts.addAttribute("", "nArgs", "nArgs", "", fname.getArgumentCount() + "");

                    element(prefix + "Function_Name", fname.getName(), atts);
                }

                end(prefix + "Function_Names");
                end(prefix + "Functions");
            }
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

             
                Set<FunctionName> functions = getAvailableFunctionNames();
                Iterator it = functions.iterator();

                while (it.hasNext()) {
                    FunctionName fname = (FunctionName) it.next();
                    AttributesImpl atts = new AttributesImpl();
                    atts.addAttribute("", "nArgs", "nArgs", "", fname.getArgumentCount() + "");

                    element(prefix + "Function_Name", fname.getName(), atts);
                }

                end(prefix + "Function_Names");
                end(prefix + "Functions");
            }
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

            for (String file : filterRoot.list()) {
                if (file.endsWith(".py")) {
                    PythonFilterFunctionAdapter adapter =
                        new PythonFilterFunctionAdapter(new File(filterRoot, file), py);
                    for(String name : adapter.getNames()) {
                        FunctionName fname =
                            ff.functionName(name, adapter.getParameterNames(name).size());
                        names.add(fname);
                    }
                }
            }
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

            Expression tx = fts.getTransformation();
            if(tx != null) {
                boolean rasterTransformation = false;
                if(tx instanceof Function) {
                    Function f = (Function) tx;
                    FunctionName name = f.getFunctionName();
                    if(name != null) {
                        Parameter<?> result = name.getReturn();
                        if(result != null) {
                            if(GridCoverage2D.class.isAssignableFrom(result.getType())) {
                                rasterTransformation = true;
                                this.rasterTransformation = tx;
                            }
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.