Interface ResourceRelationshipLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ResourceRelationshipLookupSession extends OsidSession

This session provides methods for examining resource relationships.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition
  • isolated bin view: All relationship methods in this session operate, retrieve and pertain to relationships defined explicitly in the current bin. Using an isolated view is useful for managing relationships with the ResourceRelationshipAdminSession .
  • federated bin view: All relationship methods in this session operate, retrieve and pertain to all relationships defined in this bin and any other catalogs implicitly available in this bin through bin inheritence.
  • effective resource relationship view: All resource relationship lookup methods return resource relationships where the current date falls in between the effective dates inclusive.
  • any resource relationship view: Resource relationships of any effective date are returned from methods.
  • Method Details

    • getBinId

      Id getBinId()
      Gets the Bin Id associated with this session.
      Returns:
      the Bin Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBin

      Gets the Bin associated with this session.
      Returns:
      the Bin associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupResourceRelationships

      boolean canLookupResourceRelationships()
      Tests if this user can access resource relationships. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer relationship operations.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeResourceRelationshipView

      void useComparativeResourceRelationshipView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryResourceRelationshipView

      void usePlenaryResourceRelationshipView()
      A complete view of the resource relationship returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
      Compliance:
      mandatory - This method is must be implemented.
    • useFederatedBinView

      void useFederatedBinView()
      Federates the view for methods in this session. A federated view will include relationships in bins which are children of this bin in the bin hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedBinView

      void useIsolatedBinView()
      Isolates the view for methods in this session. An isolated view restricts relationships to this bin only.
      Compliance:
      mandatory - This method is must be implemented.
    • useEffectiveResourceRelationshipView

      void useEffectiveResourceRelationshipView()
      Only resource relationships whose effective dates are current are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • useAnyEffectiveResourceRelationshipView

      void useAnyEffectiveResourceRelationshipView()
      All resource relationships of any effective dates are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • getResourceRelationship

      ResourceRelationship getResourceRelationship(Id resourceRelationshipId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the ResourceRelationship specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Relationship may have a different Id than requested, such as the case where a duplicate Id was assigned to a Relationship and retained for compatibility. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      resourceRelationshipId - Id of the Relationship
      Returns:
      the relationship
      Throws:
      NotFoundException - resourceRelationshipId not found
      NullArgumentException - resourceRelationshipId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getResourceRelationshipsByIds

      ResourceRelationshipList getResourceRelationshipsByIds(IdList resourceRelationshipIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets a ResourceRelationshipList corresponding to the given IdList . In plenary mode, the returned list contains all of the relationships specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Relationships may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      resourceRelationshipIds - the list of Ids to retrieve
      Returns:
      the returned ResourceRelationship list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - resourceRelationshipIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsByGenusType

      ResourceRelationshipList getResourceRelationshipsByGenusType(Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException
      Gets the resource relationships for the given resource relationship genus type. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      relationshipGenusType - a relationship genus type
      Returns:
      the relationships
      Throws:
      NullArgumentException - relationshipGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsByParentGenusType

      ResourceRelationshipList getResourceRelationshipsByParentGenusType(Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException
      Gets the reource relationships for the given resource relationship genus type and include any relationships with a genus type derived from the specified genus type. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      relationshipGenusType - a relationship genus type
      Returns:
      the relationships
      Throws:
      NullArgumentException - relationshipGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsByRecordType

      ResourceRelationshipList getResourceRelationshipsByRecordType(Type relationshipRecordType) throws OperationFailedException, PermissionDeniedException
      Gets the resource relationships for the given resource relationship record type. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      relationshipRecordType - a relationship record type
      Returns:
      the relationships
      Throws:
      NullArgumentException - relationshipRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsOnDate

      Gets the resource relationships effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      from - starting date
      to - ending date
      Returns:
      the relationships
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsForSourceResource

      ResourceRelationshipList getResourceRelationshipsForSourceResource(Id sourceResourceId) throws OperationFailedException, PermissionDeniedException
      Gets the ResourceRelationships of a resource. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      sourceResourceId - Id of a Resource
      Returns:
      the relationships
      Throws:
      NullArgumentException - sourceResourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsForSourceResourceOnDate

      ResourceRelationshipList getResourceRelationshipsForSourceResourceOnDate(Id sourceResourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of resource relationships for a resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      sourceResourceId - a resource Id
      from - start of date range
      to - end of date range
      Returns:
      the relationships
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - sourceResourceId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsByGenusTypeForSourceResource

      ResourceRelationshipList getResourceRelationshipsByGenusTypeForSourceResource(Id sourceResourceId, Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException
      Gets the ResourceRelationships of a resource of relationship genus type that includes any genus type derived from the given one. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      sourceResourceId - Id of a Resource
      relationshipGenusType - a relationship genus type
      Returns:
      the relationships
      Throws:
      NullArgumentException - sourceResourceId or relationshipGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsByGenusTypeForSourceResourceOnDate

      ResourceRelationshipList getResourceRelationshipsByGenusTypeForSourceResourceOnDate(Id sourceResourceId, Type relationshipGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of resource relationships of a given genus type for a resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      sourceResourceId - a resource Id
      relationshipGenusType - a relationship genus type
      from - start of date range
      to - end of date range
      Returns:
      the relationships
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - sourceResourceId, relationshipGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsForDestinationResource

      ResourceRelationshipList getResourceRelationshipsForDestinationResource(Id destinationResourceId) throws OperationFailedException, PermissionDeniedException
      Gets the ResourceRelationships of a resource. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      destinationResourceId - Id of a Resource
      Returns:
      the relationships
      Throws:
      NullArgumentException - destinationResourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsForDestinationResourceOnDate

      ResourceRelationshipList getResourceRelationshipsForDestinationResourceOnDate(Id sourceResourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of resource relationships for a resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      sourceResourceId - a resource Id
      from - start of date range
      to - end of date range
      Returns:
      the relationships
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - destinationResourceId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsByGenusTypeForDestinationResource

      ResourceRelationshipList getResourceRelationshipsByGenusTypeForDestinationResource(Id destinationResourceId, Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException
      Gets the ResourceRelationships of a resource of relationship genus type that includes any genus type derived from the given one. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      destinationResourceId - Id of a Resource
      relationshipGenusType - a relationship genus type
      Returns:
      the relationships
      Throws:
      NullArgumentException - destinationResourceId or relationshipGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsByGenusTypeForDestinationResourceOnDate

      ResourceRelationshipList getResourceRelationshipsByGenusTypeForDestinationResourceOnDate(Id destinationResourceId, Type relationshipGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of resource relationships of a given genus type for a resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      destinationResourceId - a resource Id
      relationshipGenusType - a relationship genus type
      from - start of date range
      to - end of date range
      Returns:
      the relationships
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - destinationResourceId, relationshipGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsForResources

      ResourceRelationshipList getResourceRelationshipsForResources(Id sourceResourceId, Id destinationResourceId) throws OperationFailedException, PermissionDeniedException
      Gets the ResourceRelationships given two resources. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      sourceResourceId - Id of a Resource
      destinationResourceId - Id of another Resource
      Returns:
      the relationships
      Throws:
      NullArgumentException - sourceRelationshipId or destinationRelationshipId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsForResourcesOnDate

      ResourceRelationshipList getResourceRelationshipsForResourcesOnDate(Id sourceResourceId, Id destinationResourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of resource relationships for a two peer resources and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      sourceResourceId - a resource Id
      destinationResourceId - Id of another Resource
      from - start of date range
      to - end of date range
      Returns:
      the relationships
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - sourceResourceId, destinationResourceId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsByGenusTypeForResources

      ResourceRelationshipList getResourceRelationshipsByGenusTypeForResources(Id sourceResourceId, Id destinationResourceId, Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException
      Gets the ResourceRelationships given two resources and a relationship genus type which includes any genus types derived from the given genus type. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      sourceResourceId - Id of a Resource
      destinationResourceId - Id of another Resource
      relationshipGenusType - a relationship genus type
      Returns:
      the relationships
      Throws:
      NullArgumentException - sourceResourceId, destinationResourceId , or relatonshipGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationshipsByGenusTypeForResourcesOnDate

      ResourceRelationshipList getResourceRelationshipsByGenusTypeForResourcesOnDate(Id sourceResourceId, Id destinationResourceId, Type relationshipGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of resource relationships of a given genus type for a two peer resources and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.
      Parameters:
      sourceResourceId - a resource Id
      destinationResourceId - Id of another Resource
      relationshipGenusType - a relationship genus type
      from - start of date range
      to - end of date range
      Returns:
      the relationships
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - sourceResourceId, destinationResourceId, relationshipGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceRelationships

      Gets all ResourceRelationships . In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.
      Returns:
      the relationships
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.