使用 ElectionReport
做為根實體。用於定義與報表狀態和格式及產生時間相關的項目。
ElectionReport
包含下列主要元素:
與 Election
相同,ElectionReport
會納入容器元素中的元素例項,但 Election
除外。如此一來,在 XML 檢視者和編輯器中操控執行個體檔案就變得輕鬆許多。
有時,請務必保留項目的特定排序配置,例如辦公室或政黨。在這類情況下,我們希望產生應用程式可以根據已開始進行的任何排序配置定義這些元素。
元素
下表列出 ElectionReport
的元素:
元素 | 多重性 | 類型 | 說明 |
---|---|---|---|
CommitteeCollection |
0 或 1 | 不適用 | Committee 定義的包裝函式元素。詳情請參閱「集合實體」一節。 |
Election |
0 或以上 | Election |
將選舉與報告建立關聯。 |
ExternalIdentifiers |
0 或 1 | ExternalIdentifiers |
將 ID 與報表建立關聯。 |
Format |
1 | ReportDetailLevel |
提供報表的詳細資料層級,例如是否為比賽摘要或初步結果。 |
GeneratedDate |
1 | dateTime |
識別選舉報告的產生日期和時間。 |
GpUnitCollection |
0 或 1 | 不適用 | GpUnit 定義的包裝函式元素。詳情請參閱「集合實體」一節。 |
Issuer |
1 | string |
檢舉核發機構的身分。 |
IssuerAbbreviation |
1 | string |
發卡機構的縮寫,例如所回報結果的州/省縮寫。 |
IsTest |
0 或 1 | boolean |
表示報表是否為測試報告。如果沒有這個元素,預設值為 false 。 |
Notes |
0 或 1 | string |
用於在報表中加入任意訊息。 |
OfficeCollection |
0 或 1 | 不適用 | Office 定義的包裝函式元素。詳情請參閱「集合實體」一節。 |
PartyCollection |
0 或 1 | 不適用 | Party 定義的包裝函式元素。詳情請參閱「集合實體」一節。 |
PersonCollection |
0 或 1 | 不適用 | Person 定義的包裝函式元素。詳情請參閱「集合實體」一節。 |
SequenceStart |
1 | integer |
報表依序列出的數字。此元素會與 SequenceEnd 搭配使用,做為讀取方式,例如:「1/1」、「1/2」或「2/2」。開頭為 1 。 |
SequenceEnd |
1 | integer |
報表序列的上限。舉例來說,如果只有一份報表,則為 1 ;如果序列中有兩份報表,則為 2 。 |
Status |
1 | ResultsStatus |
選舉報告的狀態,例如預選或非官方資料。 |
TestType |
0 或 1 | string |
測試類型的說明,例如預先選擇或邏輯和準確度。 |
VendorApplicationID |
1 | string |
產生選舉報告的供應商應用程式 ID。例如 X-EMS version 3.1.a 。 |
範例
XML
<ElectionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Election>…</Election> <GpUnitCollection> <GpUnit objectId="ru-gpu0">…</GpUnit> <GpUnit objectId="ru-gpu1">…</GpUnit> </GpUnitCollection> <OfficeCollection> <Office objectId="off0001a">…</Office> </OfficeCollection> <PartyCollection> <Party objectId="par001">…</Party> <Party objectId="par002">…</Party> </PartyCollection> <PersonCollection> <Person objectId="per001">…</Person> <Person objectId="per002">…</Person> </PersonCollection> <Issuer>Example Data Provider</Issuer> <IssuerAbbreviation>EDP</IssuerAbbreviation> <Format>summary-contest</Format> <GeneratedDate>2013-11-05T14:25:28</GeneratedDate> <Status>unofficial-partial</Status> <VendorApplicationId>Hand-Generated v0.1</VendorApplicationId> <SequenceStart>1</SequenceStart> <SequenceEnd>1</SequenceEnd> </ElectionReport>
JSON
{ "@type": "ElectionReport", "Election": [ ... ], "GpUnitCollection": { "GpUnit": [ {...}, {...} ] }, "OfficeCollection": { "Office": [ { "objectId": "off0001a", ... } ] }, "PartyCollection": { "Party": [ { "objectId": "par001", ... }, { "objectId": "par002", ... } ] }, "PersonCollection": { "Person": [ { "objectId": "per001", ... }, { "objectId": "per002", ... } ] }, "Issuer": "Example Data Provider", "IssuerAbbreviation": "EDP", "Format": "summary-contest", 'GeneratedDate": "2013-11-05T14:25:28", "Status": "unofficial-partial", "VendorApplicationId": "Hand-Generated v0.1", "SequenceStart": 1, "SequenceEnd": 1 }