Use BallotSelection para identificar as opções de voto em uma disputa, como
quando você vincula candidatos e partidos à contagem de votos.
Neste documento, discutimos BallotSelection e as subentidades dele:
BallotSelectionCandidateSelectionPartySelectionBallotMeasureSelectionSpecialBallotSelection
Selecione um dos seguintes tipos de feed para saber mais sobre como usar
BallotSelection e os elementos inerentes a ele com esse tipo de feed.
BallotSelection
BallotSelection é um elemento abstrato com três tipos que são usados com base no tipo de concurso:
CandidateSelection: use estetypedeBallotSelectionquando a disputa for para um ou mais candidatos. Ele vincula a seleção de cédulas aos elementosCandidate.PartySelection: use estetypedeBallotSelectionquando o tipo de disputa for para umaParty, como uma disputa proporcional de partidos.BallotMeasureSelection: use esse tipo deBallotSelectionpara representar possíveis seleções em umBallotMeasureContest.SpecialBallotSelection: esse tipo deBallotSelectioné usado para agregações de contagem de votos (por exemplo, agregar vários candidatos em "Outros") e diferentes tipos de não votos (ou seja, cédulas em branco, nulas ou inválidas e votos "nenhuma das opções acima").
Atributos
A tabela a seguir descreve os atributos de BallotSelection:
| Atributo | Obrigatório? | Tipo | Descrição |
|---|---|---|---|
objectId
|
Obrigatório | ID |
Identificador interno exclusivo usado por outros elementos para fazer referência a este elemento. |
Elementos
A tabela a seguir descreve os elementos de BallotSelection:
| Elemento | Multiplicidade | Tipo | Descrição |
|---|---|---|---|
SequenceOrder |
0 ou 1 | integer |
Especifica uma ordem padrão para a seleção de cédulas para fins de exibição. Se |
CandidateSelection
Use CandidateSelection para identificar as seleções de voto em uma disputa de candidatos, incluindo votos por escrito.
CandidateSelection herda os atributos e elementos de BallotSelection. Referências a vários elementos Candidate podem ser incluídas, se necessário. Por exemplo, quando a seleção da cédula é para uma chapa com vários candidatos.
Quando vários candidatos são referenciados para um tíquete, às vezes é importante preservar a ordem deles. Nesses casos, esperamos que o
aplicativo gerador liste as referências aos
elementos Candidate em
CandidateIds de acordo com o esquema de ordenação em vigor. Por exemplo, a ordem dos candidatos precisa corresponder à mesma ordem das referências de elementos Office em OfficeIds no Contest do tipo CandidateContest.
Se mais de um objeto Candidate for referenciado, eles serão apresentados ao usuário
na seguinte ordem:
- Todos os candidatos com
IsTopTicketdefinido comotruesão ordenados antes de todos os candidatos sem um valor deIsTopTicket. Eles, por sua vez, são ordenados antes de todos os candidatos comIsTopTicketdefinido comofalse. O ideal é que a seleção seja definida com um candidato sem um valorIsTopTicketou com um par de candidatos, e um deles tenhaIsTopTicketdefinido comotrue. Se essas condições não forem atendidas, o seguinte vai acontecer:- Todos os candidatos com
IsTopTicketdefinido comotruesão apresentados em uma ordem indefinida. - Todos os candidatos com
IsTopTicketausente são apresentados em uma ordem indefinida. - Todos os candidatos com
IsTopTicketdefinido comofalsesão apresentados em uma ordem indefinida.
- Todos os candidatos com
A sintaxe XML para CandidateSelection é a seguinte:
<BallotSelection xsi:type="CandidateSelection">.
Elementos
A tabela a seguir descreve os elementos de CandidateSelection:
| Elemento | Multiplicidade | Tipo | Descrição |
|---|---|---|---|
CandidateIds |
1 | IDREFS |
Identificadores exclusivos de um ou mais elementos
Candidate. Usado para associar um candidato à seleção de candidatos na cédula. Também é útil quando a seleção de cédulas é para vários candidatos, como uma chapa com presidente e vice-presidente selecionados juntos. |
EndorsementPartyIds |
0 ou mais | IDREFS |
Identificador exclusivo de duas ou mais entidades Party.
Isso representa um acordo em que os partidos políticos listam o mesmo candidato em uma cédula. |
IncludedInAggregation |
0 ou 1 | boolean |
Indica se as contagens de votos da seleção estão incluídas no
AggregateBallotSelection da disputa. Assumido como false se não for especificado.
|
IsWriteIn |
0 ou 1 | boolean |
Indica se o candidato é um voto por escrito. O valor padrão é
false. |
Exemplos
XML
<BallotSelection objectId="cs10861" xsi:type="CandidateSelection"> <CandidateIds>can10861a can10861b</CandidateIds> </BallotSelection>
JSON
"BallotSelection": [ { "@type": "CandidateSelection", "objectId": "cs10861", "CandidateIds": [ "can10861a", "can10861b" ] } ]
PartySelection
Use PartySelection para identificar seleções de cédulas que envolvem um partido, como
uma seleção de lista partidária na cédula.
PartySelection herda os atributos e elementos de BallotSelection. A sintaxe XML para PartySelection é a seguinte:
<BallotSelection xsi:type="PartySelection" ... />.
Elementos
A tabela a seguir descreve os elementos de PartySelection:
| Elemento | Multiplicidade | Tipo | Descrição |
|---|---|---|---|
IncludedInAggregation |
0 ou 1 | boolean |
Indica se as contagens de votos da seleção estão incluídas no
AggregateBallotSelection da disputa. Assumido como false se não for especificado.
|
PartyIds |
1 | IDREFS |
Identificador exclusivo de um ou mais elementos
Party. Usado para associar uma ou mais partes à seleção de partes. |
Exemplos
XML
<BallotSelection objectId="ps150" xsi:type="PartySelection"> <PartyIds>par100</PartyIds> </BallotSelection>
JSON
"BallotSelection": [ { "@type": "PartySelection", "objectId": "ps150", "PartyIds": [ "par100" ] } ]
BallotMeasureSelection
Use BallotMeasureSelection para identificar seleções de cédulas que envolvem uma medida eleitoral, como referendos.
BallotMeasureSelection herda os atributos e elementos de
BallotSelection. A sintaxe XML para BallotMeasureSelection é a seguinte:
<BallotSelection xsi:type="BallotMeasureSelection" ... />.
Elementos
A tabela a seguir descreve os elementos de BallotMeasureSelection:
| Elemento | Multiplicidade | Tipo | Descrição |
|---|---|---|---|
ExternalIdentifiers |
0 ou 1 | ExternalIdentifiers |
Associa um ID à seleção de referendo. Um identificador estável é obrigatório. |
Selection |
1 | InternationalizedText |
Fornece uma opção disponível para a cédula, como Yes
ou No. |
Exemplos
XML
<BallotSelection objectId="bms00" xsi:type="BallotMeasureSelection"> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>bmc0_yes</Value> </ExternalIdentifier> </ExternalIdentifiers> <Selection> <Text language="en">Yes</Text> </Selection> </BallotSelection>
JSON
"BallotSelection": [ { "@type": "BallotMeasureSelection", "objectId": "bms00", "ExternalIdentifiers": { "ExternalIdentifier" : [ { "Type": "other", "OtherType": "stable", "Value": "bmc0_yes" } ] }, "Selection": { "Text": [ { "value": "Yes", "language": "en" } ] } } ]
XML
<BallotSelection objectId="bms00" xsi:type="BallotMeasureSelection"> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>bmc0_yes</Value> </ExternalIdentifier> </ExternalIdentifiers> <Selection> <Text language="en">Yes</Text> </Selection> </BallotSelection>
JSON
"BallotSelection": [ { "@type": "BallotMeasureSelection", "objectId": "bms00", "ExternalIdentifiers": { "ExternalIdentifier" : [ { "Type": "other", "OtherType": "stable", "Value": "bmc0_yes" } ] }, "Selection": { "Text": [ { "value": "Yes", "language": "en" } ] } } ]
SpecialBallotSelection
Esse tipo de BallotSelection é usado para agregações de contagem de votos (por exemplo, agregar vários candidatos em "Outros") e diferentes tipos de não votos (ou seja, cédulas em branco, nulas ou inválidas e votos "nenhuma das opções acima").
SpecialBallotSelection não deve ser usado no subelemento BallotSelection
geral de Contest. Em vez disso, ele tem campos distintos em Contest,
ou seja, AggregateBallotSelection, BlankBallotSelection,
NoneOfTheAboveBallotSelection e NullBallotSelection. Consulte os
elementos Contest para mais
detalhes.
Elementos
A tabela a seguir descreve os elementos de SpecialBallotSelection:
| Elemento | Multiplicidade | Tipo | Descrição |
|---|---|---|---|
CountedInTotal |
0 ou 1 | boolean |
Se as contagens de votos da seleção de entidades são contabilizadas no total de votos considerados relevantes. Será true se não for especificado.
|
ExternalIdentifiers |
0 ou 1 | ExternalIdentifiers |
Associa um ID à seleção de referendo. Um identificador estável é obrigatório. |
Selection |
1 | InternationalizedText |
Fornece um nome para essa seleção de cédula, como "Outros" ou "Nenhuma das opções acima". |
Exemplos
XML
<AggregateBallotSelection objectId="selection3"> <Selection> <Text language="en">Other Candidates</Text> </Selection> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>selection3</Value> </ExternalIdentifier> </ExternalIdentifiers> </AggregateBallotSelection> <!-- Counts of ballots left blank --> <BlankBallotSelection objectId="selection4"> <Selection> <Text language="en">Blank ballots</Text> </Selection> <!-- These ballots count in the total and can affect majorities --> <CountedInTotal>true</CountedInTotal> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>selection4</Value> </ExternalIdentifier> </ExternalIdentifiers> </BlankBallotSelection> <!-- Votes for "None of the above" option on the ballot --> <NoneOfTheAboveBallotSelection objectId="selection5"> <!-- The NOTA selection optiona as it appears on the ballot, often "None of the above", "None", or "Uncommitted" --> <Selection> <Text language="en">None</Text> </Selection> <!-- These ballots count in the total and can affect majorities --> <CountedInTotal>true</CountedInTotal> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>selection5</Value> </ExternalIdentifier> </ExternalIdentifiers> </NoneOfTheAboveBallotSelection> <!-- Counts of null or spoiled ballots, i.e. ballots that have been marked in a way that the vote cannot be counted --> <NullBallotSelection objectId="selection5"> <!-- How these ballots are often called in a given country, often "null" or "spoiled" --> <Selection> <Text language="en">Spoiled ballots</Text> </Selection> <!-- These ballots do count in the total and are treated as the same as if this vote did not happen at all --> <CountedInTotal>false</CountedInTotal> <ExternalIdentifiers> <ExternalIdentifier> <Type>other</Type> <OtherType>stable</OtherType> <Value>selection5</Value> </ExternalIdentifier> </ExternalIdentifiers> </NullBallotSelection>
JSON
"AggregateBallotSelection": { "objectId": "selection3", "Selection": { "Text": { "@language": "en", "#text": "Other Candidates" } }, "ExternalIdentifiers": { "ExternalIdentifier": { "Type": "other", "OtherType": "stable", "Value": "selection3" } }, }, "BlankBallotSelection": { "objectId": "selection4", "Selection": { "Text": { "@language": "en", "#text": "Blank Ballots" } }, "CountedInTotal": true, "ExternalIdentifiers": { "ExternalIdentifier": { "Type": "other", "OtherType": "stable", "Value": "selection4" } } }, "NoneOfTheAboveBallotSelection": { "objectId": "selection5", "Selection": { "Text": { "@language": "en", "#text": "None" } }, "CountedInTotal": true, "ExternalIdentifiers": { "ExternalIdentifier": { "Type": "other", "OtherType": "stable", "Value": "selection5" } } }, "NullBallotSelection": { "objectId": "selection5", "Selection": { "Text": { "@language": "en", "#text": "Spoiled ballots" } }, "CountedInTotal": false, "ExternalIdentifiers": { "ExternalIdentifier": { "Type": "other", "OtherType": "stable", "Value": "selection5" } } }