OSID Logo
OSID Specifications
ontology package
Version 3.0.0
Release Candidate Preview
Interfaceosid.ontology.SubjectOntologyAssignmentSession
Implementsosid.OsidSession
Description

This session provides methods to re-assign Subjects to Ontologies. A Subject may map to multiple Ontologies and removing the last reference to a Subject is the equivalent of deleting it. Each Ontology may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Subject to another Ontology is not a copy operation (eg: does not change its Id ).

MethodcanAssignSubjects
Description

Tests if this user can alter subject/ontology mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignSubjectsToOntology
Description

Tests if this user can alter subject/ontology mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Parametersosid.id.IdontologyIdthe Id of the Ontology
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT ontologyId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableOntologyIds
Description

Gets a list of ontologies including and under the given ontology node in which any subject can be assigned.

Parametersosid.id.IdontologyIdthe Id of the Ontology
Returnosid.id.IdListlist of assignable ontology Ids
ErrorsNULL_ARGUMENT ontologyId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableOntologyIdsForSubject
Description

Gets a list of ontologies including and under the given ontology node in which a specific subject can be assigned.

Parametersosid.id.IdontologyIdthe Id of the Ontology
osid.id.IdsubjectIdthe Id of the Subject
Returnosid.id.IdListlist of assignable ontology Ids
ErrorsNULL_ARGUMENT ontologyId or subjectId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignSubjectToOntology
Description

Adds an existing Subject to an Ontology.

Parametersosid.id.IdsubjectIdthe Id of the Subject
osid.id.IdontologyIdthe Id of the Ontology
ErrorsALREADY_EXISTS subjectId is already assigned to ontologyId
NOT_FOUND subjectId or ontologyId not found
NULL_ARGUMENT subjectId or ontologyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignSubjectFromOntology
Description

Removes a Subject from an Ontology.

Parametersosid.id.IdsubjectIdthe Id of the Subject
osid.id.IdontologyIdthe Id of the Ontology
ErrorsNOT_FOUND subjectId or ontologyId not found or subjectId not assigned to ontologyId
NULL_ARGUMENT subjectId or ontologyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignSubjectToOntology
Description

Moves a Subject from one Ontology to another. Mappings to other Ontologies are unaffected.

Parametersosid.id.IdsubjectIdthe Id of the Subject
osid.id.IdfromOntologyIdthe Id of the current Ontology
osid.id.IdtoOntologyIdthe Id of the destination Ontology
ErrorsNOT_FOUND subjectId, fromOntologyId, or toOntologyId not found or subjectId not mapped to fromOntologyId
NULL_ARGUMENT subjectId, fromOntologyId, or toOntologyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.