OSID Logo
OSID Specifications
osid package
Version 3.0.0
Release Candidate Preview
Interfaceosid.OsidRelationship
Implementsosid.OsidObject
osid.Temporal
Description

A Relationship associates two OSID objects. Relationships are transient. They define a date range for which they are in effect.

Unlike other OsidObjects that rely on the auxiliary Journaling OSID to track variance over time, OsidRelationships introduce a different concept of time independent from journaling. For example, in the present, a student was registered in a course and dropped it. The relationship between the student and the course remains pertinent, independent of any journaled changes that may have occurred to either the student or the course.

Once the student has dropped the course, the relationship has expired such that isEffective() becomes false. It can be inferred that during the period of the effective dates, the student was actively registered in the course. Here is an example:

  • T1. September 1: Student registers for course for grades
  • T2. September 10: Student drops course
  • T3. September 15: Student re-registers for course pass/fail

The relationships are:

                     
                     
                     T1. R1 {effective,   September 1  -> end of term,  data=grades}
                     T2. R1 {ineffective, September 1  -> September 10, data=grades}
                     T3. R1 {ineffective, September 1  -> September 10, data=grades}
                         R2 {effective,   September 10 -> end of term,  data=p/f}
                     
                                 
                     
                

An OSID Provider may also permit dates to be set in the future in which case the relationship can become automatically become effective at a future time and later expire. More complex effectiveness management can be done through other rule-based services.

OSID Consumer lookups and queries of relationships need to consider that it may be only effective relationshps are of interest.

MethodhasEndReason
Description

Tests if a reason this relationship came to an end is known.

Returnboolean true if an end reason is available, false otherwise
ErrorsILLEGAL_STATE isEffective() is true
CompliancemandatoryThis method must be implemented.
MethodgetEndReasonId
Description

Gets a state Id indicating why this relationship has ended.

Returnosid.id.Ida state Id
ErrorsILLEGAL_STATE hasEndReason() is false
CompliancemandatoryThis method must be implemented.
MethodgetEndReason
Description

Gets a state indicating why this relationship has ended.

Returnosid.process.Statea state
ErrorsILLEGAL_STATE hasEndReason() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.