Package org.opengis.filter.capability

Examples of org.opengis.filter.capability.Functions


            boolean simple = true;
            FunctionName[] functionNames = { filterFac.functionName("MIN", 2),
                    filterFac.functionName("ABS", 1) };

            Functions functions = filterFac.functions(functionNames);
            final ArithmeticOperators aritmeticOps = filterFac.arithmeticOperators(simple,
                    functions);

            final boolean logicalOps = true;
            scalarCaps = filterFac.scalarCapabilities(comparisonOps, aritmeticOps, logicalOps);
View Full Code Here


    public void testParse() throws Exception {
        Element element = FilterMockData.element(document, document,
                new QName(OGC.NAMESPACE, "Functions"));
        FilterMockData.functionNames(document, element);

        Functions functions = (Functions) parse(OGC.FunctionsType);
        assertEquals(2, functions.getFunctionNames().size());
    }
View Full Code Here

        Functions functions = (Functions) parse(OGC.FunctionsType);
        assertEquals(2, functions.getFunctionNames().size());
    }

    public void testEncode() throws Exception {
        Functions functions = FilterMockData.functions();
        Document dom = encode(functions, new QName(OGC.NAMESPACE, "Functions"), OGC.FunctionsType);

        assertEquals(1, dom.getElementsByTagNameNS(OGC.NAMESPACE, "FunctionNames").getLength());
        assertEquals(2, dom.getElementsByTagNameNS(OGC.NAMESPACE, "FunctionName").getLength());
    }
View Full Code Here

    public Object getProperty(Object object, QName name)
        throws Exception {
        if ("Function_Names".equals(name.getLocalPart())
                || "FunctionNames".equals(name.getLocalPart()) /* 1.1 */) {
            Functions functions = (Functions) object;

            return functions.getFunctionNames();
        }

        return null;
    }
View Full Code Here

        //<xsd:element ref="ogc:Simple_Arithmetic"/>
        boolean simpleArithmetic = node.hasChild("Simple_Arithmetic")
            || node.hasChild("SimpleArithmetic"); //1.1

        //<xsd:element name="Functions" type="ogc:FunctionsType"/>
        Functions functions = (Functions) node.getChildValue(Functions.class);

        return factory.arithmeticOperators(simpleArithmetic, functions);
    }
View Full Code Here

    public void testParse() throws Exception {
        Element element = FilterMockData.element(document, document,
                new QName(OGC.NAMESPACE, "Functions"));
        FilterMockData.functionNames(document, element);

        Functions functions = (Functions) parse(OGC.FunctionsType);
        assertEquals(2, functions.getFunctionNames().size());
    }
View Full Code Here

        Functions functions = (Functions) parse(OGC.FunctionsType);
        assertEquals(2, functions.getFunctionNames().size());
    }

    public void testEncode() throws Exception {
        Functions functions = FilterMockData.functions();
        Document dom = encode(functions, new QName(OGC.NAMESPACE, "Functions"), OGC.FunctionsType);

        assertEquals(1, dom.getElementsByTagNameNS(OGC.NAMESPACE, "Function_Names").getLength());
        assertEquals(2, dom.getElementsByTagNameNS(OGC.NAMESPACE, "Function_Name").getLength());
    }
View Full Code Here

        if( scalar == null ) return false;       
       
        ArithmeticOperators operators = scalar.getArithmeticOperators();
        if( operators == null ) return false;
       
        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

        if( scalar == null ) return false;       
       
        ArithmeticOperators operators = scalar.getArithmeticOperators();
        if( operators == null ) return false;
       
        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

TOP

Related Classes of org.opengis.filter.capability.Functions

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.