Interface ResourceQuery

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

public interface ResourceQuery extends OsidObjectQuery

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

  • Method Details

    • matchGroup

      void matchGroup(boolean match)
      Matches resources that are also groups.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearGroupTerms

      void clearGroupTerms()
      Clears the group terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDemographic

      void matchDemographic(boolean match)
      Matches resources that are also demographics.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearDemographicTerms

      void clearDemographicTerms()
      Clears the demographic terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchContainingGroupId

      void matchContainingGroupId(Id resourceId, boolean match)
      Sets the group Id for this query to match resources within the given group.
      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.
    • clearContainingGroupIdTerms

      void clearContainingGroupIdTerms()
      Clears the group Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsContainingGroupQuery

      boolean supportsContainingGroupQuery()
      Tests if a ResourceQuery is available for querying containing groups.
      Returns:
      true if a group resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getContainingGroupQuery

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

      void matchAnyContainingGroup(boolean match)
      Matches resources inside any group.
      Parameters:
      match - true to match any containing group, false to match resources part of no groups
      Compliance:
      mandatory - This method must be implemented.
    • clearContainingGroupTerms

      void clearContainingGroupTerms()
      Clears the containing group terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAvatarId

      void matchAvatarId(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.
    • clearAvatarIdTerms

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

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

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

      void matchAnyAvatar(boolean match)
      Matches resources with any asset.
      Parameters:
      match - true to match any asset, false to match resources with no asset
      Compliance:
      mandatory - This method must be implemented.
    • clearAvatarTerms

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

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

      void clearAgentIdTerms()
      Clears the agent Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAgentQuery

      boolean supportsAgentQuery()
      Tests if an AgentQuery is available.
      Returns:
      true if an agent query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAgentQuery

      AgentQuery getAgentQuery()
      Gets the query for an agent. Multiple retrievals produce a nested OR term.
      Returns:
      the agent query
      Throws:
      UnimplementedException - supportsAgentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAgentQuery()} is {@code true} .
    • matchAnyAgent

      void matchAnyAgent(boolean match)
      Matches resources with any agent.
      Parameters:
      match - true to match any agent, false to match resources with no agent
      Compliance:
      mandatory - This method must be implemented.
    • clearAgentTerms

      void clearAgentTerms()
      Clears the agent terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchResourceRelationshipId

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

      void clearResourceRelationshipIdTerms()
      Clears the resource relationship Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsResourceRelationshipQuery

      boolean supportsResourceRelationshipQuery()
      Tests if a ResourceRelationshipQuery is available.
      Returns:
      true if a resource relationship query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipQuery

      ResourceRelationshipQuery getResourceRelationshipQuery()
      Gets the query for aa resource relationship. Multiple retrievals produce a nested OR term.
      Returns:
      the resource relationship query
      Throws:
      UnimplementedException - supportsResourceRelationshipQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsResourceRelationshipQuery()} is {@code true} .
    • matchAnyResourceRelationship

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

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

      void matchBinId(Id binId, boolean match)
      Sets the bin Id for this query.
      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.
    • getResourceQueryRecord

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