OSID Logo
OSID Specifications
voting package
Version 3.1.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.IdraceId a race Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT raceId is null
Compliancemandatory This method must be implemented.
MethodclearRaceIdTerms
Description

Clears the race Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsRaceQuery
Description

Tests if a RaceQuery is available for querying candidates.

Returnboolean true if a race query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetRaceQuery
Description

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

Returnosid.voting.RaceQuery the race query
ErrorsUNIMPLEMENTED supportsRaceQuery() is false
Complianceoptional This method must be implemented if supportsRaceQuery() is true.
MethodclearRaceTerms
Description

Clears the race terms.

Compliancemandatory This method must be implemented.
MethodmatchResourceId
Description

Sets the resource Id for this query.

Parametersosid.id.IdresourceId a resource Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT resourceId is null
Compliancemandatory This method must be implemented.
MethodclearResourceIdTerms
Description

Clears the resource Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsResourceQuery
Description

Tests if a ResourceQuery is available for querying candidates.

Returnboolean true if a resource query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetResourceQuery
Description

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

Returnosid.resource.ResourceQuery the resource query
ErrorsUNIMPLEMENTED supportsResourceQuery() is false
Complianceoptional This method must be implemented if supportsResourceQuery() is true.
MethodclearResourceTerms
Description

Clears the resource terms.

Compliancemandatory This method must be implemented.
MethodmatchVoteId
Description

Sets the vote Id for this query.

Parametersosid.id.IdvoteId the vote Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT voteId is null
Compliancemandatory This method must be implemented.
MethodclearVoteIdTerms
Description

Clears the vote Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsVoteQuery
Description

Tests if a VoteQuery is available.

Returnboolean true if a vote query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetVoteQuery
Description

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

Returnosid.voting.VoteQuery the vote query
ErrorsUNIMPLEMENTED supportsVoteQuery() is false
Complianceoptional This method must be implemented if supportsVoteQuery() is true.
MethodmatchAnyVote
Description

Matches candidates with any vote.

Parametersbooleanmatch true to match any vote, false to match candidates with no votes
Compliancemandatory This method must be implemented.
MethodclearVoteTerms
Description

Clears the vote terms.

Compliancemandatory This method must be implemented.
MethodmatchPollsId
Description

Sets the polls Id for this query.

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

Clears the polls Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsPollsQuery
Description

Tests if a PollsQuery is available.

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

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

Returnosid.voting.PollsQuery the polls query
ErrorsUNIMPLEMENTED supportsPollsQuery() is false
Complianceoptional This method must be implemented if supportsPollsQuery() is true.
MethodclearPollsTerms
Description

Clears the polls terms.

Compliancemandatory This 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.TypecandidateRecordType a candidate record type
Returnosid.voting.records.CandidateQueryRecord the candidate query record
ErrorsNULL_ARGUMENT candidateRecordType is null
OPERATION_FAILED unable to complete request
UNSUPPORTED hasRecordType(candidateRecordType) is false
Compliancemandatory This method must be implemented.