Interface AssetTemporalSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AssetTemporalSession extends OsidSession

This session defines a means for accessing temporal coverage of an asset. The views sorrespond to the view defined in the AssetLookupSession .

  • Method Details

    • getRepositoryId

      Id getRepositoryId()
      Gets the Repository Id associated with this session.
      Returns:
      the Repository Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getRepository

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

      boolean canLookupTemporalCoverage()
      Tests if this user can perform temporal lookups. 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 lookup operations.
      Returns:
      false if lookups are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeAssetView

      void useComparativeAssetView()
      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.
    • usePlenaryAssetView

      void usePlenaryAssetView()
      A complete view of the Asset 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.
    • useFederatedRepositoryView

      void useFederatedRepositoryView()
      Federates the view for methods in this session. A federated view will include assets in repositories which are children of this repository in the repository hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedRepositoryView

      void useIsolatedRepositoryView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this repository only.
      Compliance:
      mandatory - This method is must be implemented.
    • getTemporalCoverage

      Gets the temporal coverage related to the subject of this asset. Each element of the returned list describes a range of 2 times each described by a point in time with specified granularity and uncertainty. If the list contains more than one element, each element indicates a relevant time or period for the subject of this asset.
      Parameters:
      assetId - Id of the Asset to query
      Returns:
      a list of times relevant to the subject of this asset
      Throws:
      NotFoundException - assetId is not found
      NullArgumentException - assetId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getAssetIdsByTemporalCoverage

      IdList getAssetIdsByTemporalCoverage(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets asset Ids with temporal coverege within the specified dates inclusive.
      Parameters:
      from - starting range
      to - ending range
      Returns:
      list of asset Ids
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getAssetsByTemporalCoverage

      RepositoryList getAssetsByTemporalCoverage(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets assets with temporal coverege within the specified dates inclusive.
      Parameters:
      from - starting range
      to - ending range
      Returns:
      list of assets
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.