Class FilterToMongo

  • All Implemented Interfaces:
    ExpressionVisitor, FilterVisitor

    public class FilterToMongo
    extends AbstractFilterToMongo
    Visitor responsible for generating a BasicDBObject to use as a MongoDB query.
    Author:
    Gerald Gay, Data Tactics Corp., Alan Mangan, Data Tactics Corp., Tom Kunicki, Boundless Spatial Inc. (C) 2011, Open Source Geospatial Foundation (OSGeo)
    See Also:
    GNU Lesser General Public License (LGPL)
    • Method Detail

      • setFeatureType

        public void setFeatureType​(SimpleFeatureType featureType)
        Sets the feature type the encoder is encoding a filter for.

        The type of the attributes may drive how the filter is translated to a mongodb query document.

      • getValueTypeInternal

        protected Class<?> getValueTypeInternal​(Expression e)
        Description copied from class: AbstractFilterToMongo
        Method responsible of retrieving the value type of an Expression
        Specified by:
        getValueTypeInternal in class AbstractFilterToMongo
        Parameters:
        e - the expression for which find the value type
        Returns:
        the type as a Class of the Expression
      • getGeometryPath

        protected String getGeometryPath()
        Description copied from class: AbstractFilterToMongo
        Method responsible of retrieving the MongoDB geometry json path
        Specified by:
        getGeometryPath in class AbstractFilterToMongo
        Returns:
        the MongoDB json paath for the default geometry
      • getPropertyPath

        protected String getPropertyPath​(String prop)
        Description copied from class: AbstractFilterToMongo
        Method responsible of mapping a PropertyName to the corresponding MongoDB json path
        Specified by:
        getPropertyPath in class AbstractFilterToMongo
        Parameters:
        prop - the string property name to map
        Returns:
        the MongoDB json path