Interface RelevancyQuery

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

public interface RelevancyQuery extends OsidRelationshipQuery

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

  • Method Details

    • matchSubjectId

      void matchSubjectId(Id subjectId, boolean match)
      Sets the subject Id for this query.
      Specified by:
      matchSubjectId in interface OsidObjectQuery
      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.
    • clearSubjectIdTerms

      void clearSubjectIdTerms()
      Clears the subject Id terms for this query.
      Specified by:
      clearSubjectIdTerms in interface OsidObjectQuery
      Compliance:
      mandatory - This method must be implemented.
    • supportsSubjectQuery

      boolean supportsSubjectQuery()
      Tests if a SubjectQuery is available.
      Specified by:
      supportsSubjectQuery in interface OsidObjectQuery
      Returns:
      true if a subject query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSubjectQuery

      SubjectQuery getSubjectQuery()
      Gets the query for a subject. Multiple retrievals produce a nested OR term.
      Specified by:
      getSubjectQuery in interface OsidObjectQuery
      Returns:
      the subject query
      Throws:
      UnimplementedException - supportsSubjectQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSubjectQuery()} is {@code true} .
    • clearSubjectTerms

      void clearSubjectTerms()
      Clears the subject terms for this query.
      Specified by:
      clearSubjectTerms in interface OsidObjectQuery
      Compliance:
      mandatory - This method must be implemented.
    • matchMappedId

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

      void clearMappedIdTerms()
      Clears the mapped Id 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.
    • getRelevancyQueryRecord

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