Interface OntologyQuery

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

public interface OntologyQuery extends OsidCatalogQuery

This is the query for searching ontologies. Each method specifies an AND term while multiple invocations of the same method produce 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} .
    • matchAnySubject

      void matchAnySubject(boolean match)
      Matches ontologies that have any subject.
      Specified by:
      matchAnySubject in interface OsidObjectQuery
      Parameters:
      match - true to match ontologies with any subject, false to match ontologies with no subject
      Compliance:
      mandatory - This method must be implemented.
    • clearSubjectTerms

      void clearSubjectTerms()
      Clears the subject terms for this query.
      Specified by:
      clearSubjectTerms in interface OsidObjectQuery
      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.
    • matchAncestorOntologyId

      void matchAncestorOntologyId(Id ontologyId, boolean match)
      Sets the ontology Id for this query to match ontologies that have the specified ontology as an ancestor.
      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.
    • clearAncestorOntologyIdTerms

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

      boolean supportsAncestorOntologyQuery()
      Tests if an OntologyQuery is available.
      Returns:
      true if an ontology query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorOntologyQuery

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

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

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

      void matchDescendantOntologyId(Id ontologyId, boolean match)
      Sets the ontology Id for this query to match ontologies that have the specified ontology as a descendant.
      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.
    • clearDescendantOntologyIdTerms

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

      boolean supportsDescendantOntologyQuery()
      Tests if an OntologyQuery is available.
      Returns:
      true if an ontology query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantOntologyQuery

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

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

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

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