Package

org.locationtech.geomesa

filter

Permalink

package filter

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. filter
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. class AndSplittingFilter extends DefaultFilterVisitor

    Permalink
  2. case class Bounds[T](lower: Bound[T], upper: Bound[T]) extends Product with Serializable

    Permalink

    Single typed bound.

    Single typed bound. If filter is unbounded on one or both sides, the associated bound will be None.

    For example, bounds for 'foo < 5' would be (None, Some(5)) Special case for 'foo NOT NULL' will have both bounds be None

    T

    binding of the attribute type

    lower

    lower bound, if any

    upper

    upper bound, if any

  3. case class FilterValues[+T](values: Seq[T], precise: Boolean = true, disjoint: Boolean = false) extends Product with Serializable

    Permalink

    Holds values extracted from a filter.

    Holds values extracted from a filter. Values may be empty, in which case nothing was extracted from the filter. May be marked as 'disjoint', which means that mutually exclusive values were extracted from the filter. This may be checked to short-circuit queries that will not result in any hits.

    T

    type parameter

    values

    values extracted from the filter. If nothing was extracted, will be empty

    precise

    values exactly match the filter, or may return false positives

    disjoint

    mutually exclusive values were extracted, e.g. 'a < 1 && a > 2'

  4. trait GeometryProcessing extends AnyRef

    Permalink

    Process a geometry for querying

  5. class OrSplittingFilter extends DefaultFilterVisitor

    Permalink
  6. type PartionedFilter = (Seq[Filter], Seq[Filter])

    Permalink

Value Members

  1. object Bounds extends Serializable

    Permalink
  2. object FilterHelper

    Permalink
  3. object FilterProperties

    Permalink
  4. object FilterValues extends Serializable

    Permalink
  5. object GeometryProcessing extends GeometryProcessing with LazyLogging

    Permalink
  6. object RichTransform

    Permalink
  7. val WildcardMultiChar: Char

    Permalink
  8. val WildcardSingleChar: Char

    Permalink
  9. val WildcardSuffix: String

    Permalink
  10. val Wildcards: Seq[Char]

    Permalink
  11. def andFilters(filters: Seq[Filter])(implicit ff: FilterFactory = ff): Filter

    Permalink
  12. def andOption(filters: Seq[Filter])(implicit ff: FilterFactory = ff): Option[Filter]

    Permalink
  13. def checkOrder(one: Expression, two: Expression): Option[AttributeExpression]

    Permalink

    Checks the order of properties and literals in the expression

    Checks the order of properties and literals in the expression

    one

    first expression

    two

    second expression

    returns

    (prop, literal, whether the order was flipped)

  14. def checkOrderUnsafe(one: Expression, two: Expression): AttributeExpression

    Permalink

    Checks the order of properties and literals in the expression - if the expression does not contain a property and a literal, throws an exception.

    Checks the order of properties and literals in the expression - if the expression does not contain a property and a literal, throws an exception.

    one

    first expression

    two

    second expression

    returns

    (prop, literal, whether the order was flipped)

  15. def decomposeAnd(f: Filter): Seq[Filter]

    Permalink
  16. def decomposeBinary(f: Filter): Seq[Filter]

    Permalink
  17. def decomposeOr(f: Filter): Seq[Filter]

    Permalink
  18. package expression

    Permalink
  19. package factory

    Permalink
  20. implicit val ff: FilterFactory2

    Permalink
  21. def filterToString(filter: Option[Filter]): String

    Permalink
  22. def filterToString(filter: Filter): String

    Permalink
  23. def filtersToString(filters: Seq[Filter]): String

    Permalink
  24. package function

    Permalink
  25. def getAttributeProperty(f: Filter): Option[String]

    Permalink
  26. package index

    Permalink
  27. def isIdFilter(f: Filter): Boolean

    Permalink
  28. def isPrimarySpatialFilter(filter: Filter, sft: SimpleFeatureType): Boolean

    Permalink
  29. def isPrimaryTemporalFilter(f: Filter, sft: SimpleFeatureType): Boolean

    Permalink
  30. def isSpatialFilter(f: Filter): Boolean

    Permalink
  31. def isTemporalFilter(f: Filter, dtg: String): Boolean

    Permalink
  32. def likeEligible(filter: PropertyIsLike): Boolean

    Permalink

    Like queries we can handle with our current index

    Like queries we can handle with our current index

    filter

    filter

  33. def logicDistributionCNF(x: Filter): List[List[Filter]]

    Permalink

    returns

    A List[ List[Filter] ] where the inner List of Filters are to be joined by Ors and the outer list combined by Ands.

  34. def mergeFilters(f1: Filter, f2: Filter): Filter

    Permalink
  35. def orFilters(filters: Seq[Filter])(implicit ff: FilterFactory = ff): Filter

    Permalink
  36. def orOption(filters: Seq[Filter])(implicit ff: FilterFactory = ff): Option[Filter]

    Permalink
  37. def partitionID(filter: Filter): (Seq[Filter], Seq[Filter])

    Permalink
  38. def partitionPrimarySpatials(filters: Seq[Filter], sft: SimpleFeatureType): PartionedFilter

    Permalink
  39. def partitionPrimarySpatials(filter: Filter, sft: SimpleFeatureType): PartionedFilter

    Permalink
  40. def partitionPrimaryTemporals(filters: Seq[Filter], sft: SimpleFeatureType): PartionedFilter

    Permalink
  41. def partitionSubFilters(filter: Filter, filterFilter: (Filter) ⇒ Boolean): PartionedFilter

    Permalink
  42. def rewriteFilterInCNF(filter: Filter)(implicit ff: FilterFactory): Filter

    Permalink

    This function rewrites a org.opengis.filter.Filter in terms of a top-level AND with children filters which 1) do not contain further ANDs, (i.e., ANDs bubble up) 2) only contain at most one OR which is at the top of their 'tree'

    This function rewrites a org.opengis.filter.Filter in terms of a top-level AND with children filters which 1) do not contain further ANDs, (i.e., ANDs bubble up) 2) only contain at most one OR which is at the top of their 'tree'

    Note that this further implies that NOTs have been 'pushed down' and do have not have ANDs nor ORs as children.

    In boolean logic, this form is called conjunctive normal form (CNF).

    The main use case for this function is to aid in splitting filters between a combination of a GeoMesa data store and some other data store. This is done with the AndSplittingFilter class. In the examples below, anything with "XAttr" is assumed to be a filter that CANNOT be answered through GeoMesa. In having a filter split on the AND, the portion of the filter that GeoMesa CAN answer will be applied in GeoMesa, returning a result set, and then the portion that GeoMesa CANNOT answer will be applied on that result set.

    Examples:

    1. ( (GmAttr ILIKE 'test') OR (date BETWEEN '2014-01-01T10:30:00.000Z' AND '2014-01-02T10:30:00.000Z') ) AND (XAttr ILIKE = 'example')

    Converting to CNF will allow easily splitting the filter on the AND into two children

    • one child is the "GmAttr" and "date" filters that can be answered with GeoMesa
    • one child is the "XAttr" filter that cannot be answered by GeoMesa

    In this case, the GeoMesa child filter will be processed first, and then the "XAttr" filter will be processed on the GeoMesa result set to return a subset of the GeoMesa results.

    2. (GmAttr ILIKE 'test') AND ( (date BETWEEN '2014-01-01T10:30:00.000Z' AND '2014-01-02T10:30:00.000Z') OR (XAttr1 ILIKE = 'example1') ) AND (XAttr2 ILIKE = 'example2')

    Converting to CNF still allows easily splitting the filter on the AND into three children

    • one child is the "GmAttr" filter
    • one child is the "date" OR "XAttr1" filter
    • one child is the "XAttr2" filter

    In this case, the "GmAttr" child will be processed first, returning a result set from GeoMesa called RS1. Then, RS1 will be further filtered with the "date" predicate that can be handled by GeoMesa, returning a subset of RS1 called SS1. The additional filter which cannot be answered by GeoMesa, "XAttr1," will be applied to RS1 and return subset SS2. Finally, the final child, the "XAttr2" filter, which cannot be answered by GeoMesa, will be applied to both SS1 and SS2 to return SS3, a JOIN of SS1+SS2 filtered with "XAttr2."

    3. (GmAttr ILIKE 'test') OR (XAttr ILIKE = 'example')

    This is the worst-case-scenario for a query that is answered through two data stores, both GeoMesa and some other store.

    CNF converts this to:

    • one child of "GmAttr" OR "XAttr"

    In this case, the "GmAttr" will return a result set, RS1. The reason this is the worst-case-scenario is because, to answer the "XAttr" portion of the query (which cannot be answered by GeoMesa), a "Filter.INCLUDE" A.K.A a full table scan (on Accumulo) A.K.A. every record in GeoMesa is necessary to find the results that satisfy the "XAttr" portion of the query. This will product result set RS2. The returned results will be a JOIN of RS1+RS2.

    filter

    An arbitrary filter.

    returns

    A filter in CNF (described above).

  43. def rewriteFilterInDNF(filter: Filter)(implicit ff: FilterFactory): Filter

    Permalink

    This function rewrites a org.opengis.filter.Filter in terms of a top-level OR with children filters which 1) do not contain further ORs, (i.e., ORs bubble up) 2) only contain at most one AND which is at the top of their 'tree'

    This function rewrites a org.opengis.filter.Filter in terms of a top-level OR with children filters which 1) do not contain further ORs, (i.e., ORs bubble up) 2) only contain at most one AND which is at the top of their 'tree'

    Note that this further implies that NOTs have been 'pushed down' and do have not have ANDs nor ORs as children.

    In boolean logic, this form is called disjunctive normal form (DNF).

    filter

    An arbitrary filter.

    returns

    A filter in DNF (described above).

  44. package visitor

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped