Interface AssetContentQuery

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

public interface AssetContentQuery extends OsidObjectQuery, OsidSubjugateableQuery

This is the query for searching asset contents. Each method forms an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchAssetId

      void matchAssetId(Id assetId, boolean match)
      Sets the asset Id for this query.
      Parameters:
      assetId - the asset Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - assetId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAssetIdTerms

      void clearAssetIdTerms()
      Clears the asset Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAssetQuery

      boolean supportsAssetQuery()
      Tests if an AssetQuery is available.
      Returns:
      true if an asset query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAssetQuery

      AssetQuery getAssetQuery()
      Gets the query for an asset. Multiple retrievals produce a nested OR term.
      Returns:
      the asset query
      Throws:
      UnimplementedException - supportsAssetQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAssetQuery()} is {@code true} .
    • clearAssetTerms

      void clearAssetTerms()
      Clears the asset terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDataLength

      void matchDataLength(long low, long high, boolean match)
      Matches content whose length of the data in bytes are inclusive of the given range.
      Parameters:
      low - low range
      high - high range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - low is greater than high
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyDataLength

      void matchAnyDataLength(boolean match)
      Matches content that has any data length.
      Parameters:
      match - true to match content with any data length, false to match content with no data length
      Compliance:
      mandatory - This method must be implemented.
    • clearDataLengthTerms

      void clearDataLengthTerms()
      Clears the data length terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchData

      void matchData(byte[] data, boolean match, boolean partial)
      Matches data in this content.
      Parameters:
      data - list of matching strings
      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 content that has any data.
      Parameters:
      match - true to match content with any data, false to match content with no data
      Compliance:
      mandatory - This method must be implemented.
    • clearDataTerms

      void clearDataTerms()
      Clears the data terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchURL

      void matchURL(String url, Type stringMatchType, boolean match)
      Sets the url for this query. Supplying multiple strings behaves like a boolean OR among the elements each which must correspond to the stringMatchType .
      Parameters:
      url - url string to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - url not of stringMatchType
      NullArgumentException - url or stringMatchType is null
      UnsupportedException - supportsStringMatchType(url) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyURL

      void matchAnyURL(boolean match)
      Matches content that has any url.
      Parameters:
      match - true to match content with any url, false to match content with no url
      Compliance:
      mandatory - This method must be implemented.
    • clearURLTerms

      void clearURLTerms()
      Clears the url terms.
      Compliance:
      mandatory - This method must be implemented.
    • getAssetContentQueryRecord

      AssetContentQueryRecord getAssetContentQueryRecord(Type assetContentRecordType) throws OperationFailedException
      Gets the asset content query record corresponding to the given AssetContent record Type . Multiple record retrievals produce a nested OR term.
      Parameters:
      assetContentRecordType - an asset content record type
      Returns:
      the asset content query record
      Throws:
      NullArgumentException - assetContentRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(assetContentRecordType) is false
      Compliance:
      mandatory - This method must be implemented.