Interface CompositionQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidContainableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidOperableQuery, OsidQuery, OsidSourceableQuery, Suppliable

public interface CompositionQuery extends OsidObjectQuery, OsidContainableQuery, OsidOperableQuery, OsidSourceableQuery

This is the query for searching compositions. Each method specifies an AND term while multiple invocations of the same method produces 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} .
    • matchAnyAsset

      void matchAnyAsset(boolean match)
      Matches compositions that has any asset mapping.
      Parameters:
      match - true to match compositions with any asset, false to match compositions with no asset
      Compliance:
      mandatory - This method must be implemented.
    • clearAssetTerms

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

      void matchContainingCompositionId(Id compositionId, boolean match)
      Sets the composition Id for this query to match compositions that have the specified composition as an ancestor.
      Parameters:
      compositionId - a composition Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - compositionId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearContainingCompositionIdTerms

      void clearContainingCompositionIdTerms()
      Clears the containing composition Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsContainingCompositionQuery

      boolean supportsContainingCompositionQuery()
      Tests if an CompositionQuery is available.
      Returns:
      true if a composition query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getContainingCompositionQuery

      CompositionQuery getContainingCompositionQuery()
      Gets the query for a composition. Multiple retrievals produce a nested OR term.
      Returns:
      the composition query
      Throws:
      UnimplementedException - supportsContainingCompositionQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsContainingCompositionQuery()} is {@code true} .
    • matchAnyContainingComposition

      void matchAnyContainingComposition(boolean match)
      Matches compositions with any ancestor.
      Parameters:
      match - true to match composition with any ancestor, false to match root compositions
      Compliance:
      mandatory - This method must be implemented.
    • clearContainingCompositionTerms

      void clearContainingCompositionTerms()
      Clears the containing composition terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchContainedCompositionId

      void matchContainedCompositionId(Id compositionId, boolean match)
      Sets the composition Id for this query to match compositions that contain the specified composition.
      Parameters:
      compositionId - a composition Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - compositionId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearContainedCompositionIdTerms

      void clearContainedCompositionIdTerms()
      Clears the contained composition Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsContainedCompositionQuery

      boolean supportsContainedCompositionQuery()
      Tests if an CompositionQuery is available.
      Returns:
      true if a composition query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getContainedCompositionQuery

      CompositionQuery getContainedCompositionQuery()
      Gets the query for a composition. Multiple retrievals produce a nested OR term.
      Returns:
      the composition query
      Throws:
      UnimplementedException - supportsContainedCompositionQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsContainedCompositionQuery()} is {@code true} .
    • matchAnyContainedComposition

      void matchAnyContainedComposition(boolean match)
      Matches compositions that contain any other compositions.
      Parameters:
      match - true to match composition with any descendant, false to match leaf compositions
      Compliance:
      mandatory - This method must be implemented.
    • clearContainedCompositionTerms

      void clearContainedCompositionTerms()
      Clears the contained composition terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRepositoryId

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

      void clearRepositoryIdTerms()
      Clears the repository Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsRepositoryQuery

      boolean supportsRepositoryQuery()
      Tests if a RepositoryQuery is available.
      Returns:
      true if a repository query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRepositoryQuery

      RepositoryQuery getRepositoryQuery()
      Gets the query for a repository. Multiple queries can be retrieved for a nested OR term.
      Returns:
      the repository query
      Throws:
      UnimplementedException - supportsRepositoryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsRepositoryQuery()} is {@code true} .
    • clearRepositoryTerms

      void clearRepositoryTerms()
      Clears the repository terms.
      Compliance:
      mandatory - This method must be implemented.
    • getCompositionQueryRecord

      CompositionQueryRecord getCompositionQueryRecord(Type compositionRecordType) throws OperationFailedException
      Gets the composition query record corresponding to the given Composition record Type . Multiple retrievals produce a nested OR term.
      Parameters:
      compositionRecordType - a composition record type
      Returns:
      the composition query record
      Throws:
      NullArgumentException - compositionRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(compositionRecordType) is false
      Compliance:
      mandatory - This method must be implemented.