BMLTiOSLibSearchCriteria

public class BMLTiOSLibSearchCriteria : NSObject

This is a special class that is used to gather and process meeting search criteria.

The way it works, is that it gathers a search state, then creates a URI parameter list to be used by the main communication module. It does not do any communication, in itself.

It has been designed so that the search criteria are expressed as properties, instead of functions.

In order to execute searches, the user should access the instance of this class, and use it to set up search criteria. Upon completion of this, they should call the main instance’s performMeetingSearch(_:) method. The main instance will ask the Search Criteria instance to create a URI parameter list that will describe the search.

Public Typealiases

Public Enums

  • These are the available selection states for Search Criteria.

    See more

    Declaration

    Swift

    public enum SelectionState : Int
  • This enum specifies what kind of results we want from the search.

    See more

    Declaration

    Swift

    public enum SearchCriteriaExtent
  • This only applies when we are logged in as an admin. We can search for published, unpublished, or both kinds of meetings. Additionally, this only applies to meetings that are under the logged-in admin’s control. Meetings outside their control will always only show published meetings.

    See more

    Declaration

    Swift

    public enum SearchCriteriaPublishedStatus
  • This is used to index our weekday list.

    See more

    Declaration

    Swift

    public enum WeekdayIndex : Int

Public Calculated Properties

  • Accessor for our internal Published Status.

    Declaration

    Swift

    public var publishedStatus: SearchCriteriaPublishedStatus { get set }

    Return Value

    whether we want published, unpublished, or both.

  • Accessor for our internal Service body list.

    Declaration

    Swift

    public var serviceBodies: SelectableServiceBodyList { get }

    Return Value

    the selected/unselected Service bodies, in a linear list.

  • Accessor for our internal format list.

    Declaration

    Swift

    public var formats: SelectableFormatList { get }

    Return Value

    The selected/unselected formats.

  • Accessor for our internal weekday list.

    Declaration

    Swift

    public var weekdays: SelectableWeekdayDictionary { get set }
  • Accessor for our internal search radius value.

    Declaration

    Swift

    public var searchRadius: Float { get set }

    Return Value

    the search radius. negative integer values are auto-search thresholds. Positive floating point is dependent upon the measurement units selected by the user.

  • Accessor for our internal Search String.

    Declaration

    Swift

    public var searchString: String { get set }

    Return Value

    the string we are looking for.

  • Accessor for our internal Search String Is a Location selector.

    NOTE: If this is specified, and a string is provided in searchString, then searchLocation is ignored.

    Declaration

    Swift

    public var searchStringIsALocation: Bool { get set }

    Return Value

    true, if the string is to be interpreted as a location.

  • Accessor for our internal Search String is Exact selector

    Declaration

    Swift

    public var stringSearchIsExact: Bool { get set }

    Return Value

    true, if the string should be parsed strictly (no metaphone).

  • Accessor for our internal Search String Uses all Substrings selector

    Declaration

    Swift

    public var stringSearchUsesAllStrings: Bool { get set }

    Return Value

    true, if the match needs to go across all strings.

  • Accessor for our internal center location selector.

    NOTE: This is ignored if searchStringIsALocation is true, and we have a search string in searchString.

    Declaration

    Swift

    public var searchLocation: CLLocationCoordinate2D! { get set }

    Return Value

    the search center, as a Location manager 2D coordinate.

  • Accessor for our internal specific field value search criteria.

    Declaration

    Swift

    public var specificFieldSearch: SpecificFieldValueTuple? { get set }

    Return Value

    an optional tuple, with the various field criteria, or nil

  • Accessor for our internal start time (in seconds from midnight -00:00:00) search criteria. This is an inclusive time, and includes 24:00:00 (end of day midnight).

    Declaration

    Swift

    public var startTimeInSeconds: Int? { get set }

    Return Value

    an optional int, with seconds from Midnight, or nil

  • Accessor for our internal meeting end time (in seconds from midnight -00:00:00) search criteria. This is an inclusive time, and includes 24:00:00 (end of day midnight).

    Declaration

    Swift

    public var endTimeInSeconds: Int? { get set }

    Return Value

    an optional int, with seconds from Midnight, or nil

  • Accessor for our internal duration (in seconds) search criteria.

    Declaration

    Swift

    public var durationTimeInSeconds: Int? { get set }

    Return Value

    an optional int, with seconds, or nil

  • Accessor for our internal meetings should begin before (or at) start time flag.

    Declaration

    Swift

    public var meetingsStartBeforeStartTime: Bool { get set }

    Return Value

    a Bool, true if the meeting should start before or on the start time, or false, if the meeting is to start at or after the start time.

  • Accessor for our internal meetings should be shorter than the duration flag.

    Declaration

    Swift

    public var meetingsAreShorterThanDuration: Bool { get set }

    Return Value

    a Bool, true if the meeting should be shorter than (or equal to) the duration time, or false, if the meeting is equal to, or longer than, the duration.

  • An easy way to test or set a minimum starting time for meetings.

    Declaration

    Swift

    public var meetingsShouldStartAtOrAfter: NSDateComponents? { get set }

    Return Value

    an optional NSDateComponents. If not nil, will contain the minimum start time for meetings.

  • An easy way to test or set a maximum starting time for meetings.

    Declaration

    Swift

    public var meetingsShouldStartBeforeOrAt: NSDateComponents? { get set }

    Return Value

    an optional NSDateComponents. If not nil, will contain the maximum start time for meetings.

  • An easy way to test or set a minimum duration time for meetings.

    Declaration

    Swift

    public var meetingsAreAtLeast: NSDateComponents? { get set }

    Return Value

    an optional NSDateComponents. If not nil, will contain the minimum duration for meetings.

  • An easy way to test or set a maximum duration time for meetings.

    Declaration

    Swift

    public var meetingsAreNoLongerThan: NSDateComponents? { get set }

    Return Value

    an optional NSDateComponents. If not nil, will contain the maximum duration for meetings.

  • An easy way to test or set a maximum end time for meetings.

    Declaration

    Swift

    public var meetingsEndOnOrBefore: NSDateComponents? { get set }

    Return Value

    an optional NSDateComponents. If not nil, will contain the maximum end time for meetings.

  • Declaration

    Swift

    public var isDirty: Bool { get }

    Return Value

    true, if there is a search criteria set.

  • Declaration

    Swift

    public var specificFieldFilter: [String] { get set }

    Return Value

    An Array of String. Each element is a specific field that should be returned in the query. Empty, means return all fields.

Public Initializer

  • Default initializer. We must have at least the server comm.

    Declaration

    Swift

    public init(_ inServerComm: BMLTiOSLib)

    Parameters

    inServerComm

    This is a reference to the BMLTiOSLib instance that “owns” this.

Public Instance Methods

  • Make sure we completely deallocate our selectable lists.

    Declaration

    Swift

    public func clearStorage()
  • This resets all search criteria to default.

    Declaration

    Swift

    public func clearAll()
  • This returns the selection object for a given Service body object.

    Declaration

    Swift

    public func getServiceBodyElementFromServiceBodyObject(_ inObject: BMLTiOSLibHierarchicalServiceBodyNode) -> SelectableServiceBodyItem!

    Parameters

    inObject

    The Service body object we are matching.

    Return Value

    the wrapper item for that Service body object.

  • This tells our BMLTiOSLib instance to perform a meeting search, based on our current criteria.

    Declaration

    Swift

    public func performMeetingSearch(_ inSearchResultsType: BMLTiOSLibSearchCriteria.SearchCriteriaExtent = .BothMeetingsAndFormats)

    Parameters

    inSearchResultsType

    The type of result[s] you’d like. Defaults to both meetings and formats.