Interface RelevancyLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RelevancyLookupSession extends OsidSession

This session provides methods for examining subject relevancy.

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 ontology view: All relevancy methods in this session operate, retrieve and pertain to relevancies defined explicitly in the current ontology. Using an isolated view is useful for managing relevancies with the RelevancyAdminSession .
  • federated ontology view: All relevancy methods in this session operate, retrieve and pertain to all relevancies defined in this ontology and any other obtologies implicitly available in this ontology through ontology inheritence.
  • effective relevancy view: All relevancy methods return effective relevancies.
  • any effective relevancy view: Both effective and ineffective relevancies are returned.
  • Method Details

    • getOntologyId

      Id getOntologyId()
      Gets the Ontology Id associated with this session.
      Returns:
      the Ontology Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getOntology

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

      boolean canLookupRelevancies()
      Tests if this user can lookup subject relevancies. 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 to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeRelevancyView

      void useComparativeRelevancyView()
      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.
    • usePlenaryRelevancyView

      void usePlenaryRelevancyView()
      A complete view of the Relevancy 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.
    • useFederatedOntologyView

      void useFederatedOntologyView()
      Federates the view for methods in this session. A federated view will include relevancies in ontologies which are children of this ontology in the ontology hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedOntologyView

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

      void useEffectiveRelevancyView()
      The returns from the lookup methods return only effetive relevancies.
      Compliance:
      mandatory - This method is must be implemented.
    • useAnyEffectiveRelevancyView

      void useAnyEffectiveRelevancyView()
      Both effective and ineffective relavcnies are returned.
      Compliance:
      mandatory - This method is must be implemented.
    • getRelevancy

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

      Gets a RelevancyList corresponding to the given IdList . In plenary mode, the returned list contains all of the relevancies 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 relevancies may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      relevancyIds - the list of Ids to retrieve
      Returns:
      the returned Relevancy list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - relevancyIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRelevanciesByGenusType

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

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

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

      Gets a RelevancyList effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known relevancies or an error results. Otherwise, the returned list may contain only those relevancies that are accessible through this session. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      from - a starting date
      to - an ending date
      Returns:
      list of relevancies
      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.
    • getRelevanciesByGenusTypeOnDate

      RelevancyList getRelevanciesByGenusTypeOnDate(Type relevancyGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a RelevancyList of the given genus type 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 relevancies or an error results. Otherwise, the returned list may contain only those relevancies that are accessible through this session. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      relevancyGenusType - relevancy genus type
      from - a starting date
      to - an ending date
      Returns:
      list of relevancies
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - relevancyGenusType, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRelevanciesForSubject

      RelevancyList getRelevanciesForSubject(Id subjectId) throws OperationFailedException, PermissionDeniedException
      Gets the Relevancy mapped to a subject Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Relevancy may have a different Id than requested, such as the case where a duplicate Id was assigned to a Relevancy and retained for compatibility. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      subjectId - the subject Id
      Returns:
      list of relevancies
      Throws:
      NullArgumentException - subjectId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getRelevanciesForSubjectOnDate

      RelevancyList getRelevanciesForSubjectOnDate(Id subjectId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a RelevancyList for the given subject effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known relevancies or an error results. Otherwise, the returned list may contain only those relevancies that are accessible through this session. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      subjectId - the subject Id
      from - a starting date
      to - an ending date
      Returns:
      list of relevancies
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - subjectId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRelevanciesByGenusTypeForSubject

      RelevancyList getRelevanciesByGenusTypeForSubject(Id subjectId, Type relevancyGenusType) throws OperationFailedException, PermissionDeniedException
      Gets the Relevancy mapped to a subject Id and relevancy genus Type . Genus Types derived from the given genus Type are included. In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Relevancy may have a different Id than requested, such as the case where a duplicate Id was assigned to a Relevancy and retained for compatibility. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      subjectId - the subject Id
      relevancyGenusType - relevancy genus type
      Returns:
      list of relevancies
      Throws:
      NullArgumentException - subjectId or relevancyGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getRelevanciesByGenusTypeForSubjectOnDate

      RelevancyList getRelevanciesByGenusTypeForSubjectOnDate(Id subjectId, Type relevancyGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a RelevancyList of the given genus type for the given subject effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known relevancies or an error results. Otherwise, the returned list may contain only those relevancies that are accessible through this session. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      subjectId - the subject Id
      relevancyGenusType - relevancy genus type
      from - a starting date
      to - an ending date
      Returns:
      list of relevancies
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - subjectId, relevancyGenusType, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRelevanciesForSubjects

      RelevancyList getRelevanciesForSubjects(IdList subjectIds) throws OperationFailedException, PermissionDeniedException
      Gets the relevancies for the given subject Ids . In plenary mode, the returned list contains all of the relevancies specified in the subject Id list, in the order of the list, including duplicates, or an error results if a relevancy Id in the supplied list is not found or inaccessible. Otherwise, inaccessible relevancies may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      subjectIds - list of subject Ids
      Returns:
      list of relevancies
      Throws:
      NullArgumentException - subjectIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getRelevanciesForMappedId

      RelevancyList getRelevanciesForMappedId(Id id) throws OperationFailedException, PermissionDeniedException
      Gets the Relevancy elements mapped to an Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Relevancy may have a different Id than requested, such as the case where a duplicate Id was assigned to a Relevancy and retained for compatibility. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      id - an Id
      Returns:
      list of relevancies
      Throws:
      NullArgumentException - id is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getRelevanciesForMappedIdOnDate

      RelevancyList getRelevanciesForMappedIdOnDate(Id id, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a RelevancyList for the given mapped Id effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known relevancies or an error results. Otherwise, the returned list may contain only those relevancies that are accessible through this session. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      id - an Id
      from - a starting date
      to - an ending date
      Returns:
      list of relevancies
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - id, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRelevanciesByGenusTypeForMappedId

      RelevancyList getRelevanciesByGenusTypeForMappedId(Id id, Type relevancyGenusType) throws OperationFailedException, PermissionDeniedException
      Gets the Relevancy elements mapped to an Id of the given relevancy genus Type which includes derived genus Types . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Relevancy may have a different Id than requested, such as the case where a duplicate Id was assigned to a Relevancy and retained for compatibility. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      id - an Id
      relevancyGenusType - relevancy genus type
      Returns:
      list of relevancies
      Throws:
      NullArgumentException - id or relevancyGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getRelevanciesByGenusTypeForMappedIdOnDate

      RelevancyList getRelevanciesByGenusTypeForMappedIdOnDate(Id id, Type relevancyGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a RelevancyList of the given genus type for the given mapped Id effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known relevancies or an error results. Otherwise, the returned list may contain only those relevancies that are accessible through this session. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      id - an Id
      relevancyGenusType - relevancy genus type
      from - a starting date
      to - an ending date
      Returns:
      list of relevancies
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - id, relevancyGenusType, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRelevanciesForMappedIds

      Gets the relevancies for the given mapped Ids . In plenary mode, the returned list contains all of the relevancies mapped to the Id or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible relevancies may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      ids - a list of Ids
      Returns:
      list of relevancies
      Throws:
      NullArgumentException - ids is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getRelevanciesForSubjectAndMappedId

      RelevancyList getRelevanciesForSubjectAndMappedId(Id subjectId, Id id) throws OperationFailedException, PermissionDeniedException
      Gets the Relevancy mapped to a subject and mapped Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Relevancy may have a different Id than requested, such as the case where a duplicate Id was assigned to a Relevancy and retained for compatibility. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      subjectId - the subject Id
      id - the mapped Id
      Returns:
      list of relevancies
      Throws:
      NullArgumentException - subjectId or id is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getRelevanciesForSubjectAndMappedIdOnDate

      RelevancyList getRelevanciesForSubjectAndMappedIdOnDate(Id subjectId, Id id, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a RelevancyList for the given subject and mapped Id effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known relevancies or an error results. Otherwise, the returned list may contain only those relevancies that are accessible through this session. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      subjectId - the subject Id
      id - the mapped Id
      from - a starting date
      to - an ending date
      Returns:
      list of relevancies
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - subjectId, id, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRelevanciesByGenusTypeForSubjectAndMappedId

      RelevancyList getRelevanciesByGenusTypeForSubjectAndMappedId(Id subjectId, Id id, Type relevancyGenusType) throws OperationFailedException, PermissionDeniedException
      Gets the Relevancy of the given genus type and mapped to a subject and mapped Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Relevancy may have a different Id than requested, such as the case where a duplicate Id was assigned to a Relevancy and retained for compatibility. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      subjectId - the subject Id
      id - the mapped Id
      relevancyGenusType - relevancy genus type
      Returns:
      list of relevancies
      Throws:
      NullArgumentException - subjectId, id , or relevancyGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getRelevanciesByGenusTypeForSubjectAndMappedIdOnDate

      RelevancyList getRelevanciesByGenusTypeForSubjectAndMappedIdOnDate(Id subjectId, Id id, Type relevancyGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a RelevancyList of the given genus type and related to the given subject and mapped Id effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known relevancies or an error results. Otherwise, the returned list may contain only those relevancies that are accessible through this session. In effective mode, relevancies are returned that are currently effective. In any effective mode, effective relevancies and those currently expired are returned.
      Parameters:
      subjectId - the subject Id
      id - the mapped Id
      relevancyGenusType - relevancy genus type
      from - a starting date
      to - an ending date
      Returns:
      list of relevancies
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - subjectId, id, relevancyGenusTYpe, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getRelevancies

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