OSID Logo
OSID Specifications
resource package
Version 3.1.0
Interfaceosid.resource.ResourceSearchSession
Implementsosid.resource.ResourceQuerySession
Used Byosid.resource.ResourceManager
osid.resource.ResourceProxyManager
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 an 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.ResourceSearch the resource search
Compliancemandatory This 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.ResourceSearchOrder the resource search order
Compliancemandatory This method must be implemented.
MethodgetResourcesBySearch
Description

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

Parametersosid.resource.ResourceQueryresourceQuery the resource query
osid.resource.ResourceSearchresourceSearch the resource search
Returnosid.resource.ResourceSearchResults the resource search results
ErrorsNULL_ARGUMENT resourceQuery or resourceSearch is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED resourceQuery or resourceSearch is not of this service
Compliancemandatory This method must be implemented.
MethodgetResourceQueryFromInspector
Description

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

Parametersosid.resource.ResourceQueryInspectorresourceQueryInspector a resource query inspector
Returnosid.resource.ResourceQuery the resource query
ErrorsNULL_ARGUMENT resourceQueryInspector is null
UNSUPPORTED resourceQueryInspector is not of this service
Compliancemandatory This method must be implemented.