OSID Logo
OSID Specifications
voting package
Version 3.0.0
Interfaceosid.voting.CandidateQuery
Implementsosid.OsidRelationshipQuery
Used Byosid.voting.CandidateQuerySession
osid.voting.CandidateSearchSession
osid.voting.CandidateSmartPollsSession
osid.voting.PollsQuery
osid.voting.RaceQuery
osid.voting.VoteQuery
Description

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

MethodmatchRaceId
Description

Sets the race Id for this query.

Parametersosid.id.IdraceIda race Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTraceId is null
CompliancemandatoryThis method must be implemented.
MethodclearRaceIdTerms
Description

Clears the race Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsRaceQuery
Description

Tests if a RaceQuery is available for querying candidates.

Returnbooleantrue if a race query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRaceQuery
Description

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

Returnosid.voting.RaceQuerythe race query
ErrorsUNIMPLEMENTEDsupportsRaceQuery() is false
ComplianceoptionalThis method must be implemented if supportsRaceQuery() is true .
MethodclearRaceTerms
Description

Clears the race terms.

CompliancemandatoryThis method must be implemented.
MethodmatchResourceId
Description

Sets the resource Id for this query.

Parametersosid.id.IdresourceIda resource Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTresourceId is null
CompliancemandatoryThis method must be implemented.
MethodclearResourceIdTerms
Description

Clears the resource Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsResourceQuery
Description

Tests if a ResourceQuery is available for querying candidates.

Returnbooleantrue if a resource query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetResourceQuery
Description

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

Returnosid.resource.ResourceQuerythe resource query
ErrorsUNIMPLEMENTEDsupportsResourceQuery() is false
ComplianceoptionalThis method must be implemented if supportsResourceQuery() is true .
MethodclearResourceTerms
Description

Clears the resource terms.

CompliancemandatoryThis method must be implemented.
MethodmatchVoteId
Description

Sets the vote Id for this query.

Parametersosid.id.IdvoteIdthe vote Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTvoteId is null
CompliancemandatoryThis method must be implemented.
MethodclearVoteIdTerms
Description

Clears the vote Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsVoteQuery
Description

Tests if a VoteQuery is available.

Returnbooleantrue if a vote query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetVoteQuery
Description

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

Returnosid.voting.VoteQuerythe vote query
ErrorsUNIMPLEMENTEDsupportsVoteQuery() is false
ComplianceoptionalThis method must be implemented if supportsVoteQuery() is true .
MethodmatchAnyVote
Description

Matches candidates with any vote.

Parametersbooleanmatchtrue to match any vote, false to match candidates with no votes
CompliancemandatoryThis method must be implemented.
MethodclearVoteTerms
Description

Clears the vote terms.

CompliancemandatoryThis method must be implemented.
MethodmatchPollsId
Description

Sets the polls Id for this query.

Parametersosid.id.IdpollsIdthe polls Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTpollsId is null
CompliancemandatoryThis method must be implemented.
MethodclearPollsIdTerms
Description

Clears the polls Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsPollsQuery
Description

Tests if a PollsQuery is available.

Returnbooleantrue 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
ErrorsUNIMPLEMENTEDsupportsPollsQuery() is false
ComplianceoptionalThis method must be implemented if supportsPollsQuery() is true .
MethodclearPollsTerms
Description

Clears the polls terms.

CompliancemandatoryThis method must be implemented.
MethodgetCandidateQueryRecord
Description

Gets the candidate query record corresponding to the given Candidate record Type . Multiple retrievals produce a nested OR term.

Parametersosid.type.TypecandidateRecordTypea candidate record type
Returnosid.voting.records.CandidateQueryRecordthe candidate query record
ErrorsNULL_ARGUMENTcandidateRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTEDhasRecordType(candidateRecordType) is false
CompliancemandatoryThis method must be implemented.