Interface RepositoryQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidCatalogQuery, OsidExtensibleQuery, OsidFederateableQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidSourceableQuery, Suppliable

public interface RepositoryQuery extends OsidCatalogQuery

This is the query for searching repositories. Each method specifies 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 - an 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 repositories that has any asset mapping.
      Parameters:
      match - true to match repositories with any asset, false to match repositories with no asset
      Compliance:
      mandatory - This method must be implemented.
    • clearAssetTerms

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

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

      void clearAssetContentIdTerms()
      Clears the asset content Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAssetContentQuery

      boolean supportsAssetContentQuery()
      Tests if an AssetContentQuery is available.
      Returns:
      true if an asset content query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAssetContentQuery

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

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

      void clearAssetContentTerms()
      Clears the asset content terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCompositionId

      void matchCompositionId(Id compositionId, boolean match)
      Sets the composition Id for this query.
      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.
    • clearCompositionIdTerms

      void clearCompositionIdTerms()
      Clears the composition Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCompositionQuery

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

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

      void matchAnyComposition(boolean match)
      Matches repositories that has any composition mapping.
      Parameters:
      match - true to match repositories with any composition, false to match repositories with no composition
      Compliance:
      mandatory - This method must be implemented.
    • clearCompositionTerms

      void clearCompositionTerms()
      Clears the composition terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorRepositoryId

      void matchAncestorRepositoryId(Id repositoryId, boolean match)
      Sets the repository Id for this query to match repositories that have the specified repository as an ancestor.
      Parameters:
      repositoryId - a 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.
    • clearAncestorRepositoryIdTerms

      void clearAncestorRepositoryIdTerms()
      Clears the ancestor repository Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorRepositoryQuery

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

      RepositoryQuery getAncestorRepositoryQuery()
      Gets the query for a repository. Multiple retrievals produce a nested OR term.
      Returns:
      the repository query
      Throws:
      UnimplementedException - supportsAncestorRepositoryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorRepositoryQuery()} is {@code true} .
    • matchAnyAncestorRepository

      void matchAnyAncestorRepository(boolean match)
      Matches repositories with any ancestor.
      Parameters:
      match - true to match repositories with any ancestor, false to match root repositories
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorRepositoryTerms

      void clearAncestorRepositoryTerms()
      Clears the ancestor repository terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantRepositoryId

      void matchDescendantRepositoryId(Id repositoryId, boolean match)
      Sets the repository Id for this query to match repositories that have the specified repository as a descendant.
      Parameters:
      repositoryId - a 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.
    • clearDescendantRepositoryIdTerms

      void clearDescendantRepositoryIdTerms()
      Clears the descendant repository Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantRepositoryQuery

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

      RepositoryQuery getDescendantRepositoryQuery()
      Gets the query for a repository. Multiple retrievals produce a nested OR term.
      Returns:
      the repository query
      Throws:
      UnimplementedException - supportsDescendantRepositoryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantRepositoryQuery()} is {@code true} .
    • matchAnyDescendantRepository

      void matchAnyDescendantRepository(boolean match)
      Matches repositories with any descendant.
      Parameters:
      match - true to match repositories with any descendant, false to match leaf repositories
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantRepositoryTerms

      void clearDescendantRepositoryTerms()
      Clears the descendant repository terms.
      Compliance:
      mandatory - This method must be implemented.
    • getRepositoryQueryRecord

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