Interface EventQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidContainableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidTemporalQuery, Suppliable

public interface EventQuery extends OsidObjectQuery, OsidTemporalQuery, OsidContainableQuery

This is the query for searching events. Each method match request produces an AND term while multiple invocations of a method produces a nested OR .

  • Method Details

    • matchImplicit

      void matchImplicit(boolean match)
      Matches an event that is implicitly generated.
      Parameters:
      match - true to match events implicitly generated, false to match events explicitly defined
      Compliance:
      mandatory - This method must be implemented.
    • clearImplicitTerms

      void clearImplicitTerms()
      Clears the implcit terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDuration

      void matchDuration(Duration low, Duration high, boolean match)
      Matches the event duration between the given range inclusive.
      Parameters:
      low - low duration range
      high - high duration range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      NullArgumentException - high or low is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyDuration

      void matchAnyDuration(boolean match)
      Matches an event that has any duration.
      Parameters:
      match - true to match events with any duration, false to match events with no start time
      Compliance:
      mandatory - This method must be implemented.
    • clearDurationTerms

      void clearDurationTerms()
      Clears the duration terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRecurringEventId

      void matchRecurringEventId(Id recurringEventId, boolean match)
      Matches events that related to the recurring event.
      Parameters:
      recurringEventId - an Id for a recurring event
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - recurringEventId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearRecurringEventIdTerms

      void clearRecurringEventIdTerms()
      Clears the recurring event terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsRecurringEventQuery

      boolean supportsRecurringEventQuery()
      Tests if a RecurringEventQuery is available for querying recurring events.
      Returns:
      true if a recurring event query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRecurringEventQuery

      RecurringEventQuery getRecurringEventQuery()
      Gets the query for a recurring event. Multiple retrievals produce a nested OR term.
      Returns:
      the recurring event query
      Throws:
      UnimplementedException - supportsRecurringEventQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsRecurringEventQuery()} is {@code true} .
    • matchAnyRecurringEvent

      void matchAnyRecurringEvent(boolean match)
      Matches an event that is part of any recurring event.
      Parameters:
      match - true to match events part of any recurring event, false to match only standalone events
      Compliance:
      mandatory - This method must be implemented.
    • clearRecurringEventTerms

      void clearRecurringEventTerms()
      Clears the recurring event terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSupersedingEventId

      void matchSupersedingEventId(Id supersedingEventId, boolean match)
      Matches events that relate to the superseding event.
      Parameters:
      supersedingEventId - an Id for a superseding event
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearSupersedingEventIdTerms

      void clearSupersedingEventIdTerms()
      Clears the superseding events type terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSupersedingEventQuery

      boolean supportsSupersedingEventQuery()
      Tests if a SupersedingEventQuery is available for querying offset events.
      Returns:
      true if a superseding event query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSupersedingEventQuery

      SupersedingEventQuery getSupersedingEventQuery()
      Gets the query for a superseding event. Multiple retrievals produce a nested OR term.
      Returns:
      the superseding event query
      Throws:
      UnimplementedException - supportsSupersedingEventQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSupersedingEventQuery()} is {@code true} .
    • matchAnySupersedingEvent

      void matchAnySupersedingEvent(boolean match)
      Matches any superseding event.
      Parameters:
      match - true to match any superseding events, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • clearSupersedingEventTerms

      void clearSupersedingEventTerms()
      Clears the superseding event terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchOffsetEventId

      void matchOffsetEventId(Id offsetEventId, boolean match)
      Matches events that relates to the offset event.
      Parameters:
      offsetEventId - an Id for an offset event
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearOffsetEventIdTerms

      void clearOffsetEventIdTerms()
      Clears the recurring events type terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsOffsetEventQuery

      boolean supportsOffsetEventQuery()
      Tests if an OffsetEventQuery is available for querying offset events.
      Returns:
      true if an offset event query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getOffsetEventQuery

      OffsetEventQuery getOffsetEventQuery()
      Gets the query for an offset event. Multiple retrievals produce a nested OR term.
      Returns:
      the offset event query
      Throws:
      UnimplementedException - supportsOffsetEventQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsOffsetEventQuery()} is {@code true} .
    • matchAnyOffsetEvent

      void matchAnyOffsetEvent(boolean match)
      Matches any offset event.
      Parameters:
      match - true to match any offset events, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • clearOffsetEventTerms

      void clearOffsetEventTerms()
      Clears the offset event terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchLocationDescription

      void matchLocationDescription(String location, Type stringMatchType, boolean match)
      Matches the location description string.
      Parameters:
      location - location string
      stringMatchType - string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - location is not of stringMatchType
      NullArgumentException - location or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyLocationDescription

      void matchAnyLocationDescription(boolean match)
      Matches an event that has any location description assigned.
      Parameters:
      match - true to match events with any location description, false to match events with no location description
      Compliance:
      mandatory - This method must be implemented.
    • clearLocationDescriptionTerms

      void clearLocationDescriptionTerms()
      Clears the location description terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchLocationId

      void matchLocationId(Id locationId, boolean match)
      Sets the location Id for this query.
      Parameters:
      locationId - a location Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - locationId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearLocationIdTerms

      void clearLocationIdTerms()
      Clears the location Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsLocationQuery

      boolean supportsLocationQuery()
      Tests if a LocationQuery is available for querying locations.
      Returns:
      true if a location query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getLocationQuery

      LocationQuery getLocationQuery()
      Gets the query for a location. Multiple retrievals produce a nested OR term.
      Returns:
      the location query
      Throws:
      UnimplementedException - supportsLocationQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsLocationQuery()} is {@code true} .
    • matchAnyLocation

      void matchAnyLocation(boolean match)
      Matches an event that has any location assigned.
      Parameters:
      match - true to match events with any location, false to match events with no location
      Compliance:
      mandatory - This method must be implemented.
    • clearLocationTerms

      void clearLocationTerms()
      Clears the location terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSponsorId

      void matchSponsorId(Id sponsorId, boolean match)
      Sets the sponsor Id for this query.
      Parameters:
      sponsorId - a sponsor Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - sponsorId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSponsorIdTerms

      void clearSponsorIdTerms()
      Clears the sponsor Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSponsorQuery

      boolean supportsSponsorQuery()
      Tests if a LocationQuery is available for querying sponsors.
      Returns:
      true if a sponsor query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSponsorQuery

      ResourceQuery getSponsorQuery()
      Gets the query for a sponsor. Multiple retrievals produce a nested OR term.
      Returns:
      the sponsor query
      Throws:
      UnimplementedException - supportsSponsorQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSponsorQuery()} is {@code true} .
    • clearSponsorTerms

      void clearSponsorTerms()
      Clears the sponsor terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCoordinate

      void matchCoordinate(Coordinate coordinate, boolean match)
      Matches events whose locations contain the given coordinate.
      Parameters:
      coordinate - a coordinate
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - coordinate is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCoordinateTerms

      void clearCoordinateTerms()
      Clears the cooordinate terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSpatialUnit

      void matchSpatialUnit(SpatialUnit spatialUnit, boolean match)
      Matches events whose locations fall within the given spatial unit.
      Parameters:
      spatialUnit - a spatial unit
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - spatialUnit is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSpatialUnitTerms

      void clearSpatialUnitTerms()
      Clears the spatial unit terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCommitmentId

      void matchCommitmentId(Id commitmentId, boolean match)
      Sets the commitment Id for this query.
      Parameters:
      commitmentId - a commitment Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - commitmentId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCommitmentIdTerms

      void clearCommitmentIdTerms()
      Clears the commitment Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCommitmentQuery

      boolean supportsCommitmentQuery()
      Tests if a CommitmentQuery is available for querying recurring event terms.
      Returns:
      true if a commitment query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCommitmentQuery

      CommitmentQuery getCommitmentQuery()
      Gets the query for a commitment. Multiple retrievals produce a nested OR term.
      Returns:
      the commitment query
      Throws:
      UnimplementedException - supportsCommitmentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCommitmentQuery()} is {@code true} .
    • matchAnyCommitment

      void matchAnyCommitment(boolean match)
      Matches an event that has any commitment.
      Parameters:
      match - true to match events with any commitment, false to match events with no commitments
      Compliance:
      mandatory - This method must be implemented.
    • clearCommitmentTerms

      void clearCommitmentTerms()
      Clears the commitment terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchContainingEventId

      void matchContainingEventId(Id eventId, boolean match)
      Sets the event Id for this query to match events that have the specified event as an ancestor.
      Parameters:
      eventId - an event Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - eventId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearContainingEventIdTerms

      void clearContainingEventIdTerms()
      Clears the containing event Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsContainingEventQuery

      boolean supportsContainingEventQuery()
      Tests if a containing event query is available.
      Returns:
      true if a containing event query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getContainingEventQuery

      EventQuery getContainingEventQuery()
      Gets the query for a containing event.
      Returns:
      the containing event query
      Throws:
      UnimplementedException - supportsContainingEventQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsContainingEventQuery()} is {@code true} .
    • matchAnyContainingEvent

      void matchAnyContainingEvent(boolean match)
      Matches events with any ancestor event.
      Parameters:
      match - true to match events with any ancestor event, false to match events with no ancestor events
      Compliance:
      mandatory - This method must be implemented.
    • clearContainingEventTerms

      void clearContainingEventTerms()
      Clears the containing event terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCalendarId

      void matchCalendarId(Id calendarId, boolean match)
      Sets the calendar Id for this query.
      Parameters:
      calendarId - a calendar Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - calendarId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCalendarIdTerms

      void clearCalendarIdTerms()
      Clears the calendar Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCalendarQuery

      boolean supportsCalendarQuery()
      Tests if a CalendarQuery is available for querying calendars.
      Returns:
      true if a calendar query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCalendarQuery

      CalendarQuery getCalendarQuery()
      Gets the query for a calendar. Multiple retrievals produce a nested OR term.
      Returns:
      the calendar query
      Throws:
      UnimplementedException - supportsCalendarQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCalendarQuery()} is {@code true} .
    • clearCalendarTerms

      void clearCalendarTerms()
      Clears the calendar terms.
      Compliance:
      mandatory - This method must be implemented.
    • getEventQueryRecord

      EventQueryRecord getEventQueryRecord(Type eventRecordType) throws OperationFailedException
      Gets the event query record corresponding to the given Event record Type .Multiple retrievals produce a nested OR term.
      Parameters:
      eventRecordType - an event query record type
      Returns:
      the event query record
      Throws:
      NullArgumentException - eventRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(eventRecordType) is false
      Compliance:
      mandatory - This method must be implemented.