Interface CatalogQuery

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

public interface CatalogQuery extends OsidCatalogQuery

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

  • Method Details

    • matchId

      void matchId(Id id, boolean match)
      Matches an Id in this catalog. Multiple Ids are treated as a boolean OR .
      Specified by:
      matchId in interface OsidIdentifiableQuery
      Parameters:
      id - Id to match
      match - true if for a positive match, false for a negative match
      Throws:
      NullArgumentException - id is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyId

      void matchAnyId(boolean match)
      Matches catalogs that have any Id mapping.
      Parameters:
      match - true to match catalogs with any Id mapping, false to match catalogs with no Id mapping
      Compliance:
      mandatory - This method must be implemented.
    • clearIdTerms

      void clearIdTerms()
      Clears the Id query terms.
      Specified by:
      clearIdTerms in interface OsidIdentifiableQuery
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorCatalogId

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

      void clearAncestorCatalogIdTerms()
      Clears the ancestor Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorCatalogQuery

      boolean supportsAncestorCatalogQuery()
      Tests if a CatalogQuery is available.
      Returns:
      true if a catalog query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorCatalogQuery

      CatalogQuery getAncestorCatalogQuery()
      Gets the query for a catalog. Multiple retrievals produce a nested OR term.
      Returns:
      the catalog query
      Throws:
      UnimplementedException - supportsAncestorCatalogQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorCatalogQuery()} is {@code true} .
    • matchAnyAncestorCatalog

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

      void clearAncestorCatalogTerms()
      Clears the ancestor query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantCatalogId

      void matchDescendantCatalogId(Id catalogId, boolean match)
      Sets the catalog Id for this query to match catalogs that have the specified catalog as an descendant.
      Parameters:
      catalogId - a catalog Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - catalogId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantCatalogIdTerms

      void clearDescendantCatalogIdTerms()
      Clears the descendant Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantCatalogQuery

      boolean supportsDescendantCatalogQuery()
      Tests if a CatalogQuery is available.
      Returns:
      true if a catalog query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantCatalogQuery

      CatalogQuery getDescendantCatalogQuery()
      Gets the query for a catalog. Multiple retrievals produce a nested OR term.
      Returns:
      the catalog query
      Throws:
      UnimplementedException - supportsDescendantCatalogQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantCatalogQuery()} is {@code true} .
    • matchAnyDescendantCatalog

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

      void clearDescendantCatalogTerms()
      Clears the descendant query terms.
      Compliance:
      mandatory - This method must be implemented.
    • getCatalogQueryRecord

      CatalogQueryRecord getCatalogQueryRecord(Type catalogRecordType) throws OperationFailedException
      Gets the catalog query record corresponding to the given Catalog record Type .Multiple record retrievals produce a boolean OR term.
      Parameters:
      catalogRecordType - a catalog record type
      Returns:
      the catalog query record
      Throws:
      NullArgumentException - catalogRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(catalogRecordType) is false
      Compliance:
      mandatory - This method must be implemented.