OSID Logo
OSID Specifications
resource package
Version 3.0.0
Release Candidate Preview
Interfaceosid.resource.ResourceSearchSession
Implementsosid.resource.ResourceQuerySession
Description

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

getResourcesByQuery() is the basic search method and returns a list of Resources. A more advanced search may be performed with getResourcesBySearch(). It accepts an ResourceSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getResourcesBySearch() returns an ResourceSearchResults that can be used to access the resulting ResourceList or be used to perform a search within the result set through ResourceList.

This session defines views that offer differing behaviors for searching.

  • federated bin view: searches include resources in bins of which this bin is a ancestor in the bin hierarchy
  • isolated bin view: searches are restricted to resources in this bin

Resources may have a resource query record indicated by their respective record types. The resource query record is accessed via the ResourceQuery.

MethodgetResourceSearch
Description

Gets a resource search.

Returnosid.resource.ResourceSearchthe resource search
CompliancemandatoryThis method must be implemented.
MethodgetResourceSearchOrder
Description

Gets a resource search order. The ResourceSearchOrder is supplied to a ResourceSearch to specify the ordering of results.

Returnosid.resource.ResourceSearchOrderthe resource search order
CompliancemandatoryThis method must be implemented.
MethodgetResourcesBySearch
Description

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

Parametersosid.resource.ResourceQueryresourceQuerythe resource query
osid.resource.ResourceSearchresourceSearchthe resource search
Returnosid.resource.ResourceSearchResultsthe resource search results
ErrorsNULL_ARGUMENT resourceQuery or resourceSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED resourceQuery or resourceSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetResourceQueryFromInspector
Description

Gets a resource query from an inspector. The inspector is available from a ResourceSearchResults.

Parametersosid.resource.ResourceQueryInspectorresourceQueryInspectora resource query inspector
Returnosid.resource.ResourceQuerythe resource query
ErrorsNULL_ARGUMENT resourceQueryInspector is null
UNSUPPORTED resourceQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.