OSID Logo
OSID Specifications
voting package
Version 3.0.0
Interfaceosid.voting.VoteQuery
Implementsosid.OsidRelationshipQuery
Used Byosid.voting.CandidateQuery
osid.voting.VoteQuerySession
osid.voting.VoteSearchSession
osid.voting.VoteSmartPollsSession
osid.voting.rules.VoteEnablerQuery
osid.voting.rules.VoteEnablerSmartPollsSession
Description

This is the query for searching votes. Each method match request produces an AND term while multiple invocations of a method produces a nested OR .

MethodmatchCandidateId
Description

Sets the candidate Id for this query.

Parametersosid.id.IdcandidateIda candidate Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTcandidateId is null
CompliancemandatoryThis method must be implemented.
MethodclearCandidateIdTerms
Description

Clears the candidate Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsCandidateQuery
Description

Tests if a CandidateQuery is available for querying candidates.

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

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

Returnosid.voting.CandidateQuerythe candidate query
ErrorsUNIMPLEMENTEDsupportsCandidateQuery() is false
ComplianceoptionalThis method must be implemented if supportsCandidateQuery() is true .
MethodclearCandidateTerms
Description

Clears the candidate terms.

CompliancemandatoryThis method must be implemented.
MethodmatchVoterId
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.
MethodclearVoterIdTerms
Description

Clears the voter agent Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsVoterQuery
Description

Tests if a ResourceQuery is available for querying candidates.

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

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

Returnosid.resource.ResourceQuerythe resource query
ErrorsUNIMPLEMENTEDsupportsVoterQuery() is false
ComplianceoptionalThis method must be implemented if supportsVoterQuery() is true .
MethodclearVoterTerms
Description

Clears the voter terms.

CompliancemandatoryThis method must be implemented.
MethodmatchVotingAgentId
Description

Sets the voting agent Id for this query.

Parametersosid.id.IdagentIda voting agent agent Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTagentId is null
CompliancemandatoryThis method must be implemented.
MethodclearVotingAgentIdTerms
Description

Clears the voting agent Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsVotingAgentQuery
Description

Tests if an AgentQuery is available for querying candidates.

Returnbooleantrue if a voting agent query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetVotingAgentQuery
Description

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

Returnosid.authentication.AgentQuerythe agent query
ErrorsUNIMPLEMENTEDsupportsVotingAgentQuery() is false
ComplianceoptionalThis method must be implemented if supportsVotingAgentQuery() is true .
MethodclearVotingAgentTerms
Description

Clears the voter terms.

CompliancemandatoryThis method must be implemented.
MethodmatchVotes
Description

Matches the number of votes within the given range inclusive.

Parametersintegerfromstart of range
integertoend of range
booleanmatchtrue for a positive match, false for a negative match
ErrorsINVALID_ARGUMENTfrom is greater than to
CompliancemandatoryThis method must be implemented.
MethodclearVotesTerms
Description

Clears the votes terms.

CompliancemandatoryThis method must be implemented.
MethodmatchMinimumVotes
Description

Matches the number of minimum votes inclusive.

Parametersintegervotesthe numbe rof votes
booleanmatchtrue for a positive match, false for a negative match
CompliancemandatoryThis method must be implemented.
MethodclearMinimumVotesTerms
Description

Clears the minimum votes terms.

CompliancemandatoryThis method must be implemented.
MethodmatchPollsId
Description

Sets the polls Id for this query to match terms assigned to polls.

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.
MethodgetVoteQueryRecord
Description

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

Parametersosid.type.TypevoteRecordTypea vote query record type
Returnosid.voting.records.VoteQueryRecordthe vote query record
ErrorsNULL_ARGUMENTvoteRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTEDhasRecordType(voteRecordType) is false
CompliancemandatoryThis method must be implemented.