public interface OntologyLookupSession extends OsidSession
This session provides methods for retrieving Ontology
objects. The Ontology
represents a collection of
Subjects.
This session defines views that offer differing behaviors when retrieving multiple objects.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. For
example, a browsing application may only need to examine the
Ontologies
it can access, without breaking execution. However, an
administrative application may require all Ontology
elements to be available.
Ontologies may have an additional records indicated by their
respective record types. The record may not be accessed through a cast of
the Ontology.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupOntologies()
Tests if this user can perform
Ontology lookups. |
OntologyList |
getOntologies()
Gets all
Ontologies. |
OntologyList |
getOntologiesByGenusType(Type ontologyGenusType)
Gets an
OntologyList corresponding to the given
ontology genus Type which does not include ontologies
of types derived from the specified Type. |
OntologyList |
getOntologiesByIds(IdList ontologyIds)
Gets an
OntologyList corresponding to the given
IdList. |
OntologyList |
getOntologiesByParentGenusType(Type ontologyGenusType)
Gets an
OntologyList corresponding to the given
ontology genus Type and include any additional
ontologies with genus types derived from the specified Type. |
OntologyList |
getOntologiesByProvider(Id resourceId)
Gets an
OntologyList for the given provider. |
OntologyList |
getOntologiesByRecordType(Type ontologyRecordType)
Gets an
OntologyList containing the given ontology
record Type. |
Ontology |
getOntology(Id ontologyId)
Gets the
Ontology specified by its Id. |
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
Ontology returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupOntologies()
Ontology
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 useComparativeOntologyView()
mandatory
- This method is must be implemented. void usePlenaryOntologyView()
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. Ontology getOntology(Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ontology
specified by its Id.
In plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Ontology
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to an
Ontology
and retained for compatility.ontologyId
- Id
of the Ontology
NotFoundException
- ontologyId
not foundNullArgumentException
- ontologyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. OntologyList getOntologiesByIds(IdList ontologyIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
OntologyList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
ontologies 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 Ontology
objects may be omitted from the
list and may present the elements in any order including returning a
unique set.ontologyIds
- the list of Ids
to retrieve Ontology
listNotFoundException
- an Id was
not foundNullArgumentException
- ontologyIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OntologyList getOntologiesByGenusType(Type ontologyGenusType) throws OperationFailedException, PermissionDeniedException
OntologyList
corresponding to the given
ontology genus Type
which does not include ontologies
of types derived from the specified Type.
In plenary
mode, the returned list contains all known ontologies or an error
results. Otherwise, the returned list may contain only those
ontologies that are accessible through this session.ontologyGenusType
- an ontology genus type Ontology
listNullArgumentException
- ontologyGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OntologyList getOntologiesByParentGenusType(Type ontologyGenusType) throws OperationFailedException, PermissionDeniedException
OntologyList
corresponding to the given
ontology genus Type
and include any additional
ontologies with genus types derived from the specified Type.
In plenary mode, the returned list contains all known
ontologies or an error results. Otherwise, the returned list may
contain only those ontologies that are accessible through this
session.ontologyGenusType
- an ontology genus type Ontology
listNullArgumentException
- ontologyGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OntologyList getOntologiesByRecordType(Type ontologyRecordType) throws OperationFailedException, PermissionDeniedException
OntologyList
containing the given ontology
record Type.
In plenary mode, the returned list
contains all known ontologies or an error results. Otherwise, the
returned list may contain only those ontologies that are accessible
through this session.ontologyRecordType
- an ontology record type Ontology
listNullArgumentException
- ontologyRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OntologyList getOntologiesByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
OntologyList
for the given provider. In plenary
mode, the returned list contains all known ontologies or an error
results. Otherwise, the returned list may contain only those
ontologies that are accessible through this session.resourceId
- a resource Id
Ontology
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OntologyList getOntologies() throws OperationFailedException, PermissionDeniedException
Ontologies.
In plenary mode, the returned list
contains all known ontologies or an error results. Otherwise, the
returned list may contain only those ontologies that are accessible
through this session. OntologyList
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.