| Interface | osid.filing.DirectorySearchResults | ||
|---|---|---|---|
| Implements | osid.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();
| ||
| Method | getDirectories | ||
| Description |
Gets the directory list resulting from a search. | ||
| Return | osid.filing.DirectoryList | the directory list | |
| Errors | ILLEGAL_STATE | list already retrieved | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getDirectoryQueryInspector | ||
| Description |
Gets the inspector for the query to examine the terms used in the search. | ||
| Return | osid.filing.DirectoryQueryInspector | the query inspector | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getDirectorySearchResultsRecord | ||
| Description |
Gets the directory search results record corresponding
to the given directory search record | ||
| Parameters | osid.type.Type | directorySearchRecordType | a directory search record type |
| Return | osid.filing.records.DirectorySearchResultsRecord | the directory search results record | |
| Errors | NULL_ARGUMENT | directorySearchRecordType is null | |
| OPERATION_FAILED | unable to complete request | ||
| UNSUPPORTED | hasRecordType(directorySearchRecordType) is false
| ||
| Compliance | mandatory | This method must be implemented. | |