Interface Candidate

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

public interface Candidate extends OsidRelationship

A Candidate represents a voting option in a race. A Candidate is a relationship between a Resource and a Race .

  • Method Details

    • getRaceId

      Id getRaceId()
      Gets the race Id of the candidate.
      Returns:
      the candidate Id
      Compliance:
      mandatory - This method must be implemented.
    • getRace

      Race getRace() throws OperationFailedException
      Gets the race of the candidate.
      Returns:
      the race
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getResourceId

      Id getResourceId()
      Gets the resource Id related to the candidate.
      Returns:
      the resource Id
      Compliance:
      mandatory - This method must be implemented.
    • getResource

      Resource getResource() throws OperationFailedException
      Gets the resource related to the candidate.
      Returns:
      the resource
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getCandidateRecord

      CandidateRecord getCandidateRecord(Type candidateRecordType) throws OperationFailedException
      Gets the candidate record corresponding to the given Candidate record Type . This method is used to retrieve an object implementing the requested record. The candidateRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(candidateRecordType) is true .
      Parameters:
      candidateRecordType - the candidate record type
      Returns:
      the candidate record
      Throws:
      NullArgumentException - candidateRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(candidateRecordType) is false
      Compliance:
      mandatory - This method must be implemented.