public interface DirectorySearchResults extends OsidSearchResults
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();
Modifier and Type | Method and Description |
---|---|
DirectoryList |
getDirectories()
Gets the directory list resulting from a search.
|
DirectoryQueryInspector |
getDirectoryQueryInspector()
Gets the inspector for the query to examine the terms used in the
search.
|
DirectorySearchResultsRecord |
getDirectorySearchResultsRecord(Type directorySearchRecordType)
Gets the directory search results record corresponding to the given
directory search record
Type. |
getResultSize
getRecordTypes, hasRecordType
getProperties, getPropertiesByRecordType
DirectoryList getDirectories()
IllegalStateException
- list already retrievedmandatory
- This method must be implemented. DirectoryQueryInspector getDirectoryQueryInspector()
mandatory
- This method must be implemented. DirectorySearchResultsRecord getDirectorySearchResultsRecord(Type directorySearchRecordType) throws OperationFailedException
Type.
This method is used to
retrieve an object implementing the requested record.directorySearchRecordType
- a directory search record typeNullArgumentException
-
directorySearchRecordType
is null
OperationFailedException
- unable to complete requestUnsupportedException
-
hasRecordType(directorySearchRecordType)
is
false
mandatory
- This method must be implemented.