OSID Logo
OSID Specifications
voting rules package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.rules.RaceProcessorQuery
Implementsosid.OsidProcessorQuery
Description

This is the query for searching race processors. Each method match specifies a AND term while multiple invocations of the same method produce a nested OR.

MethodmatchMaximumWinners
Description

Matches rules with a maximum winners value between the given range inclusive.

Parameterscardinallowstart of range
cardinalhighend of range
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT low is greater than high
CompliancemandatoryThis method must be implemented.
MethodmatchAnyMaximumWinners
Description

Matches rules with any maximum winner value.

Parametersbooleanmatch true to match rules with a maximum winner value, false to match rules with no maximum winner value
CompliancemandatoryThis method must be implemented.
MethodclearMaximumWinnersTerms
Description

Clears the maximum winners terms.

CompliancemandatoryThis method must be implemented.
MethodmatchMinimumPercentageToWin
Description

Matches rules with a minimum percentage to win value between the given range inclusive.

Parameterscardinallowstart of range
cardinalhighend of range
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT low is greater than high
CompliancemandatoryThis method must be implemented.
MethodmatchAnyMinimumPercentageToWin
Description

Matches rules with any minimum percentage to win value.

Parametersbooleanmatch true to match rules with a minimum value, false to match rules with no minimum value
CompliancemandatoryThis method must be implemented.
MethodclearMinimumPercentageToWinTerms
Description

Clears the minimum percentage to win terms.

CompliancemandatoryThis method must be implemented.
MethodmatchMinimumVotesToWin
Description

Matches rules with a minimum votes to win value between the given range inclusive.

Parameterscardinallowstart of range
cardinalhighend of range
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT low is greater than high
CompliancemandatoryThis method must be implemented.
MethodmatchAnyMinimumVotesToWin
Description

Matches rules with any minimum votes to win value.

Parametersbooleanmatch true to match rules with a minimum value, false to match rules with no minimum value
CompliancemandatoryThis method must be implemented.
MethodclearMinimumVotesToWinTerms
Description

Clears the minimum votes to win terms.

CompliancemandatoryThis method must be implemented.
MethodmatchRuledRaceId
Description

Matches rules mapped to the race.

Parametersosid.id.IdraceIdthe race Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT raceId is null
CompliancemandatoryThis method must be implemented.
MethodclearRuledRaceIdTerms
Description

Clears the race Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsRuledRaceQuery
Description

Tests if a RaceQuery is available.

Returnboolean true if a race query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRuledRaceQuery
Description

Gets the query for a race. Multiple retrievals produce a nested OR term.

Returnosid.voting.RaceQuerythe race query
ErrorsUNIMPLEMENTED supportsRuledRaceQuery() is false
ComplianceoptionalThis method must be implemented if supportsRuledRaceQuery() is true.
MethodmatchAnyRuledRace
Description

Matches any rule mapped to any race.

Parametersbooleanmatch true for rules mapped to any race, false to match rules mapped to no race
CompliancemandatoryThis method must be implemented.
MethodclearRuledRaceTerms
Description

Clears the race query terms.

CompliancemandatoryThis method must be implemented.
MethodmatchPollsId
Description

Matches rules mapped to the polls.

Parametersosid.id.IdpollsIdthe polls Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT pollsId is null
CompliancemandatoryThis method must be implemented.
MethodclearPollsIdTerms
Description

Clears the polls Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsPollsQuery
Description

Tests if a PollsQuery is available.

Returnboolean true if a polls query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetPollsQuery
Description

Gets the query for a polls. Multiple retrievals produce a nested OR term.

Returnosid.voting.PollsQuerythe polls query
ErrorsUNIMPLEMENTED supportsPollsQuery() is false
ComplianceoptionalThis method must be implemented if supportsPollsQuery() is true.
MethodclearPollsTerms
Description

Clears the polls query terms.

CompliancemandatoryThis method must be implemented.
MethodgetRaceProcessorQueryRecord
Description

Gets the race processor query record corresponding to the given RaceProcessor record Type. Multiple record retrievals produce a nested OR term.

Parametersosid.type.TyperaceProcessorRecordTypea race processor record type
Returnosid.voting.rules.records.RaceProcessorQueryRecordthe race processor query record
ErrorsNULL_ARGUMENT raceProcessorRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(raceProcessorRecordType) is false
CompliancemandatoryThis method must be implemented.