Skip to content

Local authority list

This document explains the XML structure and its relations to the classes in Java. Provided below are the relations explained and an example structure.

The section titles represent the XML class that it is referring to, below that you will find the representing Java class with a link to the file.

Example

<EML>
    <TransactionId>1</TransactionId>
    <ManagingAuthority>
        <AuthorityIdentifier Id="0358">Aalsmeer</AuthorityIdentifier>
        <AuthorityAddress></AuthorityAddress>
    </ManagingAuthority>
    <kr:CreationDateTime>2021-03-18T03:17:09.476</kr:CreationDateTime>
    <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"></ds:CanonicalizationMethod>
    <Count>
        <EventIdentifier></EventIdentifier>
        <Election>

<!--            Election infromation-->
            <ElectionIdentifier Id="TK2021">
                <ElectionName>Tweede Kamer der Staten-Generaal 2021</ElectionName>
                <ElectionCategory>TK</ElectionCategory>
                <kr:ElectionSubcategory>TK</kr:ElectionSubcategory>
                <kr:ElectionDate>2021-03-17</kr:ElectionDate>
            </ElectionIdentifier>
            <Contests>
                <Contest>

<!--                    Contest information -->
                    <ContestIdentifier Id="10">
                        <ContestName>Haarlem</ContestName>
                    </ContestIdentifier>
                    <TotalVotes>
                        <Selection>

<!--                            Affiliation identifier (election party id) information about the party -->
                            <AffiliationIdentifier Id="1">
                                <RegisteredName>VVD</RegisteredName>
                            </AffiliationIdentifier>

<!--                            The total votes the party got -->
                            <ValidVotes>6301</ValidVotes>
                        </Selection>
                        <Selection>

<!--                            The candidate from the party in the array and the id from the candidate-->
                            <Candidate>
                                <CandidateIdentifier Id="1"></CandidateIdentifier>
                            </Candidate>

<!--                            The total votes that the candidate received -->
                            <ValidVotes>5546</ValidVotes>
                        </Selection>
                    </TotalVotes>
                </Contest>
            </Contests>
        </Election>
    </Count>
</EML>

EML

XML Example
<EML>
    <TransactionId>1</TransactionId>
</EML

Class used: LocalAuthorityList

the TransactionId is used for this class
Note: The Election, Contest and ManagingAuthority properties from this class come from other classes listed below.

Data field Class field
TransactionId [Value] transactionId [Property]

ManagingAuthority

    <ManagingAuthority>
        <AuthorityIdentifier Id="0358">
            Aalsmeer
        </AuthorityIdentifier>
    </ManagingAuthority>

Class used: ManagingAuthority

The Id and AuthorityIdentifier text are used for this class.

Data field Class field
Id [Attribute] id [Property]
AuthorityIdentifier [Value] name [Property]

ElectionIdentifier

XML Example
<ElectionIdentifier Id="TK2021">
    <ElectionName>Tweede Kamer der Staten-Generaal 2021</ElectionName>
    <ElectionCategory>TK</ElectionCategory>
    <kr:ElectionDate>2021-03-17</kr:ElectionDate>
</ElectionIdentifier>

Class used: Election

The Id, ElectionName, ElectionCategory and ElectionDate are used for this class.

Data field Class field
Id [Attribute] id [Property]
ElectionName [Value] name [Property]
ElectionCategory [Value] category [Property]
ElectionDate [Value] electionDate [Property]

ContestIdentifier

XML Example
<ContestIdentifier Id="10">
    <ContestName>Haarlem</ContestName>
</ContestIdentifier>

Class used: Contest

The Id and ContestName are used for this class.
Note: The parties property from this class come from other classes listed below.

Data field Class field
Id [Attribute] id [Property]
ContestName [Value] name [Property]

ElectionPartyWithVotes

XML Example
<AffiliationIdentifier Id="1">
    <RegisteredName>VVD</RegisteredName> 
</AffiliationIdentifier>

Class used: ElectionPartyWithVotes

The Id and RegisteredName are used for this class.
Note: the votes of the registered party from this class are come from other classes listed below

Data field Class field
Id [Attribute] id [Property]
RegisteredName [Value] name [Property]

Candidate

XML Example
<Candidate>
    <CandidateIdentifier Id="1"></CandidateIdentifier>
</Candidate>

Class used: Candidate

The CandidateIdentifier is used for this class.
Note: the rest off the class has been left empty because the XML doesn’t have any other information besides the candidate id

Data field Class field
CandidateIdentifier#Id [Attribute] id [Property]

TotalVotes

XML Example
    <ValidVotes>6301</ValidVotes>

Class used: TotalVotes

the ValidVotes are used in this class Note: depending on if it is the party or of it is an candidate it will be added to the parent of the ValidVotes

Data field Class field
ValidVotes [Attribute] Totalvotes [Property]