Class FilterBuilder

java.lang.Object
org.bedework.calfacade.filter.FilterBuilder
All Implemented Interfaces:
org.bedework.util.logging.Logged

public class FilterBuilder extends Object implements org.bedework.util.logging.Logged
This class builds a filter expression given a set of paths. Given one or more paths we create a filter to represent each path. Each path pi will produce an associated filter f-pi. What we return is f-p1 | f-p2 | ... | f-pn A path pi could point directly at an unfiltered collection Ci. The filter then becomes simply that collection. Alternatively that collection might have a filter f-ci. The result is Ci & f-ci We can have a chain of filters on aliases with an eventual target of Ci For example A1 -> A2 -> A3 -> Ci where each A is an alias If each A has a filter f-ai the above gives us Ci & f-a1 & f-a2 & f-a3 For folders we or the resulting filter for each sub-path. The end result is a set of filters applied directly to one or more calendar collections. (C1 & f1) | (C2 & f2) | ... (Cn & fn) It is probable that many of the Ci are the same collection so we should gather all the Ci together. In the one calendar model this would result in C1 & (f1 | f2 | ... | fn) What is less likely, though still possible, is a set of common sub-expressions which can be factored out
Author:
Mike Douglass
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bedework.caldav.util.filter.FilterBase
    buildFilter(String path, boolean applyFilter, boolean explicitSelection)
    Build a filter from the given path.
    org.bedework.util.logging.BwLogger
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.bedework.util.logging.Logged

    audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
  • Constructor Details

  • Method Details

    • buildFilter

      public org.bedework.caldav.util.filter.FilterBase buildFilter(String path, boolean applyFilter, boolean explicitSelection)
      Build a filter from the given path. The applyFilter flag only applies to the root of the tree. The filter may already have been processed by the caller.
      Parameters:
      path -
      applyFilter - applies only to root of tree
      Returns:
      FilterBase or null
    • getLogger

      public org.bedework.util.logging.BwLogger getLogger()
      Specified by:
      getLogger in interface org.bedework.util.logging.Logged