BallotSelection を使用して、候補者と政党を投票数にリンクする場合など、選挙の投票用紙の選択肢を特定します。
このドキュメントでは、BallotSelection とそのサブエンティティについて説明します。
BallotSelectionCandidateSelectionPartySelectionBallotMeasureSelectionSpecialBallotSelection
次のいずれかのフィードタイプを選択して、そのタイプのフィードで BallotSelection とその固有の要素を使用する方法の詳細をご覧ください。
BallotSelection
BallotSelection は抽象要素で、コンテストのタイプに応じて使用される 3 つのタイプがあります。
CandidateSelection: 候補者が 1 人以上いるコンテストの場合は、BallotSelectionのこのtypeを使用します。投票の選択をCandidate要素にリンクします。PartySelection: コンテスト タイプがParty(政党比例コンテストなど)の場合、BallotSelectionのこのtypeを使用します。BallotMeasureSelection: このタイプのBallotSelectionを使用して、BallotMeasureContestで選択可能な項目を表します。SpecialBallotSelection: このタイプのBallotSelectionは、投票数の集計(複数の候補者を「その他」に集計するなど)や、さまざまな種類の無効票(白票、無効票、棄権票、「上記に該当なし」票など)に使用されます。
属性
次の表に、BallotSelection の属性を示します。
| 属性 | 必須かどうか | 型 | 説明 |
|---|---|---|---|
objectId
|
必須 | ID |
他の要素がこの要素を参照するために使用する一意の内部識別子。 |
要素
次の表に、BallotSelection の要素を示します。
| 要素 | 重複 | タイプ | 説明 |
|---|---|---|---|
SequenceOrder |
0 または 1 | integer |
表示用に投票の選択のデフォルトの順序を指定します。 フィードに |
CandidateSelection
CandidateSelection を使用して、候補者コンテストの投票用紙の選択を特定します(手書きを含む)。
CandidateSelection は BallotSelection の属性と要素を継承します。必要に応じて、複数の Candidate 要素への参照を含めることができます。たとえば、投票用紙の選択が複数の候補者のチケットの場合などです。
チケットで複数の候補が参照される場合、候補の順序を保持することが重要になることがあります。このような場合、生成アプリケーションは、設定されている順序付けスキームに従って、CandidateIds 内の Candidate 要素への参照をリストアップすることが期待されます。たとえば、候補の順序は、CandidateContest 型の Contest の OfficeIds 内の Office 要素参照の順序と一致する必要があります。
複数の Candidate オブジェクトが参照されている場合は、次の順序でユーザーに提示されます。
IsTopTicketがtrueに設定されているすべての候補は、IsTopTicket値のないすべての候補よりも前に並べられます。これらの候補は、IsTopTicketがfalseに設定されているすべての候補よりも優先されます。理想的には、IsTopTicket値のない候補が 1 つ選択されているか、候補が 2 つあり、そのうちの 1 つのIsTopTicketがtrueに設定されている状態です。これらの条件が満たされない場合は、次のようになります。IsTopTicketがtrueに設定されているすべての候補は、未定義の順序で提示されます。IsTopTicketが存在しないすべての候補は、未定義の順序で提示されます。IsTopTicketがfalseに設定されているすべての候補は、未定義の順序で提示されます。
CandidateSelection の XML 構文は <BallotSelection xsi:type="CandidateSelection"> です。
要素
次の表に、CandidateSelection の要素を示します。
| 要素 | 重複 | タイプ | 説明 |
|---|---|---|---|
CandidateIds |
1 | IDREFS |
1 つ以上の Candidate 要素の一意の識別子。候補者を投票用紙の候補者選択に関連付けるために使用します。大統領と副大統領が一緒に選択されたチケットなど、複数の候補者が選択されている場合にも便利です。 |
EndorsementPartyIds |
0 以上 | IDREFS |
2 つ以上の Party エンティティの一意の識別子。これは、政党が同じ候補者を投票用紙に記載する取り決めを表します。 |
IncludedInAggregation |
0 または 1 | boolean |
選択の投票数がコンテストの AggregateBallotSelection に含まれるかどうか。指定しない場合は false とみなされます。
|
IsWriteIn |
0 または 1 | boolean |
候補者が手書きかどうかを示します。デフォルト値は false です。 |
例
XML
<BallotSelection objectId="cs10861" xsi:type="CandidateSelection"> <CandidateIds>can10861a can10861b</CandidateIds> </BallotSelection>
JSON
"BallotSelection": [ { "@type": "CandidateSelection", "objectId": "cs10861", "CandidateIds": [ "can10861a", "can10861b" ] } ]
PartySelection
PartySelection を使用して、政党を含む投票用紙の選択肢(投票用紙の政党リストの選択など)を特定します。
PartySelection は BallotSelection の属性と要素を継承します。PartySelection の XML 構文は <BallotSelection xsi:type="PartySelection" ... /> です。
要素
次の表に、PartySelection の要素を示します。
| 要素 | 重複 | タイプ | 説明 |
|---|---|---|---|
IncludedInAggregation |
0 または 1 | boolean |
選択の投票数がコンテストの AggregateBallotSelection に含まれるかどうか。指定しない場合は false とみなされます。
|
PartyIds |
1 | IDREFS |
1 つ以上の Party 要素の一意の識別子。1 つ以上の当事者を当事者選択に関連付けるために使用します。 |
例
XML
<BallotSelection objectId="ps150" xsi:type="PartySelection"> <PartyIds>par100</PartyIds> </BallotSelection>
JSON
"BallotSelection": [ { "@type": "PartySelection", "objectId": "ps150", "PartyIds": [ "par100" ] } ]
BallotMeasureSelection
BallotMeasureSelection を使用して、国民投票などの投票案を含む投票の選択肢を特定します。
BallotMeasureSelection は、BallotSelection の属性と要素を継承します。BallotMeasureSelection の XML 構文は <BallotSelection xsi:type="BallotMeasureSelection" ... /> です。
要素
次の表に、BallotMeasureSelection の要素を示します。
| 要素 | 重複 | タイプ | 説明 |
|---|---|---|---|
ExternalIdentifiers |
0 または 1 | ExternalIdentifiers |
ID を投票項目の選択肢に関連付けます。安定した識別子が必要です。 |
Selection |
1 | InternationalizedText |
投票の選択肢(Yes や No など)を提供します。 |
例
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
このタイプの BallotSelection は、投票数の集計(複数の候補を「その他」に集計するなど)や、さまざまな種類の無効票(白票、無効票、棄権票、「上記のいずれでもない」票など)に使用されます。
SpecialBallotSelection は Contest の一般的な BallotSelection サブ要素で使用すべきではなく、Contest に独自の個別のフィールド(AggregateBallotSelection、BlankBallotSelection、NoneOfTheAboveBallotSelection、NullBallotSelection)があります。詳しくは、Contest 要素をご覧ください。
要素
次の表に、SpecialBallotSelection の要素を示します。
| 要素 | 重複 | タイプ | 説明 |
|---|---|---|---|
CountedInTotal |
0 または 1 | boolean |
エンティティ選択の投票数が、注目すべき投票数の合計にカウントされるかどうか。指定しない場合は true とみなされます。
|
ExternalIdentifiers |
0 または 1 | ExternalIdentifiers |
ID を投票項目の選択肢に関連付けます。安定した識別子が必要です。 |
Selection |
1 | InternationalizedText |
この投票選択肢の名前(「その他」、「上記に該当しない」など)を指定します。 |
例
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" } } }