Interface DirectorySearchResults

All Superinterfaces:
Browsable, Extensible, OsidResult, OsidSearchResults

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();            
  
  • Method Details

    • getDirectories

      DirectoryList getDirectories()
      Gets the directory list resulting from a search.
      Returns:
      the directory list
      Throws:
      IllegalStateException - list already retrieved
      Compliance:
      mandatory - This method must be implemented.
    • getDirectoryQueryInspector

      DirectoryQueryInspector getDirectoryQueryInspector()
      Gets the inspector for the query to examine the terms used in the search.
      Returns:
      the query inspector
      Compliance:
      mandatory - This method must be implemented.
    • getDirectorySearchResultsRecord

      DirectorySearchResultsRecord getDirectorySearchResultsRecord(Type directorySearchRecordType) throws OperationFailedException
      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.
      Parameters:
      directorySearchRecordType - a directory search record type
      Returns:
      the directory search results record
      Throws:
      NullArgumentException - directorySearchRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(directorySearchRecordType) is false
      Compliance:
      mandatory - This method must be implemented.