public interface OsidRelationship extends OsidObject, Temporal
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:
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.
| Modifier and Type | Method and Description |
|---|---|
State |
getEndReason()
Gets a state indicating why this relationship has ended.
|
Id |
getEndReasonId()
Gets a state
Id indicating why this relationship has
ended. |
boolean |
hasEndReason()
Tests if a reason this relationship came to an end is known.
|
getDescription, getDisplayName, getGenusType, isOfGenusTypegetId, isCurrentgetRecordTypes, hasRecordTypegetProperties, getPropertiesByRecordTypegetEndDate, getStartDate, isEffectiveboolean hasEndReason()
true if an end reason is available,
false otherwiseIllegalStateException - isEffective() is
true mandatory - This method must be implemented. Id getEndReasonId()
Id indicating why this relationship has
ended. Id IllegalStateException - hasEndReason()
is false mandatory - This method must be implemented. State getEndReason() throws OperationFailedException
IllegalStateException - hasEndReason()
is false OperationFailedException - unable to complete requestmandatory - This method must be implemented.