public interface OntologyAssignmentSession extends OsidSession
This session provides methods to manage Id
to
Ontology
mappings. Arbitrary Ids
may be used to
offer a restricted ontology to allow an arbitrary Id
to be
used in the SubjectLookupSession
or the
SubjectHierarchySession.
Only one ontology can be assigned to an
Id.
Modifier and Type | Method and Description |
---|---|
void |
assignOntology(Id id,
Id ontologyId)
Assigns an
Id to an ontology. |
boolean |
canAssignOntologies()
Tests if this user can manage of id/ontology mappings.
|
void |
getIds(Id ontologyId)
Gets a list of the
Ids assigned to an ontology. |
void |
getOntology(Id id)
Gets the ontology to which the
Id is assigned. |
void |
unassignOntology(Id id,
Id ontologyId)
Unassigns an
Id from an ontology. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignOntologies()
PERMISSION_DENIED.
This is intended as a
hint to an application that may wish not to offer mapping functions to
unauthorized users. false
if managing mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void assignOntology(Id id, Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
to an ontology.id
- an Id
ontologyId
- Id
of the Ontology
NotFoundException
- ontologyId
is not
foundNullArgumentException
- id
or
ontologyId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignOntology(Id id, Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
from an ontology.id
- an Id
ontologyId
- Id
of the Ontology
NotFoundException
- id
not assigned to
ontologyId
NullArgumentException
- id
or
ontologyId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void getOntology(Id id) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is assigned.id
- an Id
NotFoundException
- id
not foundNullArgumentException
- id
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void getIds(Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
assigned to an ontology.ontologyId
- Id
of the Ontology
NotFoundException
- ontologyId
not foundNullArgumentException
- ontologyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.