Interface CanonicalUnitQuery

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

public interface CanonicalUnitQuery extends OsidObjectQuery, OsidOperableQuery

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

  • Method Details

    • matchTitle

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

      void matchAnyTitle(boolean match)
      Matches canonical units with any title.
      Parameters:
      match - true to match canonical units with any title, false to match canonical units with no title
      Compliance:
      mandatory - This method must be implemented.
    • clearTitleTerms

      void clearTitleTerms()
      Clears all title terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCode

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

      void matchAnyCode(boolean match)
      Matches canonical units with any code.
      Parameters:
      match - true to match canonical units with any code, false to match canonical units with no code
      Compliance:
      mandatory - This method must be implemented.
    • clearCodeTerms

      void clearCodeTerms()
      Clears all code terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchOfferedCyclicTimePeriodId

      void matchOfferedCyclicTimePeriodId(Id cyclicTimePeriodId, boolean match)
      Sets the cyclic time period Id for this query.
      Parameters:
      cyclicTimePeriodId - a cyclic time period Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - cyclicTimePeriodId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearOfferedCyclicTimePeriodIdTerms

      void clearOfferedCyclicTimePeriodIdTerms()
      Clears all offered cyclic time period Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsOfferedCyclicTimePeriodQuery

      boolean supportsOfferedCyclicTimePeriodQuery()
      Tests if a CyclicTimePeriodQuery is available.
      Returns:
      true if a cyclic time period query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getOfferedCyclicTimePeriodQuery

      CyclicTimePeriodQuery getOfferedCyclicTimePeriodQuery()
      Gets the query for a cyclic period query. Multiple retrievals produce a nested OR term.
      Returns:
      the cyclic time period query
      Throws:
      UnimplementedException - supportsOfferedCyclicTimePeriodQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsOfferedCyclicTimePeriodQuery()} is {@code true} .
    • matchAnyOfferedCyclicTimePeriod

      void matchAnyOfferedCyclicTimePeriod(boolean match)
      Matches canonicals that have any cyclic time period.
      Parameters:
      match - true to match canonicals with any cyclic time period, false to match canonicals with no cyclic time periods
      Compliance:
      mandatory - This method must be implemented.
    • clearOfferedCyclicTimePeriodTerms

      void clearOfferedCyclicTimePeriodTerms()
      Clears all cyclic time period terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchResultOptionId

      void matchResultOptionId(Id gradeSystemId, boolean match)
      Sets the grade system Id for this query.
      Parameters:
      gradeSystemId - a grade system Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - gradeSystemId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearResultOptionIdTerms

      void clearResultOptionIdTerms()
      Clears the grade system Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsResultOptionQuery

      boolean supportsResultOptionQuery()
      Tests if a GradeSystemQuery is available.
      Returns:
      true if a grade system query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getResultOptionQuery

      GradeSystemQuery getResultOptionQuery()
      Gets the query for a grading option. Multiple retrievals produce a nested OR term.
      Returns:
      a grade system query
      Throws:
      UnimplementedException - supportsResultOptionQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsGradingOptionQuery()} is {@code true} .
    • matchAnyResultOption

      void matchAnyResultOption(boolean match)
      Matches canonicals that have any grading option.
      Parameters:
      match - true to match canonicals with any grading option, false to match canonicals with no grading options
      Compliance:
      mandatory - This method must be implemented.
    • clearResultOptionTerms

      void clearResultOptionTerms()
      Clears the grading option terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSponsorId

      void matchSponsorId(Id resourceId, boolean match)
      Sets the resource Id for this query to match canonicals that have a sponsor.
      Parameters:
      resourceId - a resource Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - resourceId 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 ResourceQuery is available.
      Returns:
      true if a resource 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:
      a resource query
      Throws:
      UnimplementedException - supportsSponsorQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSponsorQuery()} is {@code true} .
    • matchAnySponsor

      void matchAnySponsor(boolean match)
      Matches canonicals that have any sponsor.
      Parameters:
      match - true to match canonicals with any sponsor, false to match canonicals with no sponsors
      Compliance:
      mandatory - This method must be implemented.
    • clearSponsorTerms

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

      void matchCatalogueId(Id catalogueId, boolean match)
      Sets the catalogue Id for this query to match canonical units assigned to catalogues.
      Parameters:
      catalogueId - a catalogue Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - catalogueId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCatalogueIdTerms

      void clearCatalogueIdTerms()
      Clears all catalogue Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCatalogueQuery

      boolean supportsCatalogueQuery()
      Tests if a CatalogueQuery is available.
      Returns:
      true if a catalogue query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCatalogueQuery

      CatalogueQuery getCatalogueQuery()
      Gets the query for a catalogue query. Multiple retrievals produce a nested OR term.
      Returns:
      the catalogue query
      Throws:
      UnimplementedException - supportsCatalogueQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCatalogueQuery()} is {@code true} .
    • clearCatalogueTerms

      void clearCatalogueTerms()
      Clears all catalogue terms.
      Compliance:
      mandatory - This method must be implemented.
    • getCanonicalUnitQueryRecord

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