OSID Logo
OSID Specifications
filing package
Version 3.0.0
Interfaceosid.filing.DirectoryQuery
Implementsosid.OsidCatalogQuery
osid.filing.DirectoryEntryQuery
Used Byosid.filing.DirectoryEntryQuery
osid.filing.DirectoryQuerySession
osid.filing.DirectorySearchSession
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
booleanmatchtrue for a positive match, false for a negative match
ErrorsINVALID_ARGUMENTname not of stringMatchType
NULL_ARGUMENTname or stringMatchType is null
UNSUPPORTEDsupportsStringMatchType(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.

Returnbooleantrue 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.

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

Matches directories with any file.

Parametersbooleanmatchtrue 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_ARGUMENTdirectoryRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTEDhasRecordType(directoryRecordType) is false
CompliancemandatoryThis method must be implemented.