Interface TermQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidFederateableQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, Suppliable

public interface TermQuery extends OsidObjectQuery, OsidFederateableQuery

This is the query for searching terms. Each method match specifies an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchDisplayLabel

      void matchDisplayLabel(String label, Type stringMatchType, boolean match)
      Adds a display label for this query.
      Parameters:
      label - label string to match
      stringMatchType - the label match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - label not of stringMatchType
      NullArgumentException - label or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyDisplayLabel

      void matchAnyDisplayLabel(boolean match)
      Matches a display label that has any value.
      Parameters:
      match - true to match courses with any label, false to match assets with no title
      Compliance:
      mandatory - This method must be implemented.
    • clearDisplayLabelTerms

      void clearDisplayLabelTerms()
      Clears the display label query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchOpenDate

      void matchOpenDate(DateTime low, DateTime high, boolean match)
      Matches the open date between the given range inclusive.
      Parameters:
      low - low date range
      high - high date range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyOpenDate

      void matchAnyOpenDate(boolean match)
      Matches a term that has any open date assigned.
      Parameters:
      match - true to match terms with any open date, false to match terms with no open date
      Compliance:
      mandatory - This method must be implemented.
    • clearOpenDateTerms

      void clearOpenDateTerms()
      Clears the open date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRegistrationStart

      void matchRegistrationStart(DateTime low, DateTime high, boolean match)
      Matches the registration start date between the given range inclusive.
      Parameters:
      low - low date range
      high - high date range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyRegistrationStart

      void matchAnyRegistrationStart(boolean match)
      Matches a term that has any registration start date assigned.
      Parameters:
      match - true to match terms with any registration start date, false to match terms with no registration start date
      Compliance:
      mandatory - This method must be implemented.
    • clearRegistrationStartTerms

      void clearRegistrationStartTerms()
      Clears the registration start date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRegistrationEnd

      void matchRegistrationEnd(DateTime low, DateTime high, boolean match)
      Matches the registration end date between the given range inclusive.
      Parameters:
      low - low date range
      high - high date range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyRegistrationEnd

      void matchAnyRegistrationEnd(boolean match)
      Matches a term that has any registration end date assigned.
      Parameters:
      match - true to match terms with any registration end date, false to match terms with no registration end date
      Compliance:
      mandatory - This method must be implemented.
    • clearRegistrationEndTerms

      void clearRegistrationEndTerms()
      Clears the registration end date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRegistrationPeriod

      void matchRegistrationPeriod(DateTime date, boolean match)
      Matches the registration period that incudes the given date.
      Parameters:
      date - a date
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearRegistrationPeriodTerms

      void clearRegistrationPeriodTerms()
      Clears the registration period query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRegistrationDuration

      void matchRegistrationDuration(Duration low, Duration high, boolean match)
      Matches the registration period 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
      Compliance:
      mandatory - This method must be implemented.
    • clearRegistrationDurationTerms

      void clearRegistrationDurationTerms()
      Clears the registration period duration query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchClassesStart

      void matchClassesStart(DateTime low, DateTime high, boolean match)
      Matches the class start date between the given range inclusive.
      Parameters:
      low - low date range
      high - high date range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyClassesStart

      void matchAnyClassesStart(boolean match)
      Matches a term that has any class start date assigned.
      Parameters:
      match - true to match terms with any class start date, false to match terms with no class start date
      Compliance:
      mandatory - This method must be implemented.
    • clearClassesStartTerms

      void clearClassesStartTerms()
      Clears the class start date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchClassesEnd

      void matchClassesEnd(DateTime low, DateTime high, boolean match)
      Matches the class end date between the given range inclusive.
      Parameters:
      low - low date range
      high - high date range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyClassesEnd

      void matchAnyClassesEnd(boolean match)
      Matches a term that has any class end date assigned.
      Parameters:
      match - true to match terms with any class end date, false to match terms with no class end date
      Compliance:
      mandatory - This method must be implemented.
    • clearClassesEndTerms

      void clearClassesEndTerms()
      Clears the class end date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchClassesPeriod

      void matchClassesPeriod(DateTime date, boolean match)
      Matches the class period that incudes the given date.
      Parameters:
      date - a date
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearClassesPeriodTerms

      void clearClassesPeriodTerms()
      Clears the class period query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchClassesDuration

      void matchClassesDuration(Duration low, Duration high, boolean match)
      Matches the classes period 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
      Compliance:
      mandatory - This method must be implemented.
    • clearClassesDurationTerms

      void clearClassesDurationTerms()
      Clears the classes period duration query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAddDate

      void matchAddDate(DateTime low, DateTime high, boolean match)
      Matches the add date between the given range inclusive.
      Parameters:
      low - low date range
      high - high date range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyAddDate

      void matchAnyAddDate(boolean match)
      Matches a term that has any add date assigned.
      Parameters:
      match - true to match terms with any add date, false to match terms with no add/drop date
      Compliance:
      mandatory - This method must be implemented.
    • clearAddDateTerms

      void clearAddDateTerms()
      Clears the add date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDropDate

      void matchDropDate(DateTime low, DateTime high, boolean match)
      Matches the drop date between the given range inclusive.
      Parameters:
      low - low date range
      high - high date range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyDropDate

      void matchAnyDropDate(boolean match)
      Matches a term that has any drop date assigned.
      Parameters:
      match - true to match terms with any drop date, false to match terms with no add/drop date
      Compliance:
      mandatory - This method must be implemented.
    • clearDropDateTerms

      void clearDropDateTerms()
      Clears the drop date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchFinalExamStart

      void matchFinalExamStart(DateTime low, DateTime high, boolean match)
      Matches the final exam period start date between the given range inclusive.
      Parameters:
      low - low date range
      high - high date range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyFinalExamStart

      void matchAnyFinalExamStart(boolean match)
      Matches a term that has any final exam period start date assigned.
      Parameters:
      match - true to match terms with any final exam start date, false to match terms with no final exam start date
      Compliance:
      mandatory - This method must be implemented.
    • clearFinalExamStartTerms

      void clearFinalExamStartTerms()
      Clears the final exam start date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchFinalExamEnd

      void matchFinalExamEnd(DateTime low, DateTime high, boolean match)
      Matches the final exam period end date between the given range inclusive.
      Parameters:
      low - low date range
      high - high date range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyFinalExamEnd

      void matchAnyFinalExamEnd(boolean match)
      Matches a term that has any final exam period end date assigned.
      Parameters:
      match - true to match terms with any final exam end date, false to match terms with no final exam end date
      Compliance:
      mandatory - This method must be implemented.
    • clearFinalExamEndTerms

      void clearFinalExamEndTerms()
      Clears the final exam period end date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchFinalExamPeriod

      void matchFinalExamPeriod(DateTime date, boolean match)
      Matches the final exam period that incudes the given date.
      Parameters:
      date - a date
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearFinalExamPeriodTerms

      void clearFinalExamPeriodTerms()
      Clears the final exam period query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchFinalExamDuration

      void matchFinalExamDuration(Duration low, Duration high, boolean match)
      Matches the final exam period 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
      Compliance:
      mandatory - This method must be implemented.
    • clearFinalExamDurationTerms

      void clearFinalExamDurationTerms()
      Clears the final exam period duration query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCloseDate

      void matchCloseDate(DateTime low, DateTime high, boolean match)
      Matches the close date between the given range inclusive.
      Parameters:
      low - low date range
      high - high date range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - high is less than low
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyCloseDate

      void matchAnyCloseDate(boolean match)
      Matches a term that has any close date assigned.
      Parameters:
      match - true to match terms with any close date, false to match terms with no close date
      Compliance:
      mandatory - This method must be implemented.
    • clearCloseDateTerms

      void clearCloseDateTerms()
      Clears the close date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorTermId

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

      void clearAncestorTermIdTerms()
      Clears the ancestor term Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorTermQuery

      boolean supportsAncestorTermQuery()
      Tests if a TermQuery is available.
      Returns:
      true if a termency query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorTermQuery

      TermQuery getAncestorTermQuery()
      Gets the query for a term. Multiple retrievals produce a nested OR term.
      Returns:
      the term query
      Throws:
      UnimplementedException - supportsAncestorTermQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorTermQuery()} is {@code true} .
    • matchAnyAncestorTerm

      void matchAnyAncestorTerm(boolean match)
      Matches terms with any ancestor.
      Parameters:
      match - true to match terms with any ancestor, false to match root terms
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorTermTerms

      void clearAncestorTermTerms()
      Clears the ancestor term query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantTermId

      void matchDescendantTermId(Id termId, boolean match)
      Sets the term Id for this query to match terms that have the specified term as a descendant.
      Parameters:
      termId - a term Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - termId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantTermIdTerms

      void clearDescendantTermIdTerms()
      Clears the descendant term Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantTermQuery

      boolean supportsDescendantTermQuery()
      Tests if a TermQuery is available.
      Returns:
      true if a termency query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantTermQuery

      TermQuery getDescendantTermQuery()
      Gets the query for a term. Multiple retrievals produce a nested OR term.
      Returns:
      the term query
      Throws:
      UnimplementedException - supportsDescendantTermQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantTermQuery()} is {@code true} .
    • matchAnyDescendantTerm

      void matchAnyDescendantTerm(boolean match)
      Matches terms with any descendant.
      Parameters:
      match - true to match terms with any Ddscendant, false to match leaf terms
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantTermTerms

      void clearDescendantTermTerms()
      Clears the descendant term query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCourseOfferingId

      void matchCourseOfferingId(Id courseOfferingId, boolean match)
      Sets the course offering Id for this query to match terms assigned to course offerings.
      Parameters:
      courseOfferingId - the course offering Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - courseOfferingId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCourseOfferingIdTerms

      void clearCourseOfferingIdTerms()
      Clears the course offering Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCourseOfferingQuery

      boolean supportsCourseOfferingQuery()
      Tests if a CourseOfferingQuery is available.
      Returns:
      true if a course offering query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCourseOfferingQuery

      CourseOfferingQuery getCourseOfferingQuery()
      Gets the query for a course offering. Multiple retrievals produce a nested OR term.
      Returns:
      the course offering query
      Throws:
      UnimplementedException - supportsCourseOfferingQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCourseOfferingQuery()} is {@code true} .
    • matchAnyCourseOffering

      void matchAnyCourseOffering(boolean match)
      Matches courses that have any course offering.
      Parameters:
      match - true to match terms with any course offering, false to match terms with no course offerings
      Compliance:
      mandatory - This method must be implemented.
    • clearCourseOfferingTerms

      void clearCourseOfferingTerms()
      Clears the course offering query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCourseCatalogId

      void matchCourseCatalogId(Id courseCatalogId, boolean match)
      Sets the course catalog Id for this query to match terms assigned to course catalogs.
      Parameters:
      courseCatalogId - the course catalog Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - courseCatalogId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCourseCatalogIdTerms

      void clearCourseCatalogIdTerms()
      Clears the course catalog Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCourseCatalogQuery

      boolean supportsCourseCatalogQuery()
      Tests if a CourseCatalogQuery is available.
      Returns:
      true if a course catalog query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCourseCatalogQuery

      CourseCatalogQuery getCourseCatalogQuery()
      Gets the query for a course catalog. Multiple retrievals produce a nested OR term.
      Returns:
      the course catalog query
      Throws:
      UnimplementedException - supportsCourseCatalogQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCourseCatalogQuery()} is {@code true} .
    • clearCourseCatalogTerms

      void clearCourseCatalogTerms()
      Clears the course catalog query terms.
      Compliance:
      mandatory - This method must be implemented.
    • getTermQueryRecord

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