Package org.geotools.xml.filter.FilterSchema

Examples of org.geotools.xml.filter.FilterSchema.FilterElement


            Filter lf = (Filter) value;

            switch ( Filters.getFilterType( lf )) {
            case COMPARE_EQUALS:
                BinaryComparisonOpType.getInstance().encode(new FilterElement(
                    "PropertyIsEqualTo",
                        BinaryComparisonOpType.getInstance(), element), value,
                    output, hints);

                return;

            case COMPARE_GREATER_THAN:
                BinaryComparisonOpType.getInstance().encode(new FilterElement(
                    "PropertyIsGreaterThan",
                        BinaryComparisonOpType.getInstance(), element), value,
                    output, hints);

                return;

            case COMPARE_GREATER_THAN_EQUAL:
                BinaryComparisonOpType.getInstance().encode(new FilterElement(
                    "PropertyIsGreaterThanOrEqualTo",
                        BinaryComparisonOpType.getInstance(), element), value,
                    output, hints);

                return;

            case COMPARE_LESS_THAN:
                BinaryComparisonOpType.getInstance().encode(new FilterElement(
                        "PropertyIsLessThan",
                        BinaryComparisonOpType.getInstance(), element), value,
                    output, hints);

                return;

            case COMPARE_LESS_THAN_EQUAL:
                BinaryComparisonOpType.getInstance().encode(new FilterElement(
                        "PropertyIsLessThanOrEqualTo",
                        BinaryComparisonOpType.getInstance(), element), value,
                    output, hints);

                return;

            case COMPARE_NOT_EQUALS:
                BinaryComparisonOpType.getInstance().encode(new FilterElement(
                        "PropertyIsNotEqualTo",
                        BinaryComparisonOpType.getInstance(), element), value,
                    output, hints);

                return;

            case LIKE:
                PropertyIsLikeType.getInstance().encode(new FilterElement(
                        "PropertyIsLike", PropertyIsLikeType.getInstance(),
                        element), value, output, hints);

                return;

            case NULL:
                PropertyIsNullType.getInstance().encode(new FilterElement(
                        "PropertyIsNull", PropertyIsNullType.getInstance(),
                        element), value, output, hints);

                return;

            case BETWEEN:
                PropertyIsBetweenType.getInstance().encode(new FilterElement(
                        "PropertyIsBetween",
                        PropertyIsBetweenType.getInstance(), element), value,
                    output, hints);

                return;
View Full Code Here


            BinarySpatialOperator lf = (BinarySpatialOperator) value;

            switch ( Filters.getFilterType( lf )) {
            case GEOMETRY_BBOX:
                BBOXType.getInstance().encode(new FilterElement("BBOX",
                        BBOXType.getInstance(), element), value, output, hints);

                return;

            case GEOMETRY_BEYOND:
                DistanceBufferType.getInstance().encode(new FilterElement(
                        "Beyond", DistanceBufferType.getInstance(), element),
                    value, output, hints);

                return;

            case GEOMETRY_CONTAINS:
                BinarySpatialOpType.getInstance().encode(new FilterElement(
                        "Contains", BinarySpatialOpType.getInstance(), element),
                    value, output, hints);

                return;

            case GEOMETRY_CROSSES:
                BinarySpatialOpType.getInstance().encode(new FilterElement(
                        "Crosses", BinarySpatialOpType.getInstance(), element),
                    value, output, hints);

                return;

            case GEOMETRY_DISJOINT:
                BinarySpatialOpType.getInstance().encode(new FilterElement(
                        "Disjoint", BinarySpatialOpType.getInstance(), element),
                    value, output, hints);

                return;

            case GEOMETRY_DWITHIN:
                DistanceBufferType.getInstance().encode(new FilterElement(
                        "DWithin", DistanceBufferType.getInstance(), element),
                    value, output, hints);

                return;

            case GEOMETRY_EQUALS:
                BinarySpatialOpType.getInstance().encode(new FilterElement(
                        "Equals", BinarySpatialOpType.getInstance(), element),
                    value, output, hints);

                return;

            case GEOMETRY_INTERSECTS:
                BinarySpatialOpType.getInstance().encode(new FilterElement(
                        "Intersects", BinarySpatialOpType.getInstance(), element),
                    value, output, hints);

                return;

            case GEOMETRY_OVERLAPS:
                BinarySpatialOpType.getInstance().encode(new FilterElement(
                        "Overlaps", BinarySpatialOpType.getInstance(), element),
                    value, output, hints);

                return;

            case GEOMETRY_TOUCHES:
                BinarySpatialOpType.getInstance().encode(new FilterElement(
                        "Touches", BinarySpatialOpType.getInstance(), element),
                    value, output, hints);

                return;

            case GEOMETRY_WITHIN:
                BinarySpatialOpType.getInstance().encode(new FilterElement(
                        "Within", BinarySpatialOpType.getInstance(), element),
                    value, output, hints);

                return;
            }
View Full Code Here

            if( value instanceof BinaryLogicOperator){
                BinaryLogicOperator lf = (BinaryLogicOperator) value;
   
                switch ( Filters.getFilterType( lf )) {
                case LOGIC_AND:
                    BinaryLogicOpType.getInstance().encode(new FilterElement(
                            "And", BinaryLogicOpType.getInstance(), element),
                        value, output, hints);
   
                    return;
   
                case LOGIC_OR:
   
                    BinaryLogicOpType.getInstance().encode(new FilterElement("Or",
                            BinaryLogicOpType.getInstance(), element), value,
                        output, hints);
   
                    return;
                }
            }
            else if ( value instanceof Not){
                Not lf = (Not) value;
                UnaryLogicOpType.getInstance().encode(new FilterElement("Not",
                        UnaryLogicOpType.getInstance(), element), value,
                    output, hints);
                return;
            }
View Full Code Here

            return instance;
        }

        private static Element[] elems = loadE();
        private static Element[] loadE(){
            Element exp = new FilterElement("expression",
                    ExpressionType.getInstance()) {
                public boolean isAbstract() {
                    return true;
                }
            };
            return new Element[]{
                new FilterElement("PropertyName",PropertyNameType.getInstance(),exp){
                    public int getMaxOccurs(){return ElementGrouping.UNBOUNDED;}
              }
            };
        }
View Full Code Here

            case ATTRIBUTE_DOUBLE:
            case ATTRIBUTE_GEOMETRY:
            case ATTRIBUTE_INTEGER:
            case ATTRIBUTE_STRING:
            case ATTRIBUTE_UNDECLARED:
                PropertyNameType.getInstance().encode(new FilterElement(
                        "PropertyName", PropertyNameType.getInstance()), e,
                    output, hints);

                return;

            case FUNCTION:
                FunctionType.getInstance().encode((element != null) ? element
                                                                    : new FilterElement(
                        "Function", FunctionType.getInstance()), e, output,
                    hints);

                return;

            case LITERAL_DOUBLE:
            case LITERAL_GEOMETRY:
            case LITERAL_INTEGER:
            case LITERAL_STRING:
                LiteralType.getInstance().encode((element != null) ? element
                                                                   : new FilterElement(
                        "Literal", LiteralType.getInstance()), e, output, hints);

                return;

            case MATH_ADD:
                BinaryOperatorType.getInstance().encode((element != null)
                    ? element
                    : new FilterElement("Add", BinaryOperatorType.getInstance()),
                    e, output, hints);

                return;

            case MATH_DIVIDE:
                BinaryOperatorType.getInstance().encode((element != null)
                    ? element
                    : new FilterElement("Div", BinaryOperatorType.getInstance()),
                    e, output, hints);

                return;

            case MATH_MULTIPLY:
                BinaryOperatorType.getInstance().encode((element != null)
                    ? element
                    : new FilterElement("Mul", BinaryOperatorType.getInstance()),
                    e, output, hints);

                return;

            case MATH_SUBTRACT:
                BinaryOperatorType.getInstance().encode((element != null)
                    ? element
                    : new FilterElement("Sub", BinaryOperatorType.getInstance()),
                    e, output, hints);

                return;
            }
View Full Code Here

TOP

Related Classes of org.geotools.xml.filter.FilterSchema.FilterElement

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.