Interface OntologyAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 .
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignOntology(Id id, Id ontologyId) Assigns anIdto an ontology.booleanTests if this user can manage of id/ontology mappings.voidGets a list of theIdsassigned to an ontology.voidgetOntology(Id id) Gets the ontology to which theIdis assigned.voidunassignOntology(Id id, Id ontologyId) Unassigns anIdfrom an ontology.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignOntologies
boolean canAssignOntologies()Tests if this user can manage of id/ontology mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known assignment methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may wish not to offer mapping functions to unauthorized users.- Returns:
falseif managing mappings is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
assignOntology
void assignOntology(Id id, Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException Assigns anIdto an ontology.- Parameters:
id-an IdontologyId-Idof theOntology- Throws:
NotFoundException-ontologyIdis not foundNullArgumentException-idorontologyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignOntology
void unassignOntology(Id id, Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException Unassigns anIdfrom an ontology.- Parameters:
id-an IdontologyId-Idof theOntology- Throws:
NotFoundException-idnot assigned toontologyIdNullArgumentException-idorontologyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getOntology
void getOntology(Id id) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the ontology to which theIdis assigned.- Parameters:
id-an Id- Throws:
NotFoundException-idnot foundNullArgumentException-idisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIds
void getIds(Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a list of theIdsassigned to an ontology.- Parameters:
ontologyId-Idof theOntology- Throws:
NotFoundException-ontologyIdnot foundNullArgumentException-ontologyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-