public interface SubjectLookupSession extends OsidSession
This session provides methods for retrieving Subject s.
This session defines views that offer differing behaviors when retrieving multiple objects.
SubjectAdminSession. Subjects may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Subject.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupSubjects()
Tests if this user can perform
Subject lookups. |
Ontology |
getOntology()
Gets the
Ontology associated with this session. |
Id |
getOntologyId()
Gets the
Ontology Id associated with
this session. |
Subject |
getSubject(Id subjectId)
Gets the
Subject specified by its Id. |
SubjectList |
getSubjects()
Gets all
Subjects. |
SubjectList |
getSubjectsByGenusType(Type subjectGenusType)
Gets a
SubjectList corresponding to the given subject
genus Type which does not include subjects of genus
types derived from the specified Type. |
SubjectList |
getSubjectsByIds(IdList subjectIds)
Gets a
SubjectList corresponding to the given
IdList. |
SubjectList |
getSubjectsByParentGenusType(Type subjectGenusType)
Gets a
SubjectList corresponding to the given subject
genus Type and include any additional subject with
genus types derived from the specified Type. |
SubjectList |
getSubjectsByRecordType(Type subjectRecordType)
Gets a
SubjectList containing the given term record
Type. |
void |
useComparativeSubjectView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useFederatedOntologyView()
Federates the view for methods in this session.
|
void |
useIsolatedOntologyView()
Isolates the view for methods in this session.
|
void |
usePlenarySubjectView()
A complete view of the
Subject returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getOntologyId()
Ontology Id associated with
this session. Ontology Id associated with this sessionmandatory - This method must be implemented. Ontology getOntology() throws OperationFailedException, PermissionDeniedException
Ontology associated with this session. Ontology associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupSubjects()
Subject 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 to
unauthorized users. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeSubjectView()
mandatory - This method is must be implemented. void usePlenarySubjectView()
Subject 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.mandatory - This method is must be implemented. void useFederatedOntologyView()
mandatory - This method is must be implemented. void useIsolatedOntologyView()
mandatory - This method is must be implemented. Subject getSubject(Id subjectId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Subject specified by its Id. In
plenary mode, the exact Id is found or a
NOT_FOUND results. Otherwise, the returned Subject
may have a different Id than requested, such as
the case where a duplicate Id was assigned to a
Subject and retained for compatibility.subjectId - Id of the Subject NotFoundException - subjectId not foundNullArgumentException - subjectId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. SubjectList getSubjectsByIds(IdList subjectIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
SubjectList corresponding to the given
IdList. In plenary mode, the returned list contains all of the
subjects 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 Subjects may be omitted from the list and
may present the elements in any order including returning a unique
set.subjectIds - the list of Ids to retrieve Subject listNotFoundException - an Id was not foundNullArgumentException - subjectIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. SubjectList getSubjectsByGenusType(Type subjectGenusType) throws OperationFailedException, PermissionDeniedException
SubjectList corresponding to the given subject
genus Type which does not include subjects of genus
types derived from the specified Type. In plenary mode,
the returned list contains all known subjects or an error results.
Otherwise, the returned list may contain only those subjects that are
accessible through this session.subjectGenusType - a subject genus type Subject listNullArgumentException - subjectGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. SubjectList getSubjectsByParentGenusType(Type subjectGenusType) throws OperationFailedException, PermissionDeniedException
SubjectList corresponding to the given subject
genus Type and include any additional subject with
genus types derived from the specified Type. In plenary
mode, the returned list contains all known terms or an error results.
Otherwise, the returned list may contain only those subjects that are
accessible through this session.subjectGenusType - a subject genus type Subject listNullArgumentException - subjectGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. SubjectList getSubjectsByRecordType(Type subjectRecordType) throws OperationFailedException, PermissionDeniedException
SubjectList containing the given term record
Type. In plenary mode, the returned list contains all
known subjects or an error results. Otherwise, the returned list may
contain only those subjects that are accessible through this session.subjectRecordType - a subject record type Subject listNullArgumentException - subjectRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. SubjectList getSubjects() throws OperationFailedException, PermissionDeniedException
Subjects. In plenary mode, the returned list
contains all known subjects or an error results. Otherwise, the
returned list may contain only those subjects that are accessible
through this session. SubjectList OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.