Examples of ArithmeticOperators


Examples of org.opengis.filter.capability.ArithmeticOperators

            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

Examples of org.opengis.filter.capability.ArithmeticOperators

    }

    public void testParse1() throws Exception {
        FilterMockData.arithmetic(document, document);

        ArithmeticOperators arithmetic = (ArithmeticOperators) parse(OGC.ArithmeticOperatorsType);

        assertTrue(arithmetic.hasSimpleArithmetic());
        assertNotNull(arithmetic.getFunctions());
    }
View Full Code Here

Examples of org.opengis.filter.capability.ArithmeticOperators

    }

    public void testParse2() throws Exception {
        FilterMockData.arithmetic(document, document, false);

        ArithmeticOperators arithmetic = (ArithmeticOperators) parse(OGC.ArithmeticOperatorsType);

        assertFalse(arithmetic.hasSimpleArithmetic());
        assertNotNull(arithmetic.getFunctions());
    }
View Full Code Here

Examples of org.opengis.filter.capability.ArithmeticOperators

        //<xsd:element name="Comparison_Operators" type="ogc:Comparison_OperatorsType"/>
        ComparisonOperators comparison = (ComparisonOperators) node.getChildValue(ComparisonOperators.class);

        //<xsd:element name="Arithmetic_Operators" type="ogc:Arithmetic_OperatorsType"/>
        ArithmeticOperators arithmetic = (ArithmeticOperators) node.getChildValue(ArithmeticOperators.class);

        return factory.scalarCapabilities(comparison, arithmetic, logical);
    }
View Full Code Here

Examples of org.opengis.filter.capability.ArithmeticOperators

        return factory.arithmeticOperators(simpleArithmetic, functions);
    }

    public Object getProperty(Object object, QName name)
        throws Exception {
        ArithmeticOperators arithmetic = (ArithmeticOperators) object;

        if ((name.equals(OGC.Simple_Arithmetic)
                || name.equals(org.geotools.filter.v1_1.OGC.SimpleArithmetic))
                && arithmetic.hasSimpleArithmetic()) {
            return new Object();
        }

        if (name.getLocalPart().equals("Functions")) {
            return arithmetic.getFunctions();
        }

        return null;
    }
View Full Code Here

Examples of org.opengis.filter.capability.ArithmeticOperators

    }

    public void testParse1() throws Exception {
        FilterMockData.arithmetic(document, document);

        ArithmeticOperators arithmetic = (ArithmeticOperators) parse(OGC.Arithmetic_OperatorsType);

        assertTrue(arithmetic.hasSimpleArithmetic());
        assertNotNull(arithmetic.getFunctions());
    }
View Full Code Here

Examples of org.opengis.filter.capability.ArithmeticOperators

    }

    public void testParse2() throws Exception {
        FilterMockData.arithmetic(document, document, false);

        ArithmeticOperators arithmetic = (ArithmeticOperators) parse(OGC.Arithmetic_OperatorsType);

        assertFalse(arithmetic.hasSimpleArithmetic());
        assertNotNull(arithmetic.getFunctions());
    }
View Full Code Here

Examples of org.opengis.filter.capability.ArithmeticOperators

    public Object visit( Divide expression, Object extraData ) {
        ScalarCapabilities scalar = capabilities.getScalarCapabilities();
        if( scalar == null ) return false;       
       
        ArithmeticOperators operators = scalar.getArithmeticOperators();
        if( operators == null ) return false;
       
        return operators.hasSimpleArithmetic();
    }
View Full Code Here

Examples of org.opengis.filter.capability.ArithmeticOperators

    public Object visit( Function function, Object extraData ) {
        ScalarCapabilities scalar = capabilities.getScalarCapabilities();
        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
View Full Code Here

Examples of org.opengis.filter.capability.ArithmeticOperators

    public Object visit( Multiply expression, Object extraData ) {
        ScalarCapabilities scalar = capabilities.getScalarCapabilities();
        if( scalar == null ) return false;       
       
        ArithmeticOperators operators = scalar.getArithmeticOperators();
        if( operators == null ) return false;
       
        return operators.hasSimpleArithmetic();
    }
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.