OSID Logo
OSID Specifications
resourcing package
Version 3.0.0
Release Candidate Preview
Interfaceosid.resourcing.WorkSearchSession
Implementsosid.resourcing.WorkQuerySession
Description

This session provides methods for searching among Work objects. The search query is constructed using the WorkQuery.

getWorksByQuery() is the basic search method and returns a list of Works. A more advanced search may be performed with getWorksBySearch(). It accepts a WorkSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getWorksBySearch() returns a WorkSearchResults that can be used to access the resulting WorkList or be used to perform a search within the result set through WorkSearch.

This session defines views that offer differing behaviors for searching.

  • federated foundry view: searches include works in foundries of which this foundry is an ancestor in the foundry hierarchy
  • isolated foundry view: searches are restricted to works in this foundry

Works may have a query record indicated by their respective record types. The query record is accessed via the WorkQuery.

MethodgetWorkSearch
Description

Gets a work search.

Returnosid.resourcing.WorkSearchthe work search
CompliancemandatoryThis method must be implemented.
MethodgetWorkSearchOrder
Description

Gets a work search order. The WorkSearchOrder is supplied to a WorkSearch to specify the ordering of results.

Returnosid.resourcing.WorkSearchOrderthe work search order
CompliancemandatoryThis method must be implemented.
MethodgetWorksBySearch
Description

Gets the search results matching the given search query using the given search.

Parametersosid.resourcing.WorkQueryworkQuerythe work query
osid.resourcing.WorkSearchworkSearchthe work search order
Returnosid.resourcing.WorkSearchResultsthe returned search results
ErrorsNULL_ARGUMENT workQuery or workSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED workQuery or workSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetWorkQueryFromInspector
Description

Gets a work query from an inspector. The inspector is available from a WorkSearchResults.

Parametersosid.resourcing.WorkQueryInspectorworkQueryInspectora work query inspector
Returnosid.resourcing.WorkQuerythe work query
ErrorsNULL_ARGUMENT workQueryInspector is null
UNSUPPORTED workQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.