Interface OsidRelationship
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, Temporal
- All Known Subinterfaces:
Activity, ActivityRegistration, Appointment, AssessmentEntry, Authorization, Availability, AwardEntry, Bid, Budget, BudgetEntry, Candidate, Comment, Commission, Commitment, Conferral, Contact, CourseEntry, CourseOffering, CourseRegistration, CredentialEntry, Credit, Deed, Docet, Edge, Effort, Enrollment, Entry, GradeEntry, Hold, Input, Instruction, Issue, Item, Lease, Lesson, Offering, Participant, Path, Plan, Proficiency, ProfileEntry, ProgramEntry, ProgramOffering, Provision, Provisionable, Registration, Relationship, Relevancy, Request, RequestTransaction, ResourceRelationship, Response, Route, Subscription, Vote
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.
-
Method Summary
Modifier and TypeMethodDescriptionGets a state indicating why this relationship has ended.Gets a stateIdindicating why this relationship has ended.booleanTests if a reason this relationship came to an end is known.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.Methods inherited from interface Temporal
getEndDate, getStartDate, isEffectiveModifier and TypeMethodDescriptionGets the end date.Gets the start date.booleanTests if the current date is within the start end end dates inclusive.
-
Method Details
-
hasEndReason
boolean hasEndReason()Tests if a reason this relationship came to an end is known.- Returns:
trueif an end reason is available,falseotherwise- Throws:
IllegalStateException-isEffective()istrue- Compliance:
mandatory- This method must be implemented.
-
getEndReasonId
Id getEndReasonId()Gets a stateIdindicating why this relationship has ended.- Returns:
- a state
Id - Throws:
IllegalStateException-hasEndReason()isfalse- Compliance:
mandatory- This method must be implemented.
-
getEndReason
Gets a state indicating why this relationship has ended.- Returns:
- a state
- Throws:
IllegalStateException-hasEndReason()isfalseOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-