Interface ItemQuery

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

public interface ItemQuery extends OsidObjectQuery, OsidAggregateableQuery

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

  • Method Details

    • matchLearningObjectiveId

      void matchLearningObjectiveId(Id objectiveId, boolean match)
      Sets the learning objective Id for this query.
      Parameters:
      objectiveId - a learning objective Id
      match - true for a positive match, false for negative match
      Throws:
      NullArgumentException - objectiveId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearLearningObjectiveIdTerms

      void clearLearningObjectiveIdTerms()
      Clears all learning objective Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsLearningObjectiveQuery

      boolean supportsLearningObjectiveQuery()
      Tests if an ObjectiveQuery is available.
      Returns:
      true if a learning objective query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getLearningObjectiveQuery

      ObjectiveQuery getLearningObjectiveQuery()
      Gets the query for a learning objective. Multiple retrievals produce a nested OR term.
      Returns:
      the learning objective query
      Throws:
      UnimplementedException - supportsLearningObjectiveQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsLearningObjectiveQuery()} is {@code true} .
    • matchAnyLearningObjective

      void matchAnyLearningObjective(boolean match)
      Matches an item with any objective.
      Parameters:
      match - true to match items with any learning objective, false to match items with no learning objectives
      Compliance:
      mandatory - This method must be implemented.
    • clearLearningObjectiveTerms

      void clearLearningObjectiveTerms()
      Clears all learning objective terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchQuestionId

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

      void clearQuestionIdTerms()
      Clears all question Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsQuestionQuery

      boolean supportsQuestionQuery()
      Tests if a QuestionQuery is available.
      Returns:
      true if a question query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getQuestionQuery

      QuestionQuery getQuestionQuery()
      Gets the query for a question. Multiple retrievals produce a nested OR term.
      Returns:
      the question query
      Throws:
      UnimplementedException - supportsQuestionQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsLearningObjectiveQuery()} is {@code true} .
    • matchAnyQuestion

      void matchAnyQuestion(boolean match)
      Matches an item with any question.
      Parameters:
      match - true to match items with any question, false to match items with no questions
      Compliance:
      mandatory - This method must be implemented.
    • clearQuestionTerms

      void clearQuestionTerms()
      Clears all question terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAnswerId

      void matchAnswerId(Id answerId, boolean match)
      Sets the answer Id for this query.
      Parameters:
      answerId - an answer Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - answerId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAnswerIdTerms

      void clearAnswerIdTerms()
      Clears all answer Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAnswerQuery

      boolean supportsAnswerQuery()
      Tests if an AnswerQuery is available.
      Returns:
      true if an answer query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAnswerQuery

      AnswerQuery getAnswerQuery()
      Gets the query for an answer. Multiple retrievals produce a nested OR term.
      Returns:
      the answer query
      Throws:
      UnimplementedException - supportsAnswerQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsLearningObjectiveQuery()} is {@code true} .
    • matchAnyAnswer

      void matchAnyAnswer(boolean match)
      Matches an item with any answer.
      Parameters:
      match - true to match items with any answer, false to match items with no answers
      Compliance:
      mandatory - This method must be implemented.
    • clearAnswerTerms

      void clearAnswerTerms()
      Clears all answer terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAssessmentId

      void matchAssessmentId(Id assessmentId, boolean match)
      Sets the assessment Id for this query.
      Parameters:
      assessmentId - an assessment Id
      match - true for a positive match, false for negative match
      Throws:
      NullArgumentException - assessmentId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAssessmentIdTerms

      void clearAssessmentIdTerms()
      Clears all assessment Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAssessmentQuery

      boolean supportsAssessmentQuery()
      Tests if an AssessmentQuery is available.
      Returns:
      true if an assessment query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentQuery

      AssessmentQuery getAssessmentQuery()
      Gets the query for an assessment. Multiple retrievals produce a nested OR term.
      Returns:
      the assessment query
      Throws:
      UnimplementedException - supportsAssessmentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAssessmentQuery()} is {@code true} .
    • matchAnyAssessment

      void matchAnyAssessment(boolean match)
      Matches an item with any assessment.
      Parameters:
      match - true to match items with any assessment, false to match items with no assessments
      Compliance:
      mandatory - This method must be implemented.
    • clearAssessmentTerms

      void clearAssessmentTerms()
      Clears all assessment terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchBankId

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

      void clearBankIdTerms()
      Clears all bank Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsBankQuery

      boolean supportsBankQuery()
      Tests if a BankQuery is available.
      Returns:
      true if a bank query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getBankQuery

      BankQuery getBankQuery()
      Gets the query for a bank. Multiple retrievals produce a nested OR term.
      Returns:
      the bank query
      Throws:
      UnimplementedException - supportsBankQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsBankQuery()} is {@code true} .
    • clearBankTerms

      void clearBankTerms()
      Clears all bank terms.
      Compliance:
      mandatory - This method must be implemented.
    • getItemQueryRecord

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