public interface SubjectOntologySession extends OsidSession
This session provides methods to retrieve Subject
to
Ontology
mappings. A Subject
may appear in
multiple Ontologies.
Each Ontology
may have
its own authorizations governing who is allowed to look at it.
This lookup session defines two views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupSubjectOntologyMappings()
Tests if this user can perform lookups of subject/ontology mappings.
|
OntologyList |
getOntologiesBySubject(Id subjectId)
Gets the list of
Ontologies mapped to a Subject. |
IdList |
getOntologyIdsBySubject(Id subjectId)
Gets the list of
Ontology Ids mapped to
a Subject. |
IdList |
getSubjectIdsByOntologies(IdList ontologyIds)
Gets the list of
Subject Ids corresponding to a list of
Ontologies. |
IdList |
getSubjectIdsByOntology(Id ontologyId)
Gets the list of
Subject Ids associated
with an Ontology. |
SubjectList |
getSubjectsByOntologies(IdList ontologyIds)
Gets the list of
Subjects corresponding to a list of
Ontologies. |
SubjectList |
getSubjectsByOntology(Id ontologyId)
Gets the list of
Subjects associated with an
Ontology. |
void |
useComparativeOntologyView()
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 |
usePlenaryOntologyView()
A complete view of the
Subject and Ontology
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupSubjectOntologyMappings()
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if looking up mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeOntologyView()
mandatory
- This method is must be implemented. void usePlenaryOntologyView()
Subject
and Ontology
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. IdList getSubjectIdsByOntology(Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Subject
Ids
associated
with an Ontology.
ontologyId
- Id
of the Ontology
Ids
NotFoundException
- ontologyId
is not
foundNullArgumentException
- ontologyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. SubjectList getSubjectsByOntology(Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Subjects
associated with an
Ontology.
ontologyId
- Id
of the Ontology
Ids
NotFoundException
- ontologyId
is not
foundNullArgumentException
- ontologyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getSubjectIdsByOntologies(IdList ontologyIds) throws OperationFailedException, PermissionDeniedException
Subject Ids
corresponding to a list of
Ontologies.
ontologyIds
- list of ontology Ids
Ids
NullArgumentException
- ontologyIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. SubjectList getSubjectsByOntologies(IdList ontologyIds) throws OperationFailedException, PermissionDeniedException
Subjects
corresponding to a list of
Ontologies.
ontologyIds
- list of ontology Ids
NullArgumentException
- ontologyIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getOntologyIdsBySubject(Id subjectId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ontology
Ids
mapped to
a Subject.
subjectId
- Id
of a Subject
Ids
NotFoundException
- subjectId
is not
foundNullArgumentException
- subjectId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OntologyList getOntologiesBySubject(Id subjectId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ontologies
mapped to a Subject.
subjectId
- Id
of a Subject
NotFoundException
- subjectId
is not
foundNullArgumentException
- subjectId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.