Interface DirectoryQuery

All Superinterfaces:
DirectoryEntryQuery, Extensible, OsidBrowsableQuery, OsidCatalogQuery, OsidExtensibleQuery, OsidFederateableQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidSourceableQuery, Suppliable

public interface DirectoryQuery extends OsidCatalogQuery, DirectoryEntryQuery

This is the query for searching directories. Each method match request produces an AND term while multiple invocations of a method produces a nested OR .

An example to find directories whose name is "Library".

DirectoryQuery query = session.getDirectoryQuery();
query.matchName("Library", wordStringMatchType, true);

DirectoryList list = session.getDirectoriesByQuery(query);            
  
  • Method Details

    • matchFileName

      void matchFileName(String name, Type stringMatchType, boolean match)
      Matches directories that contain the specified file name.
      Parameters:
      name - a file name
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - name not of stringMatchType
      NullArgumentException - name or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • clearFileNameTerms

      void clearFileNameTerms()
      Clears all file name terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsFileQuery

      boolean supportsFileQuery()
      Tests if a FileQuery is available.
      Returns:
      true if a file query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getFileQuery

      FileQuery getFileQuery(boolean match)
      Gets the query for a file contained within the directory.
      Parameters:
      match - true for a positive match, false for a negative match
      Returns:
      the directory query
      Throws:
      UnimplementedException - supportsFileQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsFileQuery()} is {@code true} .
    • matchAnyFile

      void matchAnyFile(boolean match)
      Matches directories with any file.
      Parameters:
      match - true to match directories with any file,, false to match directories with no file.
      Compliance:
      mandatory - This method must be implemented.
    • clearFileTerms

      void clearFileTerms()
      Clears all file terms.
      Compliance:
      mandatory - This method must be implemented.
    • getDirectoryQueryRecord

      DirectoryQueryRecord getDirectoryQueryRecord(Type directoryRecordType) throws OperationFailedException
      Gets the directory query record corresponding to the given Directory record Type . Multiple record retrievals produce a nested boolean OR term.
      Parameters:
      directoryRecordType - a directory record type
      Returns:
      the directory query record
      Throws:
      NullArgumentException - directoryRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(directoryRecordType) is false
      Compliance:
      mandatory - This method must be implemented.