Interface CanonicalUnitSearchSession

All Superinterfaces:
AutoCloseable, CanonicalUnitQuerySession, Closeable, OsidSession, OsidSession

public interface CanonicalUnitSearchSession extends CanonicalUnitQuerySession

This session provides methods for searching CanonicalUnits. The search query is constructed using the CanonicalUnitQuery. The canonical unit record Type also specifies the record for the canonical unit query.

getCanonicalUnitsByQuery() is the basic search method and returns a list of CanonicalUnit elements. A more advanced search may be performed with getCanonicalUnitsBySearch(). It accepts a CanonicalUnitSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getCanonicalUnitsBySearch() returns a CanonicalUnitSearchResults that can be used to access the resulting CanonicalUnitList or be used to perform a search within the result set through CanonicalUnitSearch.

This session defines views that offer differing behaviors for searching.

  • federated catalogue view: searches include canonical units in catalogues of which this catalogue is an ancestor in the catalogue hierarchy
  • isolated catalogue view: searches are restricted to canonical units in this catalogue

CanonicalUnits may have a query record indicated by their respective record types. The query record is accessed via the CanonicalUnitQuery. The returns in this session may not be cast directly to these interfaces.

  • Method Details

    • getCanonicalUnitSearch

      CanonicalUnitSearch getCanonicalUnitSearch()
      Gets a canonical unit search.
      Returns:
      the canonical unit search
      Compliance:
      mandatory - This method must be implemented.
    • getCanonicalUnitSearchOrder

      CanonicalUnitSearchOrder getCanonicalUnitSearchOrder()
      Gets a canonical unit search order. The CanonicalUnitSearchOrder is supplied to a CanonicalUnitSearch to specify the ordering of results.
      Returns:
      the canonical unit search order
      Compliance:
      mandatory - This method must be implemented.
    • getCanonicalUnitsBySearch

      CanonicalUnitSearchResults getCanonicalUnitsBySearch(CanonicalUnitQuery canonicalUnitQuery, CanonicalUnitSearch canonicalUnitSearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search.
      Parameters:
      canonicalUnitQuery - the canonical unit query
      canonicalUnitSearch - the canonical unit search
      Returns:
      the search results
      Throws:
      NullArgumentException - canonicalUnitQuery or canonicalUnitSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - canonicalUnitQuery or canonicalUnitSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getCanonicalUnitQueryFromInspector

      CanonicalUnitQuery getCanonicalUnitQueryFromInspector(CanonicalUnitQueryInspector canonicalUnitQueryInspector)
      Gets a canonical unit query from an inspector. The inspector is available from a CanonicalUnitSearchResults.
      Parameters:
      canonicalUnitQueryInspector - a canonical unit query inspector
      Returns:
      the canonical unit query
      Throws:
      NullArgumentException - canonicalUnitQueryInspector is null
      UnsupportedException - canonicalUnitQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.