Interface BinQuery

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

public interface BinQuery extends OsidCatalogQuery

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

  • Method Details

    • matchResourceId

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

      void clearResourceIdTerms()
      Clears the resource Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsResourceQuery

      boolean supportsResourceQuery()
      Tests if a ResourceQuery is available.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getResourceQuery

      ResourceQuery getResourceQuery()
      Gets the query for a resource. Multiple retrievals produce a nested OR term.
      Returns:
      the resource query
      Throws:
      UnimplementedException - supportsResourceQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsResourceQuery()} is {@code true} .
    • matchAnyResource

      void matchAnyResource(boolean match)
      Matches bins with any resource.
      Parameters:
      match - true to match bins with any resource, false to match bins with no resources
      Compliance:
      mandatory - This method must be implemented.
    • clearResourceTerms

      void clearResourceTerms()
      Clears the resource terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorBinId

      void matchAncestorBinId(Id binid, boolean match)
      Sets the bin Id for this query to match bins that have the specified bin as an ancestor.
      Parameters:
      binid - a bin Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - binId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorBinIdTerms

      void clearAncestorBinIdTerms()
      Clears the ancestor bin Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorBinQuery

      boolean supportsAncestorBinQuery()
      Tests if a BinQuery is available.
      Returns:
      true if a bin query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorBinQuery

      BinQuery getAncestorBinQuery()
      Gets the query for a bin. Multiple retrievals produce a nested OR term.
      Returns:
      the bin query
      Throws:
      UnimplementedException - supportsAncestorBinQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorBinQuery()} is {@code true} .
    • matchAnyAncestorBin

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

      void clearAncestorBinTerms()
      Clears the ancestor bin terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantBinId

      void matchDescendantBinId(Id binid, boolean match)
      Sets the bin Id for this query to match bins that have the specified bin as a descendant.
      Parameters:
      binid - a bin Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - binId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantBinIdTerms

      void clearDescendantBinIdTerms()
      Clears the descendant bin Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantBinQuery

      boolean supportsDescendantBinQuery()
      Tests if a BinQuery is available.
      Returns:
      true if a bin query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantBinQuery

      BinQuery getDescendantBinQuery()
      Gets the query for a bin. Multiple retrievals produce a nested OR term.
      Returns:
      the bin query
      Throws:
      UnimplementedException - supportsDescendantBinQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantBinQuery()} is {@code true} .
    • matchAnyDescendantBin

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

      void clearDescendantBinTerms()
      Clears the descendant bin terms.
      Compliance:
      mandatory - This method must be implemented.
    • getBinQueryRecord

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