OSID Logo
OSID Specifications
filing package
Version 3.0.0
Release Candidate Preview
Interfaceosid.filing.DirectorySearchResults
Implementsosid.OsidSearchResults
Description

This interface provides a means to capture results of a search. This example gets a result set from a keyword match.

An example to find directories whose path contains "System" from a resulting search of directories whose name is "Library", sorted by the path name.

                     
                     
                     DirectoryQuery query = session.getDirectoryQuery();
                     query.addNameMatch("Library", wordStringMatchType, true);
                     DirectorySearch search = session.getDirectorySearch();
                     DirectorySearchResults results = session.getDirectoriesBySearch(query, search);
                     
                     query = session.getDirectoryQuery();
                     query.addNameMatch("System", wordStringMatchType, true);
                     search = session.getDirectorySearch();
                     search.searchWithinDirectoryResults(results);
                     DirectorySearchOrder order = session.getDirectorySearchOrder();
                     order.orderByPath();
                     search.orderDirectoryResults(order);
                     
                     results = session.getDirectoriesBySearch(query, search);
                     DirectoryList directories = results.getDirectories();
                     
                                 
                     
                
MethodgetDirectories
Description

Gets the directory list resulting from a search.

Returnosid.filing.DirectoryListthe directory list
ErrorsILLEGAL_STATElist already retrieved
CompliancemandatoryThis method must be implemented.
MethodgetDirectoryQueryInspector
Description

Gets the inspector for the query to examine the terms used in the search.

Returnosid.filing.DirectoryQueryInspectorthe query inspector
CompliancemandatoryThis method must be implemented.
MethodgetDirectorySearchResultsRecord
Description

Gets the directory search results record corresponding to the given directory search record Type. This method is used to retrieve an object implementing the requested record.

Parametersosid.type.TypedirectorySearchRecordTypea directory search record type
Returnosid.filing.records.DirectorySearchResultsRecordthe directory search results record
ErrorsNULL_ARGUMENT directorySearchRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(directorySearchRecordType) is false
CompliancemandatoryThis method must be implemented.