Interface ResourceRelationshipQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidRelationshipQuery, OsidTemporalQuery, Suppliable

public interface ResourceRelationshipQuery extends OsidRelationshipQuery

This is the query for searching resource relationships. Each method match request produces an AND term while multiple invocations of a method produces a nested OR .

  • Method Details

    • matchSourceResourceId

      void matchSourceResourceId(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.
    • clearSourceResourceIdTerms

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

      boolean supportsSourceResourceQuery()
      Tests if a ResourceQuery is available for querying resources.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSourceResourceQuery

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

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

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

      void clearDestinationResourceIdTerms()
      Clears the peer resource Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDestinationResourceQuery

      boolean supportsDestinationResourceQuery()
      Tests if a ResourceQuery is available for querying resources.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDestinationResourceQuery

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

      void clearDestinationResourceTerms()
      Clears the peer resource terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSameResource

      void matchSameResource(boolean match)
      Matches relationships where the peer resources are the same.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearSameResourceTerms

      void clearSameResourceTerms()
      Clears the same resource terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchBinId

      void matchBinId(Id binId, boolean match)
      Sets the bin Id for this query to match terms assigned to bins.
      Parameters:
      binId - the 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.
    • clearBinIdTerms

      void clearBinIdTerms()
      Clears the bin Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsBinQuery

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

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

      void clearBinTerms()
      Clears the bin terms.
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipQueryRecord

      ResourceRelationshipQueryRecord getResourceRelationshipQueryRecord(Type resourceRelationshipRecordType) throws OperationFailedException
      Gets the resource relationship query record corresponding to the given ResourceRelationship record Type . Multiple retrievals produce a nested OR term.
      Parameters:
      resourceRelationshipRecordType - a resource relationship query record type
      Returns:
      the resource relationship query record
      Throws:
      NullArgumentException - resourceRelationshipRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(resourceRelationshipRecordType) is false
      Compliance:
      mandatory - This method must be implemented.