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

Clears the candidate Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsCandidateQuery
Description

Tests if a CandidateQuery is available for querying candidates.

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

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

Returnosid.voting.CandidateQuery the candidate query
ErrorsUNIMPLEMENTED supportsCandidateQuery() is false
Complianceoptional This method must be implemented if supportsCandidateQuery() is true.
MethodclearCandidateTerms
Description

Clears the candidate terms.

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

Clears the voter agent Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsVoterQuery
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.
MethodgetVoterQuery
Description

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

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

Clears the voter terms.

Compliancemandatory This method must be implemented.
MethodmatchVotingAgentId
Description

Sets the voting agent Id for this query.

Parametersosid.id.IdagentId a voting agent agent Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT agentId is null
Compliancemandatory This method must be implemented.
MethodclearVotingAgentIdTerms
Description

Clears the voting agent Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsVotingAgentQuery
Description

Tests if an AgentQuery is available for querying candidates.

Returnboolean true if a voting agent query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetVotingAgentQuery
Description

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

Returnosid.authentication.AgentQuery the agent query
ErrorsUNIMPLEMENTED supportsVotingAgentQuery() is false
Complianceoptional This method must be implemented if supportsVotingAgentQuery() is true.
MethodclearVotingAgentTerms
Description

Clears the voter terms.

Compliancemandatory This method must be implemented.
MethodmatchVotes
Description

Matches the number of votes within the given range inclusive.

Parametersintegerfrom start of range
integerto end of range
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT from is greater than to
Compliancemandatory This method must be implemented.
MethodclearVotesTerms
Description

Clears the votes terms.

Compliancemandatory This method must be implemented.
MethodmatchMinimumVotes
Description

Matches the number of minimum votes inclusive.

Parametersintegervotes the numbe rof votes
booleanmatch true for a positive match, false for a negative match
Compliancemandatory This method must be implemented.
MethodclearMinimumVotesTerms
Description

Clears the minimum votes terms.

Compliancemandatory This method must be implemented.
MethodmatchPollsId
Description

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

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

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

Parametersosid.type.TypevoteRecordType a vote query record type
Returnosid.voting.records.VoteQueryRecord the vote query record
ErrorsNULL_ARGUMENT voteRecordType is null
OPERATION_FAILED unable to complete request
UNSUPPORTED hasRecordType(voteRecordType) is false
Compliancemandatory This method must be implemented.