Interface SubjectQuery

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

public interface SubjectQuery extends OsidObjectQuery, OsidFederateableQuery

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

  • Method Details

    • matchCode

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

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

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

      void clearAncestorSubjectIdTerms()
      Clears the ancestor subject Id terms for this query.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorSubjectQuery

      boolean supportsAncestorSubjectQuery()
      Tests if a SubjectQuery is available.
      Returns:
      true if a subject query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorSubjectQuery

      SubjectQuery getAncestorSubjectQuery()
      Gets the query for a subject. Multiple retrievals produce a nested OR term.
      Returns:
      the subject query
      Throws:
      UnimplementedException - supportsAncestorSubjectQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorSubjectQuery()} is {@code true} .
    • matchAnyAncestorSubject

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

      void clearAncestorSubjectTerms()
      Clears the ancestor subject terms for this query.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantSubjectId

      void matchDescendantSubjectId(Id subjectId, boolean match)
      Sets the subject Id for this query to match subjects that have the specified subject as a descendant.
      Parameters:
      subjectId - a subject Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - subjectId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantSubjectIdTerms

      void clearDescendantSubjectIdTerms()
      Clears the descendant subject Id terms for this query.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantSubjectQuery

      boolean supportsDescendantSubjectQuery()
      Tests if a SubjectQuery is available.
      Returns:
      true if a subject query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantSubjectQuery

      SubjectQuery getDescendantSubjectQuery()
      Gets the query for a subject. Multiple retrievals produce a nested OR term.
      Returns:
      the subject query
      Throws:
      UnimplementedException - supportsDescendantSubjectQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantSubjectQuery()} is {@code true} .
    • matchAnyDescendantSubject

      void matchAnyDescendantSubject(boolean match)
      Matches subjects with any descendant.
      Parameters:
      match - true to match subjects with any descendant, false to match leaf subjects
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantSubjectTerms

      void clearDescendantSubjectTerms()
      Clears the descendant subject terms for this query.
      Compliance:
      mandatory - This method must be implemented.
    • matchRelevancyId

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

      void clearRelevancyIdTerms()
      Clears the relevancy Id terms for this query.
      Compliance:
      mandatory - This method must be implemented.
    • supportsRelevancyQuery

      boolean supportsRelevancyQuery()
      Tests if a RelevancyQuery is available.
      Returns:
      true if a relevancy query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRelevancyQuery

      RelevancyQuery getRelevancyQuery()
      Gets the query for a relevancy. Multiple retrievals produce a nested OR term.
      Returns:
      the relevancy query
      Throws:
      UnimplementedException - supportsRelevancyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsRelevancyQuery()} is {@code true} .
    • matchAnyRelevancy

      void matchAnyRelevancy(boolean match)
      Matches ontologies that have any relevancy.
      Parameters:
      match - true to match ontologies with any relevancy, false to match ontologies with no relevancy
      Compliance:
      mandatory - This method must be implemented.
    • clearRelevancyTerms

      void clearRelevancyTerms()
      Clears the relevancy terms for this query.
      Compliance:
      mandatory - This method must be implemented.
    • matchOntologyId

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

      void clearOntologyIdTerms()
      Clears the ontology Id terms for this query.
      Compliance:
      mandatory - This method must be implemented.
    • supportsOntologyQuery

      boolean supportsOntologyQuery()
      Tests if an OntologyQuery is available for querying ontologies.
      Returns:
      true if an ontology query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getOntologyQuery

      OntologyQuery getOntologyQuery()
      Gets the query for an ontology. Multiple retrievals produce a nested OR term.
      Returns:
      the ontology query
      Throws:
      UnimplementedException - supportsOntologyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsOntologyQuery()} is {@code true} .
    • clearOntologyTerms

      void clearOntologyTerms()
      Clears the ontology terms for this query.
      Compliance:
      mandatory - This method must be implemented.
    • getSubjectQueryRecord

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