OSID Logo
OSID Specifications
filing package
Version 3.0.0
Release Candidate Preview
Interfaceosid.filing.DirectoryQuery
Implementsosid.OsidCatalogQuery
osid.filing.DirectoryEntryQuery
Description

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);
                     
                                 
                     
                
MethodmatchFileName
Description

Matches directories that contain the specified file name.

Parametersstringnamea file name
osid.type.TypestringMatchTypethe string match type
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT name not of stringMatchType
NULL_ARGUMENT name or stringMatchType is null
UNSUPPORTED supportsStringMatchType(stringMatchType) is false
CompliancemandatoryThis method must be implemented.
MethodclearFileNameTerms
Description

Clears all file name terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsFileQuery
Description

Tests if a FileQuery is available.

Returnboolean true if a file query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetFileQuery
Description

Gets the query for a file contained within the directory.

Parametersbooleanmatch true for a positive match, false for a negative match
Returnosid.filing.FileQuerythe directory query
ErrorsUNIMPLEMENTED supportsFileQuery() is false
ComplianceoptionalThis method must be implemented if supportsFileQuery() is true.
MethodmatchAnyFile
Description

Matches directories with any file.

Parametersbooleanmatch true to match directories with any file,, false to match directories with no file.
CompliancemandatoryThis method must be implemented.
MethodclearFileTerms
Description

Clears all file terms.

CompliancemandatoryThis method must be implemented.
MethodgetDirectoryQueryRecord
Description

Gets the directory query record corresponding to the given Directory record Type. Multiple record retrievals produce a nested boolean OR term.

Parametersosid.type.TypedirectoryRecordTypea directory record type
Returnosid.filing.records.DirectoryQueryRecordthe directory query record
ErrorsNULL_ARGUMENT directoryRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(directoryRecordType) is false
CompliancemandatoryThis method must be implemented.