Interface FileQuery

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

public interface FileQuery extends DirectoryEntryQuery

This is the query for searching files. Each method specifies an AND term while multiple invocations of the same method produces a nested OR .

  • Method Details

    • matchSize

      void matchSize(long from, long to, boolean match)
      Matches files whose size is within and including the given range.
      Parameters:
      from - low file size
      to - high file size
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - to is les than from
      Compliance:
      mandatory - This method must be implemented.
    • matchAnySize

      void matchAnySize(boolean match)
      Matches a file that has any known size.
      Parameters:
      match - true to match any size, false to match files with no known size
      Compliance:
      mandatory - This method must be implemented.
    • clearSizeTerms

      void clearSizeTerms()
      Clears all file size terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDataString

      void matchDataString(String data, Type stringMatchType, boolean match)
      Adds data strings to this query to match files whose content contains these strings. Supplying multiple strings behaves like a boolean AND among the elements each which must correspond to the stringMatchType . An OR can be performed with multiple queries.
      Parameters:
      data - string to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - data not of stringMatchType
      NullArgumentException - data or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • clearDataStringTerms

      void clearDataStringTerms()
      Clears all file data string terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchData

      void matchData(byte[] data, boolean match, boolean partial)
      Matches files who data contains the given bytes.
      Parameters:
      data - data to match
      match - true for a positive match, false for a negative match
      partial - true for a partial match, false for a complete match
      Throws:
      NullArgumentException - data is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyData

      void matchAnyData(boolean match)
      Matches a file that has any data.
      Parameters:
      match - true to match any data, false to match files with no data
      Compliance:
      mandatory - This method must be implemented.
    • clearDataTerms

      void clearDataTerms()
      Clears all file data terms.
      Compliance:
      mandatory - This method must be implemented.
    • getFileQueryRecord

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