Interface Relationship

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal

public interface Relationship extends OsidRelationship

A Relationship is an object between two peers. The genus type indicates the relationship between the peer and the related peer.

  • Method Details

    • getSourceId

      Id getSourceId()
      Gets the from peer Id in this relationship.
      Returns:
      the peer
      Compliance:
      mandatory - This method must be implemented.
    • getDestinationId

      Id getDestinationId()
      Gets the to peer Id in this relationship.
      Returns:
      the related peer
      Compliance:
      mandatory - This method must be implemented.
    • getRelationshipRecord

      RelationshipRecord getRelationshipRecord(Type relationshipRecordType) throws OperationFailedException, PermissionDeniedException
      Gets the relationshop record corresponding to the given Relationship record Type . This method is used to retrieve an object implementing the requested record. The relationshipRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(relationshipRecordType) is true .
      Parameters:
      relationshipRecordType - the type of relationship record to retrieve
      Returns:
      the relationship record
      Throws:
      NullArgumentException - relationshipRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - hasRecordType(relationshipRecordType) is false
      Compliance:
      mandatory - This method must be implemented.